diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5a4de1..d7ca62a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,6 +80,41 @@ jobs: - name: Check binary exists run: deno_foo -V + test-setup-cache: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + + - name: Setup Deno + uses: ./ + with: + cache: true + cache-hash: ${{ hashFiles('**/deno.lock') }} + + - name: Download dependencies for cache + run: deno install --global --no-config npm:cowsay@1.6.0 + + test-cache: + needs: test-setup-cache + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + + - name: Setup Deno + uses: ./ + with: + cache: true + cache-hash: ${{ hashFiles('**/deno.lock') }} + + - name: Run with cached dependencies + run: deno run --cached-only --no-config -RE npm:cowsay@1.6.0 "It works!" + lint: runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 4085bee..3b77bc8 100644 --- a/README.md +++ b/README.md @@ -141,3 +141,23 @@ number. - run: echo "Deno version is ${{ steps.deno.outputs.deno-version }}" ``` + +### Caching dependencies downloaded by Deno automatically + +Dependencies installed by Deno can be cached automatically, which is similar to +the [`cache` option in `setup-node`](https://github.com/actions/setup-node). + +To enable the cache, use `cache: true`. It's recommended to also add the +`cache-hash` property, to scope caches based on lockfile changes. + +```yaml +- uses: denoland/setup-deno@v2 + with: + cache: true + cache-hash: ${{ hashFiles('**/deno.lock') }} +``` + +> [!WARNING] +> If an environment variable `DENO_DIR` is set for steps that run/download +> dependencies, then `DENO_DIR` must also be set for the `denoland/setup-deno` +> action, for the caching to work as intended. diff --git a/action.yml b/action.yml index 3d03b46..75a3aab 100644 --- a/action.yml +++ b/action.yml @@ -13,7 +13,14 @@ inputs: deno-binary-name: description: The name to use for the binary. default: "deno" + cache: + description: Cache downloaded modules & packages automatically in GitHub Actions cache. + default: "false" + cache-hash: + description: A hash used as part of the cache key. Use e.g. `$\{{ hashFiles('**/deno.lock') }}` to cache based on the lockfile contents. outputs: + cache-hit: + description: A boolean indicating whether the cache was hit. deno-version: description: "The Deno version that was installed." release-channel: @@ -21,3 +28,5 @@ outputs: runs: using: "node20" main: "dist/main.mjs" + post: "dist/post.mjs" + post-if: always() diff --git a/deno.json b/deno.json index b6047c9..fc6019e 100644 --- a/deno.json +++ b/deno.json @@ -14,6 +14,7 @@ "build": "deno run -A scripts/build.ts" }, "imports": { + "@actions/cache": "npm:@actions/cache@^4.0.3", "@actions/core": "npm:@actions/core@^1.11.1", "@actions/tool-cache": "npm:@actions/tool-cache@^2.0.2", "@types/node": "npm:@types/node@^22.15.0", diff --git a/deno.lock b/deno.lock index 8eb2608..edb3f25 100644 --- a/deno.lock +++ b/deno.lock @@ -1,6 +1,7 @@ { "version": "5", "specifiers": { + "npm:@actions/cache@^4.0.3": "4.0.3", "npm:@actions/core@^1.11.1": "1.11.1", "npm:@actions/tool-cache@^2.0.2": "2.0.2", "npm:@types/node@*": "22.15.15", @@ -11,6 +12,21 @@ "npm:undici@^7.8.0": "7.9.0" }, "npm": { + "@actions/cache@4.0.3": { + "integrity": "sha512-SvrqFtYJ7I48A/uXNkoJrnukx5weQv1fGquhs3+4nkByZThBH109KTIqj5x/cGV7JGNvb8dLPVywUOqX1fjiXg==", + "dependencies": [ + "@actions/core", + "@actions/exec", + "@actions/glob", + "@actions/http-client", + "@actions/io", + "@azure/abort-controller@1.1.0", + "@azure/ms-rest-js", + "@azure/storage-blob", + "@protobuf-ts/plugin", + "semver@6.3.1" + ] + }, "@actions/core@1.11.1": { "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", "dependencies": [ @@ -24,6 +40,13 @@ "@actions/io" ] }, + "@actions/glob@0.1.2": { + "integrity": "sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==", + "dependencies": [ + "@actions/core", + "minimatch" + ] + }, "@actions/http-client@2.2.3": { "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", "dependencies": [ @@ -44,6 +67,132 @@ "semver@6.3.1" ] }, + "@azure/abort-controller@1.1.0": { + "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", + "dependencies": [ + "tslib@2.8.1" + ] + }, + "@azure/abort-controller@2.1.2": { + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "dependencies": [ + "tslib@2.8.1" + ] + }, + "@azure/core-auth@1.9.0": { + "integrity": "sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==", + "dependencies": [ + "@azure/abort-controller@2.1.2", + "@azure/core-util", + "tslib@2.8.1" + ] + }, + "@azure/core-client@1.9.4": { + "integrity": "sha512-f7IxTD15Qdux30s2qFARH+JxgwxWLG2Rlr4oSkPGuLWm+1p5y1+C04XGLA0vmX6EtqfutmjvpNmAfgwVIS5hpw==", + "dependencies": [ + "@azure/abort-controller@2.1.2", + "@azure/core-auth", + "@azure/core-rest-pipeline", + "@azure/core-tracing", + "@azure/core-util", + "@azure/logger", + "tslib@2.8.1" + ] + }, + "@azure/core-http-compat@2.3.0": { + "integrity": "sha512-qLQujmUypBBG0gxHd0j6/Jdmul6ttl24c8WGiLXIk7IHXdBlfoBqW27hyz3Xn6xbfdyVSarl1Ttbk0AwnZBYCw==", + "dependencies": [ + "@azure/abort-controller@2.1.2", + "@azure/core-client", + "@azure/core-rest-pipeline" + ] + }, + "@azure/core-lro@2.7.2": { + "integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==", + "dependencies": [ + "@azure/abort-controller@2.1.2", + "@azure/core-util", + "@azure/logger", + "tslib@2.8.1" + ] + }, + "@azure/core-paging@1.6.2": { + "integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==", + "dependencies": [ + "tslib@2.8.1" + ] + }, + "@azure/core-rest-pipeline@1.20.0": { + "integrity": "sha512-ASoP8uqZBS3H/8N8at/XwFr6vYrRP3syTK0EUjDXQy0Y1/AUS+QeIRThKmTNJO2RggvBBxaXDPM7YoIwDGeA0g==", + "dependencies": [ + "@azure/abort-controller@2.1.2", + "@azure/core-auth", + "@azure/core-tracing", + "@azure/core-util", + "@azure/logger", + "@typespec/ts-http-runtime", + "tslib@2.8.1" + ] + }, + "@azure/core-tracing@1.2.0": { + "integrity": "sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==", + "dependencies": [ + "tslib@2.8.1" + ] + }, + "@azure/core-util@1.12.0": { + "integrity": "sha512-13IyjTQgABPARvG90+N2dXpC+hwp466XCdQXPCRlbWHgd3SJd5Q1VvaBGv6k1BIa4MQm6hAF1UBU1m8QUxV8sQ==", + "dependencies": [ + "@azure/abort-controller@2.1.2", + "@typespec/ts-http-runtime", + "tslib@2.8.1" + ] + }, + "@azure/core-xml@1.4.5": { + "integrity": "sha512-gT4H8mTaSXRz7eGTuQyq1aIJnJqeXzpOe9Ay7Z3FrCouer14CbV3VzjnJrNrQfbBpGBLO9oy8BmrY75A0p53cA==", + "dependencies": [ + "fast-xml-parser", + "tslib@2.8.1" + ] + }, + "@azure/logger@1.2.0": { + "integrity": "sha512-0hKEzLhpw+ZTAfNJyRrn6s+V0nDWzXk9OjBr2TiGIu0OfMr5s2V4FpKLTAK3Ca5r5OKLbf4hkOGDPyiRjie/jA==", + "dependencies": [ + "@typespec/ts-http-runtime", + "tslib@2.8.1" + ] + }, + "@azure/ms-rest-js@2.7.0": { + "integrity": "sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==", + "dependencies": [ + "@azure/core-auth", + "abort-controller", + "form-data", + "node-fetch", + "tslib@1.14.1", + "tunnel", + "uuid", + "xml2js" + ] + }, + "@azure/storage-blob@12.27.0": { + "integrity": "sha512-IQjj9RIzAKatmNca3D6bT0qJ+Pkox1WZGOg2esJF2YLHb45pQKOwGPIAV+w3rfgkj7zV3RMxpn/c6iftzSOZJQ==", + "dependencies": [ + "@azure/abort-controller@2.1.2", + "@azure/core-auth", + "@azure/core-client", + "@azure/core-http-compat", + "@azure/core-lro", + "@azure/core-paging", + "@azure/core-rest-pipeline", + "@azure/core-tracing", + "@azure/core-util", + "@azure/core-xml", + "@azure/logger", + "events", + "tslib@2.8.1" + ] + }, "@babel/generator@7.27.1": { "integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==", "dependencies": [ @@ -78,19 +227,19 @@ "integrity": "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==", "dependencies": [ "@emnapi/wasi-threads", - "tslib" + "tslib@2.8.1" ] }, "@emnapi/runtime@1.4.3": { "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==", "dependencies": [ - "tslib" + "tslib@2.8.1" ] }, "@emnapi/wasi-threads@1.0.2": { "integrity": "sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==", "dependencies": [ - "tslib" + "tslib@2.8.1" ] }, "@fastify/busboy@2.1.1": { @@ -250,6 +399,37 @@ "os": ["win32"], "cpu": ["x64"] }, + "@protobuf-ts/plugin-framework@2.10.0": { + "integrity": "sha512-EuW9irbt+w7Ml1CaAxK6xyl7pSuWVbNy0rsChxJEthMrAVTN5EPdJ3whNWvsRBa+HwRImEl8KHNnRoq/vGOHbg==", + "dependencies": [ + "@protobuf-ts/runtime", + "typescript" + ] + }, + "@protobuf-ts/plugin@2.10.0": { + "integrity": "sha512-iMX4C4TVfMNRLn2msK0cVg5jmizjtu5FYiy8EK5Lg6EgyR9TVHeK2rzmufWKYM2Pcg1jSwC0cFcXHQnCoeFxUg==", + "dependencies": [ + "@protobuf-ts/plugin-framework", + "@protobuf-ts/protoc", + "@protobuf-ts/runtime", + "@protobuf-ts/runtime-rpc", + "typescript" + ], + "bin": true + }, + "@protobuf-ts/protoc@2.10.0": { + "integrity": "sha512-S4BtGBh22+uL5E6qLVxV0QNY6tiLVB8QL7RIkvo+KYknipZfSNwubdKy5CPkrwVXzJn4s3cx7bKx1w6BxkBIPg==", + "bin": true + }, + "@protobuf-ts/runtime-rpc@2.10.0": { + "integrity": "sha512-8CS/XPv3+pMK4v8UKhtCdvbS4h9l7aqlteKdRt0/UbIKZ8n0qHj6hX8cBhz2ngvohxCOS0N08zPr9aCLBNhW3Q==", + "dependencies": [ + "@protobuf-ts/runtime" + ] + }, + "@protobuf-ts/runtime@2.10.0": { + "integrity": "sha512-ypYwGg9Pn3W/2lZ7/HW60hONGuSdzphvOY8Dq7LeNttymDe0y3LaTUUMRpuGqOT6FfrWEMnfQbyqU8AAreo8wA==" + }, "@quansync/fs@0.1.3": { "integrity": "sha512-G0OnZbMWEs5LhDyqy2UL17vGhSVHkQIfVojMtEWVenvj0V5S84VBgy86kJIuNsGDp2p7sTKlpSIpBUWdC35OKg==", "dependencies": [ @@ -321,7 +501,7 @@ "@tybys/wasm-util@0.9.0": { "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", "dependencies": [ - "tslib" + "tslib@2.8.1" ] }, "@types/node@22.15.15": { @@ -339,16 +519,33 @@ "@types/semver@7.7.0": { "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==" }, + "@typespec/ts-http-runtime@0.2.2": { + "integrity": "sha512-Gz/Sm64+Sq/vklJu1tt9t+4R2lvnud8NbTD/ZfpZtMiUX7YeVpCA8j6NSW8ptwcoLL+NmYANwqP8DV0q/bwl2w==", + "dependencies": [ + "http-proxy-agent", + "https-proxy-agent", + "tslib@2.8.1" + ] + }, "@valibot/to-json-schema@1.0.0_valibot@1.0.0": { "integrity": "sha512-/9crJgPptVsGCL6X+JPDQyaJwkalSZ/52WuF8DiRUxJgcmpNdzYRfZ+gqMEP8W3CTVfuMWPqqvIgfwJ97f9Etw==", "dependencies": [ "valibot" ] }, + "abort-controller@3.0.0": { + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dependencies": [ + "event-target-shim" + ] + }, "acorn@8.14.1": { "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "bin": true }, + "agent-base@7.1.3": { + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==" + }, "ansis@3.17.0": { "integrity": "sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==" }, @@ -359,15 +556,44 @@ "pathe" ] }, + "asynckit@0.4.0": { + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion@1.1.11": { + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": [ + "balanced-match", + "concat-map" + ] + }, "cac@6.7.14": { "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==" }, + "call-bind-apply-helpers@1.0.2": { + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dependencies": [ + "es-errors", + "function-bind" + ] + }, "chokidar@4.0.3": { "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dependencies": [ "readdirp" ] }, + "combined-stream@1.0.8": { + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": [ + "delayed-stream" + ] + }, + "concat-map@0.0.1": { + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, "consola@3.4.2": { "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==" }, @@ -380,6 +606,9 @@ "defu@6.1.4": { "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==" }, + "delayed-stream@1.0.0": { + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, "detect-libc@2.0.4": { "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==" }, @@ -393,9 +622,51 @@ "pathe" ] }, + "dunder-proto@1.0.1": { + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": [ + "call-bind-apply-helpers", + "es-errors", + "gopd" + ] + }, "empathic@1.1.0": { "integrity": "sha512-rsPft6CK3eHtrlp9Y5ALBb+hfK+DWnA4WFebbazxjWyx8vSm3rZeoM3z9irsjcqO3PYRzlfv27XIB4tz2DV7RA==" }, + "es-define-property@1.0.1": { + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" + }, + "es-errors@1.3.0": { + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, + "es-object-atoms@1.1.1": { + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dependencies": [ + "es-errors" + ] + }, + "es-set-tostringtag@2.1.0": { + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dependencies": [ + "es-errors", + "get-intrinsic", + "has-tostringtag", + "hasown" + ] + }, + "event-target-shim@5.0.1": { + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, + "events@3.3.0": { + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, + "fast-xml-parser@5.2.3": { + "integrity": "sha512-OdCYfRqfpuLUFonTNjvd30rCBZUneHpSQkCqfaeWQ9qrKcl6XlWeDBNVwGb+INAIxRshuN2jF+BE0L6gbBO2mw==", + "dependencies": [ + "strnum" + ], + "bin": true + }, "fdir@6.4.4_picomatch@4.0.2": { "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", "dependencies": [ @@ -405,15 +676,82 @@ "picomatch" ] }, + "form-data@2.5.3": { + "integrity": "sha512-XHIrMD0NpDrNM/Ckf7XJiBbLl57KEhT3+i3yY+eWm+cqYZJQTZrKo8Y8AWKnuV5GT4scfuUGt9LzNoIx3dU1nQ==", + "dependencies": [ + "asynckit", + "combined-stream", + "es-set-tostringtag", + "mime-types", + "safe-buffer" + ] + }, + "function-bind@1.1.2": { + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + }, + "get-intrinsic@1.3.0": { + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dependencies": [ + "call-bind-apply-helpers", + "es-define-property", + "es-errors", + "es-object-atoms", + "function-bind", + "get-proto", + "gopd", + "has-symbols", + "hasown", + "math-intrinsics" + ] + }, + "get-proto@1.0.1": { + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dependencies": [ + "dunder-proto", + "es-object-atoms" + ] + }, "get-tsconfig@4.10.0": { "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", "dependencies": [ "resolve-pkg-maps" ] }, + "gopd@1.2.0": { + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" + }, + "has-symbols@1.1.0": { + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" + }, + "has-tostringtag@1.0.2": { + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": [ + "has-symbols" + ] + }, + "hasown@2.0.2": { + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": [ + "function-bind" + ] + }, "hookable@5.5.3": { "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==" }, + "http-proxy-agent@7.0.2": { + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dependencies": [ + "agent-base", + "debug" + ] + }, + "https-proxy-agent@7.0.6": { + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dependencies": [ + "agent-base", + "debug" + ] + }, "jiti@2.4.2": { "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", "bin": true @@ -496,9 +834,33 @@ "@jridgewell/sourcemap-codec" ] }, + "math-intrinsics@1.1.0": { + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" + }, + "mime-db@1.52.0": { + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types@2.1.35": { + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": [ + "mime-db" + ] + }, + "minimatch@3.1.2": { + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": [ + "brace-expansion" + ] + }, "ms@2.1.3": { "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node-fetch@2.7.0": { + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": [ + "whatwg-url" + ] + }, "oxc-resolver@9.0.2": { "integrity": "sha512-w838ygc1p7rF+7+h5vR9A+Y9Fc4imy6C3xPthCMkdFUgFvUWkmABeNB8RBDQ6+afk44Q60/UMMQ+gfDUW99fBA==", "optionalDependencies": [ @@ -585,6 +947,12 @@ ], "bin": true }, + "safe-buffer@5.2.1": { + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "sax@1.4.1": { + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" + }, "semver@6.3.1": { "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": true @@ -593,6 +961,9 @@ "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "bin": true }, + "strnum@2.1.0": { + "integrity": "sha512-w0S//9BqZZGw0L0Y8uLSelFGnDJgTyyNQLmSlPnVz43zPAiqu3w4t8J8sDqqANOGeZIZ/9jWuPguYcEnsoHv4A==" + }, "tinyexec@1.0.1": { "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==" }, @@ -603,6 +974,9 @@ "picomatch" ] }, + "tr46@0.0.3": { + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "tsdown@0.10.1_rolldown@1.0.0-beta.8-commit.852c603__valibot@1.0.0": { "integrity": "sha512-NT1XSUDweBpgpiZb3Upfy3DBwAbn8W0aXo3Ecp4kHozTLewWa0UkWUP6nRTvSj2c0NcD/BLLuf0HthqMpbEdkA==", "dependencies": [ @@ -624,12 +998,19 @@ ], "bin": true }, + "tslib@1.14.1": { + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "tslib@2.8.1": { "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "tunnel@0.0.6": { "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, + "typescript@3.9.10": { + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "bin": true + }, "unconfig@7.3.2": { "integrity": "sha512-nqG5NNL2wFVGZ0NA/aCFw0oJ2pxSf1lwg4Z5ill8wd7K4KX/rQbHlwbh+bjctXL5Ly1xtzHenHGOK0b+lG6JVg==", "dependencies": [ @@ -667,15 +1048,40 @@ "webpack-virtual-modules" ] }, + "uuid@8.3.2": { + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": true + }, "valibot@1.0.0": { "integrity": "sha512-1Hc0ihzWxBar6NGeZv7fPLY0QuxFMyxwYR2sF1Blu7Wq7EnremwY2W02tit2ij2VJT8HcSkHAQqmFfl77f73Yw==" }, + "webidl-conversions@3.0.1": { + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, "webpack-virtual-modules@0.6.2": { "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==" + }, + "whatwg-url@5.0.0": { + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": [ + "tr46", + "webidl-conversions" + ] + }, + "xml2js@0.5.0": { + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dependencies": [ + "sax", + "xmlbuilder" + ] + }, + "xmlbuilder@11.0.1": { + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" } }, "workspace": { "dependencies": [ + "npm:@actions/cache@^4.0.3", "npm:@actions/core@^1.11.1", "npm:@actions/tool-cache@^2.0.2", "npm:@types/node@^22.15.0", diff --git a/dist/cache-ByPW8-iO.mjs b/dist/cache-ByPW8-iO.mjs new file mode 100644 index 0000000..6feff8d --- /dev/null +++ b/dist/cache-ByPW8-iO.mjs @@ -0,0 +1,4 @@ +import "./semver-DmxAwBYV.mjs"; +import { restoreCache, saveCache } from "./cache-DzONlZ-I.mjs"; + +export { restoreCache }; \ No newline at end of file diff --git a/dist/cache-DzONlZ-I.mjs b/dist/cache-DzONlZ-I.mjs new file mode 100644 index 0000000..cea3105 --- /dev/null +++ b/dist/cache-DzONlZ-I.mjs @@ -0,0 +1,43177 @@ +import { __commonJS, __require, __toESM, import_core, require_auth, require_core, require_exec, require_io, require_lib, require_semver } from "./semver-DmxAwBYV.mjs"; +import process$1 from "node:process"; + +//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports) { + var __createBinding$18 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m$1[k]; + } + }); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$17 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$18 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$18(result, mod, k); + } + __setModuleDefault$17(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getOptions = void 0; + const core$8 = __importStar$18(require_core()); + /** + * Returns a copy with defaults filled in. + */ + function getOptions(copy$1) { + const result = { + followSymbolicLinks: true, + implicitDescendants: true, + omitBrokenSymbolicLinks: true + }; + if (copy$1) { + if (typeof copy$1.followSymbolicLinks === "boolean") { + result.followSymbolicLinks = copy$1.followSymbolicLinks; + core$8.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + } + if (typeof copy$1.implicitDescendants === "boolean") { + result.implicitDescendants = copy$1.implicitDescendants; + core$8.debug(`implicitDescendants '${result.implicitDescendants}'`); + } + if (typeof copy$1.omitBrokenSymbolicLinks === "boolean") { + result.omitBrokenSymbolicLinks = copy$1.omitBrokenSymbolicLinks; + core$8.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + } + } + return result; + } + exports.getOptions = getOptions; +} }); + +//#endregion +//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path-helper.js +var require_internal_path_helper = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path-helper.js"(exports) { + var __createBinding$17 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m$1[k]; + } + }); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$16 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$17 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$17(result, mod, k); + } + __setModuleDefault$16(result, mod); + return result; + }; + var __importDefault$6 = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0; + const path$7 = __importStar$17(__require("path")); + const assert_1$8 = __importDefault$6(__require("assert")); + const IS_WINDOWS$5 = process.platform === "win32"; + /** + * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths. + * + * For example, on Linux/macOS: + * - `/ => /` + * - `/hello => /` + * + * For example, on Windows: + * - `C:\ => C:\` + * - `C:\hello => C:\` + * - `C: => C:` + * - `C:hello => C:` + * - `\ => \` + * - `\hello => \` + * - `\\hello => \\hello` + * - `\\hello\world => \\hello\world` + */ + function dirname(p) { + p = safeTrimTrailingSeparator(p); + if (IS_WINDOWS$5 && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) return p; + let result = path$7.dirname(p); + if (IS_WINDOWS$5 && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) result = safeTrimTrailingSeparator(result); + return result; + } + exports.dirname = dirname; + /** + * Roots the path if not already rooted. On Windows, relative roots like `\` + * or `C:` are expanded based on the current working directory. + */ + function ensureAbsoluteRoot(root, itemPath) { + assert_1$8.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + assert_1$8.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + if (hasAbsoluteRoot(itemPath)) return itemPath; + if (IS_WINDOWS$5) { + if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { + let cwd = process.cwd(); + assert_1$8.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) if (itemPath.length === 2) return `${itemPath[0]}:\\${cwd.substr(3)}`; + else { + if (!cwd.endsWith("\\")) cwd += "\\"; + return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; + } + else return `${itemPath[0]}:\\${itemPath.substr(2)}`; + } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { + const cwd = process.cwd(); + assert_1$8.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + return `${cwd[0]}:\\${itemPath.substr(1)}`; + } + } + assert_1$8.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + if (root.endsWith("/") || IS_WINDOWS$5 && root.endsWith("\\")) {} else root += path$7.sep; + return root + itemPath; + } + exports.ensureAbsoluteRoot = ensureAbsoluteRoot; + /** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\\hello\share` and `C:\hello` (and using alternate separator). + */ + function hasAbsoluteRoot(itemPath) { + assert_1$8.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + itemPath = normalizeSeparators(itemPath); + if (IS_WINDOWS$5) return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); + return itemPath.startsWith("/"); + } + exports.hasAbsoluteRoot = hasAbsoluteRoot; + /** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). + */ + function hasRoot(itemPath) { + assert_1$8.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + itemPath = normalizeSeparators(itemPath); + if (IS_WINDOWS$5) return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); + return itemPath.startsWith("/"); + } + exports.hasRoot = hasRoot; + /** + * Removes redundant slashes and converts `/` to `\` on Windows + */ + function normalizeSeparators(p) { + p = p || ""; + if (IS_WINDOWS$5) { + p = p.replace(/\//g, "\\"); + const isUnc = /^\\\\+[^\\]/.test(p); + return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + exports.normalizeSeparators = normalizeSeparators; + /** + * Normalizes the path separators and trims the trailing separator (when safe). + * For example, `/foo/ => /foo` but `/ => /` + */ + function safeTrimTrailingSeparator(p) { + if (!p) return ""; + p = normalizeSeparators(p); + if (!p.endsWith(path$7.sep)) return p; + if (p === path$7.sep) return p; + if (IS_WINDOWS$5 && /^[A-Z]:\\$/i.test(p)) return p; + return p.substr(0, p.length - 1); + } + exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; +} }); + +//#endregion +//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-match-kind.js +var require_internal_match_kind = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-match-kind.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MatchKind = void 0; + /** + * Indicates whether a pattern matches a path + */ + var MatchKind; + (function(MatchKind$1) { + /** Not matched */ + MatchKind$1[MatchKind$1["None"] = 0] = "None"; + /** Matched if the path is a directory */ + MatchKind$1[MatchKind$1["Directory"] = 1] = "Directory"; + /** Matched if the path is a regular file */ + MatchKind$1[MatchKind$1["File"] = 2] = "File"; + /** Matched */ + MatchKind$1[MatchKind$1["All"] = 3] = "All"; + })(MatchKind = exports.MatchKind || (exports.MatchKind = {})); +} }); + +//#endregion +//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern-helper.js +var require_internal_pattern_helper = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports) { + var __createBinding$16 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m$1[k]; + } + }); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$15 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$16 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$16(result, mod, k); + } + __setModuleDefault$15(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.partialMatch = exports.match = exports.getSearchPaths = void 0; + const pathHelper$2 = __importStar$16(require_internal_path_helper()); + const internal_match_kind_1$2 = require_internal_match_kind(); + const IS_WINDOWS$4 = process.platform === "win32"; + /** + * Given an array of patterns, returns an array of paths to search. + * Duplicates and paths under other included paths are filtered out. + */ + function getSearchPaths(patterns) { + patterns = patterns.filter((x) => !x.negate); + const searchPathMap = {}; + for (const pattern of patterns) { + const key = IS_WINDOWS$4 ? pattern.searchPath.toUpperCase() : pattern.searchPath; + searchPathMap[key] = "candidate"; + } + const result = []; + for (const pattern of patterns) { + const key = IS_WINDOWS$4 ? pattern.searchPath.toUpperCase() : pattern.searchPath; + if (searchPathMap[key] === "included") continue; + let foundAncestor = false; + let tempKey = key; + let parent = pathHelper$2.dirname(tempKey); + while (parent !== tempKey) { + if (searchPathMap[parent]) { + foundAncestor = true; + break; + } + tempKey = parent; + parent = pathHelper$2.dirname(tempKey); + } + if (!foundAncestor) { + result.push(pattern.searchPath); + searchPathMap[key] = "included"; + } + } + return result; + } + exports.getSearchPaths = getSearchPaths; + /** + * Matches the patterns against the path + */ + function match(patterns, itemPath) { + let result = internal_match_kind_1$2.MatchKind.None; + for (const pattern of patterns) if (pattern.negate) result &= ~pattern.match(itemPath); + else result |= pattern.match(itemPath); + return result; + } + exports.match = match; + /** + * Checks whether to descend further into the directory + */ + function partialMatch(patterns, itemPath) { + return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); + } + exports.partialMatch = partialMatch; +} }); + +//#endregion +//#region node_modules/.deno/concat-map@0.0.1/node_modules/concat-map/index.js +var require_concat_map = __commonJS({ "node_modules/.deno/concat-map@0.0.1/node_modules/concat-map/index.js"(exports, module) { + module.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; +} }); + +//#endregion +//#region node_modules/.deno/balanced-match@1.0.2/node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ "node_modules/.deno/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module) { + module.exports = balanced$1; + function balanced$1(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r = range$1(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str) { + var m$1 = str.match(reg); + return m$1 ? m$1[0] : null; + } + balanced$1.range = range$1; + function range$1(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) return [ai, bi]; + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) result = [begs.pop(), bi]; + else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) result = [left, right]; + } + return result; + } +} }); + +//#endregion +//#region node_modules/.deno/brace-expansion@1.1.11/node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ "node_modules/.deno/brace-expansion@1.1.11/node_modules/brace-expansion/index.js"(exports, module) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) return [""]; + var parts = []; + var m$1 = balanced("{", "}", str); + if (!m$1) return str.split(","); + var pre = m$1.pre; + var body$1 = m$1.body; + var post = m$1.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body$1 + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str) { + if (!str) return []; + if (str.substr(0, 2) === "{}") str = "\\{\\}" + str.substr(2); + return expand$1(escapeBraces(str), true).map(unescapeBraces); + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y$1) { + return i <= y$1; + } + function gte(i, y$1) { + return i >= y$1; + } + function expand$1(str, isTop) { + var expansions = []; + var m$1 = balanced("{", "}", str); + if (!m$1 || /\$$/.test(m$1.pre)) return [str]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m$1.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m$1.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m$1.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m$1.post.match(/,.*\}/)) { + str = m$1.pre + "{" + m$1.body + escClose + m$1.post; + return expand$1(str); + } + return [str]; + } + var n; + if (isSequence) n = m$1.body.split(/\.\./); + else { + n = parseCommaParts(m$1.body); + if (n.length === 1) { + n = expand$1(n[0], false).map(embrace); + if (n.length === 1) { + var post = m$1.post.length ? expand$1(m$1.post, false) : [""]; + return post.map(function(p) { + return m$1.pre + n[0] + p; + }); + } + } + } + var pre = m$1.pre; + var post = m$1.post.length ? expand$1(m$1.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y$1 = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y$1 < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y$1); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) c = "-" + z + c.slice(1); + else c = z + c; + } + } + } + N.push(c); + } + } else N = concatMap(n, function(el) { + return expand$1(el, false); + }); + for (var j = 0; j < N.length; j++) for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) expansions.push(expansion); + } + return expansions; + } +} }); + +//#endregion +//#region node_modules/.deno/minimatch@3.1.2/node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ "node_modules/.deno/minimatch@3.1.2/node_modules/minimatch/minimatch.js"(exports, module) { + module.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path$6 = function() { + try { + return __require("path"); + } catch (e) {} + }() || { sep: "/" }; + minimatch.sep = path$6.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { + open: "(?:(?!(?:", + close: "))[^/]*?)" + }, + "?": { + open: "(?:", + close: ")?" + }, + "+": { + open: "(?:", + close: ")+" + }, + "*": { + open: "(?:", + close: ")*" + }, + "@": { + open: "(?:", + close: ")" + } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s$1) { + return s$1.split("").reduce(function(set, c) { + set[c] = true; + return set; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) return minimatch; + var orig = minimatch; + var m$1 = function minimatch$1(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m$1.Minimatch = function Minimatch$1(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m$1.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m$1.filter = function filter$1(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m$1.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m$1.makeRe = function makeRe$1(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m$1.braceExpand = function braceExpand$1(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m$1.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m$1; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") return false; + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) return new Minimatch(pattern, options); + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path$6.sep !== "/") pattern = pattern.split(path$6.sep).join("/"); + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() {}; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug$3() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s$1) { + return s$1.split(slashSplit); + }); + this.debug(this.pattern, set); + set = set.map(function(s$1, si, set$1) { + return s$1.map(this.parse, this); + }, this); + this.debug(this.pattern, set); + set = set.filter(function(s$1) { + return s$1.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) if (this instanceof Minimatch) options = this.options; + else options = {}; + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) return [pattern]; + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") throw new TypeError("invalid pattern"); + if (pattern.length > MAX_PATTERN_LENGTH) throw new TypeError("pattern is too long"); + }; + Minimatch.prototype.parse = parse$2; + var SUBPARSE = {}; + function parse$2(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") if (!options.noglobstar) return GLOBSTAR; + else pattern = "*"; + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self$1 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self$1.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + case "/": return false; + case "\\": + clearStateChar(); + escaping = true; + continue; + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self$1.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") negativeLists.push(pl); + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) escaping = false; + else if (reSpecials[c] && !(c === "^" && inClass)) re += "\\"; + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) $2 = "\\"; + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) re += "\\\\"; + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) dollar = "$"; + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) re = "(?=.)" + re; + if (addPatternStart) re = patternStart + re; + if (isSub === SUBPARSE) return [re, hasMagic]; + if (!hasMagic) return globUnescape(pattern); + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) list.push(pattern); + return list; + }; + Minimatch.prototype.match = function match$1(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path$6.sep !== "/") f = f.split(path$6.sep).join("/"); + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set = this.set; + this.debug(this.pattern, "set", set); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file = f; + if (options.matchBase && pattern.length === 1) file = [filename]; + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug("matchOne", { + "this": this, + file, + pattern + }); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + /* istanbul ignore if */ + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [ + pattern, + p, + f + ]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + /* istanbul ignore if */ + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) return true; + else if (fi === fl) return partial; + else if (pi === pl) return fi === fl - 1 && file[fi] === ""; + /* istanbul ignore next */ + throw new Error("wtf?"); + }; + function globUnescape(s$1) { + return s$1.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s$1) { + return s$1.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } +} }); + +//#endregion +//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path.js +var require_internal_path = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path.js"(exports) { + var __createBinding$15 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m$1[k]; + } + }); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$14 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$15 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$15(result, mod, k); + } + __setModuleDefault$14(result, mod); + return result; + }; + var __importDefault$5 = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Path = void 0; + const path$5 = __importStar$15(__require("path")); + const pathHelper$1 = __importStar$15(require_internal_path_helper()); + const assert_1$7 = __importDefault$5(__require("assert")); + const IS_WINDOWS$3 = process.platform === "win32"; + /** + * Helper class for parsing paths into segments + */ + var Path = class { + /** + * Constructs a Path + * @param itemPath Path or array of segments + */ + constructor(itemPath) { + this.segments = []; + if (typeof itemPath === "string") { + assert_1$7.default(itemPath, `Parameter 'itemPath' must not be empty`); + itemPath = pathHelper$1.safeTrimTrailingSeparator(itemPath); + if (!pathHelper$1.hasRoot(itemPath)) this.segments = itemPath.split(path$5.sep); + else { + let remaining = itemPath; + let dir = pathHelper$1.dirname(remaining); + while (dir !== remaining) { + const basename = path$5.basename(remaining); + this.segments.unshift(basename); + remaining = dir; + dir = pathHelper$1.dirname(remaining); + } + this.segments.unshift(remaining); + } + } else { + assert_1$7.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + for (let i = 0; i < itemPath.length; i++) { + let segment = itemPath[i]; + assert_1$7.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + segment = pathHelper$1.normalizeSeparators(itemPath[i]); + if (i === 0 && pathHelper$1.hasRoot(segment)) { + segment = pathHelper$1.safeTrimTrailingSeparator(segment); + assert_1$7.default(segment === pathHelper$1.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + this.segments.push(segment); + } else { + assert_1$7.default(!segment.includes(path$5.sep), `Parameter 'itemPath' contains unexpected path separators`); + this.segments.push(segment); + } + } + } + } + /** + * Converts the path to it's string representation + */ + toString() { + let result = this.segments[0]; + let skipSlash = result.endsWith(path$5.sep) || IS_WINDOWS$3 && /^[A-Z]:$/i.test(result); + for (let i = 1; i < this.segments.length; i++) { + if (skipSlash) skipSlash = false; + else result += path$5.sep; + result += this.segments[i]; + } + return result; + } + }; + exports.Path = Path; +} }); + +//#endregion +//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern.js +var require_internal_pattern = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern.js"(exports) { + var __createBinding$14 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m$1[k]; + } + }); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$13 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$14 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$14(result, mod, k); + } + __setModuleDefault$13(result, mod); + return result; + }; + var __importDefault$4 = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Pattern = void 0; + const os$2 = __importStar$14(__require("os")); + const path$4 = __importStar$14(__require("path")); + const pathHelper = __importStar$14(require_internal_path_helper()); + const assert_1$6 = __importDefault$4(__require("assert")); + const minimatch_1 = require_minimatch(); + const internal_match_kind_1$1 = require_internal_match_kind(); + const internal_path_1 = require_internal_path(); + const IS_WINDOWS$2 = process.platform === "win32"; + var Pattern = class Pattern { + constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { + /** + * Indicates whether matches should be excluded from the result set + */ + this.negate = false; + let pattern; + if (typeof patternOrNegate === "string") pattern = patternOrNegate.trim(); + else { + segments = segments || []; + assert_1$6.default(segments.length, `Parameter 'segments' must not empty`); + const root = Pattern.getLiteral(segments[0]); + assert_1$6.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + pattern = new internal_path_1.Path(segments).toString().trim(); + if (patternOrNegate) pattern = `!${pattern}`; + } + while (pattern.startsWith("!")) { + this.negate = !this.negate; + pattern = pattern.substr(1).trim(); + } + pattern = Pattern.fixupPattern(pattern, homedir); + this.segments = new internal_path_1.Path(pattern).segments; + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path$4.sep); + pattern = pathHelper.safeTrimTrailingSeparator(pattern); + let foundGlob = false; + const searchSegments = this.segments.map((x) => Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); + this.searchPath = new internal_path_1.Path(searchSegments).toString(); + this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS$2 ? "i" : ""); + this.isImplicitPattern = isImplicitPattern; + const minimatchOptions = { + dot: true, + nobrace: true, + nocase: IS_WINDOWS$2, + nocomment: true, + noext: true, + nonegate: true + }; + pattern = IS_WINDOWS$2 ? pattern.replace(/\\/g, "/") : pattern; + this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); + } + /** + * Matches the pattern against the specified path + */ + match(itemPath) { + if (this.segments[this.segments.length - 1] === "**") { + itemPath = pathHelper.normalizeSeparators(itemPath); + if (!itemPath.endsWith(path$4.sep) && this.isImplicitPattern === false) itemPath = `${itemPath}${path$4.sep}`; + } else itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + if (this.minimatch.match(itemPath)) return this.trailingSeparator ? internal_match_kind_1$1.MatchKind.Directory : internal_match_kind_1$1.MatchKind.All; + return internal_match_kind_1$1.MatchKind.None; + } + /** + * Indicates whether the pattern may match descendants of the specified path + */ + partialMatch(itemPath) { + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + if (pathHelper.dirname(itemPath) === itemPath) return this.rootRegExp.test(itemPath); + return this.minimatch.matchOne(itemPath.split(IS_WINDOWS$2 ? /\\+/ : /\/+/), this.minimatch.set[0], true); + } + /** + * Escapes glob patterns within a path + */ + static globEscape(s$1) { + return (IS_WINDOWS$2 ? s$1 : s$1.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); + } + /** + * Normalizes slashes and ensures absolute root + */ + static fixupPattern(pattern, homedir) { + assert_1$6.default(pattern, "pattern cannot be empty"); + const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => Pattern.getLiteral(x)); + assert_1$6.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + assert_1$6.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + pattern = pathHelper.normalizeSeparators(pattern); + if (pattern === "." || pattern.startsWith(`.${path$4.sep}`)) pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1); + else if (pattern === "~" || pattern.startsWith(`~${path$4.sep}`)) { + homedir = homedir || os$2.homedir(); + assert_1$6.default(homedir, "Unable to determine HOME directory"); + assert_1$6.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + pattern = Pattern.globEscape(homedir) + pattern.substr(1); + } else if (IS_WINDOWS$2 && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { + let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); + if (pattern.length > 2 && !root.endsWith("\\")) root += "\\"; + pattern = Pattern.globEscape(root) + pattern.substr(2); + } else if (IS_WINDOWS$2 && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { + let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); + if (!root.endsWith("\\")) root += "\\"; + pattern = Pattern.globEscape(root) + pattern.substr(1); + } else pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern); + return pathHelper.normalizeSeparators(pattern); + } + /** + * Attempts to unescape a pattern segment to create a literal path segment. + * Otherwise returns empty string. + */ + static getLiteral(segment) { + let literal = ""; + for (let i = 0; i < segment.length; i++) { + const c = segment[i]; + if (c === "\\" && !IS_WINDOWS$2 && i + 1 < segment.length) { + literal += segment[++i]; + continue; + } else if (c === "*" || c === "?") return ""; + else if (c === "[" && i + 1 < segment.length) { + let set = ""; + let closed = -1; + for (let i2 = i + 1; i2 < segment.length; i2++) { + const c2 = segment[i2]; + if (c2 === "\\" && !IS_WINDOWS$2 && i2 + 1 < segment.length) { + set += segment[++i2]; + continue; + } else if (c2 === "]") { + closed = i2; + break; + } else set += c2; + } + if (closed >= 0) { + if (set.length > 1) return ""; + if (set) { + literal += set; + i = closed; + continue; + } + } + } + literal += c; + } + return literal; + } + /** + * Escapes regexp special characters + * https://javascript.info/regexp-escaping + */ + static regExpEscape(s$1) { + return s$1.replace(/[[\\^$.|?*+()]/g, "\\$&"); + } + }; + exports.Pattern = Pattern; +} }); + +//#endregion +//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-search-state.js +var require_internal_search_state = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-search-state.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SearchState = void 0; + var SearchState = class { + constructor(path$8, level) { + this.path = path$8; + this.level = level; + } + }; + exports.SearchState = SearchState; +} }); + +//#endregion +//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-globber.js +var require_internal_globber = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-globber.js"(exports) { + var __createBinding$13 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m$1[k]; + } + }); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$12 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$13 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$13(result, mod, k); + } + __setModuleDefault$12(result, mod); + return result; + }; + var __awaiter$15 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues$2 = exports && exports.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m$1 = o[Symbol.asyncIterator], i; + return m$1 ? m$1.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d$1, v) { + Promise.resolve(v).then(function(v$1) { + resolve({ + value: v$1, + done: d$1 + }); + }, reject); + } + }; + var __await$1 = exports && exports.__await || function(v) { + return this instanceof __await$1 ? (this.v = v, this) : new __await$1(v); + }; + var __asyncGenerator$1 = exports && exports.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([ + n, + v, + a, + b + ]) > 1 || resume$1(n, v); + }); + }; + } + function resume$1(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await$1 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume$1("next", value); + } + function reject(value) { + resume$1("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume$1(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DefaultGlobber = void 0; + const core$7 = __importStar$13(require_core()); + const fs$4 = __importStar$13(__require("fs")); + const globOptionsHelper = __importStar$13(require_internal_glob_options_helper()); + const path$3 = __importStar$13(__require("path")); + const patternHelper = __importStar$13(require_internal_pattern_helper()); + const internal_match_kind_1 = require_internal_match_kind(); + const internal_pattern_1 = require_internal_pattern(); + const internal_search_state_1 = require_internal_search_state(); + const IS_WINDOWS$1 = process.platform === "win32"; + var DefaultGlobber = class DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a$2; + return __awaiter$15(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b$1 = __asyncValues$2(this.globGenerator()), _c$1; _c$1 = yield _b$1.next(), !_c$1.done;) { + const itemPath = _c$1.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c$1 && !_c$1.done && (_a$2 = _b$1.return)) yield _a$2.call(_b$1); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator$1(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core$7.debug(`Search path '${searchPath}'`); + try { + yield __await$1(fs$4.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") continue; + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match$1 = patternHelper.match(patterns, item.path); + const partialMatch$1 = !!match$1 || patternHelper.partialMatch(patterns, item.path); + if (!match$1 && !partialMatch$1) continue; + const stats = yield __await$1( + DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists +); + if (!stats) continue; + if (stats.isDirectory()) { + if (match$1 & internal_match_kind_1.MatchKind.Directory) yield yield __await$1(item.path); + else if (!partialMatch$1) continue; + const childLevel = item.level + 1; + const childItems = (yield __await$1(fs$4.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path$3.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match$1 & internal_match_kind_1.MatchKind.File) yield yield __await$1(item.path); + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter$15(this, void 0, void 0, function* () { + const result = new DefaultGlobber(options); + if (IS_WINDOWS$1) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) if (!line || line.startsWith("#")) continue; + else result.patterns.push(new internal_pattern_1.Pattern(line)); + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter$15(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) try { + stats = yield fs$4.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core$7.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + else stats = yield fs$4.promises.lstat(item.path); + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs$4.promises.realpath(item.path); + while (traversalChain.length >= item.level) traversalChain.pop(); + if (traversalChain.some((x) => x === realPath)) { + core$7.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports.DefaultGlobber = DefaultGlobber; +} }); + +//#endregion +//#region node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ "node_modules/.deno/@actions+glob@0.1.2/node_modules/@actions/glob/lib/glob.js"(exports) { + var __awaiter$14 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.create = void 0; + const internal_globber_1 = require_internal_globber(); + /** + * Constructs a globber + * + * @param patterns Patterns separated by newlines + * @param options Glob options + */ + function create(patterns, options) { + return __awaiter$14(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports.create = create; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/constants.js +var require_constants$3 = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CacheFileSizeLimit = exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0; + var CacheFilename; + (function(CacheFilename$1) { + CacheFilename$1["Gzip"] = "cache.tgz"; + CacheFilename$1["Zstd"] = "cache.tzst"; + })(CacheFilename || (exports.CacheFilename = CacheFilename = {})); + var CompressionMethod; + (function(CompressionMethod$1) { + CompressionMethod$1["Gzip"] = "gzip"; + CompressionMethod$1["ZstdWithoutLong"] = "zstd-without-long"; + CompressionMethod$1["Zstd"] = "zstd"; + })(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {})); + var ArchiveToolType; + (function(ArchiveToolType$1) { + ArchiveToolType$1["GNU"] = "gnu"; + ArchiveToolType$1["BSD"] = "bsd"; + })(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {})); + exports.DefaultRetryAttempts = 2; + exports.DefaultRetryDelay = 5e3; + exports.SocketTimeout = 5e3; + exports.GnuTarPathOnWindows = `${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`; + exports.SystemTarPathOnWindows = `${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`; + exports.TarFilename = "cache.tar"; + exports.ManifestFilename = "manifest.txt"; + exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheUtils.js +var require_cacheUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports) { + var __createBinding$12 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$11 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$12 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$12(result, mod, k); + } + __setModuleDefault$11(result, mod); + return result; + }; + var __awaiter$13 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues$1 = exports && exports.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m$1 = o[Symbol.asyncIterator], i; + return m$1 ? m$1.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d$1, v) { + Promise.resolve(v).then(function(v$1) { + resolve({ + value: v$1, + done: d$1 + }); + }, reject); + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getRuntimeToken = exports.getCacheVersion = exports.assertDefined = exports.getGnuTarPathOnWindows = exports.getCacheFileName = exports.getCompressionMethod = exports.unlinkFile = exports.resolvePaths = exports.getArchiveFileSizeInBytes = exports.createTempDirectory = void 0; + const core$6 = __importStar$12(require_core()); + const exec = __importStar$12(require_exec()); + const glob = __importStar$12(require_glob()); + const io$1 = __importStar$12(require_io()); + const crypto$1 = __importStar$12(__require("crypto")); + const fs$3 = __importStar$12(__require("fs")); + const path$2 = __importStar$12(__require("path")); + const semver = __importStar$12(require_semver()); + const util$3 = __importStar$12(__require("util")); + const constants_1$4 = require_constants$3(); + const versionSalt = "1.0"; + function createTempDirectory() { + return __awaiter$13(this, void 0, void 0, function* () { + const IS_WINDOWS$6 = process.platform === "win32"; + let tempDirectory = process.env["RUNNER_TEMP"] || ""; + if (!tempDirectory) { + let baseLocation; + if (IS_WINDOWS$6) baseLocation = process.env["USERPROFILE"] || "C:\\"; + else if (process.platform === "darwin") baseLocation = "/Users"; + else baseLocation = "/home"; + tempDirectory = path$2.join(baseLocation, "actions", "temp"); + } + const dest = path$2.join(tempDirectory, crypto$1.randomUUID()); + yield io$1.mkdirP(dest); + return dest; + }); + } + exports.createTempDirectory = createTempDirectory; + function getArchiveFileSizeInBytes(filePath) { + return fs$3.statSync(filePath).size; + } + exports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + function resolvePaths(patterns) { + var _a$2, e_1, _b$1, _c$1; + var _d$1; + return __awaiter$13(this, void 0, void 0, function* () { + const paths = []; + const workspace = (_d$1 = process.env["GITHUB_WORKSPACE"]) !== null && _d$1 !== void 0 ? _d$1 : process.cwd(); + const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); + try { + for (var _e = true, _f = __asyncValues$1(globber.globGenerator()), _g; _g = yield _f.next(), _a$2 = _g.done, !_a$2; _e = true) { + _c$1 = _g.value; + _e = false; + const file = _c$1; + const relativeFile = path$2.relative(workspace, file).replace(new RegExp(`\\${path$2.sep}`, "g"), "/"); + core$6.debug(`Matched: ${relativeFile}`); + if (relativeFile === "") paths.push("."); + else paths.push(`${relativeFile}`); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a$2 && (_b$1 = _f.return)) yield _b$1.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + return paths; + }); + } + exports.resolvePaths = resolvePaths; + function unlinkFile(filePath) { + return __awaiter$13(this, void 0, void 0, function* () { + return util$3.promisify(fs$3.unlink)(filePath); + }); + } + exports.unlinkFile = unlinkFile; + function getVersion(app, additionalArgs = []) { + return __awaiter$13(this, void 0, void 0, function* () { + let versionOutput = ""; + additionalArgs.push("--version"); + core$6.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + try { + yield exec.exec(`${app}`, additionalArgs, { + ignoreReturnCode: true, + silent: true, + listeners: { + stdout: (data) => versionOutput += data.toString(), + stderr: (data) => versionOutput += data.toString() + } + }); + } catch (err) { + core$6.debug(err.message); + } + versionOutput = versionOutput.trim(); + core$6.debug(versionOutput); + return versionOutput; + }); + } + function getCompressionMethod() { + return __awaiter$13(this, void 0, void 0, function* () { + const versionOutput = yield getVersion("zstd", ["--quiet"]); + const version$1 = semver.clean(versionOutput); + core$6.debug(`zstd version: ${version$1}`); + if (versionOutput === "") return constants_1$4.CompressionMethod.Gzip; + else return constants_1$4.CompressionMethod.ZstdWithoutLong; + }); + } + exports.getCompressionMethod = getCompressionMethod; + function getCacheFileName(compressionMethod) { + return compressionMethod === constants_1$4.CompressionMethod.Gzip ? constants_1$4.CacheFilename.Gzip : constants_1$4.CacheFilename.Zstd; + } + exports.getCacheFileName = getCacheFileName; + function getGnuTarPathOnWindows() { + return __awaiter$13(this, void 0, void 0, function* () { + if (fs$3.existsSync(constants_1$4.GnuTarPathOnWindows)) return constants_1$4.GnuTarPathOnWindows; + const versionOutput = yield getVersion("tar"); + return versionOutput.toLowerCase().includes("gnu tar") ? io$1.which("tar") : ""; + }); + } + exports.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + function assertDefined(name, value) { + if (value === void 0) throw Error(`Expected ${name} but value was undefiend`); + return value; + } + exports.assertDefined = assertDefined; + function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { + const components = paths.slice(); + if (compressionMethod) components.push(compressionMethod); + if (process.platform === "win32" && !enableCrossOsArchive) components.push("windows-only"); + components.push(versionSalt); + return crypto$1.createHash("sha256").update(components.join("|")).digest("hex"); + } + exports.getCacheVersion = getCacheVersion; + function getRuntimeToken() { + const token = process.env["ACTIONS_RUNTIME_TOKEN"]; + if (!token) throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable"); + return token; + } + exports.getRuntimeToken = getRuntimeToken; +} }); + +//#endregion +//#region node_modules/.deno/tslib@2.8.1/node_modules/tslib/tslib.js +var require_tslib = __commonJS({ "node_modules/.deno/tslib@2.8.1/node_modules/tslib/tslib.js"(exports, module) { + /****************************************************************************** + + Copyright (c) Microsoft Corporation. + + + + Permission to use, copy, modify, and/or distribute this software for any + + purpose with or without fee is hereby granted. + + + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + + PERFORMANCE OF THIS SOFTWARE. + + ***************************************************************************** */ + var __extends; + var __assign; + var __rest; + var __decorate; + var __param; + var __esDecorate; + var __runInitializers; + var __propKey; + var __setFunctionName; + var __metadata; + var __awaiter$12; + var __generator; + var __exportStar$1; + var __values$1; + var __read; + var __spread; + var __spreadArrays; + var __spreadArray; + var __await; + var __asyncGenerator; + var __asyncDelegator; + var __asyncValues; + var __makeTemplateObject; + var __importStar$11; + var __importDefault$3; + var __classPrivateFieldGet; + var __classPrivateFieldSet; + var __classPrivateFieldIn; + var __createBinding$11; + var __addDisposableResource; + var __disposeResources; + var __rewriteRelativeImportExtension; + (function(factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) define("tslib", ["exports"], function(exports$1) { + factory(createExporter(root, createExporter(exports$1))); + }); + else if (typeof module === "object" && typeof module.exports === "object") factory(createExporter(root, createExporter(module.exports))); + else factory(createExporter(root)); + function createExporter(exports$1, previous) { + if (exports$1 !== root) if (typeof Object.create === "function") Object.defineProperty(exports$1, "__esModule", { value: true }); + else exports$1.__esModule = true; + return function(id, v) { + return exports$1[id] = previous ? previous(id, v) : v; + }; + } + })(function(exporter) { + var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d$1, b) { + d$1.__proto__ = b; + } || function(d$1, b) { + for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d$1[p] = b[p]; + }; + __extends = function(d$1, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d$1, b); + function __() { + this.constructor = d$1; + } + d$1.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + __assign = Object.assign || function(t) { + for (var s$1, i = 1, n = arguments.length; i < n; i++) { + s$1 = arguments[i]; + for (var p in s$1) if (Object.prototype.hasOwnProperty.call(s$1, p)) t[p] = s$1[p]; + } + return t; + }; + __rest = function(s$1, e) { + var t = {}; + for (var p in s$1) if (Object.prototype.hasOwnProperty.call(s$1, p) && e.indexOf(p) < 0) t[p] = s$1[p]; + if (s$1 != null && typeof Object.getOwnPropertySymbols === "function") { + for (var i = 0, p = Object.getOwnPropertySymbols(s$1); i < p.length; i++) if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s$1, p[i])) t[p[i]] = s$1[p[i]]; + } + return t; + }; + __decorate = function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d$1; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d$1 = decorators[i]) r = (c < 3 ? d$1(r) : c > 3 ? d$1(target, key, r) : d$1(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + __param = function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept$1(f) { + if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); + return f; + } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context$2 = {}; + for (var p in contextIn) context$2[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context$2.access[p] = contextIn.access[p]; + context$2.addInitializer = function(f) { + if (done) throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept$1(f || null)); + }; + var result = (0, decorators[i])(kind === "accessor" ? { + get: descriptor.get, + set: descriptor.set + } : descriptor[key], context$2); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept$1(result.get)) descriptor.get = _; + if (_ = accept$1(result.set)) descriptor.set = _; + if (_ = accept$1(result.init)) initializers.unshift(_); + } else if (_ = accept$1(result)) if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; + __runInitializers = function(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + return useValue ? value : void 0; + }; + __propKey = function(x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + __setFunctionName = function(f, name, prefix$1) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { + configurable: true, + value: prefix$1 ? "".concat(prefix$1, " ", name) : name + }); + }; + __metadata = function(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + __awaiter$12 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + __generator = function(thisArg, body$1) { + var _ = { + label: 0, + sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, f, y$1, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y$1 && (t = op[0] & 2 ? y$1["return"] : op[0] ? y$1["throw"] || ((t = y$1["return"]) && t.call(y$1), 0) : y$1.next) && !(t = t.call(y$1, op[1])).done) return t; + if (y$1 = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { + value: op[1], + done: false + }; + case 5: + _.label++; + y$1 = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body$1.call(thisArg, _); + } catch (e) { + op = [6, e]; + y$1 = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } + }; + __exportStar$1 = function(m$1, o) { + for (var p in m$1) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding$11(o, m$1, p); + }; + __createBinding$11 = Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }; + __values$1 = function(o) { + var s$1 = typeof Symbol === "function" && Symbol.iterator, m$1 = s$1 && o[s$1], i = 0; + if (m$1) return m$1.call(o); + if (o && typeof o.length === "number") return { next: function() { + if (o && i >= o.length) o = void 0; + return { + value: o && o[i++], + done: !o + }; + } }; + throw new TypeError(s$1 ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read = function(o, n) { + var m$1 = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m$1) return o; + var i = m$1.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m$1 = i["return"])) m$1.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + /** @deprecated */ + __spread = function() { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; + }; + /** @deprecated */ + __spreadArrays = function() { + for (var s$1 = 0, i = 0, il = arguments.length; i < il; i++) s$1 += arguments[i].length; + for (var r = Array(s$1), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; + return r; + }; + __spreadArray = function(to, from, pack) { + if (pack || arguments.length === 2) { + for (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + __await = function(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + __asyncGenerator = function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function awaitReturn(f) { + return function(v) { + return Promise.resolve(v).then(f, reject); + }; + } + function verb(n, f) { + if (g[n]) { + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([ + n, + v, + a, + b + ]) > 1 || resume$1(n, v); + }); + }; + if (f) i[n] = f(i[n]); + } + } + function resume$1(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume$1("next", value); + } + function reject(value) { + resume$1("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume$1(q[0][0], q[0][1]); + } + }; + __asyncDelegator = function(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function(e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function() { + return this; + }, i; + function verb(n, f) { + i[n] = o[n] ? function(v) { + return (p = !p) ? { + value: __await(o[n](v)), + done: false + } : f ? f(v) : v; + } : f; + } + }; + __asyncValues = function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m$1 = o[Symbol.asyncIterator], i; + return m$1 ? m$1.call(o) : (o = typeof __values$1 === "function" ? __values$1(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d$1, v) { + Promise.resolve(v).then(function(v$1) { + resolve({ + value: v$1, + done: d$1 + }); + }, reject); + } + }; + __makeTemplateObject = function(cooked, raw) { + if (Object.defineProperty) Object.defineProperty(cooked, "raw", { value: raw }); + else cooked.raw = raw; + return cooked; + }; + var __setModuleDefault$18 = Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }; + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o$1) { + var ar = []; + for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + __importStar$11 = function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$11(result, mod, k[i]); + } + __setModuleDefault$18(result, mod); + return result; + }; + __importDefault$3 = function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + __classPrivateFieldGet = function(receiver, state$1, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state$1 === "function" ? receiver !== state$1 || !f : !state$1.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state$1.get(receiver); + }; + __classPrivateFieldSet = function(receiver, state$1, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state$1 === "function" ? receiver !== state$1 || !f : !state$1.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state$1.set(receiver, value), value; + }; + __classPrivateFieldIn = function(state$1, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state$1 === "function" ? receiver === state$1 : state$1.has(receiver); + }; + __addDisposableResource = function(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { + try { + inner.call(this); + } catch (e) { + return Promise.reject(e); + } + }; + env.stack.push({ + value, + dispose, + async + }); + } else if (async) env.stack.push({ async: true }); + return value; + }; + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + __disposeResources = function(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s$1 = 0; + function next() { + while (r = env.stack.pop()) try { + if (!r.async && s$1 === 1) return s$1 = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s$1 |= 2, Promise.resolve(result).then(next, function(e) { + fail(e); + return next(); + }); + } else s$1 |= 1; + } catch (e) { + fail(e); + } + if (s$1 === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); + }; + __rewriteRelativeImportExtension = function(path$8, preserveJsx) { + if (typeof path$8 === "string" && /^\.\.?\//.test(path$8)) return path$8.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m$1, tsx, d$1, ext$1, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d$1 && (!ext$1 || !cm) ? m$1 : d$1 + ext$1 + "." + cm.toLowerCase() + "js"; + }); + return path$8; + }; + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__esDecorate", __esDecorate); + exporter("__runInitializers", __runInitializers); + exporter("__propKey", __propKey); + exporter("__setFunctionName", __setFunctionName); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter$12); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar$1); + exporter("__createBinding", __createBinding$11); + exporter("__values", __values$1); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar$11); + exporter("__importDefault", __importDefault$3); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); + exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); + }); +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AbortError = void 0; + /** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts snippet:ReadmeSampleAbortError + * import { AbortError } from "@typespec/ts-http-runtime"; + * + * async function doAsyncWork(options: { abortSignal: AbortSignal }): Promise { + * if (options.abortSignal.aborted) { + * throw new AbortError(); + * } + * + * // do async work + * } + * + * const controller = new AbortController(); + * controller.abort(); + * + * try { + * doAsyncWork({ abortSignal: controller.signal }); + * } catch (e) { + * if (e instanceof Error && e.name === "AbortError") { + * // handle abort error here. + * } + * } + * ``` + */ + var AbortError$2 = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports.AbortError = AbortError$2; +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log$3 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.log = log$1; + const tslib_1$9 = require_tslib(); + const node_os_1 = __require("node:os"); + const node_util_1$1 = tslib_1$9.__importDefault(__require("node:util")); + const process$4 = tslib_1$9.__importStar(__require("node:process")); + function log$1(message, ...args) { + process$4.stderr.write(`${node_util_1$1.default.format(message, ...args)}${node_os_1.EOL}`); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + const log_js_1$10 = require_log$3(); + const debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + let enabledString; + let enabledNamespaces = []; + let skippedNamespaces = []; + const debuggers = []; + if (debugEnvVariable) enable(debugEnvVariable); + const debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1$10.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const wildcard = /\*/g; + const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); + for (const ns of namespaceList) if (ns.startsWith("-")) skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); + else enabledNamespaces.push(new RegExp(`^${ns}$`)); + for (const instance of debuggers) instance.enabled = enabled(instance.namespace); + } + function enabled(namespace) { + if (namespace.endsWith("*")) return true; + for (const skipped of skippedNamespaces) if (skipped.test(namespace)) return false; + for (const enabledNamespace of enabledNamespaces) if (enabledNamespace.test(namespace)) return true; + return false; + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug$3, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend + }); + function debug$3(...args) { + if (!newDebugger.enabled) return; + if (args.length > 0) args[0] = `${namespace} ${args[0]}`; + newDebugger.log(...args); + } + debuggers.push(newDebugger); + return newDebugger; + } + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; + } + return false; + } + function extend(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports.default = debugObj; +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TypeSpecRuntimeLogger = void 0; + exports.createLoggerContext = createLoggerContext; + exports.setLogLevel = setLogLevel$1; + exports.getLogLevel = getLogLevel$1; + exports.createClientLogger = createClientLogger$1; + const tslib_1$8 = require_tslib(); + const debug_js_1 = tslib_1$8.__importDefault(require_debug()); + const TYPESPEC_RUNTIME_LOG_LEVELS = [ + "verbose", + "info", + "warning", + "error" + ]; + const levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + /** + * Creates a logger context base on the provided options. + * @param options - The options for creating a logger context. + * @returns The logger context. + */ + function createLoggerContext(options) { + const registeredLoggers = new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + if (logLevelFromEnv) if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) setLogLevel$1(logLevelFromEnv); + else console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + function shouldEnable(logger$2) { + return Boolean(logLevel && levelMap[logger$2.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger$2 = Object.assign(parent.extend(level), { level }); + patchLogMethod(parent, logger$2); + if (shouldEnable(logger$2)) { + const enabledNamespaces$1 = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces$1 + "," + logger$2.namespace); + } + registeredLoggers.add(logger$2); + return logger$2; + } + return { + setLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + logLevel = level; + const enabledNamespaces$1 = []; + for (const logger$2 of registeredLoggers) if (shouldEnable(logger$2)) enabledNamespaces$1.push(logger$2.namespace); + debug_js_1.default.enable(enabledNamespaces$1.join(",")); + }, + getLogLevel() { + return logLevel; + }, + createClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + }, + logger: clientLogger + }; + } + const context$1 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + /** + * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. + * @param level - The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ + exports.TypeSpecRuntimeLogger = context$1.logger; + /** + * Retrieves the currently specified log level. + */ + function setLogLevel$1(logLevel) { + context$1.setLogLevel(logLevel); + } + /** + * Retrieves the currently specified log level. + */ + function getLogLevel$1() { + return context$1.getLogLevel(); + } + /** + * Creates a logger for use by the SDKs that inherits from `TypeSpecRuntimeLogger`. + * @param namespace - The name of the SDK package. + * @hidden + */ + function createClientLogger$1(namespace) { + return context$1.createClientLogger(namespace); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js +var require_httpHeaders$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createHttpHeaders = createHttpHeaders$1; + function normalizeName(name) { + return name.toLowerCase(); + } + function* headerIterator(map) { + for (const entry of map.values()) yield [entry.name, entry.value]; + } + var HttpHeadersImpl = class { + constructor(rawHeaders) { + this._headersMap = new Map(); + if (rawHeaders) for (const headerName of Object.keys(rawHeaders)) this.set(headerName, rawHeaders[headerName]); + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param name - The name of the header to set. This value is case-insensitive. + * @param value - The value of the header to set. + */ + set(name, value) { + this._headersMap.set(normalizeName(name), { + name, + value: String(value).trim() + }); + } + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param name - The name of the header. This value is case-insensitive. + */ + get(name) { + var _a$2; + return (_a$2 = this._headersMap.get(normalizeName(name))) === null || _a$2 === void 0 ? void 0 : _a$2.value; + } + /** + * Get whether or not this header collection contains a header entry for the provided header name. + * @param name - The name of the header to set. This value is case-insensitive. + */ + has(name) { + return this._headersMap.has(normalizeName(name)); + } + /** + * Remove the header with the provided headerName. + * @param name - The name of the header to remove. + */ + delete(name) { + this._headersMap.delete(normalizeName(name)); + } + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJSON(options = {}) { + const result = {}; + if (options.preserveCase) for (const entry of this._headersMap.values()) result[entry.name] = entry.value; + else for (const [normalizedName, entry] of this._headersMap) result[normalizedName] = entry.value; + return result; + } + /** + * Get the string representation of this HTTP header collection. + */ + toString() { + return JSON.stringify(this.toJSON({ preserveCase: true })); + } + /** + * Iterate over tuples of header [name, value] pairs. + */ + [Symbol.iterator]() { + return headerIterator(this._headersMap); + } + }; + /** + * Creates an object that satisfies the `HttpHeaders` interface. + * @param rawHeaders - A simple object representing initial headers + */ + function createHttpHeaders$1(rawHeaders) { + return new HttpHeadersImpl(rawHeaders); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports) { + var _a$1; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.randomUUID = randomUUID$1; + const node_crypto_1$1 = __require("node:crypto"); + const uuidFunction = typeof ((_a$1 = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a$1 === void 0 ? void 0 : _a$1.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : node_crypto_1$1.randomUUID; + /** + * Generated Universally Unique Identifier + * + * @returns RFC4122 v4 UUID. + */ + function randomUUID$1() { + return uuidFunction(); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createPipelineRequest = createPipelineRequest$1; + const httpHeaders_js_1$7 = require_httpHeaders$1(); + const uuidUtils_js_1$2 = require_uuidUtils(); + var PipelineRequestImpl = class { + constructor(options) { + var _a$2, _b$1, _c$1, _d$1, _e, _f, _g; + this.url = options.url; + this.body = options.body; + this.headers = (_a$2 = options.headers) !== null && _a$2 !== void 0 ? _a$2 : (0, httpHeaders_js_1$7.createHttpHeaders)(); + this.method = (_b$1 = options.method) !== null && _b$1 !== void 0 ? _b$1 : "GET"; + this.timeout = (_c$1 = options.timeout) !== null && _c$1 !== void 0 ? _c$1 : 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = (_d$1 = options.disableKeepAlive) !== null && _d$1 !== void 0 ? _d$1 : false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1$2.randomUUID)(); + this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; + this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; + this.requestOverrides = options.requestOverrides; + } + }; + /** + * Creates a new pipeline request with the given options. + * This method is to allow for the easy setting of default values and not required. + * @param options - The options to create the request with. + */ + function createPipelineRequest$1(options) { + return new PipelineRequestImpl(options); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createEmptyPipeline = createEmptyPipeline$1; + const ValidPhaseNames = new Set([ + "Deserialize", + "Serialize", + "Retry", + "Sign" + ]); + /** + * A private implementation of Pipeline. + * Do not export this class from the package. + * @internal + */ + var HttpPipeline = class HttpPipeline { + constructor(policies) { + var _a$2; + this._policies = []; + this._policies = (_a$2 = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a$2 !== void 0 ? _a$2 : []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) throw new Error("Policies inside a phase cannot specify afterPhase."); + if (options.phase && !ValidPhaseNames.has(options.phase)) throw new Error(`Invalid phase name: ${options.phase}`); + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else return true; + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req$1) => { + return policy.sendRequest(req$1, next); + }; + }, (req$1) => httpClient.sendRequest(req$1)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) this._orderedPolicies = this.orderPolicies(); + return this._orderedPolicies; + } + clone() { + return new HttpPipeline(this._policies); + } + static create() { + return new HttpPipeline(); + } + orderPolicies() { + /** + * The goal of this method is to reliably order pipeline policies + * based on their declared requirements when they were added. + * + * Order is first determined by phase: + * + * 1. Serialize Phase + * 2. Policies not in a phase + * 3. Deserialize Phase + * 4. Retry Phase + * 5. Sign Phase + * + * Within each phase, policies are executed in the order + * they were added unless they were specified to execute + * before/after other policies or after a particular phase. + * + * To determine the final order, we will walk the policy list + * in phase order multiple times until all dependencies are + * satisfied. + * + * `afterPolicies` are the set of policies that must be + * executed before a given policy. This requirement is + * considered satisfied when each of the listed policies + * have been scheduled. + * + * `beforePolicies` are the set of policies that must be + * executed after a given policy. Since this dependency + * can be expressed by converting it into a equivalent + * `afterPolicies` declarations, they are normalized + * into that form for simplicity. + * + * An `afterPhase` dependency is considered satisfied when all + * policies in that phase have scheduled. + * + */ + const result = []; + const policyMap = new Map(); + function createPhase(name) { + return { + name, + policies: new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [ + serializePhase, + noPhase, + deserializePhase, + retryPhase, + signPhase + ]; + function getPhase(phase) { + if (phase === "Retry") return retryPhase; + else if (phase === "Serialize") return serializePhase; + else if (phase === "Deserialize") return deserializePhase; + else if (phase === "Sign") return signPhase; + else return noPhase; + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) throw new Error("Duplicate policy names not allowed in pipeline"); + const node = { + policy, + dependsOn: new Set(), + dependants: new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) throw new Error(`Missing node for policy ${policyName}`); + if (options.afterPolicies) for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + if (options.beforePolicies) for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) continue; + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) dependant.dependsOn.delete(node); + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) walkPhase(noPhase); + return; + } + if (phase.hasAfterPolicies) walkPhase(noPhase); + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + return result; + } + }; + /** + * Creates a totally empty pipeline. + * Useful for testing or creating a custom one. + */ + function createEmptyPipeline$1() { + return HttpPipeline.create(); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isObject = isObject$1; + /** + * Helper to determine when an input is a generic JS object. + * @returns true when input is an object type that is not null, Array, RegExp, or Date. + */ + function isObject$1(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isError = isError$1; + const object_js_1$2 = require_object(); + /** + * Typeguard for an error object shape (has name and message) + * @param e - Something caught by a catch clause. + */ + function isError$1(e) { + if ((0, object_js_1$2.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.custom = void 0; + const node_util_1 = __require("node:util"); + exports.custom = node_util_1.inspect.custom; +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Sanitizer = void 0; + const object_js_1$1 = require_object(); + const RedactedString = "REDACTED"; + const defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + const defaultAllowedQueryParameters = ["api-version"]; + /** + * A utility class to sanitize objects for logging. + */ + var Sanitizer = class { + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) return Object.assign(Object.assign({}, value), { + name: value.name, + message: value.message + }); + if (key === "headers") return this.sanitizeHeaders(value); + else if (key === "url") return this.sanitizeUrl(value); + else if (key === "query") return this.sanitizeQuery(value); + else if (key === "body") return void 0; + else if (key === "response") return void 0; + else if (key === "operationSpec") return void 0; + else if (Array.isArray(value) || (0, object_js_1$1.isObject)(value)) { + if (seen.has(value)) return "[Circular]"; + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") return value; + const url$1 = new URL(value); + if (!url$1.search) return value; + for (const [key] of url$1.searchParams) if (!this.allowedQueryParameters.has(key.toLowerCase())) url$1.searchParams.set(key, RedactedString); + return url$1.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) if (this.allowedHeaderNames.has(key.toLowerCase())) sanitized[key] = obj[key]; + else sanitized[key] = RedactedString; + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) return value; + const sanitized = {}; + for (const k of Object.keys(value)) if (this.allowedQueryParameters.has(k.toLowerCase())) sanitized[k] = value[k]; + else sanitized[k] = RedactedString; + return sanitized; + } + }; + exports.Sanitizer = Sanitizer; +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.RestError = void 0; + exports.isRestError = isRestError$1; + const error_js_1$2 = require_error$1(); + const inspect_js_1 = require_inspect(); + const sanitizer_js_1$3 = require_sanitizer(); + const errorSanitizer = new sanitizer_js_1$3.Sanitizer(); + /** + * A custom error type for failed pipeline requests. + */ + var RestError$1 = class RestError$1 extends Error { + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { + value: options.request, + enumerable: false + }); + Object.defineProperty(this, "response", { + value: options.response, + enumerable: false + }); + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { + request: this.request, + response: this.response + }))}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, RestError$1.prototype); + } + }; + exports.RestError = RestError$1; + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + RestError$1.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + RestError$1.PARSE_ERROR = "PARSE_ERROR"; + /** + * Typeguard for RestError + * @param e - Something caught by a catch clause. + */ + function isRestError$1(e) { + if (e instanceof RestError$1) return true; + return (0, error_js_1$2.isError)(e) && e.name === "RestError"; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.uint8ArrayToString = uint8ArrayToString$1; + exports.stringToUint8Array = stringToUint8Array$1; + /** + * The helper that transforms bytes with specific character encoding into string + * @param bytes - the uint8array bytes + * @param format - the format we use to encode the byte + * @returns a string of the encoded string + */ + function uint8ArrayToString$1(bytes, format) { + return Buffer.from(bytes).toString(format); + } + /** + * The helper that transforms string to specific character encoded bytes array. + * @param value - the string to be converted + * @param format - the format we use to decode the value + * @returns a uint8array + */ + function stringToUint8Array$1(value, format) { + return Buffer.from(value, format); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.logger = void 0; + const logger_js_1$6 = require_logger$1(); + exports.logger = (0, logger_js_1$6.createClientLogger)("ts-http-runtime"); +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getBodyLength = getBodyLength; + exports.createNodeHttpClient = createNodeHttpClient; + const tslib_1$7 = require_tslib(); + const http$2 = tslib_1$7.__importStar(__require("node:http")); + const https$1 = tslib_1$7.__importStar(__require("node:https")); + const zlib = tslib_1$7.__importStar(__require("node:zlib")); + const node_stream_1 = __require("node:stream"); + const AbortError_js_1$4 = require_AbortError$1(); + const httpHeaders_js_1$6 = require_httpHeaders$1(); + const restError_js_1$7 = require_restError$2(); + const log_js_1$9 = require_log$2(); + const sanitizer_js_1$2 = require_sanitizer(); + const DEFAULT_TLS_SETTINGS = {}; + function isReadableStream$1(body$1) { + return body$1 && typeof body$1.pipe === "function"; + } + function isStreamComplete(stream$2) { + if (stream$2.readable === false) return Promise.resolve(); + return new Promise((resolve) => { + const handler = () => { + resolve(); + stream$2.removeListener("close", handler); + stream$2.removeListener("end", handler); + stream$2.removeListener("error", handler); + }; + stream$2.on("close", handler); + stream$2.on("end", handler); + stream$2.on("error", handler); + }); + } + function isArrayBuffer(body$1) { + return body$1 && typeof body$1.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.loadedBytes = 0; + this.progressCallback = progressCallback; + } + }; + /** + * A HttpClient implementation that uses Node's "https" module to send HTTPS requests. + * @internal + */ + var NodeHttpClient = class { + constructor() { + this.cachedHttpsAgents = new WeakMap(); + } + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + var _a$2, _b$1, _c$1; + const abortController$1 = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) throw new AbortError_js_1$4.AbortError("The operation was aborted. Request has already been canceled."); + abortListener = (event) => { + if (event.type === "abort") abortController$1.abort(); + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1$2.Sanitizer(); + log_js_1$9.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController$1.abort(); + }, request.timeout); + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); + let body$1 = typeof request.body === "function" ? request.body() : request.body; + if (body$1 && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body$1); + if (bodyLength !== null) request.headers.set("Content-Length", bodyLength); + } + let responseStream; + try { + if (body$1 && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1$9.logger.error("Error in upload progress", e); + }); + if (isReadableStream$1(body$1)) body$1.pipe(uploadReportStream); + else uploadReportStream.end(body$1); + body$1 = uploadReportStream; + } + const res = await this.makeRequest(request, abortController$1, body$1); + if (timeoutId !== void 0) clearTimeout(timeoutId); + const headers = getResponseHeaders(res); + const status = (_a$2 = res.statusCode) !== null && _a$2 !== void 0 ? _a$2 : 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1$9.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if (((_b$1 = request.streamResponseStatusCodes) === null || _b$1 === void 0 ? void 0 : _b$1.has(Number.POSITIVE_INFINITY)) || ((_c$1 = request.streamResponseStatusCodes) === null || _c$1 === void 0 ? void 0 : _c$1.has(response.status))) response.readableStreamBody = responseStream; + else response.bodyAsText = await streamToText(responseStream); + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream$1(body$1)) uploadStreamDone = isStreamComplete(body$1); + let downloadStreamDone = Promise.resolve(); + if (isReadableStream$1(responseStream)) downloadStreamDone = isStreamComplete(responseStream); + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + var _a$3; + if (abortListener) (_a$3 = request.abortSignal) === null || _a$3 === void 0 || _a$3.removeEventListener("abort", abortListener); + }).catch((e) => { + log_js_1$9.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController$1, body$1) { + var _a$2; + const url$1 = new URL(request.url); + const isInsecure = url$1.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + const agent = (_a$2 = request.agent) !== null && _a$2 !== void 0 ? _a$2 : this.getOrCreateAgent(request, isInsecure); + const options = Object.assign({ + agent, + hostname: url$1.hostname, + path: `${url$1.pathname}${url$1.search}`, + port: url$1.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }) + }, request.requestOverrides); + return new Promise((resolve, reject) => { + const req$1 = isInsecure ? http$2.request(options, resolve) : https$1.request(options, resolve); + req$1.once("error", (err) => { + var _a$3; + reject(new restError_js_1$7.RestError(err.message, { + code: (_a$3 = err.code) !== null && _a$3 !== void 0 ? _a$3 : restError_js_1$7.RestError.REQUEST_SEND_ERROR, + request + })); + }); + abortController$1.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1$4.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req$1.destroy(abortError); + reject(abortError); + }); + if (body$1 && isReadableStream$1(body$1)) body$1.pipe(req$1); + else if (body$1) if (typeof body$1 === "string" || Buffer.isBuffer(body$1)) req$1.end(body$1); + else if (isArrayBuffer(body$1)) req$1.end(ArrayBuffer.isView(body$1) ? Buffer.from(body$1.buffer) : Buffer.from(body$1)); + else { + log_js_1$9.logger.error("Unrecognized body type", body$1); + reject(new restError_js_1$7.RestError("Unrecognized body type")); + } + else req$1.end(); + }); + } + getOrCreateAgent(request, isInsecure) { + var _a$2; + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) return http$2.globalAgent; + if (!this.cachedHttpAgent) this.cachedHttpAgent = new http$2.Agent({ keepAlive: true }); + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) return https$1.globalAgent; + const tlsSettings = (_a$2 = request.tlsSettings) !== null && _a$2 !== void 0 ? _a$2 : DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) return agent; + log_js_1$9.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new https$1.Agent(Object.assign({ keepAlive: !disableKeepAlive }, tlsSettings)); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1$6.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) headers.set(header, value[0]); + } else if (value) headers.set(header, value); + } + return headers; + } + function getDecodedResponseStream(stream$2, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = zlib.createGunzip(); + stream$2.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = zlib.createInflate(); + stream$2.pipe(inflate); + return inflate; + } + return stream$2; + } + function streamToText(stream$2) { + return new Promise((resolve, reject) => { + const buffer$2 = []; + stream$2.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) buffer$2.push(chunk); + else buffer$2.push(Buffer.from(chunk)); + }); + stream$2.on("end", () => { + resolve(Buffer.concat(buffer$2).toString("utf8")); + }); + stream$2.on("error", (e) => { + if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") reject(e); + else reject(new restError_js_1$7.RestError(`Error reading response as text: ${e.message}`, { code: restError_js_1$7.RestError.PARSE_ERROR })); + }); + }); + } + /** @internal */ + function getBodyLength(body$1) { + if (!body$1) return 0; + else if (Buffer.isBuffer(body$1)) return body$1.length; + else if (isReadableStream$1(body$1)) return null; + else if (isArrayBuffer(body$1)) return body$1.byteLength; + else if (typeof body$1 === "string") return Buffer.from(body$1).length; + else return null; + } + /** + * Create a new HttpClient instance for the NodeJS environment. + * @internal + */ + function createNodeHttpClient() { + return new NodeHttpClient(); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDefaultHttpClient = createDefaultHttpClient$1; + const nodeHttpClient_js_1 = require_nodeHttpClient(); + /** + * Create the correct HttpClient for the current environment. + */ + function createDefaultHttpClient$1() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.logPolicyName = void 0; + exports.logPolicy = logPolicy$1; + const log_js_1$8 = require_log$2(); + const sanitizer_js_1$1 = require_sanitizer(); + /** + * The programmatic identifier of the logPolicy. + */ + exports.logPolicyName = "logPolicy"; + /** + * A policy that logs all requests and responses. + * @param options - Options to configure logPolicy. + */ + function logPolicy$1(options = {}) { + var _a$2; + const logger$2 = (_a$2 = options.logger) !== null && _a$2 !== void 0 ? _a$2 : log_js_1$8.logger.info; + const sanitizer = new sanitizer_js_1$1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports.logPolicyName, + async sendRequest(request, next) { + if (!logger$2.enabled) return next(request); + logger$2(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger$2(`Response status code: ${response.status}`); + logger$2(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.redirectPolicyName = void 0; + exports.redirectPolicy = redirectPolicy$1; + /** + * The programmatic identifier of the redirectPolicy. + */ + exports.redirectPolicyName = "redirectPolicy"; + /** + * Methods that are allowed to follow redirects 301 and 302 + */ + const allowedRedirect = ["GET", "HEAD"]; + /** + * A policy to follow Location headers from the server in order + * to support server-side redirection. + * In the browser, this policy is not used. + * @param options - Options to control policy behavior. + */ + function redirectPolicy$1(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + const { request, status, headers } = response; + const locationHeader = headers.get("location"); + if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { + const url$1 = new URL(locationHeader, request.url); + request.url = url$1.toString(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getHeaderName = getHeaderName$1; + exports.setPlatformSpecificData = setPlatformSpecificData$1; + const tslib_1$6 = require_tslib(); + const os$1 = tslib_1$6.__importStar(__require("node:os")); + const process$3 = tslib_1$6.__importStar(__require("node:process")); + /** + * @internal + */ + function getHeaderName$1() { + return "User-Agent"; + } + /** + * @internal + */ + async function setPlatformSpecificData$1(map) { + if (process$3 && process$3.versions) { + const versions = process$3.versions; + if (versions.bun) map.set("Bun", versions.bun); + else if (versions.deno) map.set("Deno", versions.deno); + else if (versions.node) map.set("Node", versions.node); + } + map.set("OS", `(${os$1.arch()}-${os$1.type()}-${os$1.release()})`); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; + exports.SDK_VERSION = "0.2.2"; + exports.DEFAULT_RETRY_POLICY_COUNT = 3; +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getUserAgentHeaderName = getUserAgentHeaderName$1; + exports.getUserAgentValue = getUserAgentValue$1; + const userAgentPlatform_js_1$1 = require_userAgentPlatform$1(); + const constants_js_1$11 = require_constants$2(); + function getUserAgentString$2(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + /** + * @internal + */ + function getUserAgentHeaderName$1() { + return (0, userAgentPlatform_js_1$1.getHeaderName)(); + } + /** + * @internal + */ + async function getUserAgentValue$1(prefix$1) { + const runtimeInfo = new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1$11.SDK_VERSION); + await (0, userAgentPlatform_js_1$1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString$2(runtimeInfo); + const userAgentValue = prefix$1 ? `${prefix$1} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.userAgentPolicyName = void 0; + exports.userAgentPolicy = userAgentPolicy$1; + const userAgent_js_1$2 = require_userAgent$1(); + const UserAgentHeaderName$1 = (0, userAgent_js_1$2.getUserAgentHeaderName)(); + /** + * The programmatic identifier of the userAgentPolicy. + */ + exports.userAgentPolicyName = "userAgentPolicy"; + /** + * A policy that sets the User-Agent header (or equivalent) to reflect + * the library version. + * @param options - Options to customize the user agent value. + */ + function userAgentPolicy$1(options = {}) { + const userAgentValue = (0, userAgent_js_1$2.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName$1)) request.headers.set(UserAgentHeaderName$1, await userAgentValue); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.decompressResponsePolicyName = void 0; + exports.decompressResponsePolicy = decompressResponsePolicy$1; + /** + * The programmatic identifier of the decompressResponsePolicy. + */ + exports.decompressResponsePolicyName = "decompressResponsePolicy"; + /** + * A policy to enable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ + function decompressResponsePolicy$1() { + return { + name: exports.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") request.headers.set("Accept-Encoding", "gzip,deflate"); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getRandomIntegerInclusive = getRandomIntegerInclusive$1; + /** + * Returns a random integer value between a lower and upper bound, + * inclusive of both bounds. + * Note that this uses Math.random and isn't secure. If you need to use + * this for any kind of security purpose, find a better source of random. + * @param min - The smallest integer value allowed. + * @param max - The largest integer value allowed. + */ + function getRandomIntegerInclusive$1(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.calculateRetryDelay = calculateRetryDelay$2; + const random_js_1$1 = require_random(); + /** + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * @param retryAttempt - The current retry attempt number. + * @param config - The exponential retry configuration. + * @returns An object containing the calculated retry delay. + */ + function calculateRetryDelay$2(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1$1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.delay = delay$3; + exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + const AbortError_js_1$3 = require_AbortError$1(); + const StandardAbortMessage$1 = "The operation was aborted."; + /** + * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. + * @param delayInMs - The number of milliseconds to be delayed. + * @param value - The value to be resolved with after a timeout of t milliseconds. + * @param options - The options for delay - currently abort options + * - abortSignal - The abortSignal associated with containing operation. + * - abortErrorMsg - The abort error message associated with containing operation. + * @returns Resolved promise + */ + function delay$3(delayInMs, value, options) { + return new Promise((resolve, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1$3.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage$1)); + }; + const removeListeners = () => { + if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) options.abortSignal.removeEventListener("abort", onAborted); + }; + onAborted = () => { + if (timer) clearTimeout(timer); + removeListeners(); + return rejectOnAbort(); + }; + if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) return rejectOnAbort(); + timer = setTimeout(() => { + removeListeners(); + resolve(value); + }, delayInMs); + if (options === null || options === void 0 ? void 0 : options.abortSignal) options.abortSignal.addEventListener("abort", onAborted); + }); + } + /** + * @internal + * @returns the parsed value or undefined if the parsed value is invalid. + */ + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) return; + return valueAsNum; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports.throttlingRetryStrategy = throttlingRetryStrategy; + const helpers_js_1$1 = require_helpers$1(); + /** + * The header that comes back from services representing + * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). + */ + const RetryAfterHeader = "Retry-After"; + /** + * The headers that come back from services representing + * the amount of time (minimum) to wait to retry. + * + * "retry-after-ms", "x-ms-retry-after-ms" : milliseconds + * "Retry-After" : seconds or timestamp + */ + const AllRetryAfterHeaders = [ + "retry-after-ms", + "x-ms-retry-after-ms", + RetryAfterHeader + ]; + /** + * A response is a throttling retry response if it has a throttling status code (429 or 503), + * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. + * + * Returns the `retryAfterInMs` value if the response is a throttling retry response. + * If not throttling retry response, returns `undefined`. + * + * @internal + */ + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1$1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch (_a$2) { + return void 0; + } + } + /** + * A response is a retry response if it has a throttling status code (429 or 503), + * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. + */ + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) return { skipStrategy: true }; + return { retryAfterInMs }; + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.exponentialRetryStrategy = exponentialRetryStrategy; + exports.isExponentialRetryResponse = isExponentialRetryResponse; + exports.isSystemError = isSystemError; + const delay_js_1$2 = require_delay$1(); + const throttlingRetryStrategy_js_1$2 = require_throttlingRetryStrategy(); + const DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + /** + * A retry strategy that retries with an exponentially increasing delay in these two cases: + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505). + */ + function exponentialRetryStrategy(options = {}) { + var _a$2, _b$1; + const retryInterval = (_a$2 = options.retryDelayInMs) !== null && _a$2 !== void 0 ? _a$2 : DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = (_b$1 = options.maxRetryDelayInMs) !== null && _b$1 !== void 0 ? _b$1 : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1$2.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) return { skipStrategy: true }; + if (responseError && !matchedSystemError && !isExponential) return { errorToThrow: responseError }; + return (0, delay_js_1$2.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + /** + * A response is a retry response if it has status codes: + * - 408, or + * - Greater or equal than 500, except for 501 and 505. + */ + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + /** + * Determines whether an error from a pipeline response was triggered in the network layer. + */ + function isSystemError(err) { + if (!err) return false; + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.retryPolicy = retryPolicy$1; + const helpers_js_1 = require_helpers$1(); + const AbortError_js_1$2 = require_AbortError$1(); + const logger_js_1$5 = require_logger$1(); + const constants_js_1$10 = require_constants$2(); + const retryPolicyLogger$1 = (0, logger_js_1$5.createClientLogger)("ts-http-runtime retryPolicy"); + /** + * The programmatic identifier of the retryPolicy. + */ + const retryPolicyName = "retryPolicy"; + /** + * retryPolicy is a generic policy to enable retrying requests when certain conditions are met + */ + function retryPolicy$1(strategies, options = { maxRetries: constants_js_1$10.DEFAULT_RETRY_POLICY_COUNT }) { + const logger$2 = options.logger || retryPolicyLogger$1; + return { + name: retryPolicyName, + async sendRequest(request, next) { + var _a$2, _b$1; + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger$2.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger$2.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger$2.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") throw e; + response = responseError.response; + } + if ((_a$2 = request.abortSignal) === null || _a$2 === void 0 ? void 0 : _a$2.aborted) { + logger$2.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1$2.AbortError(); + throw abortError; + } + if (retryCount >= ((_b$1 = options.maxRetries) !== null && _b$1 !== void 0 ? _b$1 : constants_js_1$10.DEFAULT_RETRY_POLICY_COUNT)) { + logger$2.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) throw responseError; + else if (response) return response; + else throw new Error("Maximum retries reached with no response or error to throw"); + } + logger$2.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger$2; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger$2.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger$2.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.defaultRetryPolicyName = void 0; + exports.defaultRetryPolicy = defaultRetryPolicy$1; + const exponentialRetryStrategy_js_1$2 = require_exponentialRetryStrategy(); + const throttlingRetryStrategy_js_1$1 = require_throttlingRetryStrategy(); + const retryPolicy_js_1$5 = require_retryPolicy$1(); + const constants_js_1$9 = require_constants$2(); + /** + * Name of the {@link defaultRetryPolicy} + */ + exports.defaultRetryPolicyName = "defaultRetryPolicy"; + /** + * A policy that retries according to three strategies: + * - When the server sends a 429 response with a Retry-After header. + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. + */ + function defaultRetryPolicy$1(options = {}) { + var _a$2; + return { + name: exports.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1$5.retryPolicy)([(0, throttlingRetryStrategy_js_1$1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1$2.exponentialRetryStrategy)(options)], { maxRetries: (_a$2 = options.maxRetries) !== null && _a$2 !== void 0 ? _a$2 : constants_js_1$9.DEFAULT_RETRY_POLICY_COUNT }).sendRequest + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports) { + var _a, _b, _c, _d; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isDeno = exports.isWebWorker = exports.isBrowser = void 0; + /** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ + exports.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + /** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ + exports.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); + /** + * A constant that indicates whether the environment the code is running is Deno. + */ + exports.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + /** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ + exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + /** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + */ + exports.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); + /** + * A constant that indicates whether the environment the code is running is Node.JS. + */ + exports.isNodeRuntime = exports.isNodeLike && !exports.isBun && !exports.isDeno; + /** + * A constant that indicates whether the environment the code is running is in React-Native. + */ + exports.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formDataPolicyName = void 0; + exports.formDataPolicy = formDataPolicy$1; + const bytesEncoding_js_1$5 = require_bytesEncoding(); + const checkEnvironment_js_1$3 = require_checkEnvironment(); + const httpHeaders_js_1$5 = require_httpHeaders$1(); + /** + * The programmatic identifier of the formDataPolicy. + */ + exports.formDataPolicyName = "formDataPolicy"; + function formDataToFormDataMap(formData) { + var _a$2; + const formDataMap = {}; + for (const [key, value] of formData.entries()) { + (_a$2 = formDataMap[key]) !== null && _a$2 !== void 0 || (formDataMap[key] = []); + formDataMap[key].push(value); + } + return formDataMap; + } + /** + * A policy that encodes FormData on the request into the body. + */ + function formDataPolicy$1() { + return { + name: exports.formDataPolicyName, + async sendRequest(request, next) { + if (checkEnvironment_js_1$3.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + request.formData = formDataToFormDataMap(request.body); + request.body = void 0; + } + if (request.formData) { + const contentType$1 = request.headers.get("Content-Type"); + if (contentType$1 && contentType$1.indexOf("application/x-www-form-urlencoded") !== -1) request.body = wwwFormUrlEncode(request.formData); + else await prepareFormData(request.formData, request); + request.formData = void 0; + } + return next(request); + } + }; + } + function wwwFormUrlEncode(formData) { + const urlSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(formData)) if (Array.isArray(value)) for (const subValue of value) urlSearchParams.append(key, subValue.toString()); + else urlSearchParams.append(key, value.toString()); + return urlSearchParams.toString(); + } + async function prepareFormData(formData, request) { + const contentType$1 = request.headers.get("Content-Type"); + if (contentType$1 && !contentType$1.startsWith("multipart/form-data")) return; + request.headers.set("Content-Type", contentType$1 !== null && contentType$1 !== void 0 ? contentType$1 : "multipart/form-data"); + const parts = []; + for (const [fieldName, values] of Object.entries(formData)) for (const value of Array.isArray(values) ? values : [values]) if (typeof value === "string") parts.push({ + headers: (0, httpHeaders_js_1$5.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), + body: (0, bytesEncoding_js_1$5.stringToUint8Array)(value, "utf-8") + }); + else if (value === void 0 || value === null || typeof value !== "object") throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); + else { + const fileName = value.name || "blob"; + const headers = (0, httpHeaders_js_1$5.createHttpHeaders)(); + headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); + headers.set("Content-Type", value.type || "application/octet-stream"); + parts.push({ + headers, + body: value + }); + } + request.multipartBody = { parts }; + } +} }); + +//#endregion +//#region node_modules/.deno/ms@2.1.3/node_modules/ms/index.js +var require_ms = __commonJS({ "node_modules/.deno/ms@2.1.3/node_modules/ms/index.js"(exports, module) { + /** + * Helpers. + */ + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) return parse$1(val); + else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val); + throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); + }; + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + function parse$1(str) { + str = String(str); + if (str.length > 100) return; + var match$1 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); + if (!match$1) return; + var n = parseFloat(match$1[1]); + var type = (match$1[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": return n * y; + case "weeks": + case "week": + case "w": return n * w; + case "days": + case "day": + case "d": return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": return n; + default: return void 0; + } + } + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) return Math.round(ms / d) + "d"; + if (msAbs >= h) return Math.round(ms / h) + "h"; + if (msAbs >= m) return Math.round(ms / m) + "m"; + if (msAbs >= s) return Math.round(ms / s) + "s"; + return ms + "ms"; + } + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) return plural(ms, msAbs, d, "day"); + if (msAbs >= h) return plural(ms, msAbs, h, "hour"); + if (msAbs >= m) return plural(ms, msAbs, m, "minute"); + if (msAbs >= s) return plural(ms, msAbs, s, "second"); + return ms + " ms"; + } + /** + * Pluralization helper. + */ + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } +} }); + +//#endregion +//#region node_modules/.deno/debug@4.4.0/node_modules/debug/src/common.js +var require_common = __commonJS({ "node_modules/.deno/debug@4.4.0/node_modules/debug/src/common.js"(exports, module) { + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable$1; + createDebug.enable = enable$1; + createDebug.enabled = enabled$1; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy$1; + Object.keys(env).forEach((key) => { + createDebug[key] = env[key]; + }); + /** + * The currently active debug mode names, and names to skip. + */ + createDebug.names = []; + createDebug.skips = []; + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + for (let i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug$3(...args) { + if (!debug$3.enabled) return; + const self$1 = debug$3; + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self$1.diff = ms; + self$1.prev = prevTime; + self$1.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== "string") args.unshift("%O"); + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match$1, format) => { + if (match$1 === "%%") return "%"; + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args[index]; + match$1 = formatter.call(self$1, val); + args.splice(index, 1); + index--; + } + return match$1; + }); + createDebug.formatArgs.call(self$1, args); + const logFn = self$1.log || createDebug.log; + logFn.apply(self$1, args); + } + debug$3.namespace = namespace; + debug$3.useColors = createDebug.useColors(); + debug$3.color = createDebug.selectColor(namespace); + debug$3.extend = extend$1; + debug$3.destroy = createDebug.destroy; + Object.defineProperty(debug$3, "enabled", { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) return enableOverride; + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, + set: (v) => { + enableOverride = v; + } + }); + if (typeof createDebug.init === "function") createDebug.init(debug$3); + return debug$3; + } + function extend$1(namespace, delimiter$1) { + const newDebug = createDebug(this.namespace + (typeof delimiter$1 === "undefined" ? ":" : delimiter$1) + namespace); + newDebug.log = this.log; + return newDebug; + } + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable$1(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean); + for (const ns of split) if (ns[0] === "-") createDebug.skips.push(ns.slice(1)); + else createDebug.names.push(ns); + } + /** + * Checks if the given string matches a namespace template, honoring + * asterisks as wildcards. + * + * @param {String} search + * @param {String} template + * @return {Boolean} + */ + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; + } else { + searchIndex++; + templateIndex++; + } + else if (starIndex !== -1) { + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else return false; + while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++; + return templateIndex === template.length; + } + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable$1() { + const namespaces = [...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace)].join(","); + createDebug.enable(""); + return namespaces; + } + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled$1(name) { + for (const skip of createDebug.skips) if (matchesTemplate(name, skip)) return false; + for (const ns of createDebug.names) if (matchesTemplate(name, ns)) return true; + return false; + } + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; + } + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy$1() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + createDebug.enable(createDebug.load()); + return createDebug; + } + module.exports = setup; +} }); + +//#endregion +//#region node_modules/.deno/debug@4.4.0/node_modules/debug/src/browser.js +var require_browser = __commonJS({ "node_modules/.deno/debug@4.4.0/node_modules/debug/src/browser.js"(exports, module) { + /** + * This is the web browser implementation of `debug()`. + */ + exports.formatArgs = formatArgs$1; + exports.save = save$1; + exports.load = load$1; + exports.useColors = useColors$1; + exports.storage = localstorage(); + exports.destroy = (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + /** + * Colors. + */ + exports.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + /** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + function useColors$1() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return true; + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false; + let m$1; + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m$1 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m$1[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + /** + * Colorize log arguments if enabled. + * + * @api public + */ + function formatArgs$1(args) { + args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff); + if (!this.useColors) return; + const c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, (match$1) => { + if (match$1 === "%%") return; + index++; + if (match$1 === "%c") lastC = index; + }); + args.splice(lastC, 0, c); + } + /** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ + exports.log = console.debug || console.log || (() => {}); + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + function save$1(namespaces) { + try { + if (namespaces) exports.storage.setItem("debug", namespaces); + else exports.storage.removeItem("debug"); + } catch (error) {} + } + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + function load$1() { + let r; + try { + r = exports.storage.getItem("debug"); + } catch (error) {} + if (!r && typeof process !== "undefined" && "env" in process) r = process.env.DEBUG; + return r; + } + /** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + function localstorage() { + try { + return localStorage; + } catch (error) {} + } + module.exports = require_common()(exports); + const { formatters: formatters$1 } = module.exports; + /** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + formatters$1.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; +} }); + +//#endregion +//#region node_modules/.deno/debug@4.4.0/node_modules/debug/src/node.js +var require_node = __commonJS({ "node_modules/.deno/debug@4.4.0/node_modules/debug/src/node.js"(exports, module) { + /** + * Module dependencies. + */ + const tty = __require("tty"); + const util$2 = __require("util"); + /** + * This is the Node.js implementation of `debug()`. + */ + exports.init = init; + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.destroy = util$2.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + /** + * Colors. + */ + exports.colors = [ + 6, + 2, + 3, + 4, + 5, + 1 + ]; + try { + const supportsColor = __require("supports-color"); + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } catch (error) {} + /** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + exports.inspectOpts = Object.keys(process.env).filter((key) => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === "null") val = null; + else val = Number(val); + obj[prop] = val; + return obj; + }, {}); + /** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + function useColors() { + return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + /** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + function formatArgs(args) { + const { namespace: name, useColors: useColors$2 } = this; + if (useColors$2) { + const c = this.color; + const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); + const prefix$1 = ` ${colorCode};1m${name} \u001B[0m`; + args[0] = prefix$1 + args[0].split("\n").join("\n" + prefix$1); + args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m"); + } else args[0] = getDate() + name + " " + args[0]; + } + function getDate() { + if (exports.inspectOpts.hideDate) return ""; + return new Date().toISOString() + " "; + } + /** + * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. + */ + function log(...args) { + return process.stderr.write(util$2.formatWithOptions(exports.inspectOpts, ...args) + "\n"); + } + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + function save(namespaces) { + if (namespaces) process.env.DEBUG = namespaces; + else delete process.env.DEBUG; + } + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + function load() { + return process.env.DEBUG; + } + /** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + function init(debug$3) { + debug$3.inspectOpts = {}; + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) debug$3.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } + module.exports = require_common()(exports); + const { formatters } = module.exports; + /** + * Map %o to `util.inspect()`, all on a single line. + */ + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util$2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + }; + /** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util$2.inspect(v, this.inspectOpts); + }; +} }); + +//#endregion +//#region node_modules/.deno/debug@4.4.0/node_modules/debug/src/index.js +var require_src = __commonJS({ "node_modules/.deno/debug@4.4.0/node_modules/debug/src/index.js"(exports, module) { + /** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) module.exports = require_browser(); + else module.exports = require_node(); +} }); + +//#endregion +//#region node_modules/.deno/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js +var require_helpers = __commonJS({ "node_modules/.deno/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js"(exports) { + var __createBinding$10 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$10 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$10 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$10(result, mod, k); + } + __setModuleDefault$10(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.req = exports.json = exports.toBuffer = void 0; + const http$1 = __importStar$10(__require("http")); + const https = __importStar$10(__require("https")); + async function toBuffer(stream$2) { + let length = 0; + const chunks = []; + for await (const chunk of stream$2) { + length += chunk.length; + chunks.push(chunk); + } + return Buffer.concat(chunks, length); + } + exports.toBuffer = toBuffer; + async function json(stream$2) { + const buf = await toBuffer(stream$2); + const str = buf.toString("utf8"); + try { + return JSON.parse(str); + } catch (_err) { + const err = _err; + err.message += ` (input: ${str})`; + throw err; + } + } + exports.json = json; + function req(url$1, opts = {}) { + const href = typeof url$1 === "string" ? url$1 : url$1.href; + const req$1 = (href.startsWith("https:") ? https : http$1).request(url$1, opts); + const promise = new Promise((resolve, reject) => { + req$1.once("response", resolve).once("error", reject).end(); + }); + req$1.then = promise.then.bind(promise); + return req$1; + } + exports.req = req; +} }); + +//#endregion +//#region node_modules/.deno/agent-base@7.1.3/node_modules/agent-base/dist/index.js +var require_dist$4 = __commonJS({ "node_modules/.deno/agent-base@7.1.3/node_modules/agent-base/dist/index.js"(exports) { + var __createBinding$9 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$9 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$9 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$9(result, mod, k); + } + __setModuleDefault$9(result, mod); + return result; + }; + var __exportStar = exports && exports.__exportStar || function(m$1, exports$1) { + for (var p in m$1) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding$9(exports$1, m$1, p); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Agent = void 0; + const net$2 = __importStar$9(__require("net")); + const http = __importStar$9(__require("http")); + const https_1 = __require("https"); + __exportStar(require_helpers(), exports); + const INTERNAL = Symbol("AgentBaseInternalState"); + var Agent = class extends http.Agent { + constructor(opts) { + super(opts); + this[INTERNAL] = {}; + } + /** + * Determine whether this is an `http` or `https` request. + */ + isSecureEndpoint(options) { + if (options) { + if (typeof options.secureEndpoint === "boolean") return options.secureEndpoint; + if (typeof options.protocol === "string") return options.protocol === "https:"; + } + const { stack } = new Error(); + if (typeof stack !== "string") return false; + return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1); + } + incrementSockets(name) { + if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) return null; + if (!this.sockets[name]) this.sockets[name] = []; + const fakeSocket = new net$2.Socket({ writable: false }); + this.sockets[name].push(fakeSocket); + this.totalSocketCount++; + return fakeSocket; + } + decrementSockets(name, socket) { + if (!this.sockets[name] || socket === null) return; + const sockets = this.sockets[name]; + const index = sockets.indexOf(socket); + if (index !== -1) { + sockets.splice(index, 1); + this.totalSocketCount--; + if (sockets.length === 0) delete this.sockets[name]; + } + } + getName(options) { + const secureEndpoint = typeof options.secureEndpoint === "boolean" ? options.secureEndpoint : this.isSecureEndpoint(options); + if (secureEndpoint) return https_1.Agent.prototype.getName.call(this, options); + return super.getName(options); + } + createSocket(req$1, options, cb) { + const connectOpts = { + ...options, + secureEndpoint: this.isSecureEndpoint(options) + }; + const name = this.getName(connectOpts); + const fakeSocket = this.incrementSockets(name); + Promise.resolve().then(() => this.connect(req$1, connectOpts)).then((socket) => { + this.decrementSockets(name, fakeSocket); + if (socket instanceof http.Agent) try { + return socket.addRequest(req$1, connectOpts); + } catch (err) { + return cb(err); + } + this[INTERNAL].currentSocket = socket; + super.createSocket(req$1, options, cb); + }, (err) => { + this.decrementSockets(name, fakeSocket); + cb(err); + }); + } + createConnection() { + const socket = this[INTERNAL].currentSocket; + this[INTERNAL].currentSocket = void 0; + if (!socket) throw new Error("No socket was returned in the `connect()` function"); + return socket; + } + get defaultPort() { + return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80); + } + set defaultPort(v) { + if (this[INTERNAL]) this[INTERNAL].defaultPort = v; + } + get protocol() { + return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:"); + } + set protocol(v) { + if (this[INTERNAL]) this[INTERNAL].protocol = v; + } + }; + exports.Agent = Agent; +} }); + +//#endregion +//#region node_modules/.deno/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js +var require_parse_proxy_response = __commonJS({ "node_modules/.deno/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) { + var __importDefault$2 = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parseProxyResponse = void 0; + const debug_1$2 = __importDefault$2(require_src()); + const debug$2 = (0, debug_1$2.default)("https-proxy-agent:parse-proxy-response"); + function parseProxyResponse(socket) { + return new Promise((resolve, reject) => { + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) ondata(b); + else socket.once("readable", read); + } + function cleanup() { + socket.removeListener("end", onend); + socket.removeListener("error", onerror); + socket.removeListener("readable", read); + } + function onend() { + cleanup(); + debug$2("onend"); + reject(new Error("Proxy connection ended before receiving CONNECT response")); + } + function onerror(err) { + cleanup(); + debug$2("onerror %o", err); + reject(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf("\r\n\r\n"); + if (endOfHeaders === -1) { + debug$2("have not received end of HTTP headers yet..."); + read(); + return; + } + const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n"); + const firstLine = headerParts.shift(); + if (!firstLine) { + socket.destroy(); + return reject(new Error("No header received from proxy CONNECT response")); + } + const firstLineParts = firstLine.split(" "); + const statusCode = +firstLineParts[1]; + const statusText = firstLineParts.slice(2).join(" "); + const headers = {}; + for (const header of headerParts) { + if (!header) continue; + const firstColon = header.indexOf(":"); + if (firstColon === -1) { + socket.destroy(); + return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); + } + const key = header.slice(0, firstColon).toLowerCase(); + const value = header.slice(firstColon + 1).trimStart(); + const current = headers[key]; + if (typeof current === "string") headers[key] = [current, value]; + else if (Array.isArray(current)) current.push(value); + else headers[key] = value; + } + debug$2("got proxy server response: %o %o", firstLine, headers); + cleanup(); + resolve({ + connect: { + statusCode, + statusText, + headers + }, + buffered + }); + } + socket.on("error", onerror); + socket.on("end", onend); + read(); + }); + } + exports.parseProxyResponse = parseProxyResponse; +} }); + +//#endregion +//#region node_modules/.deno/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js +var require_dist$3 = __commonJS({ "node_modules/.deno/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js"(exports) { + var __createBinding$8 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$8 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$8 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$8(result, mod, k); + } + __setModuleDefault$8(result, mod); + return result; + }; + var __importDefault$1 = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpsProxyAgent = void 0; + const net$1 = __importStar$8(__require("net")); + const tls$1 = __importStar$8(__require("tls")); + const assert_1$5 = __importDefault$1(__require("assert")); + const debug_1$1 = __importDefault$1(require_src()); + const agent_base_1$1 = require_dist$4(); + const url_1$2 = __require("url"); + const parse_proxy_response_1 = require_parse_proxy_response(); + const debug$1 = (0, debug_1$1.default)("https-proxy-agent"); + const setServernameFromNonIpHost = (options) => { + if (options.servername === void 0 && options.host && !net$1.isIP(options.host)) return { + ...options, + servername: options.host + }; + return options; + }; + /** + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. + * + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. + */ + var HttpsProxyAgent = class extends agent_base_1$1.Agent { + constructor(proxy, opts) { + super(opts); + this.options = { path: void 0 }; + this.proxy = typeof proxy === "string" ? new url_1$2.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug$1("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); + const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; + this.connectOpts = { + ALPNProtocols: ["http/1.1"], + ...opts ? omit$1(opts, "headers") : null, + host, + port + }; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + */ + async connect(req$1, opts) { + const { proxy } = this; + if (!opts.host) throw new TypeError("No \"host\" provided"); + let socket; + if (proxy.protocol === "https:") { + debug$1("Creating `tls.Socket`: %o", this.connectOpts); + socket = tls$1.connect(setServernameFromNonIpHost(this.connectOpts)); + } else { + debug$1("Creating `net.Socket`: %o", this.connectOpts); + socket = net$1.connect(this.connectOpts); + } + const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; + const host = net$1.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; + let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`; + } + headers.Host = `${host}:${opts.port}`; + if (!headers["Proxy-Connection"]) headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"; + for (const name of Object.keys(headers)) payload += `${name}: ${headers[name]}\r\n`; + const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); + socket.write(`${payload}\r\n`); + const { connect, buffered } = await proxyResponsePromise; + req$1.emit("proxyConnect", connect); + this.emit("proxyConnect", connect, req$1); + if (connect.statusCode === 200) { + req$1.once("socket", resume); + if (opts.secureEndpoint) { + debug$1("Upgrading socket connection to TLS"); + return tls$1.connect({ + ...omit$1(setServernameFromNonIpHost(opts), "host", "path", "port"), + socket + }); + } + return socket; + } + socket.destroy(); + const fakeSocket = new net$1.Socket({ writable: false }); + fakeSocket.readable = true; + req$1.once("socket", (s$1) => { + debug$1("Replaying proxy buffer for failed request"); + (0, assert_1$5.default)(s$1.listenerCount("data") > 0); + s$1.push(buffered); + s$1.push(null); + }); + return fakeSocket; + } + }; + HttpsProxyAgent.protocols = ["http", "https"]; + exports.HttpsProxyAgent = HttpsProxyAgent; + function resume(socket) { + socket.resume(); + } + function omit$1(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) if (!keys.includes(key)) ret[key] = obj[key]; + return ret; + } +} }); + +//#endregion +//#region node_modules/.deno/http-proxy-agent@7.0.2/node_modules/http-proxy-agent/dist/index.js +var require_dist$2 = __commonJS({ "node_modules/.deno/http-proxy-agent@7.0.2/node_modules/http-proxy-agent/dist/index.js"(exports) { + var __createBinding$7 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$7 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$7 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$7(result, mod, k); + } + __setModuleDefault$7(result, mod); + return result; + }; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpProxyAgent = void 0; + const net = __importStar$7(__require("net")); + const tls = __importStar$7(__require("tls")); + const debug_1 = __importDefault(require_src()); + const events_1 = __require("events"); + const agent_base_1 = require_dist$4(); + const url_1$1 = __require("url"); + const debug = (0, debug_1.default)("http-proxy-agent"); + /** + * The `HttpProxyAgent` implements an HTTP Agent subclass that connects + * to the specified "HTTP proxy server" in order to proxy HTTP requests. + */ + var HttpProxyAgent = class extends agent_base_1.Agent { + constructor(proxy, opts) { + super(opts); + this.proxy = typeof proxy === "string" ? new url_1$1.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug("Creating new HttpProxyAgent instance: %o", this.proxy.href); + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); + const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; + this.connectOpts = { + ...opts ? omit(opts, "headers") : null, + host, + port + }; + } + addRequest(req$1, opts) { + req$1._header = null; + this.setRequestProps(req$1, opts); + super.addRequest(req$1, opts); + } + setRequestProps(req$1, opts) { + const { proxy } = this; + const protocol = opts.secureEndpoint ? "https:" : "http:"; + const hostname = req$1.getHeader("host") || "localhost"; + const base = `${protocol}//${hostname}`; + const url$1 = new url_1$1.URL(req$1.path, base); + if (opts.port !== 80) url$1.port = String(opts.port); + req$1.path = String(url$1); + const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`; + } + if (!headers["Proxy-Connection"]) headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"; + for (const name of Object.keys(headers)) { + const value = headers[name]; + if (value) req$1.setHeader(name, value); + } + } + async connect(req$1, opts) { + req$1._header = null; + if (!req$1.path.includes("://")) this.setRequestProps(req$1, opts); + let first; + let endOfHeaders; + debug("Regenerating stored HTTP header string for request"); + req$1._implicitHeader(); + if (req$1.outputData && req$1.outputData.length > 0) { + debug("Patching connection write() output buffer with updated header"); + first = req$1.outputData[0].data; + endOfHeaders = first.indexOf("\r\n\r\n") + 4; + req$1.outputData[0].data = req$1._header + first.substring(endOfHeaders); + debug("Output buffer: %o", req$1.outputData[0].data); + } + let socket; + if (this.proxy.protocol === "https:") { + debug("Creating `tls.Socket`: %o", this.connectOpts); + socket = tls.connect(this.connectOpts); + } else { + debug("Creating `net.Socket`: %o", this.connectOpts); + socket = net.connect(this.connectOpts); + } + await (0, events_1.once)(socket, "connect"); + return socket; + } + }; + HttpProxyAgent.protocols = ["http", "https"]; + exports.HttpProxyAgent = HttpProxyAgent; + function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) if (!keys.includes(key)) ret[key] = obj[key]; + return ret; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.globalNoProxyList = exports.proxyPolicyName = void 0; + exports.loadNoProxy = loadNoProxy; + exports.getDefaultProxySettings = getDefaultProxySettings$1; + exports.proxyPolicy = proxyPolicy$1; + const https_proxy_agent_1 = require_dist$3(); + const http_proxy_agent_1 = require_dist$2(); + const log_js_1$7 = require_log$2(); + const HTTPS_PROXY = "HTTPS_PROXY"; + const HTTP_PROXY = "HTTP_PROXY"; + const ALL_PROXY = "ALL_PROXY"; + const NO_PROXY = "NO_PROXY"; + /** + * The programmatic identifier of the proxyPolicy. + */ + exports.proxyPolicyName = "proxyPolicy"; + /** + * Stores the patterns specified in NO_PROXY environment variable. + * @internal + */ + exports.globalNoProxyList = []; + let noProxyListLoaded = false; + /** A cache of whether a host should bypass the proxy. */ + const globalBypassedMap = new Map(); + function getEnvironmentValue(name) { + if (process.env[name]) return process.env[name]; + else if (process.env[name.toLowerCase()]) return process.env[name.toLowerCase()]; + return void 0; + } + function loadEnvironmentProxyValue() { + if (!process) return void 0; + const httpsProxy = getEnvironmentValue(HTTPS_PROXY); + const allProxy = getEnvironmentValue(ALL_PROXY); + const httpProxy = getEnvironmentValue(HTTP_PROXY); + return httpsProxy || allProxy || httpProxy; + } + /** + * Check whether the host of a given `uri` matches any pattern in the no proxy list. + * If there's a match, any request sent to the same host shouldn't have the proxy settings set. + * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210 + */ + function isBypassed(uri, noProxyList, bypassedMap) { + if (noProxyList.length === 0) return false; + const host = new URL(uri).hostname; + if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) return bypassedMap.get(host); + let isBypassedFlag = false; + for (const pattern of noProxyList) if (pattern[0] === ".") { + if (host.endsWith(pattern)) isBypassedFlag = true; + else if (host.length === pattern.length - 1 && host === pattern.slice(1)) isBypassedFlag = true; + } else if (host === pattern) isBypassedFlag = true; + bypassedMap === null || bypassedMap === void 0 || bypassedMap.set(host, isBypassedFlag); + return isBypassedFlag; + } + function loadNoProxy() { + const noProxy = getEnvironmentValue(NO_PROXY); + noProxyListLoaded = true; + if (noProxy) return noProxy.split(",").map((item) => item.trim()).filter((item) => item.length); + return []; + } + /** + * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. + * If no argument is given, it attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + * @param proxyUrl - The url of the proxy to use. May contain authentication information. + * @deprecated - Internally this method is no longer necessary when setting proxy information. + */ + function getDefaultProxySettings$1(proxyUrl) { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) return void 0; + } + const parsedUrl = new URL(proxyUrl); + const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + return { + host: schema + parsedUrl.hostname, + port: Number.parseInt(parsedUrl.port || "80"), + username: parsedUrl.username, + password: parsedUrl.password + }; + } + /** + * This method attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + */ + function getDefaultProxySettingsInternal() { + const envProxy = loadEnvironmentProxyValue(); + return envProxy ? new URL(envProxy) : void 0; + } + function getUrlFromProxySettings(settings) { + let parsedProxyUrl; + try { + parsedProxyUrl = new URL(settings.host); + } catch (_a$2) { + throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); + } + parsedProxyUrl.port = String(settings.port); + if (settings.username) parsedProxyUrl.username = settings.username; + if (settings.password) parsedProxyUrl.password = settings.password; + return parsedProxyUrl; + } + function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { + if (request.agent) return; + const url$1 = new URL(request.url); + const isInsecure = url$1.protocol !== "https:"; + if (request.tlsSettings) log_js_1$7.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); + const headers = request.headers.toJSON(); + if (isInsecure) { + if (!cachedAgents.httpProxyAgent) cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); + request.agent = cachedAgents.httpProxyAgent; + } else { + if (!cachedAgents.httpsProxyAgent) cachedAgents.httpsProxyAgent = new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { headers }); + request.agent = cachedAgents.httpsProxyAgent; + } + } + /** + * A policy that allows one to apply proxy settings to all requests. + * If not passed static settings, they will be retrieved from the HTTPS_PROXY + * or HTTP_PROXY environment variables. + * @param proxySettings - ProxySettings to use on each request. + * @param options - additional settings, for example, custom NO_PROXY patterns + */ + function proxyPolicy$1(proxySettings, options) { + if (!noProxyListLoaded) exports.globalNoProxyList.push(...loadNoProxy()); + const defaultProxy = proxySettings ? getUrlFromProxySettings(proxySettings) : getDefaultProxySettingsInternal(); + const cachedAgents = {}; + return { + name: exports.proxyPolicyName, + async sendRequest(request, next) { + var _a$2; + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a$2 = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a$2 !== void 0 ? _a$2 : exports.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) setProxyAgentOnRequest(request, cachedAgents, defaultProxy); + else if (request.proxySettings) setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.agentPolicyName = void 0; + exports.agentPolicy = agentPolicy$1; + /** + * Name of the Agent Policy + */ + exports.agentPolicyName = "agentPolicy"; + /** + * Gets a pipeline policy that sets http.agent + */ + function agentPolicy$1(agent) { + return { + name: exports.agentPolicyName, + sendRequest: async (req$1, next) => { + if (!req$1.agent) req$1.agent = agent; + return next(req$1); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.tlsPolicyName = void 0; + exports.tlsPolicy = tlsPolicy$1; + /** + * Name of the TLS Policy + */ + exports.tlsPolicyName = "tlsPolicy"; + /** + * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. + */ + function tlsPolicy$1(tlsSettings) { + return { + name: exports.tlsPolicyName, + sendRequest: async (req$1, next) => { + if (!req$1.tlsSettings) req$1.tlsSettings = tlsSettings; + return next(req$1); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isNodeReadableStream = isNodeReadableStream$1; + exports.isWebReadableStream = isWebReadableStream; + exports.isBinaryBody = isBinaryBody; + exports.isReadableStream = isReadableStream; + exports.isBlob = isBlob; + function isNodeReadableStream$1(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body$1) { + return body$1 !== void 0 && (body$1 instanceof Uint8Array || isReadableStream(body$1) || typeof body$1 === "function" || body$1 instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream$1(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.concat = concat; + const tslib_1$5 = require_tslib(); + const stream_1 = __require("stream"); + const typeGuards_js_1$4 = require_typeGuards$1(); + function streamAsyncIterator() { + return tslib_1$5.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = yield tslib_1$5.__await(reader.read()); + if (done) return yield tslib_1$5.__await(void 0); + yield yield tslib_1$5.__await(value); + } + } finally { + reader.releaseLock(); + } + }); + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + if (!webStream.values) webStream.values = streamAsyncIterator.bind(webStream); + } + function ensureNodeStream(stream$2) { + if (stream$2 instanceof ReadableStream) { + makeAsyncIterable(stream$2); + return stream_1.Readable.fromWeb(stream$2); + } else return stream$2; + } + function toStream(source) { + if (source instanceof Uint8Array) return stream_1.Readable.from(Buffer.from(source)); + else if ((0, typeGuards_js_1$4.isBlob)(source)) return ensureNodeStream(source.stream()); + else return ensureNodeStream(source); + } + /** + * Utility function that concatenates a set of binary inputs into one combined output. + * + * @param sources - array of sources for the concatenation + * @returns - in Node, a (() =\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs. + * In browser, returns a `Blob` representing all the concatenated inputs. + * + * @internal + */ + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from(function() { + return tslib_1$5.__asyncGenerator(this, arguments, function* () { + var _a$2, e_1, _b$1, _c$1; + for (const stream$2 of streams) try { + for (var _d$1 = true, stream_2 = (e_1 = void 0, tslib_1$5.__asyncValues(stream$2)), stream_2_1; stream_2_1 = yield tslib_1$5.__await(stream_2.next()), _a$2 = stream_2_1.done, !_a$2; _d$1 = true) { + _c$1 = stream_2_1.value; + _d$1 = false; + const chunk = _c$1; + yield yield tslib_1$5.__await(chunk); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_d$1 && !_a$2 && (_b$1 = stream_2.return)) yield tslib_1$5.__await(_b$1.call(stream_2)); + } finally { + if (e_1) throw e_1.error; + } + } + }); + }()); + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.multipartPolicyName = void 0; + exports.multipartPolicy = multipartPolicy$1; + const bytesEncoding_js_1$4 = require_bytesEncoding(); + const typeGuards_js_1$3 = require_typeGuards$1(); + const uuidUtils_js_1$1 = require_uuidUtils(); + const concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1$1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) result += `${key}: ${value}\r\n`; + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) return source.byteLength; + else if ((0, typeGuards_js_1$3.isBlob)(source)) return source.size === -1 ? void 0 : source.size; + else return void 0; + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) return void 0; + else total += partLength; + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1$4.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1$4.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1$4.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1$4.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1$4.stringToUint8Array)(`\r\n--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1$4.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength$1 = getTotalLength(sources); + if (contentLength$1) request.headers.set("Content-Length", contentLength$1); + request.body = await (0, concat_js_1.concat)(sources); + } + /** + * Name of multipart policy + */ + exports.multipartPolicyName = "multipartPolicy"; + const maxBoundaryLength = 70; + const validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + /** + * Pipeline policy for multipart requests + */ + function multipartPolicy$1() { + return { + name: exports.multipartPolicyName, + async sendRequest(request, next) { + var _a$2; + if (!request.multipartBody) return next(request); + if (request.body) throw new Error("multipartBody and regular body cannot be set at the same time"); + let boundary = request.multipartBody.boundary; + const contentTypeHeader = (_a$2 = request.headers.get("Content-Type")) !== null && _a$2 !== void 0 ? _a$2 : "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + const [, contentType$1, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + boundary !== null && boundary !== void 0 || (boundary = parsedBoundary); + if (boundary) assertValidBoundary(boundary); + else boundary = generateBoundary(); + request.headers.set("Content-Type", `${contentType$1}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createPipelineFromOptions = createPipelineFromOptions$1; + const logPolicy_js_1$3 = require_logPolicy$1(); + const pipeline_js_1$5 = require_pipeline$2(); + const redirectPolicy_js_1$3 = require_redirectPolicy$1(); + const userAgentPolicy_js_1$3 = require_userAgentPolicy$1(); + const decompressResponsePolicy_js_1$3 = require_decompressResponsePolicy$1(); + const defaultRetryPolicy_js_1$3 = require_defaultRetryPolicy$1(); + const formDataPolicy_js_1$3 = require_formDataPolicy$1(); + const checkEnvironment_js_1$2 = require_checkEnvironment(); + const proxyPolicy_js_1$3 = require_proxyPolicy$1(); + const agentPolicy_js_1$3 = require_agentPolicy$1(); + const tlsPolicy_js_1$3 = require_tlsPolicy$1(); + const multipartPolicy_js_1$3 = require_multipartPolicy$1(); + /** + * Create a new pipeline with a default set of customizable policies. + * @param options - Options to configure a custom pipeline. + */ + function createPipelineFromOptions$1(options) { + const pipeline = (0, pipeline_js_1$5.createEmptyPipeline)(); + if (checkEnvironment_js_1$2.isNodeLike) { + if (options.agent) pipeline.addPolicy((0, agentPolicy_js_1$3.agentPolicy)(options.agent)); + if (options.tlsOptions) pipeline.addPolicy((0, tlsPolicy_js_1$3.tlsPolicy)(options.tlsOptions)); + pipeline.addPolicy((0, proxyPolicy_js_1$3.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1$3.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1$3.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1$3.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1$3.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1$3.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1$3.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1$2.isNodeLike) pipeline.addPolicy((0, redirectPolicy_js_1$3.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + pipeline.addPolicy((0, logPolicy_js_1$3.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.apiVersionPolicyName = void 0; + exports.apiVersionPolicy = apiVersionPolicy; + exports.apiVersionPolicyName = "ApiVersionPolicy"; + /** + * Creates a policy that sets the apiVersion as a query parameter on every request + * @param options - Client options + * @returns Pipeline policy that sets the apiVersion as a query parameter on every request + */ + function apiVersionPolicy(options) { + return { + name: exports.apiVersionPolicyName, + sendRequest: (req$1, next) => { + const url$1 = new URL(req$1.url); + if (!url$1.searchParams.get("api-version") && options.apiVersion) req$1.url = `${req$1.url}${Array.from(url$1.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + return next(req$1); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports.isBearerTokenCredential = isBearerTokenCredential; + exports.isBasicCredential = isBasicCredential; + exports.isApiKeyCredential = isApiKeyCredential; + /** + * Type guard to check if a credential is an OAuth2 token credential. + */ + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + /** + * Type guard to check if a credential is a Bearer token credential. + */ + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + /** + * Type guard to check if a credential is a Basic auth credential. + */ + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + /** + * Type guard to check if a credential is an API key credential. + */ + function isApiKeyCredential(credential) { + return "key" in credential; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ensureSecureConnection = ensureSecureConnection; + const log_js_1$6 = require_log$2(); + let insecureConnectionWarningEmmitted = false; + /** + * Checks if the request is allowed to be sent over an insecure connection. + * + * A request is allowed to be sent over an insecure connection when: + * - The `allowInsecureConnection` option is set to `true`. + * - The request has the `allowInsecureConnection` property set to `true`. + * - The request is being sent to `localhost` or `127.0.0.1` + */ + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url$1 = new URL(request.url); + if (url$1.hostname === "localhost" || url$1.hostname === "127.0.0.1") return true; + } + return false; + } + /** + * Logs a warning about sending a token over an insecure connection. + * + * This function will emit a node warning once, but log the warning every time. + */ + function emitInsecureConnectionWarning() { + const warning = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1$6.logger.warning(warning); + if (typeof (process === null || process === void 0 ? void 0 : process.emitWarning) === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning); + } + } + /** + * Ensures that authentication is only allowed over HTTPS unless explicitly allowed. + * Throws an error if the connection is not secure and not explicitly allowed. + */ + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) if (allowInsecureConnection(request, options)) emitInsecureConnectionWarning(); + else throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.apiKeyAuthenticationPolicyName = void 0; + exports.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + const checkInsecureConnection_js_1$3 = require_checkInsecureConnection(); + /** + * Name of the API Key Authentication Policy + */ + exports.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + /** + * Gets a pipeline policy that adds API key authentication to requests + */ + function apiKeyAuthenticationPolicy(options) { + return { + name: exports.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + var _a$2, _b$1; + (0, checkInsecureConnection_js_1$3.ensureSecureConnection)(request, options); + const scheme = (_b$1 = (_a$2 = request.authSchemes) !== null && _a$2 !== void 0 ? _a$2 : options.authSchemes) === null || _b$1 === void 0 ? void 0 : _b$1.find((x) => x.kind === "apiKey"); + if (!scheme) return next(request); + if (scheme.apiKeyLocation !== "header") throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.basicAuthenticationPolicyName = void 0; + exports.basicAuthenticationPolicy = basicAuthenticationPolicy; + const bytesEncoding_js_1$3 = require_bytesEncoding(); + const checkInsecureConnection_js_1$2 = require_checkInsecureConnection(); + /** + * Name of the Basic Authentication Policy + */ + exports.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + /** + * Gets a pipeline policy that adds basic authentication to requests + */ + function basicAuthenticationPolicy(options) { + return { + name: exports.basicAuthenticationPolicyName, + async sendRequest(request, next) { + var _a$2, _b$1; + (0, checkInsecureConnection_js_1$2.ensureSecureConnection)(request, options); + const scheme = (_b$1 = (_a$2 = request.authSchemes) !== null && _a$2 !== void 0 ? _a$2 : options.authSchemes) === null || _b$1 === void 0 ? void 0 : _b$1.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) return next(request); + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1$3.uint8ArrayToString)((0, bytesEncoding_js_1$3.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.bearerAuthenticationPolicyName = void 0; + exports.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + const checkInsecureConnection_js_1$1 = require_checkInsecureConnection(); + /** + * Name of the Bearer Authentication Policy + */ + exports.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + /** + * Gets a pipeline policy that adds bearer token authentication to requests + */ + function bearerAuthenticationPolicy(options) { + return { + name: exports.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + var _a$2, _b$1; + (0, checkInsecureConnection_js_1$1.ensureSecureConnection)(request, options); + const scheme = (_b$1 = (_a$2 = request.authSchemes) !== null && _a$2 !== void 0 ? _a$2 : options.authSchemes) === null || _b$1 === void 0 ? void 0 : _b$1.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) return next(request); + const token = await options.credential.getBearerToken({ abortSignal: request.abortSignal }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.oauth2AuthenticationPolicyName = void 0; + exports.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + const checkInsecureConnection_js_1 = require_checkInsecureConnection(); + /** + * Name of the OAuth2 Authentication Policy + */ + exports.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + /** + * Gets a pipeline policy that adds authorization header from OAuth2 schemes + */ + function oauth2AuthenticationPolicy(options) { + return { + name: exports.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + var _a$2, _b$1; + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (_b$1 = (_a$2 = request.authSchemes) !== null && _a$2 !== void 0 ? _a$2 : options.authSchemes) === null || _b$1 === void 0 ? void 0 : _b$1.find((x) => x.kind === "oauth2"); + if (!scheme) return next(request); + const token = await options.credential.getOAuth2Token(scheme.flows, { abortSignal: request.abortSignal }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDefaultPipeline = createDefaultPipeline$1; + exports.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + const defaultHttpClient_js_1$2 = require_defaultHttpClient$1(); + const createPipelineFromOptions_js_1$1 = require_createPipelineFromOptions$1(); + const apiVersionPolicy_js_1 = require_apiVersionPolicy(); + const credentials_js_1 = require_credentials(); + const apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + const basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + const bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + const oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + let cachedHttpClient$1; + /** + * Creates a default rest pipeline to re-use accross Rest Level Clients + */ + function createDefaultPipeline$1(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1$1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection: allowInsecureConnection$1 } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ + authSchemes, + credential, + allowInsecureConnection: allowInsecureConnection$1 + })); + else if ((0, credentials_js_1.isBasicCredential)(credential)) pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ + authSchemes, + credential, + allowInsecureConnection: allowInsecureConnection$1 + })); + else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ + authSchemes, + credential, + allowInsecureConnection: allowInsecureConnection$1 + })); + else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ + authSchemes, + credential, + allowInsecureConnection: allowInsecureConnection$1 + })); + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient$1) cachedHttpClient$1 = (0, defaultHttpClient_js_1$2.createDefaultHttpClient)(); + return cachedHttpClient$1; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.buildBodyPart = buildBodyPart; + exports.buildMultipartBody = buildMultipartBody; + const restError_js_1$6 = require_restError$2(); + const httpHeaders_js_1$4 = require_httpHeaders$1(); + const bytesEncoding_js_1$2 = require_bytesEncoding(); + const typeGuards_js_1$2 = require_typeGuards$1(); + /** + * Get value of a header in the part descriptor ignoring case + */ + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) return descriptor.headers[actualHeaderName]; + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) return contentTypeHeader; + if (descriptor.contentType === null) return void 0; + if (descriptor.contentType) return descriptor.contentType; + const { body: body$1 } = descriptor; + if (body$1 === null || body$1 === void 0) return void 0; + if (typeof body$1 === "string" || typeof body$1 === "number" || typeof body$1 === "boolean") return "text/plain; charset=UTF-8"; + if (body$1 instanceof Blob) return body$1.type || "application/octet-stream"; + if ((0, typeGuards_js_1$2.isBinaryBody)(body$1)) return "application/octet-stream"; + return "application/json"; + } + /** + * Enclose value in quotes and escape special characters, for use in the Content-Disposition header + */ + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + var _a$2; + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) return contentDispositionHeader; + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) return void 0; + const dispositionType = (_a$2 = descriptor.dispositionType) !== null && _a$2 !== void 0 ? _a$2 : "form-data"; + let disposition = dispositionType; + if (descriptor.name) disposition += `; name=${escapeDispositionField(descriptor.name)}`; + let filename = void 0; + if (descriptor.filename) filename = descriptor.filename; + else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") filename = filenameFromFile; + } + if (filename) disposition += `; filename=${escapeDispositionField(filename)}`; + return disposition; + } + function normalizeBody(body$1, contentType$1) { + if (body$1 === void 0) return new Uint8Array([]); + if ((0, typeGuards_js_1$2.isBinaryBody)(body$1)) return body$1; + if (typeof body$1 === "string" || typeof body$1 === "number" || typeof body$1 === "boolean") return (0, bytesEncoding_js_1$2.stringToUint8Array)(String(body$1), "utf-8"); + if (contentType$1 && /application\/(.+\+)?json(;.+)?/i.test(String(contentType$1))) return (0, bytesEncoding_js_1$2.stringToUint8Array)(JSON.stringify(body$1), "utf-8"); + throw new restError_js_1$6.RestError(`Unsupported body/content-type combination: ${body$1}, ${contentType$1}`); + } + function buildBodyPart(descriptor) { + var _a$2; + const contentType$1 = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1$4.createHttpHeaders)((_a$2 = descriptor.headers) !== null && _a$2 !== void 0 ? _a$2 : {}); + if (contentType$1) headers.set("content-type", contentType$1); + if (contentDisposition) headers.set("content-disposition", contentDisposition); + const body$1 = normalizeBody(descriptor.body, contentType$1); + return { + headers, + body: body$1 + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.sendRequest = sendRequest; + const restError_js_1$5 = require_restError$2(); + const httpHeaders_js_1$3 = require_httpHeaders$1(); + const pipelineRequest_js_1$2 = require_pipelineRequest$1(); + const clientHelpers_js_1$1 = require_clientHelpers(); + const typeGuards_js_1$1 = require_typeGuards$1(); + const multipart_js_1 = require_multipart(); + /** + * Helper function to send request used by the client + * @param method - method to use to send the request + * @param url - url to send the request to + * @param pipeline - pipeline with the policies to run when sending the request + * @param options - request options + * @param customHttpClient - a custom HttpClient to use when making the request + * @returns returns and HttpResponse + */ + async function sendRequest(method, url$1, pipeline, options = {}, customHttpClient) { + var _a$2; + const httpClient = customHttpClient !== null && customHttpClient !== void 0 ? customHttpClient : (0, clientHelpers_js_1$1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url$1, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream$2 = (_a$2 = response.readableStreamBody) !== null && _a$2 !== void 0 ? _a$2 : response.browserStreamBody; + const parsedBody = options.responseAsStream || stream$2 !== void 0 ? void 0 : getResponseBody(response); + const body$1 = stream$2 !== null && stream$2 !== void 0 ? stream$2 : parsedBody; + if (options === null || options === void 0 ? void 0 : options.onResponse) options.onResponse(Object.assign(Object.assign({}, response), { + request, + rawHeaders: headers, + parsedBody + })); + return { + request, + headers, + status: `${response.status}`, + body: body$1 + }; + } catch (e) { + if ((0, restError_js_1$5.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options === null || options === void 0 || options.onResponse(Object.assign(Object.assign({}, response), { + request, + rawHeaders + }), e); + } + throw e; + } + } + /** + * Function to determine the request content type + * @param options - request options InternalRequestParameters + * @returns returns the content-type + */ + function getRequestContentType(options = {}) { + var _a$2, _b$1, _c$1; + return (_c$1 = (_a$2 = options.contentType) !== null && _a$2 !== void 0 ? _a$2 : (_b$1 = options.headers) === null || _b$1 === void 0 ? void 0 : _b$1["content-type"]) !== null && _c$1 !== void 0 ? _c$1 : getContentType(options.body); + } + /** + * Function to determine the content-type of a body + * this is used if an explicit content-type is not provided + * @param body - body in the request + * @returns returns the content-type + */ + function getContentType(body$1) { + if (ArrayBuffer.isView(body$1)) return "application/octet-stream"; + if (typeof body$1 === "string") try { + JSON.parse(body$1); + return "application/json"; + } catch (error) { + return void 0; + } + return "application/json"; + } + function buildPipelineRequest(method, url$1, options = {}) { + var _a$2, _b$1, _c$1; + const requestContentType = getRequestContentType(options); + const { body: body$1, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body$1 !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1$3.createHttpHeaders)(Object.assign(Object.assign(Object.assign({}, options.headers ? options.headers : {}), { accept: (_c$1 = (_a$2 = options.accept) !== null && _a$2 !== void 0 ? _a$2 : (_b$1 = options.headers) === null || _b$1 === void 0 ? void 0 : _b$1.accept) !== null && _c$1 !== void 0 ? _c$1 : "application/json" }), hasContent && requestContentType && { "content-type": requestContentType })); + return (0, pipelineRequest_js_1$2.createPipelineRequest)({ + url: url$1, + method, + body: body$1, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + /** + * Prepares the body before sending the request + */ + function getRequestBody(body$1, contentType$1 = "") { + if (body$1 === void 0) return { body: void 0 }; + if (typeof FormData !== "undefined" && body$1 instanceof FormData) return { body: body$1 }; + if ((0, typeGuards_js_1$1.isReadableStream)(body$1)) return { body: body$1 }; + if (ArrayBuffer.isView(body$1)) return { body: body$1 instanceof Uint8Array ? body$1 : JSON.stringify(body$1) }; + const firstType = contentType$1.split(";")[0]; + switch (firstType) { + case "application/json": return { body: JSON.stringify(body$1) }; + case "multipart/form-data": + if (Array.isArray(body$1)) return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body$1) }; + return { body: JSON.stringify(body$1) }; + case "text/plain": return { body: String(body$1) }; + default: + if (typeof body$1 === "string") return { body: body$1 }; + return { body: JSON.stringify(body$1) }; + } + } + /** + * Prepares the response body + */ + function getResponseBody(response) { + var _a$2, _b$1; + const contentType$1 = (_a$2 = response.headers.get("content-type")) !== null && _a$2 !== void 0 ? _a$2 : ""; + const firstType = contentType$1.split(";")[0]; + const bodyToParse = (_b$1 = response.bodyAsText) !== null && _b$1 !== void 0 ? _b$1 : ""; + if (firstType === "text/plain") return String(bodyToParse); + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error) { + if (firstType === "application/json") throw createParseError(response, error); + return String(bodyToParse); + } + } + function createParseError(response, err) { + var _a$2; + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = (_a$2 = err.code) !== null && _a$2 !== void 0 ? _a$2 : restError_js_1$5.RestError.PARSE_ERROR; + return new restError_js_1$5.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.buildRequestUrl = buildRequestUrl; + exports.buildBaseUrl = buildBaseUrl; + exports.replaceAll = replaceAll$1; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + /** + * Builds the request url, filling in query and path parameters + * @param endpoint - base url which can be a template url + * @param routePath - path to append to the endpoint + * @param pathParameters - values of the path parameters + * @param options - request parameters including query parameters + * @returns a full url with path and query parameters + */ + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) return routePath; + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams$1(`${endpoint}/${routePath}`, options); + const url$1 = new URL(requestUrl); + return url$1.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") separator = "|"; + else if (style === "spaceDelimited") separator = "%20"; + else separator = ","; + let paramValues; + if (Array.isArray(param)) paramValues = param; + else if (typeof param === "object" && param.toString === Object.prototype.toString) paramValues = Object.entries(param).flat(); + else paramValues = [param]; + const value = paramValues.map((p) => { + if (p === null || p === void 0) return ""; + if (!p.toString || typeof p.toString !== "function") throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams$1(url$1, options = {}) { + var _a$2, _b$1, _c$1, _d$1; + if (!options.queryParameters) return url$1; + const parsedUrl = new URL(url$1); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) continue; + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? (_a$2 = param.explode) !== null && _a$2 !== void 0 ? _a$2 : false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) if (Array.isArray(rawValue)) for (const item of rawValue) paramStrings.push(getQueryParamValue(key, (_b$1 = options.skipUrlEncoding) !== null && _b$1 !== void 0 ? _b$1 : false, style, item)); + else if (typeof rawValue === "object") for (const [actualKey, value] of Object.entries(rawValue)) paramStrings.push(getQueryParamValue(actualKey, (_c$1 = options.skipUrlEncoding) !== null && _c$1 !== void 0 ? _c$1 : false, style, value)); + else throw new Error("explode can only be set to true for objects and arrays"); + else paramStrings.push(getQueryParamValue(key, (_d$1 = options.skipUrlEncoding) !== null && _d$1 !== void 0 ? _d$1 : false, style, rawValue)); + } + if (parsedUrl.search !== "") parsedUrl.search += "&"; + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + var _a$2; + if (!options.pathParameters) return endpoint; + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) throw new Error(`Path parameters ${key} must not be undefined or null`); + if (!param.toString || typeof param.toString !== "function") throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) value = encodeURIComponent(param); + endpoint = (_a$2 = replaceAll$1(endpoint, `{${key}}`, value)) !== null && _a$2 !== void 0 ? _a$2 : ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + var _a$2; + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && ((_a$2 = pathParam.allowReserved) !== null && _a$2 !== void 0 ? _a$2 : false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) value = encodeURIComponent(value); + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + /** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param value - The value to search and replace in. + * @param searchValue - The value to search for in the value argument. + * @param replaceValue - The value to replace searchValue with in the value argument. + * @returns The value where each instance of searchValue was replaced with replacedValue. + */ + function replaceAll$1(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getClient = getClient; + const clientHelpers_js_1 = require_clientHelpers(); + const sendRequest_js_1 = require_sendRequest(); + const urlHelpers_js_1$1 = require_urlHelpers$1(); + const checkEnvironment_js_1$1 = require_checkEnvironment(); + /** + * Creates a client with a default pipeline + * @param endpoint - Base endpoint for the client + * @param credentials - Credentials to authenticate the requests + * @param options - Client options + */ + function getClient(endpoint, clientOptions = {}) { + var _a$2, _b$1, _c$1; + const pipeline = (_a$2 = clientOptions.pipeline) !== null && _a$2 !== void 0 ? _a$2 : (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if ((_b$1 = clientOptions.additionalPolicies) === null || _b$1 === void 0 ? void 0 : _b$1.length) for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { afterPhase }); + } + const { allowInsecureConnection: allowInsecureConnection$1, httpClient } = clientOptions; + const endpointUrl = (_c$1 = clientOptions.endpoint) !== null && _c$1 !== void 0 ? _c$1 : endpoint; + const client = (path$8, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1$1.buildRequestUrl)(endpointUrl, path$8, args, Object.assign({ allowInsecureConnection: allowInsecureConnection$1 }, requestOptions)); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection$1, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url$1, pipeline, options, allowInsecureConnection$1, httpClient) { + var _a$2; + allowInsecureConnection$1 = (_a$2 = options.allowInsecureConnection) !== null && _a$2 !== void 0 ? _a$2 : allowInsecureConnection$1; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url$1, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection: allowInsecureConnection$1 }), httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1$1.isNodeLike) throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + else return (0, sendRequest_js_1.sendRequest)(method, url$1, pipeline, Object.assign(Object.assign({}, options), { + allowInsecureConnection: allowInsecureConnection$1, + responseAsStream: true + }), httpClient); + }, + async asNodeStream() { + if (checkEnvironment_js_1$1.isNodeLike) return (0, sendRequest_js_1.sendRequest)(method, url$1, pipeline, Object.assign(Object.assign({}, options), { + allowInsecureConnection: allowInsecureConnection$1, + responseAsStream: true + }), httpClient); + else throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + /** + * Helper function to convert OperationOptions to RequestParameters + * @param options - the options that are used by Modular layer to send the request + * @returns the result of the conversion in RequestParameters of RLC layer + */ + function operationOptionsToRequestParameters(options) { + var _a$2, _b$1, _c$1, _d$1, _e, _f; + return { + allowInsecureConnection: (_a$2 = options.requestOptions) === null || _a$2 === void 0 ? void 0 : _a$2.allowInsecureConnection, + timeout: (_b$1 = options.requestOptions) === null || _b$1 === void 0 ? void 0 : _b$1.timeout, + skipUrlEncoding: (_c$1 = options.requestOptions) === null || _c$1 === void 0 ? void 0 : _c$1.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: (_d$1 = options.requestOptions) === null || _d$1 === void 0 ? void 0 : _d$1.onUploadProgress, + onDownloadProgress: (_e = options.requestOptions) === null || _e === void 0 ? void 0 : _e.onDownloadProgress, + headers: Object.assign({}, (_f = options.requestOptions) === null || _f === void 0 ? void 0 : _f.headers), + onResponse: options.onResponse + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createRestError = createRestError; + const restError_js_1$4 = require_restError$2(); + const httpHeaders_js_1$2 = require_httpHeaders$1(); + function createRestError(messageOrResponse, response) { + var _a$2, _b$1, _c$1; + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = (_b$1 = (_a$2 = resp.body) === null || _a$2 === void 0 ? void 0 : _a$2.error) !== null && _b$1 !== void 0 ? _b$1 : resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : (_c$1 = internalError === null || internalError === void 0 ? void 0 : internalError.message) !== null && _c$1 !== void 0 ? _c$1 : `Unexpected status code: ${resp.status}`; + return new restError_js_1$4.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError === null || internalError === void 0 ? void 0 : internalError.code, + request: resp.request, + response: toPipelineResponse$1(resp) + }); + } + function toPipelineResponse$1(response) { + var _a$2; + return { + headers: (0, httpHeaders_js_1$2.createHttpHeaders)(response.headers), + request: response.request, + status: (_a$2 = statusCodeToNumber(response.status)) !== null && _a$2 !== void 0 ? _a$2 : -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs$12 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createRestError = exports.operationOptionsToRequestParameters = exports.getClient = exports.createDefaultHttpClient = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isRestError = exports.RestError = exports.createEmptyPipeline = exports.createPipelineRequest = exports.createHttpHeaders = exports.TypeSpecRuntimeLogger = exports.setLogLevel = exports.getLogLevel = exports.createClientLogger = exports.AbortError = void 0; + const tslib_1$4 = require_tslib(); + var AbortError_js_1$1 = require_AbortError$1(); + Object.defineProperty(exports, "AbortError", { + enumerable: true, + get: function() { + return AbortError_js_1$1.AbortError; + } + }); + var logger_js_1$4 = require_logger$1(); + Object.defineProperty(exports, "createClientLogger", { + enumerable: true, + get: function() { + return logger_js_1$4.createClientLogger; + } + }); + Object.defineProperty(exports, "getLogLevel", { + enumerable: true, + get: function() { + return logger_js_1$4.getLogLevel; + } + }); + Object.defineProperty(exports, "setLogLevel", { + enumerable: true, + get: function() { + return logger_js_1$4.setLogLevel; + } + }); + Object.defineProperty(exports, "TypeSpecRuntimeLogger", { + enumerable: true, + get: function() { + return logger_js_1$4.TypeSpecRuntimeLogger; + } + }); + var httpHeaders_js_1$1 = require_httpHeaders$1(); + Object.defineProperty(exports, "createHttpHeaders", { + enumerable: true, + get: function() { + return httpHeaders_js_1$1.createHttpHeaders; + } + }); + tslib_1$4.__exportStar(require_schemes(), exports); + tslib_1$4.__exportStar(require_oauth2Flows(), exports); + var pipelineRequest_js_1$1 = require_pipelineRequest$1(); + Object.defineProperty(exports, "createPipelineRequest", { + enumerable: true, + get: function() { + return pipelineRequest_js_1$1.createPipelineRequest; + } + }); + var pipeline_js_1$4 = require_pipeline$2(); + Object.defineProperty(exports, "createEmptyPipeline", { + enumerable: true, + get: function() { + return pipeline_js_1$4.createEmptyPipeline; + } + }); + var restError_js_1$3 = require_restError$2(); + Object.defineProperty(exports, "RestError", { + enumerable: true, + get: function() { + return restError_js_1$3.RestError; + } + }); + Object.defineProperty(exports, "isRestError", { + enumerable: true, + get: function() { + return restError_js_1$3.isRestError; + } + }); + var bytesEncoding_js_1$1 = require_bytesEncoding(); + Object.defineProperty(exports, "stringToUint8Array", { + enumerable: true, + get: function() { + return bytesEncoding_js_1$1.stringToUint8Array; + } + }); + Object.defineProperty(exports, "uint8ArrayToString", { + enumerable: true, + get: function() { + return bytesEncoding_js_1$1.uint8ArrayToString; + } + }); + var defaultHttpClient_js_1$1 = require_defaultHttpClient$1(); + Object.defineProperty(exports, "createDefaultHttpClient", { + enumerable: true, + get: function() { + return defaultHttpClient_js_1$1.createDefaultHttpClient; + } + }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports, "getClient", { + enumerable: true, + get: function() { + return getClient_js_1.getClient; + } + }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports, "operationOptionsToRequestParameters", { + enumerable: true, + get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } + }); + var restError_js_2 = require_restError$1(); + Object.defineProperty(exports, "createRestError", { + enumerable: true, + get: function() { + return restError_js_2.createRestError; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline$1 = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createEmptyPipeline = createEmptyPipeline; + const ts_http_runtime_1$4 = require_commonjs$12(); + /** + * Creates a totally empty pipeline. + * Useful for testing or creating a custom one. + */ + function createEmptyPipeline() { + return (0, ts_http_runtime_1$4.createEmptyPipeline)(); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal$2 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createLoggerContext = void 0; + var logger_js_1$3 = require_logger$1(); + Object.defineProperty(exports, "createLoggerContext", { + enumerable: true, + get: function() { + return logger_js_1$3.createLoggerContext; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+logger@1.2.0/node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs$11 = __commonJS({ "node_modules/.deno/@azure+logger@1.2.0/node_modules/@azure/logger/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AzureLogger = void 0; + exports.setLogLevel = setLogLevel; + exports.getLogLevel = getLogLevel; + exports.createClientLogger = createClientLogger; + const logger_1$4 = require_internal$2(); + const context = (0, logger_1$4.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + /** + * The AzureLogger provides a mechanism for overriding where logs are output to. + * By default, logs are sent to stderr. + * Override the `log` method to redirect logs to another location. + */ + exports.AzureLogger = context.logger; + /** + * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. + * @param level - The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ + function setLogLevel(level) { + context.setLogLevel(level); + } + /** + * Retrieves the currently specified log level. + */ + function getLogLevel() { + return context.getLogLevel(); + } + /** + * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. + * @param namespace - The name of the SDK package. + * @hidden + */ + function createClientLogger(namespace) { + return context.createClientLogger(namespace); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log$1 = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.logger = void 0; + const logger_1$3 = require_commonjs$11(); + exports.logger = (0, logger_1$3.createClientLogger)("core-rest-pipeline"); +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.exponentialRetryPolicyName = void 0; + exports.exponentialRetryPolicy = exponentialRetryPolicy$1; + const exponentialRetryStrategy_js_1$1 = require_exponentialRetryStrategy(); + const retryPolicy_js_1$4 = require_retryPolicy$1(); + const constants_js_1$8 = require_constants$2(); + /** + * The programmatic identifier of the exponentialRetryPolicy. + */ + exports.exponentialRetryPolicyName = "exponentialRetryPolicy"; + /** + * A policy that attempts to retry requests while introducing an exponentially increasing delay. + * @param options - Options that configure retry logic. + */ + function exponentialRetryPolicy$1(options = {}) { + var _a$2; + return (0, retryPolicy_js_1$4.retryPolicy)([(0, exponentialRetryStrategy_js_1$1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true }))], { maxRetries: (_a$2 = options.maxRetries) !== null && _a$2 !== void 0 ? _a$2 : constants_js_1$8.DEFAULT_RETRY_POLICY_COUNT }); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.systemErrorRetryPolicyName = void 0; + exports.systemErrorRetryPolicy = systemErrorRetryPolicy$1; + const exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + const retryPolicy_js_1$3 = require_retryPolicy$1(); + const constants_js_1$7 = require_constants$2(); + /** + * Name of the {@link systemErrorRetryPolicy} + */ + exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + /** + * A retry policy that specifically seeks to handle errors in the + * underlying transport layer (e.g. DNS lookup failures) rather than + * retryable error codes from the server itself. + * @param options - Options that customize the policy. + */ + function systemErrorRetryPolicy$1(options = {}) { + var _a$2; + return { + name: exports.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1$3.retryPolicy)([(0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true }))], { maxRetries: (_a$2 = options.maxRetries) !== null && _a$2 !== void 0 ? _a$2 : constants_js_1$7.DEFAULT_RETRY_POLICY_COUNT }).sendRequest + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.throttlingRetryPolicyName = void 0; + exports.throttlingRetryPolicy = throttlingRetryPolicy$1; + const throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + const retryPolicy_js_1$2 = require_retryPolicy$1(); + const constants_js_1$6 = require_constants$2(); + /** + * Name of the {@link throttlingRetryPolicy} + */ + exports.throttlingRetryPolicyName = "throttlingRetryPolicy"; + /** + * A policy that retries when the server sends a 429 response with a Retry-After header. + * + * To learn more, please refer to + * https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + * + * @param options - Options that configure retry logic. + */ + function throttlingRetryPolicy$1(options = {}) { + var _a$2; + return { + name: exports.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1$2.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { maxRetries: (_a$2 = options.maxRetries) !== null && _a$2 !== void 0 ? _a$2 : constants_js_1$6.DEFAULT_RETRY_POLICY_COUNT }).sendRequest + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal$1 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.userAgentPolicyName = exports.userAgentPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.retryPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.defaultRetryPolicyName = exports.defaultRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.agentPolicyName = exports.agentPolicy = void 0; + var agentPolicy_js_1$2 = require_agentPolicy$1(); + Object.defineProperty(exports, "agentPolicy", { + enumerable: true, + get: function() { + return agentPolicy_js_1$2.agentPolicy; + } + }); + Object.defineProperty(exports, "agentPolicyName", { + enumerable: true, + get: function() { + return agentPolicy_js_1$2.agentPolicyName; + } + }); + var decompressResponsePolicy_js_1$2 = require_decompressResponsePolicy$1(); + Object.defineProperty(exports, "decompressResponsePolicy", { + enumerable: true, + get: function() { + return decompressResponsePolicy_js_1$2.decompressResponsePolicy; + } + }); + Object.defineProperty(exports, "decompressResponsePolicyName", { + enumerable: true, + get: function() { + return decompressResponsePolicy_js_1$2.decompressResponsePolicyName; + } + }); + var defaultRetryPolicy_js_1$2 = require_defaultRetryPolicy$1(); + Object.defineProperty(exports, "defaultRetryPolicy", { + enumerable: true, + get: function() { + return defaultRetryPolicy_js_1$2.defaultRetryPolicy; + } + }); + Object.defineProperty(exports, "defaultRetryPolicyName", { + enumerable: true, + get: function() { + return defaultRetryPolicy_js_1$2.defaultRetryPolicyName; + } + }); + var exponentialRetryPolicy_js_1$1 = require_exponentialRetryPolicy$1(); + Object.defineProperty(exports, "exponentialRetryPolicy", { + enumerable: true, + get: function() { + return exponentialRetryPolicy_js_1$1.exponentialRetryPolicy; + } + }); + Object.defineProperty(exports, "exponentialRetryPolicyName", { + enumerable: true, + get: function() { + return exponentialRetryPolicy_js_1$1.exponentialRetryPolicyName; + } + }); + var retryPolicy_js_1$1 = require_retryPolicy$1(); + Object.defineProperty(exports, "retryPolicy", { + enumerable: true, + get: function() { + return retryPolicy_js_1$1.retryPolicy; + } + }); + var systemErrorRetryPolicy_js_1$1 = require_systemErrorRetryPolicy$1(); + Object.defineProperty(exports, "systemErrorRetryPolicy", { + enumerable: true, + get: function() { + return systemErrorRetryPolicy_js_1$1.systemErrorRetryPolicy; + } + }); + Object.defineProperty(exports, "systemErrorRetryPolicyName", { + enumerable: true, + get: function() { + return systemErrorRetryPolicy_js_1$1.systemErrorRetryPolicyName; + } + }); + var throttlingRetryPolicy_js_1$1 = require_throttlingRetryPolicy$1(); + Object.defineProperty(exports, "throttlingRetryPolicy", { + enumerable: true, + get: function() { + return throttlingRetryPolicy_js_1$1.throttlingRetryPolicy; + } + }); + Object.defineProperty(exports, "throttlingRetryPolicyName", { + enumerable: true, + get: function() { + return throttlingRetryPolicy_js_1$1.throttlingRetryPolicyName; + } + }); + var formDataPolicy_js_1$2 = require_formDataPolicy$1(); + Object.defineProperty(exports, "formDataPolicy", { + enumerable: true, + get: function() { + return formDataPolicy_js_1$2.formDataPolicy; + } + }); + Object.defineProperty(exports, "formDataPolicyName", { + enumerable: true, + get: function() { + return formDataPolicy_js_1$2.formDataPolicyName; + } + }); + var logPolicy_js_1$2 = require_logPolicy$1(); + Object.defineProperty(exports, "logPolicy", { + enumerable: true, + get: function() { + return logPolicy_js_1$2.logPolicy; + } + }); + Object.defineProperty(exports, "logPolicyName", { + enumerable: true, + get: function() { + return logPolicy_js_1$2.logPolicyName; + } + }); + var multipartPolicy_js_1$2 = require_multipartPolicy$1(); + Object.defineProperty(exports, "multipartPolicy", { + enumerable: true, + get: function() { + return multipartPolicy_js_1$2.multipartPolicy; + } + }); + Object.defineProperty(exports, "multipartPolicyName", { + enumerable: true, + get: function() { + return multipartPolicy_js_1$2.multipartPolicyName; + } + }); + var proxyPolicy_js_1$2 = require_proxyPolicy$1(); + Object.defineProperty(exports, "proxyPolicy", { + enumerable: true, + get: function() { + return proxyPolicy_js_1$2.proxyPolicy; + } + }); + Object.defineProperty(exports, "proxyPolicyName", { + enumerable: true, + get: function() { + return proxyPolicy_js_1$2.proxyPolicyName; + } + }); + Object.defineProperty(exports, "getDefaultProxySettings", { + enumerable: true, + get: function() { + return proxyPolicy_js_1$2.getDefaultProxySettings; + } + }); + var redirectPolicy_js_1$2 = require_redirectPolicy$1(); + Object.defineProperty(exports, "redirectPolicy", { + enumerable: true, + get: function() { + return redirectPolicy_js_1$2.redirectPolicy; + } + }); + Object.defineProperty(exports, "redirectPolicyName", { + enumerable: true, + get: function() { + return redirectPolicy_js_1$2.redirectPolicyName; + } + }); + var tlsPolicy_js_1$2 = require_tlsPolicy$1(); + Object.defineProperty(exports, "tlsPolicy", { + enumerable: true, + get: function() { + return tlsPolicy_js_1$2.tlsPolicy; + } + }); + Object.defineProperty(exports, "tlsPolicyName", { + enumerable: true, + get: function() { + return tlsPolicy_js_1$2.tlsPolicyName; + } + }); + var userAgentPolicy_js_1$2 = require_userAgentPolicy$1(); + Object.defineProperty(exports, "userAgentPolicy", { + enumerable: true, + get: function() { + return userAgentPolicy_js_1$2.userAgentPolicy; + } + }); + Object.defineProperty(exports, "userAgentPolicyName", { + enumerable: true, + get: function() { + return userAgentPolicy_js_1$2.userAgentPolicyName; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.logPolicyName = void 0; + exports.logPolicy = logPolicy; + const log_js_1$5 = require_log$1(); + const policies_1$12 = require_internal$1(); + /** + * The programmatic identifier of the logPolicy. + */ + exports.logPolicyName = policies_1$12.logPolicyName; + /** + * A policy that logs all requests and responses. + * @param options - Options to configure logPolicy. + */ + function logPolicy(options = {}) { + return (0, policies_1$12.logPolicy)(Object.assign({ logger: log_js_1$5.logger.info }, options)); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.redirectPolicyName = void 0; + exports.redirectPolicy = redirectPolicy; + const policies_1$11 = require_internal$1(); + /** + * The programmatic identifier of the redirectPolicy. + */ + exports.redirectPolicyName = policies_1$11.redirectPolicyName; + /** + * A policy to follow Location headers from the server in order + * to support server-side redirection. + * In the browser, this policy is not used. + * @param options - Options to control policy behavior. + */ + function redirectPolicy(options = {}) { + return (0, policies_1$11.redirectPolicy)(options); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getHeaderName = getHeaderName; + exports.setPlatformSpecificData = setPlatformSpecificData; + const tslib_1$3 = require_tslib(); + const os = tslib_1$3.__importStar(__require("node:os")); + const process$2 = tslib_1$3.__importStar(__require("node:process")); + /** + * @internal + */ + function getHeaderName() { + return "User-Agent"; + } + /** + * @internal + */ + async function setPlatformSpecificData(map) { + if (process$2 && process$2.versions) { + const versions = process$2.versions; + if (versions.bun) map.set("Bun", versions.bun); + else if (versions.deno) map.set("Deno", versions.deno); + else if (versions.node) map.set("Node", versions.node); + } + map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants$1 = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; + exports.SDK_VERSION = "1.20.0"; + exports.DEFAULT_RETRY_POLICY_COUNT = 3; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getUserAgentHeaderName = getUserAgentHeaderName; + exports.getUserAgentValue = getUserAgentValue; + const userAgentPlatform_js_1 = require_userAgentPlatform(); + const constants_js_1$5 = require_constants$1(); + function getUserAgentString$1(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + /** + * @internal + */ + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + /** + * @internal + */ + async function getUserAgentValue(prefix$1) { + const runtimeInfo = new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1$5.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString$1(runtimeInfo); + const userAgentValue = prefix$1 ? `${prefix$1} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.userAgentPolicyName = void 0; + exports.userAgentPolicy = userAgentPolicy; + const userAgent_js_1$1 = require_userAgent(); + const UserAgentHeaderName = (0, userAgent_js_1$1.getUserAgentHeaderName)(); + /** + * The programmatic identifier of the userAgentPolicy. + */ + exports.userAgentPolicyName = "userAgentPolicy"; + /** + * A policy that sets the User-Agent header (or equivalent) to reflect + * the library version. + * @param options - Options to customize the user agent value. + */ + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1$1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) request.headers.set(UserAgentHeaderName, await userAgentValue); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.computeSha256Hmac = computeSha256Hmac$1; + exports.computeSha256Hash = computeSha256Hash$1; + const node_crypto_1 = __require("node:crypto"); + /** + * Generates a SHA-256 HMAC signature. + * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. + * @param stringToSign - The data to be signed. + * @param encoding - The textual encoding to use for the returned HMAC digest. + */ + async function computeSha256Hmac$1(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + /** + * Generates a SHA-256 hash. + * @param content - The data to be included in the hash. + * @param encoding - The textual encoding to use for the returned hash. + */ + async function computeSha256Hash$1(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } +} }); + +//#endregion +//#region node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal = __commonJS({ "node_modules/.deno/@typespec+ts-http-runtime@0.2.2/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Sanitizer = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isWebWorker = exports.isReactNative = exports.isDeno = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isBrowser = exports.randomUUID = exports.computeSha256Hmac = exports.computeSha256Hash = exports.isError = exports.isObject = exports.getRandomIntegerInclusive = exports.calculateRetryDelay = void 0; + var delay_js_1$1 = require_delay$1(); + Object.defineProperty(exports, "calculateRetryDelay", { + enumerable: true, + get: function() { + return delay_js_1$1.calculateRetryDelay; + } + }); + var random_js_1 = require_random(); + Object.defineProperty(exports, "getRandomIntegerInclusive", { + enumerable: true, + get: function() { + return random_js_1.getRandomIntegerInclusive; + } + }); + var object_js_1 = require_object(); + Object.defineProperty(exports, "isObject", { + enumerable: true, + get: function() { + return object_js_1.isObject; + } + }); + var error_js_1$1 = require_error$1(); + Object.defineProperty(exports, "isError", { + enumerable: true, + get: function() { + return error_js_1$1.isError; + } + }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports, "computeSha256Hash", { + enumerable: true, + get: function() { + return sha256_js_1.computeSha256Hash; + } + }); + Object.defineProperty(exports, "computeSha256Hmac", { + enumerable: true, + get: function() { + return sha256_js_1.computeSha256Hmac; + } + }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports, "randomUUID", { + enumerable: true, + get: function() { + return uuidUtils_js_1.randomUUID; + } + }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports, "isBrowser", { + enumerable: true, + get: function() { + return checkEnvironment_js_1.isBrowser; + } + }); + Object.defineProperty(exports, "isBun", { + enumerable: true, + get: function() { + return checkEnvironment_js_1.isBun; + } + }); + Object.defineProperty(exports, "isNodeLike", { + enumerable: true, + get: function() { + return checkEnvironment_js_1.isNodeLike; + } + }); + Object.defineProperty(exports, "isNodeRuntime", { + enumerable: true, + get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } + }); + Object.defineProperty(exports, "isDeno", { + enumerable: true, + get: function() { + return checkEnvironment_js_1.isDeno; + } + }); + Object.defineProperty(exports, "isReactNative", { + enumerable: true, + get: function() { + return checkEnvironment_js_1.isReactNative; + } + }); + Object.defineProperty(exports, "isWebWorker", { + enumerable: true, + get: function() { + return checkEnvironment_js_1.isWebWorker; + } + }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports, "stringToUint8Array", { + enumerable: true, + get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } + }); + Object.defineProperty(exports, "uint8ArrayToString", { + enumerable: true, + get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } + }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports, "Sanitizer", { + enumerable: true, + get: function() { + return sanitizer_js_1.Sanitizer; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.cancelablePromiseRace = cancelablePromiseRace; + /** + * promise.race() wrapper that aborts rest of promises as soon as the first promise settles. + */ + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + var _a$2, _b$1; + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + (_a$2 = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a$2 === void 0 || _a$2.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + (_b$1 = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b$1 === void 0 || _b$1.removeEventListener("abort", abortHandler); + } + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError = __commonJS({ "node_modules/.deno/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AbortError = void 0; + /** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + * ``` + */ + var AbortError$1 = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports.AbortError = AbortError$1; +} }); + +//#endregion +//#region node_modules/.deno/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs$10 = __commonJS({ "node_modules/.deno/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AbortError = void 0; + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports, "AbortError", { + enumerable: true, + get: function() { + return AbortError_js_1.AbortError; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createAbortablePromise = createAbortablePromise; + const abort_controller_1$1 = require_commonjs$10(); + /** + * Creates an abortable promise. + * @param buildPromise - A function that takes the resolve and reject functions as parameters. + * @param options - The options for the abortable promise. + * @returns A promise that can be aborted. + */ + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal: abortSignal$1, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; + return new Promise((resolve, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1$1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); + } + function removeListeners() { + abortSignal$1 === null || abortSignal$1 === void 0 || abortSignal$1.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 || cleanupBeforeAbort(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal$1 === null || abortSignal$1 === void 0 ? void 0 : abortSignal$1.aborted) return rejectOnAbort(); + try { + buildPromise((x) => { + removeListeners(); + resolve(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal$1 === null || abortSignal$1 === void 0 || abortSignal$1.addEventListener("abort", onAbort); + }); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/delay.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.delay = delay$2; + exports.calculateRetryDelay = calculateRetryDelay$1; + const createAbortablePromise_js_1$1 = require_createAbortablePromise(); + const util_1$3 = require_internal(); + const StandardAbortMessage = "The delay was aborted."; + /** + * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. + * @param timeInMs - The number of milliseconds to be delayed. + * @param options - The options for delay - currently abort options + * @returns Promise that is resolved after timeInMs + */ + function delay$2(timeInMs, options) { + let token; + const { abortSignal: abortSignal$1, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; + return (0, createAbortablePromise_js_1$1.createAbortablePromise)((resolve) => { + token = setTimeout(resolve, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal: abortSignal$1, + abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage + }); + } + /** + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * @param retryAttempt - The current retry attempt number. + * @param config - The exponential retry configuration. + * @returns An object containing the calculated retry delay. + */ + function calculateRetryDelay$1(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1$3.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/error.js +var require_error = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/error.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getErrorMessage = getErrorMessage; + const util_1$2 = require_internal(); + /** + * Given what is thought to be an error object, return the message if possible. + * If the message is missing, returns a stringified version of the input. + * @param e - Something thrown from a try block + * @returns The error message or a string of the input + */ + function getErrorMessage(e) { + if ((0, util_1$2.isError)(e)) return e.message; + else { + let stringified; + try { + if (typeof e === "object" && e) stringified = JSON.stringify(e); + else stringified = String(e); + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isDefined = isDefined; + exports.isObjectWithProperties = isObjectWithProperties; + exports.objectHasProperty = objectHasProperty; + /** + * Helper TypeGuard that checks if something is defined or not. + * @param thing - Anything + */ + function isDefined(thing) { + return typeof thing !== "undefined" && thing !== null; + } + /** + * Helper TypeGuard that checks if the input is an object with the specified properties. + * @param thing - Anything. + * @param properties - The name of the properties that should appear in the object. + */ + function isObjectWithProperties(thing, properties) { + if (!isDefined(thing) || typeof thing !== "object") return false; + for (const property of properties) if (!objectHasProperty(thing, property)) return false; + return true; + } + /** + * Helper TypeGuard that checks if the input is an object with the specified property. + * @param thing - Any object. + * @param property - The name of the property that should appear in the object. + */ + function objectHasProperty(thing, property) { + return isDefined(thing) && typeof thing === "object" && property in thing; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs$9 = __commonJS({ "node_modules/.deno/@azure+core-util@1.12.0/node_modules/@azure/core-util/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isWebWorker = exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isNode = exports.isDeno = exports.isBun = exports.isBrowser = exports.objectHasProperty = exports.isObjectWithProperties = exports.isDefined = exports.getErrorMessage = exports.delay = exports.createAbortablePromise = exports.cancelablePromiseRace = void 0; + exports.calculateRetryDelay = calculateRetryDelay; + exports.computeSha256Hash = computeSha256Hash; + exports.computeSha256Hmac = computeSha256Hmac; + exports.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports.isError = isError; + exports.isObject = isObject; + exports.randomUUID = randomUUID; + exports.uint8ArrayToString = uint8ArrayToString; + exports.stringToUint8Array = stringToUint8Array; + const tslib_1$2 = require_tslib(); + const tspRuntime = tslib_1$2.__importStar(require_internal()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports, "cancelablePromiseRace", { + enumerable: true, + get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } + }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports, "createAbortablePromise", { + enumerable: true, + get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } + }); + var delay_js_1 = require_delay(); + Object.defineProperty(exports, "delay", { + enumerable: true, + get: function() { + return delay_js_1.delay; + } + }); + var error_js_1 = require_error(); + Object.defineProperty(exports, "getErrorMessage", { + enumerable: true, + get: function() { + return error_js_1.getErrorMessage; + } + }); + var typeGuards_js_1 = require_typeGuards(); + Object.defineProperty(exports, "isDefined", { + enumerable: true, + get: function() { + return typeGuards_js_1.isDefined; + } + }); + Object.defineProperty(exports, "isObjectWithProperties", { + enumerable: true, + get: function() { + return typeGuards_js_1.isObjectWithProperties; + } + }); + Object.defineProperty(exports, "objectHasProperty", { + enumerable: true, + get: function() { + return typeGuards_js_1.objectHasProperty; + } + }); + /** + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * + * @param retryAttempt - The current retry attempt number. + * + * @param config - The exponential retry configuration. + * + * @returns An object containing the calculated retry delay. + */ + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + /** + * Generates a SHA-256 hash. + * + * @param content - The data to be included in the hash. + * + * @param encoding - The textual encoding to use for the returned hash. + */ + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + /** + * Generates a SHA-256 HMAC signature. + * + * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. + * + * @param stringToSign - The data to be signed. + * + * @param encoding - The textual encoding to use for the returned HMAC digest. + */ + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + /** + * Returns a random integer value between a lower and upper bound, inclusive of both bounds. Note that this uses Math.random and isn't secure. If you need to use this for any kind of security purpose, find a better source of random. + * + * @param min - The smallest integer value allowed. + * + * @param max - The largest integer value allowed. + */ + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + /** + * Typeguard for an error object shape (has name and message) + * + * @param e - Something caught by a catch clause. + */ + function isError(e) { + return tspRuntime.isError(e); + } + /** + * Helper to determine when an input is a generic JS object. + * + * @returns true when input is an object type that is not null, Array, RegExp, or Date. + */ + function isObject(input) { + return tspRuntime.isObject(input); + } + /** + * Generated Universally Unique Identifier + * + * @returns RFC4122 v4 UUID. + */ + function randomUUID() { + return tspRuntime.randomUUID(); + } + /** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ + exports.isBrowser = tspRuntime.isBrowser; + /** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ + exports.isBun = tspRuntime.isBun; + /** + * A constant that indicates whether the environment the code is running is Deno. + */ + exports.isDeno = tspRuntime.isDeno; + /** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + * + * @deprecated + * + * Use `isNodeLike` instead. + */ + exports.isNode = tspRuntime.isNodeLike; + /** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + */ + exports.isNodeLike = tspRuntime.isNodeLike; + /** + * A constant that indicates whether the environment the code is running is Node.JS. + */ + exports.isNodeRuntime = tspRuntime.isNodeRuntime; + /** + * A constant that indicates whether the environment the code is running is in React-Native. + */ + exports.isReactNative = tspRuntime.isReactNative; + /** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ + exports.isWebWorker = tspRuntime.isWebWorker; + /** + * The helper that transforms bytes with specific character encoding into string + * @param bytes - the uint8array bytes + * @param format - the format we use to encode the byte + * @returns a string of the encoded string + */ + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + /** + * The helper that transforms string to specific character encoded bytes array. + * @param value - the string to be converted + * @param format - the format we use to decode the value + * @returns a uint8array + */ + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.hasRawContent = hasRawContent; + exports.getRawContent = getRawContent; + exports.createFileFromStream = createFileFromStream; + exports.createFile = createFile; + const core_util_1$7 = require_commonjs$9(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + const unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + /** + * Private symbol used as key on objects created using createFile containing the + * original source of the file object. + * + * This is used in Node to access the original Node stream without using Blob#stream, which + * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and + * Readable#to/fromWeb in Node versions we support: + * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14) + * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6) + * + * Once these versions are no longer supported, we may be able to stop doing this. + * + * @internal + */ + const rawContent = Symbol("rawContent"); + /** + * Type guard to check if a given object is a blob-like object with a raw content property. + */ + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + /** + * Extract the raw content from a given blob-like object. If the input was created using createFile + * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used. + * For true instances of Blob and File, returns the actual blob. + * + * @internal + */ + function getRawContent(blob) { + if (hasRawContent(blob)) return blob[rawContent](); + else return blob; + } + /** + * Create an object that implements the File interface. This object is intended to be + * passed into RequestBodyType.formData, and is not guaranteed to work as expected in + * other situations. + * + * Use this function to: + * - Create a File object for use in RequestBodyType.formData in environments where the + * global File object is unavailable. + * - Create a File-like object from a readable stream without reading the stream into memory. + * + * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is + * passed in a request's form data map, the stream will not be read into memory + * and instead will be streamed when the request is made. In the event of a retry, the + * stream needs to be read again, so this callback SHOULD return a fresh stream if possible. + * @param name - the name of the file. + * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + */ + function createFileFromStream(stream$2, name, options = {}) { + var _a$2, _b$1, _c$1, _d$1; + return Object.assign(Object.assign({}, unimplementedMethods), { + type: (_a$2 = options.type) !== null && _a$2 !== void 0 ? _a$2 : "", + lastModified: (_b$1 = options.lastModified) !== null && _b$1 !== void 0 ? _b$1 : new Date().getTime(), + webkitRelativePath: (_c$1 = options.webkitRelativePath) !== null && _c$1 !== void 0 ? _c$1 : "", + size: (_d$1 = options.size) !== null && _d$1 !== void 0 ? _d$1 : -1, + name, + stream: () => { + const s$1 = stream$2(); + if (isNodeReadableStream(s$1)) throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + return s$1; + }, + [rawContent]: stream$2 + }); + } + /** + * Create an object that implements the File interface. This object is intended to be + * passed into RequestBodyType.formData, and is not guaranteed to work as expected in + * other situations. + * + * Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable. + * + * @param content - the content of the file as a Uint8Array in memory. + * @param name - the name of the file. + * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + */ + function createFile(content, name, options = {}) { + var _a$2, _b$1, _c$1; + if (core_util_1$7.isNodeLike) return Object.assign(Object.assign({}, unimplementedMethods), { + type: (_a$2 = options.type) !== null && _a$2 !== void 0 ? _a$2 : "", + lastModified: (_b$1 = options.lastModified) !== null && _b$1 !== void 0 ? _b$1 : new Date().getTime(), + webkitRelativePath: (_c$1 = options.webkitRelativePath) !== null && _c$1 !== void 0 ? _c$1 : "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([content]).stream(), + [rawContent]: () => content + }); + else return new File([content], name, options); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.multipartPolicyName = void 0; + exports.multipartPolicy = multipartPolicy; + const policies_1$10 = require_internal$1(); + const file_js_1$1 = require_file(); + /** + * Name of multipart policy + */ + exports.multipartPolicyName = policies_1$10.multipartPolicyName; + /** + * Pipeline policy for multipart requests + */ + function multipartPolicy() { + const tspPolicy = (0, policies_1$10.multipartPolicy)(); + return { + name: exports.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) if ((0, file_js_1$1.hasRawContent)(part.body)) part.body = (0, file_js_1$1.getRawContent)(part.body); + } + return tspPolicy.sendRequest(request, next); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.decompressResponsePolicyName = void 0; + exports.decompressResponsePolicy = decompressResponsePolicy; + const policies_1$9 = require_internal$1(); + /** + * The programmatic identifier of the decompressResponsePolicy. + */ + exports.decompressResponsePolicyName = policies_1$9.decompressResponsePolicyName; + /** + * A policy to enable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ + function decompressResponsePolicy() { + return (0, policies_1$9.decompressResponsePolicy)(); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.defaultRetryPolicyName = void 0; + exports.defaultRetryPolicy = defaultRetryPolicy; + const policies_1$8 = require_internal$1(); + /** + * Name of the {@link defaultRetryPolicy} + */ + exports.defaultRetryPolicyName = policies_1$8.defaultRetryPolicyName; + /** + * A policy that retries according to three strategies: + * - When the server sends a 429 response with a Retry-After header. + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. + */ + function defaultRetryPolicy(options = {}) { + return (0, policies_1$8.defaultRetryPolicy)(options); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formDataPolicyName = void 0; + exports.formDataPolicy = formDataPolicy; + const policies_1$7 = require_internal$1(); + /** + * The programmatic identifier of the formDataPolicy. + */ + exports.formDataPolicyName = policies_1$7.formDataPolicyName; + /** + * A policy that encodes FormData on the request into the body. + */ + function formDataPolicy() { + return (0, policies_1$7.formDataPolicy)(); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.proxyPolicyName = void 0; + exports.getDefaultProxySettings = getDefaultProxySettings; + exports.proxyPolicy = proxyPolicy; + const policies_1$6 = require_internal$1(); + /** + * The programmatic identifier of the proxyPolicy. + */ + exports.proxyPolicyName = policies_1$6.proxyPolicyName; + /** + * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. + * If no argument is given, it attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + * @param proxyUrl - The url of the proxy to use. May contain authentication information. + * @deprecated - Internally this method is no longer necessary when setting proxy information. + */ + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1$6.getDefaultProxySettings)(proxyUrl); + } + /** + * A policy that allows one to apply proxy settings to all requests. + * If not passed static settings, they will be retrieved from the HTTPS_PROXY + * or HTTP_PROXY environment variables. + * @param proxySettings - ProxySettings to use on each request. + * @param options - additional settings, for example, custom NO_PROXY patterns + */ + function proxyPolicy(proxySettings, options) { + return (0, policies_1$6.proxyPolicy)(proxySettings, options); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js +var require_setClientRequestIdPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.setClientRequestIdPolicyName = void 0; + exports.setClientRequestIdPolicy = setClientRequestIdPolicy; + /** + * The programmatic identifier of the setClientRequestIdPolicy. + */ + exports.setClientRequestIdPolicyName = "setClientRequestIdPolicy"; + /** + * Each PipelineRequest gets a unique id upon creation. + * This policy passes that unique id along via an HTTP header to enable better + * telemetry and tracing. + * @param requestIdHeaderName - The name of the header to pass the request ID to. + */ + function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { + return { + name: exports.setClientRequestIdPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(requestIdHeaderName)) request.headers.set(requestIdHeaderName, request.requestId); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.agentPolicyName = void 0; + exports.agentPolicy = agentPolicy; + const policies_1$5 = require_internal$1(); + /** + * Name of the Agent Policy + */ + exports.agentPolicyName = policies_1$5.agentPolicyName; + /** + * Gets a pipeline policy that sets http.agent + */ + function agentPolicy(agent) { + return (0, policies_1$5.agentPolicy)(agent); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.tlsPolicyName = void 0; + exports.tlsPolicy = tlsPolicy; + const policies_1$4 = require_internal$1(); + /** + * Name of the TLS Policy + */ + exports.tlsPolicyName = policies_1$4.tlsPolicyName; + /** + * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. + */ + function tlsPolicy(tlsSettings) { + return (0, policies_1$4.tlsPolicy)(tlsSettings); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js +var require_tracingContext = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TracingContextImpl = exports.knownContextKeys = void 0; + exports.createTracingContext = createTracingContext; + /** @internal */ + exports.knownContextKeys = { + span: Symbol.for("@azure/core-tracing span"), + namespace: Symbol.for("@azure/core-tracing namespace") + }; + /** + * Creates a new {@link TracingContext} with the given options. + * @param options - A set of known keys that may be set on the context. + * @returns A new {@link TracingContext} with the given options. + * + * @internal + */ + function createTracingContext(options = {}) { + let context$2 = new TracingContextImpl(options.parentContext); + if (options.span) context$2 = context$2.setValue(exports.knownContextKeys.span, options.span); + if (options.namespace) context$2 = context$2.setValue(exports.knownContextKeys.namespace, options.namespace); + return context$2; + } + /** @internal */ + var TracingContextImpl = class TracingContextImpl { + constructor(initialContext) { + this._contextMap = initialContext instanceof TracingContextImpl ? new Map(initialContext._contextMap) : new Map(); + } + setValue(key, value) { + const newContext = new TracingContextImpl(this); + newContext._contextMap.set(key, value); + return newContext; + } + getValue(key) { + return this._contextMap.get(key); + } + deleteValue(key) { + const newContext = new TracingContextImpl(this); + newContext._contextMap.delete(key); + return newContext; + } + }; + exports.TracingContextImpl = TracingContextImpl; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/state.js +var require_state$1 = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/state.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.state = void 0; + /** + * @internal + * + * Holds the singleton instrumenter, to be shared across CJS and ESM imports. + */ + exports.state = { instrumenterImplementation: void 0 }; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js +var require_instrumenter = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDefaultTracingSpan = createDefaultTracingSpan; + exports.createDefaultInstrumenter = createDefaultInstrumenter; + exports.useInstrumenter = useInstrumenter; + exports.getInstrumenter = getInstrumenter; + const tracingContext_js_1$1 = require_tracingContext(); + const state_js_1$1 = require_state$1(); + function createDefaultTracingSpan() { + return { + end: () => {}, + isRecording: () => false, + recordException: () => {}, + setAttribute: () => {}, + setStatus: () => {}, + addEvent: () => {} + }; + } + function createDefaultInstrumenter() { + return { + createRequestHeaders: () => { + return {}; + }, + parseTraceparentHeader: () => { + return void 0; + }, + startSpan: (_name, spanOptions) => { + return { + span: createDefaultTracingSpan(), + tracingContext: (0, tracingContext_js_1$1.createTracingContext)({ parentContext: spanOptions.tracingContext }) + }; + }, + withContext(_context, callback, ...callbackArgs) { + return callback(...callbackArgs); + } + }; + } + /** + * Extends the Azure SDK with support for a given instrumenter implementation. + * + * @param instrumenter - The instrumenter implementation to use. + */ + function useInstrumenter(instrumenter) { + state_js_1$1.state.instrumenterImplementation = instrumenter; + } + /** + * Gets the currently set instrumenter, a No-Op instrumenter by default. + * + * @returns The currently set instrumenter + */ + function getInstrumenter() { + if (!state_js_1$1.state.instrumenterImplementation) state_js_1$1.state.instrumenterImplementation = createDefaultInstrumenter(); + return state_js_1$1.state.instrumenterImplementation; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js +var require_tracingClient = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createTracingClient = createTracingClient; + const instrumenter_js_1$1 = require_instrumenter(); + const tracingContext_js_1 = require_tracingContext(); + /** + * Creates a new tracing client. + * + * @param options - Options used to configure the tracing client. + * @returns - An instance of {@link TracingClient}. + */ + function createTracingClient(options) { + const { namespace, packageName, packageVersion } = options; + function startSpan(name, operationOptions, spanOptions) { + var _a$2; + const startSpanResult = (0, instrumenter_js_1$1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { + packageName, + packageVersion, + tracingContext: (_a$2 = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a$2 === void 0 ? void 0 : _a$2.tracingContext + })); + let tracingContext = startSpanResult.tracingContext; + const span = startSpanResult.span; + if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) tracingContext = tracingContext.setValue(tracingContext_js_1.knownContextKeys.namespace, namespace); + span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); + const updatedOptions = Object.assign({}, operationOptions, { tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) }); + return { + span, + updatedOptions + }; + } + async function withSpan(name, operationOptions, callback, spanOptions) { + const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); + try { + const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); + span.setStatus({ status: "success" }); + return result; + } catch (err) { + span.setStatus({ + status: "error", + error: err + }); + throw err; + } finally { + span.end(); + } + } + function withContext(context$2, callback, ...callbackArgs) { + return (0, instrumenter_js_1$1.getInstrumenter)().withContext(context$2, callback, ...callbackArgs); + } + /** + * Parses a traceparent header value into a span identifier. + * + * @param traceparentHeader - The traceparent header to parse. + * @returns An implementation-specific identifier for the span. + */ + function parseTraceparentHeader(traceparentHeader) { + return (0, instrumenter_js_1$1.getInstrumenter)().parseTraceparentHeader(traceparentHeader); + } + /** + * Creates a set of request headers to propagate tracing information to a backend. + * + * @param tracingContext - The context containing the span to serialize. + * @returns The set of headers to add to a request. + */ + function createRequestHeaders(tracingContext) { + return (0, instrumenter_js_1$1.getInstrumenter)().createRequestHeaders(tracingContext); + } + return { + startSpan, + withSpan, + withContext, + parseTraceparentHeader, + createRequestHeaders + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/index.js +var require_commonjs$8 = __commonJS({ "node_modules/.deno/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createTracingClient = exports.useInstrumenter = void 0; + var instrumenter_js_1 = require_instrumenter(); + Object.defineProperty(exports, "useInstrumenter", { + enumerable: true, + get: function() { + return instrumenter_js_1.useInstrumenter; + } + }); + var tracingClient_js_1 = require_tracingClient(); + Object.defineProperty(exports, "createTracingClient", { + enumerable: true, + get: function() { + return tracingClient_js_1.createTracingClient; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js +var require_restError = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.RestError = void 0; + exports.isRestError = isRestError; + const ts_http_runtime_1$3 = require_commonjs$12(); + /** + * A custom error type for failed pipeline requests. + */ + var RestError = class extends Error { + constructor(message, options = {}) { + super(message); + return new ts_http_runtime_1$3.RestError(message, options); + } + }; + exports.RestError = RestError; + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + RestError.PARSE_ERROR = "PARSE_ERROR"; + /** + * Typeguard for RestError + * @param e - Something caught by a catch clause. + */ + function isRestError(e) { + return (0, ts_http_runtime_1$3.isRestError)(e); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tracingPolicy.js +var require_tracingPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tracingPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.tracingPolicyName = void 0; + exports.tracingPolicy = tracingPolicy; + const core_tracing_1 = require_commonjs$8(); + const constants_js_1$4 = require_constants$1(); + const userAgent_js_1 = require_userAgent(); + const log_js_1$4 = require_log$1(); + const core_util_1$6 = require_commonjs$9(); + const restError_js_1$2 = require_restError(); + const util_1$1 = require_internal(); + /** + * The programmatic identifier of the tracingPolicy. + */ + exports.tracingPolicyName = "tracingPolicy"; + /** + * A simple policy to create OpenTelemetry Spans for each request made by the pipeline + * that has SpanOptions with a parent. + * Requests made without a parent Span will not be recorded. + * @param options - Options to configure the telemetry logged by the tracing policy. + */ + function tracingPolicy(options = {}) { + const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + const sanitizer = new util_1$1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); + const tracingClient$1 = tryCreateTracingClient(); + return { + name: exports.tracingPolicyName, + async sendRequest(request, next) { + var _a$2; + if (!tracingClient$1) return next(request); + const userAgent = await userAgentPromise; + const spanAttributes = { + "http.url": sanitizer.sanitizeUrl(request.url), + "http.method": request.method, + "http.user_agent": userAgent, + requestId: request.requestId + }; + if (userAgent) spanAttributes["http.user_agent"] = userAgent; + const { span, tracingContext } = (_a$2 = tryCreateSpan(tracingClient$1, request, spanAttributes)) !== null && _a$2 !== void 0 ? _a$2 : {}; + if (!span || !tracingContext) return next(request); + try { + const response = await tracingClient$1.withContext(tracingContext, next, request); + tryProcessResponse(span, response); + return response; + } catch (err) { + tryProcessError(span, err); + throw err; + } + } + }; + } + function tryCreateTracingClient() { + try { + return (0, core_tracing_1.createTracingClient)({ + namespace: "", + packageName: "@azure/core-rest-pipeline", + packageVersion: constants_js_1$4.SDK_VERSION + }); + } catch (e) { + log_js_1$4.logger.warning(`Error when creating the TracingClient: ${(0, core_util_1$6.getErrorMessage)(e)}`); + return void 0; + } + } + function tryCreateSpan(tracingClient$1, request, spanAttributes) { + try { + const { span, updatedOptions } = tracingClient$1.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { + spanKind: "client", + spanAttributes + }); + if (!span.isRecording()) { + span.end(); + return void 0; + } + const headers = tracingClient$1.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); + for (const [key, value] of Object.entries(headers)) request.headers.set(key, value); + return { + span, + tracingContext: updatedOptions.tracingOptions.tracingContext + }; + } catch (e) { + log_js_1$4.logger.warning(`Skipping creating a tracing span due to an error: ${(0, core_util_1$6.getErrorMessage)(e)}`); + return void 0; + } + } + function tryProcessError(span, error) { + try { + span.setStatus({ + status: "error", + error: (0, core_util_1$6.isError)(error) ? error : void 0 + }); + if ((0, restError_js_1$2.isRestError)(error) && error.statusCode) span.setAttribute("http.status_code", error.statusCode); + span.end(); + } catch (e) { + log_js_1$4.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1$6.getErrorMessage)(e)}`); + } + } + function tryProcessResponse(span, response) { + try { + span.setAttribute("http.status_code", response.status); + const serviceRequestId = response.headers.get("x-ms-request-id"); + if (serviceRequestId) span.setAttribute("serviceRequestId", serviceRequestId); + if (response.status >= 400) span.setStatus({ status: "error" }); + span.end(); + } catch (e) { + log_js_1$4.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1$6.getErrorMessage)(e)}`); + } + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.wrapAbortSignalLike = wrapAbortSignalLike; + /** + * Creates a native AbortSignal which reflects the state of the provided AbortSignalLike. + * If the AbortSignalLike is already a native AbortSignal, it is returned as is. + * @param abortSignalLike - The AbortSignalLike to wrap. + * @returns - An object containing the native AbortSignal and an optional cleanup function. The cleanup function should be called when the AbortSignal is no longer needed. + */ + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) return { abortSignal: abortSignalLike }; + if (abortSignalLike.aborted) return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { + abortSignal: controller.signal, + cleanup + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.wrapAbortSignalLikePolicyName = void 0; + exports.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + const wrapAbortSignal_js_1$1 = require_wrapAbortSignal(); + exports.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + /** + * Policy that ensure that any AbortSignalLike is wrapped in a native AbortSignal for processing by the pipeline. + * Since the ts-http-runtime expects a native AbortSignal, this policy is used to ensure that any AbortSignalLike is wrapped in a native AbortSignal. + * + * @returns - created policy + */ + function wrapAbortSignalLikePolicy() { + return { + name: exports.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) return next(request); + const { abortSignal: abortSignal$1, cleanup } = (0, wrapAbortSignal_js_1$1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal$1; + try { + return await next(request); + } finally { + cleanup === null || cleanup === void 0 || cleanup(); + } + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createPipelineFromOptions = createPipelineFromOptions; + const logPolicy_js_1$1 = require_logPolicy(); + const pipeline_js_1$3 = require_pipeline$1(); + const redirectPolicy_js_1$1 = require_redirectPolicy(); + const userAgentPolicy_js_1$1 = require_userAgentPolicy(); + const multipartPolicy_js_1$1 = require_multipartPolicy(); + const decompressResponsePolicy_js_1$1 = require_decompressResponsePolicy(); + const defaultRetryPolicy_js_1$1 = require_defaultRetryPolicy(); + const formDataPolicy_js_1$1 = require_formDataPolicy(); + const core_util_1$5 = require_commonjs$9(); + const proxyPolicy_js_1$1 = require_proxyPolicy(); + const setClientRequestIdPolicy_js_1$1 = require_setClientRequestIdPolicy(); + const agentPolicy_js_1$1 = require_agentPolicy(); + const tlsPolicy_js_1$1 = require_tlsPolicy(); + const tracingPolicy_js_1$1 = require_tracingPolicy(); + const wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); + /** + * Create a new pipeline with a default set of customizable policies. + * @param options - Options to configure a custom pipeline. + */ + function createPipelineFromOptions(options) { + var _a$2; + const pipeline = (0, pipeline_js_1$3.createEmptyPipeline)(); + if (core_util_1$5.isNodeLike) { + if (options.agent) pipeline.addPolicy((0, agentPolicy_js_1$1.agentPolicy)(options.agent)); + if (options.tlsOptions) pipeline.addPolicy((0, tlsPolicy_js_1$1.tlsPolicy)(options.tlsOptions)); + pipeline.addPolicy((0, proxyPolicy_js_1$1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1$1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); + pipeline.addPolicy((0, formDataPolicy_js_1$1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1$1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1$1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1$1.setClientRequestIdPolicy)((_a$2 = options.telemetryOptions) === null || _a$2 === void 0 ? void 0 : _a$2.clientRequestIdHeaderName)); + pipeline.addPolicy((0, multipartPolicy_js_1$1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1$1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + pipeline.addPolicy((0, tracingPolicy_js_1$1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { afterPhase: "Retry" }); + if (core_util_1$5.isNodeLike) pipeline.addPolicy((0, redirectPolicy_js_1$1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + pipeline.addPolicy((0, logPolicy_js_1$1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDefaultHttpClient = createDefaultHttpClient; + const ts_http_runtime_1$2 = require_commonjs$12(); + const wrapAbortSignal_js_1 = require_wrapAbortSignal(); + /** + * Create the correct HttpClient for the current environment. + */ + function createDefaultHttpClient() { + const client = (0, ts_http_runtime_1$2.createDefaultHttpClient)(); + return { async sendRequest(request) { + const { abortSignal: abortSignal$1, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal$1; + return await client.sendRequest(request); + } finally { + cleanup === null || cleanup === void 0 || cleanup(); + } + } }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createHttpHeaders = createHttpHeaders; + const ts_http_runtime_1$1 = require_commonjs$12(); + /** + * Creates an object that satisfies the `HttpHeaders` interface. + * @param rawHeaders - A simple object representing initial headers + */ + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1$1.createHttpHeaders)(rawHeaders); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createPipelineRequest = createPipelineRequest; + const ts_http_runtime_1 = require_commonjs$12(); + /** + * Creates a new pipeline request with the given options. + * This method is to allow for the easy setting of default values and not required. + * @param options - The options to create the request with. + */ + function createPipelineRequest(options) { + return (0, ts_http_runtime_1.createPipelineRequest)(options); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.exponentialRetryPolicyName = void 0; + exports.exponentialRetryPolicy = exponentialRetryPolicy; + const policies_1$3 = require_internal$1(); + /** + * The programmatic identifier of the exponentialRetryPolicy. + */ + exports.exponentialRetryPolicyName = policies_1$3.exponentialRetryPolicyName; + /** + * A policy that attempts to retry requests while introducing an exponentially increasing delay. + * @param options - Options that configure retry logic. + */ + function exponentialRetryPolicy(options = {}) { + return (0, policies_1$3.exponentialRetryPolicy)(options); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.systemErrorRetryPolicyName = void 0; + exports.systemErrorRetryPolicy = systemErrorRetryPolicy; + const policies_1$2 = require_internal$1(); + /** + * Name of the {@link systemErrorRetryPolicy} + */ + exports.systemErrorRetryPolicyName = policies_1$2.systemErrorRetryPolicyName; + /** + * A retry policy that specifically seeks to handle errors in the + * underlying transport layer (e.g. DNS lookup failures) rather than + * retryable error codes from the server itself. + * @param options - Options that customize the policy. + */ + function systemErrorRetryPolicy(options = {}) { + return (0, policies_1$2.systemErrorRetryPolicy)(options); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.throttlingRetryPolicyName = void 0; + exports.throttlingRetryPolicy = throttlingRetryPolicy; + const policies_1$1 = require_internal$1(); + /** + * Name of the {@link throttlingRetryPolicy} + */ + exports.throttlingRetryPolicyName = policies_1$1.throttlingRetryPolicyName; + /** + * A policy that retries when the server sends a 429 response with a Retry-After header. + * + * To learn more, please refer to + * https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + * + * @param options - Options that configure retry logic. + */ + function throttlingRetryPolicy(options = {}) { + return (0, policies_1$1.throttlingRetryPolicy)(options); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.retryPolicy = retryPolicy; + const logger_1$2 = require_commonjs$11(); + const constants_js_1$3 = require_constants$1(); + const policies_1 = require_internal$1(); + const retryPolicyLogger = (0, logger_1$2.createClientLogger)("core-rest-pipeline retryPolicy"); + /** + * retryPolicy is a generic policy to enable retrying requests when certain conditions are met + */ + function retryPolicy(strategies, options = { maxRetries: constants_js_1$3.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, Object.assign({ logger: retryPolicyLogger }, options)); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js +var require_tokenCycler = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DEFAULT_CYCLER_OPTIONS = void 0; + exports.createTokenCycler = createTokenCycler; + const core_util_1$4 = require_commonjs$9(); + exports.DEFAULT_CYCLER_OPTIONS = { + forcedRefreshWindowInMs: 1e3, + retryIntervalInMs: 3e3, + refreshWindowInMs: 1e3 * 60 * 2 + }; + /** + * Converts an an unreliable access token getter (which may resolve with null) + * into an AccessTokenGetter by retrying the unreliable getter in a regular + * interval. + * + * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null. + * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts. + * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception. + * @returns - A promise that, if it resolves, will resolve with an access token. + */ + async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { + async function tryGetAccessToken() { + if (Date.now() < refreshTimeout) try { + return await getAccessToken(); + } catch (_a$2) { + return null; + } + else { + const finalToken = await getAccessToken(); + if (finalToken === null) throw new Error("Failed to refresh access token."); + return finalToken; + } + } + let token = await tryGetAccessToken(); + while (token === null) { + await (0, core_util_1$4.delay)(retryIntervalInMs); + token = await tryGetAccessToken(); + } + return token; + } + /** + * Creates a token cycler from a credential, scopes, and optional settings. + * + * A token cycler represents a way to reliably retrieve a valid access token + * from a TokenCredential. It will handle initializing the token, refreshing it + * when it nears expiration, and synchronizes refresh attempts to avoid + * concurrency hazards. + * + * @param credential - the underlying TokenCredential that provides the access + * token + * @param tokenCyclerOptions - optionally override default settings for the cycler + * + * @returns - a function that reliably produces a valid access token + */ + function createTokenCycler(credential, tokenCyclerOptions) { + let refreshWorker = null; + let token = null; + let tenantId; + const options = Object.assign(Object.assign({}, exports.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + /** + * This little holder defines several predicates that we use to construct + * the rules of refreshing the token. + */ + const cycler = { + get isRefreshing() { + return refreshWorker !== null; + }, + get shouldRefresh() { + var _a$2; + if (cycler.isRefreshing) return false; + if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) return true; + return ((_a$2 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a$2 !== void 0 ? _a$2 : 0) - options.refreshWindowInMs < Date.now(); + }, + get mustRefresh() { + return token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now(); + } + }; + /** + * Starts a refresh job or returns the existing job if one is already + * running. + */ + function refresh(scopes, getTokenOptions) { + var _a$2; + if (!cycler.isRefreshing) { + const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); + refreshWorker = beginRefresh( + tryGetAccessToken, + options.retryIntervalInMs, + // If we don't have a token, then we should timeout immediately + (_a$2 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a$2 !== void 0 ? _a$2 : Date.now() +).then((_token) => { + refreshWorker = null; + token = _token; + tenantId = getTokenOptions.tenantId; + return token; + }).catch((reason) => { + refreshWorker = null; + token = null; + tenantId = void 0; + throw reason; + }); + } + return refreshWorker; + } + return async (scopes, tokenOptions) => { + const hasClaimChallenge = Boolean(tokenOptions.claims); + const tenantIdChanged = tenantId !== tokenOptions.tenantId; + if (hasClaimChallenge) token = null; + const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh; + if (mustRefresh) return refresh(scopes, tokenOptions); + if (cycler.shouldRefresh) refresh(scopes, tokenOptions); + return token; + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js +var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.bearerTokenAuthenticationPolicyName = void 0; + exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports.parseChallenges = parseChallenges; + const tokenCycler_js_1$1 = require_tokenCycler(); + const log_js_1$3 = require_log$1(); + const restError_js_1$1 = require_restError(); + /** + * The programmatic identifier of the bearerTokenAuthenticationPolicy. + */ + exports.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + /** + * Try to send the given request. + * + * When a response is received, returns a tuple of the response received and, if the response was received + * inside a thrown RestError, the RestError that was thrown. + * + * Otherwise, if an error was thrown while sending the request that did not provide an underlying response, it + * will be rethrown. + */ + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1$1.isRestError)(e) && e.response) return [e.response, e]; + else throw e; + } + } + /** + * Default authorize request handler + */ + async function defaultAuthorizeRequest(options) { + const { scopes, getAccessToken, request } = options; + const getTokenOptions = { + abortSignal: request.abortSignal, + tracingOptions: request.tracingOptions, + enableCae: true + }; + const accessToken = await getAccessToken(scopes, getTokenOptions); + if (accessToken) options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + } + /** + * We will retrieve the challenge only if the response status code was 401, + * and if the response contained the header "WWW-Authenticate" with a non-empty value. + */ + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + /** + * Re-authorize the request for CAE challenge. + * The response containing the challenge is `options.response`. + * If this method returns true, the underlying request will be sent once again. + */ + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + var _a$2; + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) return false; + onChallengeOptions.request.headers.set("Authorization", `${(_a$2 = accessToken.tokenType) !== null && _a$2 !== void 0 ? _a$2 : "Bearer"} ${accessToken.token}`); + return true; + } + /** + * A policy that can request a token from a TokenCredential implementation and + * then apply it to the Authorization header of a request as a Bearer token. + */ + function bearerTokenAuthenticationPolicy(options) { + var _a$2, _b$1, _c$1; + const { credential, scopes, challengeCallbacks } = options; + const logger$2 = options.logger || log_js_1$3.logger; + const callbacks = { + authorizeRequest: (_b$1 = (_a$2 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) === null || _a$2 === void 0 ? void 0 : _a$2.bind(challengeCallbacks)) !== null && _b$1 !== void 0 ? _b$1 : defaultAuthorizeRequest, + authorizeRequestOnChallenge: (_c$1 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) === null || _c$1 === void 0 ? void 0 : _c$1.bind(challengeCallbacks) + }; + const getAccessToken = credential ? (0, tokenCycler_js_1$1.createTokenCycler)( + credential + /* , options */ +) : () => Promise.resolve(null); + return { + name: exports.bearerTokenAuthenticationPolicyName, + async sendRequest(request, next) { + if (!request.url.toLowerCase().startsWith("https://")) throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); + await callbacks.authorizeRequest({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + getAccessToken, + logger: logger$2 + }); + let response; + let error; + let shouldSendRequest; + [response, error] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger$2.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger: logger$2 + }, parsedClaim); + if (shouldSendRequest) [response, error] = await trySendRequest(request, next); + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger: logger$2 + }); + if (shouldSendRequest) [response, error] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger$2.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger: logger$2 + }, parsedClaim); + if (shouldSendRequest) [response, error] = await trySendRequest(request, next); + } + } + } + } + if (error) throw error; + else return response; + } + }; + } + /** + * Converts: `Bearer a="b", c="d", Pop e="f", g="h"`. + * Into: `[ { scheme: 'Bearer', params: { a: 'b', c: 'd' } }, { scheme: 'Pop', params: { e: 'f', g: 'h' } } ]`. + * + * @internal + */ + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match$1; + while ((match$1 = challengeRegex.exec(challenges)) !== null) { + const scheme = match$1[1]; + const paramsString = match$1[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) params[paramMatch[1]] = paramMatch[2]; + parsedChallenges.push({ + scheme, + params + }); + } + return parsedChallenges; + } + /** + * Parse a pipeline response and look for a CAE challenge with "Bearer" scheme + * Return the value in the header without parsing the challenge + * @internal + */ + function getCaeChallengeClaims(challenges) { + var _a$2; + if (!challenges) return; + const parsedChallenges = parseChallenges(challenges); + return (_a$2 = parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")) === null || _a$2 === void 0 ? void 0 : _a$2.params.claims; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/ndJsonPolicy.js +var require_ndJsonPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/ndJsonPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ndJsonPolicyName = void 0; + exports.ndJsonPolicy = ndJsonPolicy; + /** + * The programmatic identifier of the ndJsonPolicy. + */ + exports.ndJsonPolicyName = "ndJsonPolicy"; + /** + * ndJsonPolicy is a policy used to control keep alive settings for every request. + */ + function ndJsonPolicy() { + return { + name: exports.ndJsonPolicyName, + async sendRequest(request, next) { + if (typeof request.body === "string" && request.body.startsWith("[")) { + const body$1 = JSON.parse(request.body); + if (Array.isArray(body$1)) request.body = body$1.map((item) => JSON.stringify(item) + "\n").join(""); + } + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js +var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.auxiliaryAuthenticationHeaderPolicyName = void 0; + exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; + const tokenCycler_js_1 = require_tokenCycler(); + const log_js_1$2 = require_log$1(); + /** + * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. + */ + exports.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; + const AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; + async function sendAuthorizeRequest(options) { + var _a$2, _b$1; + const { scopes, getAccessToken, request } = options; + const getTokenOptions = { + abortSignal: request.abortSignal, + tracingOptions: request.tracingOptions + }; + return (_b$1 = (_a$2 = await getAccessToken(scopes, getTokenOptions)) === null || _a$2 === void 0 ? void 0 : _a$2.token) !== null && _b$1 !== void 0 ? _b$1 : ""; + } + /** + * A policy for external tokens to `x-ms-authorization-auxiliary` header. + * This header will be used when creating a cross-tenant application we may need to handle authentication requests + * for resources that are in different tenants. + * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works + */ + function auxiliaryAuthenticationHeaderPolicy(options) { + const { credentials, scopes } = options; + const logger$2 = options.logger || log_js_1$2.logger; + const tokenCyclerMap = new WeakMap(); + return { + name: exports.auxiliaryAuthenticationHeaderPolicyName, + async sendRequest(request, next) { + if (!request.url.toLowerCase().startsWith("https://")) throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs."); + if (!credentials || credentials.length === 0) { + logger$2.info(`${exports.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); + return next(request); + } + const tokenPromises = []; + for (const credential of credentials) { + let getAccessToken = tokenCyclerMap.get(credential); + if (!getAccessToken) { + getAccessToken = (0, tokenCycler_js_1.createTokenCycler)(credential); + tokenCyclerMap.set(credential, getAccessToken); + } + tokenPromises.push(sendAuthorizeRequest({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + getAccessToken, + logger: logger$2 + })); + } + const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token)); + if (auxiliaryTokens.length === 0) { + logger$2.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); + return next(request); + } + request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); + return next(request); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js +var require_commonjs$7 = __commonJS({ "node_modules/.deno/@azure+core-rest-pipeline@1.20.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createFileFromStream = exports.createFile = exports.agentPolicyName = exports.agentPolicy = exports.auxiliaryAuthenticationHeaderPolicyName = exports.auxiliaryAuthenticationHeaderPolicy = exports.ndJsonPolicyName = exports.ndJsonPolicy = exports.bearerTokenAuthenticationPolicyName = exports.bearerTokenAuthenticationPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.userAgentPolicyName = exports.userAgentPolicy = exports.defaultRetryPolicy = exports.tracingPolicyName = exports.tracingPolicy = exports.retryPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.setClientRequestIdPolicyName = exports.setClientRequestIdPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.isRestError = exports.RestError = exports.createPipelineRequest = exports.createHttpHeaders = exports.createDefaultHttpClient = exports.createPipelineFromOptions = exports.createEmptyPipeline = void 0; + var pipeline_js_1$2 = require_pipeline$1(); + Object.defineProperty(exports, "createEmptyPipeline", { + enumerable: true, + get: function() { + return pipeline_js_1$2.createEmptyPipeline; + } + }); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + Object.defineProperty(exports, "createPipelineFromOptions", { + enumerable: true, + get: function() { + return createPipelineFromOptions_js_1.createPipelineFromOptions; + } + }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports, "createDefaultHttpClient", { + enumerable: true, + get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } + }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports, "createHttpHeaders", { + enumerable: true, + get: function() { + return httpHeaders_js_1.createHttpHeaders; + } + }); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports, "createPipelineRequest", { + enumerable: true, + get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } + }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports, "RestError", { + enumerable: true, + get: function() { + return restError_js_1.RestError; + } + }); + Object.defineProperty(exports, "isRestError", { + enumerable: true, + get: function() { + return restError_js_1.isRestError; + } + }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports, "decompressResponsePolicy", { + enumerable: true, + get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } + }); + Object.defineProperty(exports, "decompressResponsePolicyName", { + enumerable: true, + get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } + }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports, "exponentialRetryPolicy", { + enumerable: true, + get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } + }); + Object.defineProperty(exports, "exponentialRetryPolicyName", { + enumerable: true, + get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } + }); + var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); + Object.defineProperty(exports, "setClientRequestIdPolicy", { + enumerable: true, + get: function() { + return setClientRequestIdPolicy_js_1.setClientRequestIdPolicy; + } + }); + Object.defineProperty(exports, "setClientRequestIdPolicyName", { + enumerable: true, + get: function() { + return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; + } + }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports, "logPolicy", { + enumerable: true, + get: function() { + return logPolicy_js_1.logPolicy; + } + }); + Object.defineProperty(exports, "logPolicyName", { + enumerable: true, + get: function() { + return logPolicy_js_1.logPolicyName; + } + }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports, "multipartPolicy", { + enumerable: true, + get: function() { + return multipartPolicy_js_1.multipartPolicy; + } + }); + Object.defineProperty(exports, "multipartPolicyName", { + enumerable: true, + get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } + }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports, "proxyPolicy", { + enumerable: true, + get: function() { + return proxyPolicy_js_1.proxyPolicy; + } + }); + Object.defineProperty(exports, "proxyPolicyName", { + enumerable: true, + get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } + }); + Object.defineProperty(exports, "getDefaultProxySettings", { + enumerable: true, + get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } + }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports, "redirectPolicy", { + enumerable: true, + get: function() { + return redirectPolicy_js_1.redirectPolicy; + } + }); + Object.defineProperty(exports, "redirectPolicyName", { + enumerable: true, + get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } + }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports, "systemErrorRetryPolicy", { + enumerable: true, + get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } + }); + Object.defineProperty(exports, "systemErrorRetryPolicyName", { + enumerable: true, + get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } + }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports, "throttlingRetryPolicy", { + enumerable: true, + get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } + }); + Object.defineProperty(exports, "throttlingRetryPolicyName", { + enumerable: true, + get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } + }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports, "retryPolicy", { + enumerable: true, + get: function() { + return retryPolicy_js_1.retryPolicy; + } + }); + var tracingPolicy_js_1 = require_tracingPolicy(); + Object.defineProperty(exports, "tracingPolicy", { + enumerable: true, + get: function() { + return tracingPolicy_js_1.tracingPolicy; + } + }); + Object.defineProperty(exports, "tracingPolicyName", { + enumerable: true, + get: function() { + return tracingPolicy_js_1.tracingPolicyName; + } + }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports, "defaultRetryPolicy", { + enumerable: true, + get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } + }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports, "userAgentPolicy", { + enumerable: true, + get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } + }); + Object.defineProperty(exports, "userAgentPolicyName", { + enumerable: true, + get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } + }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports, "tlsPolicy", { + enumerable: true, + get: function() { + return tlsPolicy_js_1.tlsPolicy; + } + }); + Object.defineProperty(exports, "tlsPolicyName", { + enumerable: true, + get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } + }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports, "formDataPolicy", { + enumerable: true, + get: function() { + return formDataPolicy_js_1.formDataPolicy; + } + }); + Object.defineProperty(exports, "formDataPolicyName", { + enumerable: true, + get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } + }); + var bearerTokenAuthenticationPolicy_js_1 = require_bearerTokenAuthenticationPolicy(); + Object.defineProperty(exports, "bearerTokenAuthenticationPolicy", { + enumerable: true, + get: function() { + return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicy; + } + }); + Object.defineProperty(exports, "bearerTokenAuthenticationPolicyName", { + enumerable: true, + get: function() { + return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicyName; + } + }); + var ndJsonPolicy_js_1 = require_ndJsonPolicy(); + Object.defineProperty(exports, "ndJsonPolicy", { + enumerable: true, + get: function() { + return ndJsonPolicy_js_1.ndJsonPolicy; + } + }); + Object.defineProperty(exports, "ndJsonPolicyName", { + enumerable: true, + get: function() { + return ndJsonPolicy_js_1.ndJsonPolicyName; + } + }); + var auxiliaryAuthenticationHeaderPolicy_js_1 = require_auxiliaryAuthenticationHeaderPolicy(); + Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicy", { + enumerable: true, + get: function() { + return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicy; + } + }); + Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicyName", { + enumerable: true, + get: function() { + return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; + } + }); + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports, "agentPolicy", { + enumerable: true, + get: function() { + return agentPolicy_js_1.agentPolicy; + } + }); + Object.defineProperty(exports, "agentPolicyName", { + enumerable: true, + get: function() { + return agentPolicy_js_1.agentPolicyName; + } + }); + var file_js_1 = require_file(); + Object.defineProperty(exports, "createFile", { + enumerable: true, + get: function() { + return file_js_1.createFile; + } + }); + Object.defineProperty(exports, "createFileFromStream", { + enumerable: true, + get: function() { + return file_js_1.createFileFromStream; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js +var require_azureKeyCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AzureKeyCredential = void 0; + /** + * A static-key-based credential that supports updating + * the underlying key value. + */ + var AzureKeyCredential = class { + /** + * The value of the key to be used in authentication + */ + get key() { + return this._key; + } + /** + * Create an instance of an AzureKeyCredential for use + * with a service client. + * + * @param key - The initial value of the key to use in authentication + */ + constructor(key) { + if (!key) throw new Error("key must be a non-empty string"); + this._key = key; + } + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newKey - The new key value to be used + */ + update(newKey) { + this._key = newKey; + } + }; + exports.AzureKeyCredential = AzureKeyCredential; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/keyCredential.js +var require_keyCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/keyCredential.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isKeyCredential = isKeyCredential; + const core_util_1$3 = require_commonjs$9(); + /** + * Tests an object to determine whether it implements KeyCredential. + * + * @param credential - The assumed KeyCredential to be tested. + */ + function isKeyCredential(credential) { + return (0, core_util_1$3.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.js +var require_azureNamedKeyCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AzureNamedKeyCredential = void 0; + exports.isNamedKeyCredential = isNamedKeyCredential; + const core_util_1$2 = require_commonjs$9(); + /** + * A static name/key-based credential that supports updating + * the underlying name and key values. + */ + var AzureNamedKeyCredential = class { + /** + * The value of the key to be used in authentication. + */ + get key() { + return this._key; + } + /** + * The value of the name to be used in authentication. + */ + get name() { + return this._name; + } + /** + * Create an instance of an AzureNamedKeyCredential for use + * with a service client. + * + * @param name - The initial value of the name to use in authentication. + * @param key - The initial value of the key to use in authentication. + */ + constructor(name, key) { + if (!name || !key) throw new TypeError("name and key must be non-empty strings"); + this._name = name; + this._key = key; + } + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newName - The new name value to be used. + * @param newKey - The new key value to be used. + */ + update(newName, newKey) { + if (!newName || !newKey) throw new TypeError("newName and newKey must be non-empty strings"); + this._name = newName; + this._key = newKey; + } + }; + exports.AzureNamedKeyCredential = AzureNamedKeyCredential; + /** + * Tests an object to determine whether it implements NamedKeyCredential. + * + * @param credential - The assumed NamedKeyCredential to be tested. + */ + function isNamedKeyCredential(credential) { + return (0, core_util_1$2.isObjectWithProperties)(credential, ["name", "key"]) && typeof credential.key === "string" && typeof credential.name === "string"; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.js +var require_azureSASCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AzureSASCredential = void 0; + exports.isSASCredential = isSASCredential; + const core_util_1$1 = require_commonjs$9(); + /** + * A static-signature-based credential that supports updating + * the underlying signature value. + */ + var AzureSASCredential = class { + /** + * The value of the shared access signature to be used in authentication + */ + get signature() { + return this._signature; + } + /** + * Create an instance of an AzureSASCredential for use + * with a service client. + * + * @param signature - The initial value of the shared access signature to use in authentication + */ + constructor(signature) { + if (!signature) throw new Error("shared access signature must be a non-empty string"); + this._signature = signature; + } + /** + * Change the value of the signature. + * + * Updates will take effect upon the next request after + * updating the signature value. + * + * @param newSignature - The new shared access signature value to be used + */ + update(newSignature) { + if (!newSignature) throw new Error("shared access signature must be a non-empty string"); + this._signature = newSignature; + } + }; + exports.AzureSASCredential = AzureSASCredential; + /** + * Tests an object to determine whether it implements SASCredential. + * + * @param credential - The assumed SASCredential to be tested. + */ + function isSASCredential(credential) { + return (0, core_util_1$1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js +var require_tokenCredential = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isBearerToken = isBearerToken; + exports.isPopToken = isPopToken; + exports.isTokenCredential = isTokenCredential; + /** + * @internal + * @param accessToken - Access token + * @returns Whether a token is bearer type or not + */ + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + /** + * @internal + * @param accessToken - Access token + * @returns Whether a token is Pop token or not + */ + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } + /** + * Tests an object to determine whether it implements TokenCredential. + * + * @param credential - The assumed TokenCredential to be tested. + */ + function isTokenCredential(credential) { + const castCredential = credential; + return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/index.js +var require_commonjs$6 = __commonJS({ "node_modules/.deno/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isTokenCredential = exports.isSASCredential = exports.AzureSASCredential = exports.isNamedKeyCredential = exports.AzureNamedKeyCredential = exports.isKeyCredential = exports.AzureKeyCredential = void 0; + var azureKeyCredential_js_1 = require_azureKeyCredential(); + Object.defineProperty(exports, "AzureKeyCredential", { + enumerable: true, + get: function() { + return azureKeyCredential_js_1.AzureKeyCredential; + } + }); + var keyCredential_js_1 = require_keyCredential(); + Object.defineProperty(exports, "isKeyCredential", { + enumerable: true, + get: function() { + return keyCredential_js_1.isKeyCredential; + } + }); + var azureNamedKeyCredential_js_1 = require_azureNamedKeyCredential(); + Object.defineProperty(exports, "AzureNamedKeyCredential", { + enumerable: true, + get: function() { + return azureNamedKeyCredential_js_1.AzureNamedKeyCredential; + } + }); + Object.defineProperty(exports, "isNamedKeyCredential", { + enumerable: true, + get: function() { + return azureNamedKeyCredential_js_1.isNamedKeyCredential; + } + }); + var azureSASCredential_js_1 = require_azureSASCredential(); + Object.defineProperty(exports, "AzureSASCredential", { + enumerable: true, + get: function() { + return azureSASCredential_js_1.AzureSASCredential; + } + }); + Object.defineProperty(exports, "isSASCredential", { + enumerable: true, + get: function() { + return azureSASCredential_js_1.isSASCredential; + } + }); + var tokenCredential_js_1 = require_tokenCredential(); + Object.defineProperty(exports, "isTokenCredential", { + enumerable: true, + get: function() { + return tokenCredential_js_1.isTokenCredential; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js +var require_disableKeepAlivePolicy = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.disableKeepAlivePolicyName = void 0; + exports.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; + exports.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; + function createDisableKeepAlivePolicy() { + return { + name: exports.disableKeepAlivePolicyName, + async sendRequest(request, next) { + request.disableKeepAlive = true; + return next(request); + } + }; + } + /** + * @internal + */ + function pipelineContainsDisableKeepAlivePolicy(pipeline) { + return pipeline.getOrderedPolicies().some((policy) => policy.name === exports.disableKeepAlivePolicyName); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/base64.js +var require_base64$1 = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/base64.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.encodeString = encodeString; + exports.encodeByteArray = encodeByteArray; + exports.decodeString = decodeString; + exports.decodeStringToString = decodeStringToString; + /** + * Encodes a string in base64 format. + * @param value - the string to encode + * @internal + */ + function encodeString(value) { + return Buffer.from(value).toString("base64"); + } + /** + * Encodes a byte array in base64 format. + * @param value - the Uint8Aray to encode + * @internal + */ + function encodeByteArray(value) { + const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); + return bufferValue.toString("base64"); + } + /** + * Decodes a base64 string into a byte array. + * @param value - the base64 string to decode + * @internal + */ + function decodeString(value) { + return Buffer.from(value, "base64"); + } + /** + * Decodes a base64 string into a string. + * @param value - the base64 string to decode + * @internal + */ + function decodeStringToString(value) { + return Buffer.from(value, "base64").toString(); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/interfaces.js +var require_interfaces = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/interfaces.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; + /** + * Default key used to access the XML attributes. + */ + exports.XML_ATTRKEY = "$"; + /** + * Default key used to access the XML value content. + */ + exports.XML_CHARKEY = "_"; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/utils.js +var require_utils = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isPrimitiveBody = isPrimitiveBody; + exports.isDuration = isDuration; + exports.isValidUuid = isValidUuid; + exports.flattenResponse = flattenResponse; + /** + * A type guard for a primitive response body. + * @param value - Value to test + * + * @internal + */ + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); + } + const validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + /** + * Returns true if the given string is in ISO 8601 format. + * @param value - The value to be validated for ISO 8601 duration format. + * @internal + */ + function isDuration(value) { + return validateISODuration.test(value); + } + const validUuidRegex = /^[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}$/i; + /** + * Returns true if the provided uuid is valid. + * + * @param uuid - The uuid that needs to be validated. + * + * @internal + */ + function isValidUuid(uuid) { + return validUuidRegex.test(uuid); + } + /** + * Maps the response as follows: + * - wraps the response body if needed (typically if its type is primitive). + * - returns null if the combination of the headers and the body is empty. + * - otherwise, returns the combination of the headers and the body. + * + * @param responseObject - a representation of the parsed response + * @returns the response that will be returned to the user which can be null and/or wrapped + * + * @internal + */ + function handleNullableResponseAndWrappableBody(responseObject) { + const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) return responseObject.shouldWrapBody ? { body: null } : null; + else return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + } + /** + * Take a `FullOperationResponse` and turn it into a flat + * response object to hand back to the consumer. + * @param fullResponse - The processed response from the operation request + * @param responseSpec - The response map from the OperationSpec + * + * @internal + */ + function flattenResponse(fullResponse, responseSpec) { + var _a$2, _b$1; + const parsedHeaders = fullResponse.parsedHeaders; + if (fullResponse.request.method === "HEAD") return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + const bodyMapper = responseSpec && responseSpec.bodyMapper; + const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); + const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + /** If the body is asked for, we look at the expected body type to handle it */ + if (expectedBodyTypeName === "Stream") return Object.assign(Object.assign({}, parsedHeaders), { + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }); + const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; + const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); + if (expectedBodyTypeName === "Sequence" || isPageableResponse) { + const arrayResponse = (_a$2 = fullResponse.parsedBody) !== null && _a$2 !== void 0 ? _a$2 : []; + for (const key of Object.keys(modelProperties)) if (modelProperties[key].serializedName) arrayResponse[key] = (_b$1 = fullResponse.parsedBody) === null || _b$1 === void 0 ? void 0 : _b$1[key]; + if (parsedHeaders) for (const key of Object.keys(parsedHeaders)) arrayResponse[key] = parsedHeaders[key]; + return isNullable && !fullResponse.parsedBody && !parsedHeaders && Object.getOwnPropertyNames(modelProperties).length === 0 ? null : arrayResponse; + } + return handleNullableResponseAndWrappableBody({ + body: fullResponse.parsedBody, + headers: parsedHeaders, + hasNullableType: isNullable, + shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) + }); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serializer.js +var require_serializer = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MapperTypeNames = void 0; + exports.createSerializer = createSerializer; + const tslib_1$1 = require_tslib(); + const base64 = tslib_1$1.__importStar(require_base64$1()); + const interfaces_js_1$3 = require_interfaces(); + const utils_js_1$1 = require_utils(); + var SerializerImpl = class { + constructor(modelMappers = {}, isXML = false) { + this.modelMappers = modelMappers; + this.isXML = isXML; + } + /** + * @deprecated Removing the constraints validation on client side. + */ + validateConstraints(mapper, value, objectName) { + const failValidation = (constraintName, constraintValue) => { + throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); + }; + if (mapper.constraints && value !== void 0 && value !== null) { + const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern: Pattern$1, UniqueItems } = mapper.constraints; + if (ExclusiveMaximum !== void 0 && value >= ExclusiveMaximum) failValidation("ExclusiveMaximum", ExclusiveMaximum); + if (ExclusiveMinimum !== void 0 && value <= ExclusiveMinimum) failValidation("ExclusiveMinimum", ExclusiveMinimum); + if (InclusiveMaximum !== void 0 && value > InclusiveMaximum) failValidation("InclusiveMaximum", InclusiveMaximum); + if (InclusiveMinimum !== void 0 && value < InclusiveMinimum) failValidation("InclusiveMinimum", InclusiveMinimum); + if (MaxItems !== void 0 && value.length > MaxItems) failValidation("MaxItems", MaxItems); + if (MaxLength !== void 0 && value.length > MaxLength) failValidation("MaxLength", MaxLength); + if (MinItems !== void 0 && value.length < MinItems) failValidation("MinItems", MinItems); + if (MinLength !== void 0 && value.length < MinLength) failValidation("MinLength", MinLength); + if (MultipleOf !== void 0 && value % MultipleOf !== 0) failValidation("MultipleOf", MultipleOf); + if (Pattern$1) { + const pattern = typeof Pattern$1 === "string" ? new RegExp(Pattern$1) : Pattern$1; + if (typeof value !== "string" || value.match(pattern) === null) failValidation("Pattern", Pattern$1); + } + if (UniqueItems && value.some((item, i, ar) => ar.indexOf(item) !== i)) failValidation("UniqueItems", UniqueItems); + } + } + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param mapper - The mapper which defines the metadata of the serializable object + * + * @param object - A valid Javascript object to be serialized + * + * @param objectName - Name of the serialized object + * + * @param options - additional options to serialization + * + * @returns A valid serialized Javascript object + */ + serialize(mapper, object, objectName, options = { xml: {} }) { + var _a$2, _b$1, _c$1; + const updatedOptions = { xml: { + rootName: (_a$2 = options.xml.rootName) !== null && _a$2 !== void 0 ? _a$2 : "", + includeRoot: (_b$1 = options.xml.includeRoot) !== null && _b$1 !== void 0 ? _b$1 : false, + xmlCharKey: (_c$1 = options.xml.xmlCharKey) !== null && _c$1 !== void 0 ? _c$1 : interfaces_js_1$3.XML_CHARKEY + } }; + let payload = {}; + const mapperType = mapper.type.name; + if (!objectName) objectName = mapper.serializedName; + if (mapperType.match(/^Sequence$/i) !== null) payload = []; + if (mapper.isConstant) object = mapper.defaultValue; + const { required, nullable } = mapper; + if (required && nullable && object === void 0) throw new Error(`${objectName} cannot be undefined.`); + if (required && !nullable && (object === void 0 || object === null)) throw new Error(`${objectName} cannot be null or undefined.`); + if (!required && nullable === false && object === null) throw new Error(`${objectName} cannot be null.`); + if (object === void 0 || object === null) payload = object; + else if (mapperType.match(/^any$/i) !== null) payload = object; + else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) payload = serializeBasicTypes(mapperType, objectName, object); + else if (mapperType.match(/^Enum$/i) !== null) { + const enumMapper = mapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) payload = serializeDateTypes(mapperType, object, objectName); + else if (mapperType.match(/^ByteArray$/i) !== null) payload = serializeByteArrayType(objectName, object); + else if (mapperType.match(/^Base64Url$/i) !== null) payload = serializeBase64UrlType(objectName, object); + else if (mapperType.match(/^Sequence$/i) !== null) payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + else if (mapperType.match(/^Dictionary$/i) !== null) payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + else if (mapperType.match(/^Composite$/i) !== null) payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + return payload; + } + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param mapper - The mapper which defines the metadata of the serializable object + * + * @param responseBody - A valid Javascript entity to be deserialized + * + * @param objectName - Name of the deserialized object + * + * @param options - Controls behavior of XML parser and builder. + * + * @returns A valid deserialized Javascript object + */ + deserialize(mapper, responseBody, objectName, options = { xml: {} }) { + var _a$2, _b$1, _c$1, _d$1; + const updatedOptions = { + xml: { + rootName: (_a$2 = options.xml.rootName) !== null && _a$2 !== void 0 ? _a$2 : "", + includeRoot: (_b$1 = options.xml.includeRoot) !== null && _b$1 !== void 0 ? _b$1 : false, + xmlCharKey: (_c$1 = options.xml.xmlCharKey) !== null && _c$1 !== void 0 ? _c$1 : interfaces_js_1$3.XML_CHARKEY + }, + ignoreUnknownProperties: (_d$1 = options.ignoreUnknownProperties) !== null && _d$1 !== void 0 ? _d$1 : false + }; + if (responseBody === void 0 || responseBody === null) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) responseBody = []; + if (mapper.defaultValue !== void 0) responseBody = mapper.defaultValue; + return responseBody; + } + let payload; + const mapperType = mapper.type.name; + if (!objectName) objectName = mapper.serializedName; + if (mapperType.match(/^Composite$/i) !== null) payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); + else { + if (this.isXML) { + const xmlCharKey = updatedOptions.xml.xmlCharKey; + /** + * If the mapper specifies this as a non-composite type value but the responseBody contains + * both header ("$" i.e., XML_ATTRKEY) and body ("#" i.e., XML_CHARKEY) properties, + * then just reduce the responseBody value to the body ("#" i.e., XML_CHARKEY) property. + */ + if (responseBody[interfaces_js_1$3.XML_ATTRKEY] !== void 0 && responseBody[xmlCharKey] !== void 0) responseBody = responseBody[xmlCharKey]; + } + if (mapperType.match(/^Number$/i) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) payload = responseBody; + } else if (mapperType.match(/^Boolean$/i) !== null) if (responseBody === "true") payload = true; + else if (responseBody === "false") payload = false; + else payload = responseBody; + else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) payload = responseBody; + else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) payload = new Date(responseBody); + else if (mapperType.match(/^UnixTime$/i) !== null) payload = unixTimeToDate(responseBody); + else if (mapperType.match(/^ByteArray$/i) !== null) payload = base64.decodeString(responseBody); + else if (mapperType.match(/^Base64Url$/i) !== null) payload = base64UrlToByteArray(responseBody); + else if (mapperType.match(/^Sequence$/i) !== null) payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); + else if (mapperType.match(/^Dictionary$/i) !== null) payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); + } + if (mapper.isConstant) payload = mapper.defaultValue; + return payload; + } + }; + /** + * Method that creates and returns a Serializer. + * @param modelMappers - Known models to map + * @param isXML - If XML should be supported + */ + function createSerializer(modelMappers = {}, isXML = false) { + return new SerializerImpl(modelMappers, isXML); + } + function trimEnd(str, ch) { + let len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) --len; + return str.substr(0, len); + } + function bufferToBase64Url(buffer$2) { + if (!buffer$2) return void 0; + if (!(buffer$2 instanceof Uint8Array)) throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); + const str = base64.encodeByteArray(buffer$2); + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); + } + function base64UrlToByteArray(str) { + if (!str) return void 0; + if (str && typeof str.valueOf() !== "string") throw new Error("Please provide an input of type string for converting to Uint8Array"); + str = str.replace(/-/g, "+").replace(/_/g, "/"); + return base64.decodeString(str); + } + function splitSerializeName(prop) { + const classes = []; + let partialclass = ""; + if (prop) { + const subwords = prop.split("."); + for (const item of subwords) if (item.charAt(item.length - 1) === "\\") partialclass += item.substr(0, item.length - 1) + "."; + else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } + return classes; + } + function dateToUnixTime(d$1) { + if (!d$1) return void 0; + if (typeof d$1.valueOf() === "string") d$1 = new Date(d$1); + return Math.floor(d$1.getTime() / 1e3); + } + function unixTimeToDate(n) { + if (!n) return void 0; + return new Date(n * 1e3); + } + function serializeBasicTypes(typeName, objectName, value) { + if (value !== null && value !== void 0) { + if (typeName.match(/^Number$/i) !== null) { + if (typeof value !== "number") throw new Error(`${objectName} with value ${value} must be of type number.`); + } else if (typeName.match(/^String$/i) !== null) { + if (typeof value.valueOf() !== "string") throw new Error(`${objectName} with value "${value}" must be of type string.`); + } else if (typeName.match(/^Uuid$/i) !== null) { + if (!(typeof value.valueOf() === "string" && (0, utils_js_1$1.isValidUuid)(value))) throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); + } else if (typeName.match(/^Boolean$/i) !== null) { + if (typeof value !== "boolean") throw new Error(`${objectName} with value ${value} must be of type boolean.`); + } else if (typeName.match(/^Stream$/i) !== null) { + const objectType = typeof value; + if (objectType !== "string" && typeof value.pipe !== "function" && typeof value.tee !== "function" && !(value instanceof ArrayBuffer) && !ArrayBuffer.isView(value) && !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) && objectType !== "function") throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`); + } + } + return value; + } + function serializeEnumType(objectName, allowedValues, value) { + if (!allowedValues) throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); + const isPresent = allowedValues.some((item) => { + if (typeof item.valueOf() === "string") return item.toLowerCase() === value.toLowerCase(); + return item === value; + }); + if (!isPresent) throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); + return value; + } + function serializeByteArrayType(objectName, value) { + if (value !== void 0 && value !== null) { + if (!(value instanceof Uint8Array)) throw new Error(`${objectName} must be of type Uint8Array.`); + value = base64.encodeByteArray(value); + } + return value; + } + function serializeBase64UrlType(objectName, value) { + if (value !== void 0 && value !== null) { + if (!(value instanceof Uint8Array)) throw new Error(`${objectName} must be of type Uint8Array.`); + value = bufferToBase64Url(value); + } + return value; + } + function serializeDateTypes(typeName, value, objectName) { + if (value !== void 0 && value !== null) { + if (typeName.match(/^Date$/i) !== null) { + if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + value = value instanceof Date ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10); + } else if (typeName.match(/^DateTime$/i) !== null) { + if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); + } else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { + if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`); + value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); + } else if (typeName.match(/^UnixTime$/i) !== null) { + if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`); + value = dateToUnixTime(value); + } else if (typeName.match(/^TimeSpan$/i) !== null) { + if (!(0, utils_js_1$1.isDuration)(value)) throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); + } + } + return value; + } + function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { + var _a$2; + if (!Array.isArray(object)) throw new Error(`${objectName} must be of type Array.`); + let elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); + if (elementType.type.name === "Composite" && elementType.type.className) elementType = (_a$2 = serializer.modelMappers[elementType.type.className]) !== null && _a$2 !== void 0 ? _a$2 : elementType; + const tempArray = []; + for (let i = 0; i < object.length; i++) { + const serializedValue = serializer.serialize(elementType, object[i], objectName, options); + if (isXml && elementType.xmlNamespace) { + const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; + if (elementType.type.name === "Composite") { + tempArray[i] = Object.assign({}, serializedValue); + tempArray[i][interfaces_js_1$3.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; + } else { + tempArray[i] = {}; + tempArray[i][options.xml.xmlCharKey] = serializedValue; + tempArray[i][interfaces_js_1$3.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; + } + } else tempArray[i] = serializedValue; + } + return tempArray; + } + function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { + if (typeof object !== "object") throw new Error(`${objectName} must be of type object.`); + const valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}.`); + const tempDictionary = {}; + for (const key of Object.keys(object)) { + const serializedValue = serializer.serialize(valueType, object[key], objectName, options); + tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); + } + if (isXml && mapper.xmlNamespace) { + const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; + const result = tempDictionary; + result[interfaces_js_1$3.XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; + return result; + } + return tempDictionary; + } + /** + * Resolves the additionalProperties property from a referenced mapper + * @param serializer - the serializer containing the entire set of mappers + * @param mapper - the composite mapper to resolve + * @param objectName - name of the object being serialized + */ + function resolveAdditionalProperties(serializer, mapper, objectName) { + const additionalProperties = mapper.type.additionalProperties; + if (!additionalProperties && mapper.type.className) { + const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + } + return additionalProperties; + } + /** + * Finds the mapper referenced by className + * @param serializer - the serializer containing the entire set of mappers + * @param mapper - the composite mapper to resolve + * @param objectName - name of the object being serialized + */ + function resolveReferencedMapper(serializer, mapper, objectName) { + const className = mapper.type.className; + if (!className) throw new Error(`Class name for model "${objectName}" is not provided in the mapper "${JSON.stringify(mapper, void 0, 2)}".`); + return serializer.modelMappers[className]; + } + /** + * Resolves a composite mapper's modelProperties. + * @param serializer - the serializer containing the entire set of mappers + * @param mapper - the composite mapper to resolve + */ + function resolveModelProperties(serializer, mapper, objectName) { + let modelProps = mapper.type.modelProperties; + if (!modelProps) { + const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + if (!modelMapper) throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); + modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + if (!modelProps) throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); + } + return modelProps; + } + function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + if (object !== void 0 && object !== null) { + const payload = {}; + const modelProps = resolveModelProperties(serializer, mapper, objectName); + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) continue; + let propName; + let parentObject = payload; + if (serializer.isXML) if (propertyMapper.xmlIsWrapped) propName = propertyMapper.xmlName; + else propName = propertyMapper.xmlElementName || propertyMapper.xmlName; + else { + const paths = splitSerializeName(propertyMapper.serializedName); + propName = paths.pop(); + for (const pathName of paths) { + const childObject = parentObject[pathName]; + if ((childObject === void 0 || childObject === null) && (object[key] !== void 0 && object[key] !== null || propertyMapper.defaultValue !== void 0)) parentObject[pathName] = {}; + parentObject = parentObject[pathName]; + } + } + if (parentObject !== void 0 && parentObject !== null) { + if (isXml && mapper.xmlNamespace) { + const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; + parentObject[interfaces_js_1$3.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1$3.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + } + const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; + let toSerialize = object[key]; + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && (toSerialize === void 0 || toSerialize === null)) toSerialize = mapper.serializedName; + const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options); + if (serializedValue !== void 0 && propName !== void 0 && propName !== null) { + const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options); + if (isXml && propertyMapper.xmlIsAttribute) { + parentObject[interfaces_js_1$3.XML_ATTRKEY] = parentObject[interfaces_js_1$3.XML_ATTRKEY] || {}; + parentObject[interfaces_js_1$3.XML_ATTRKEY][propName] = serializedValue; + } else if (isXml && propertyMapper.xmlIsWrapped) parentObject[propName] = { [propertyMapper.xmlElementName]: value }; + else parentObject[propName] = value; + } + } + } + const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); + if (additionalPropertiesMapper) { + const propNames = Object.keys(modelProps); + for (const clientPropName in object) { + const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); + if (isAdditionalProperty) payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + "[\"" + clientPropName + "\"]", options); + } + } + return payload; + } + return object; + } + function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { + if (!isXml || !propertyMapper.xmlNamespace) return serializedValue; + const xmlnsKey = propertyMapper.xmlNamespacePrefix ? `xmlns:${propertyMapper.xmlNamespacePrefix}` : "xmlns"; + const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace }; + if (["Composite"].includes(propertyMapper.type.name)) if (serializedValue[interfaces_js_1$3.XML_ATTRKEY]) return serializedValue; + else { + const result$1 = Object.assign({}, serializedValue); + result$1[interfaces_js_1$3.XML_ATTRKEY] = xmlNamespace; + return result$1; + } + const result = {}; + result[options.xml.xmlCharKey] = serializedValue; + result[interfaces_js_1$3.XML_ATTRKEY] = xmlNamespace; + return result; + } + function isSpecialXmlProperty(propertyName, options) { + return [interfaces_js_1$3.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); + } + function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { + var _a$2, _b$1; + const xmlCharKey = (_a$2 = options.xml.xmlCharKey) !== null && _a$2 !== void 0 ? _a$2 : interfaces_js_1$3.XML_CHARKEY; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + const modelProps = resolveModelProperties(serializer, mapper, objectName); + let instance = {}; + const handledPropertyNames = []; + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + const paths = splitSerializeName(modelProps[key].serializedName); + handledPropertyNames.push(paths[0]); + const { serializedName, xmlName, xmlElementName } = propertyMapper; + let propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== void 0) propertyObjectName = objectName + "." + serializedName; + const headerCollectionPrefix = propertyMapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + const dictionary = {}; + for (const headerKey of Object.keys(responseBody)) { + if (headerKey.startsWith(headerCollectionPrefix)) dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options); + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } else if (serializer.isXML) if (propertyMapper.xmlIsAttribute && responseBody[interfaces_js_1$3.XML_ATTRKEY]) instance[key] = serializer.deserialize(propertyMapper, responseBody[interfaces_js_1$3.XML_ATTRKEY][xmlName], propertyObjectName, options); + else if (propertyMapper.xmlIsMsText) { + if (responseBody[xmlCharKey] !== void 0) instance[key] = responseBody[xmlCharKey]; + else if (typeof responseBody === "string") instance[key] = responseBody; + } else { + const propertyName = xmlElementName || xmlName || serializedName; + if (propertyMapper.xmlIsWrapped) { + const wrapped = responseBody[xmlName]; + const elementList = (_b$1 = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b$1 !== void 0 ? _b$1 : []; + instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); + handledPropertyNames.push(xmlName); + } else { + const property = responseBody[propertyName]; + instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options); + handledPropertyNames.push(propertyName); + } + } + else { + let propertyInstance; + let res = responseBody; + let steps = 0; + for (const item of paths) { + if (!res) break; + steps++; + res = res[item]; + } + if (res === null && steps < paths.length) res = void 0; + propertyInstance = res; + const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && (propertyInstance === void 0 || propertyInstance === null)) propertyInstance = mapper.serializedName; + let serializedValue; + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + for (const [k, v] of Object.entries(instance)) if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) arrayInstance[k] = v; + instance = arrayInstance; + } else if (propertyInstance !== void 0 || propertyMapper.defaultValue !== void 0) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + instance[key] = serializedValue; + } + } + } + const additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + const isAdditionalProperty = (responsePropName) => { + for (const clientPropName in modelProps) { + const paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) return false; + } + return true; + }; + for (const responsePropName in responseBody) if (isAdditionalProperty(responsePropName)) instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + "[\"" + responsePropName + "\"]", options); + } else if (responseBody && !options.ignoreUnknownProperties) { + for (const key of Object.keys(responseBody)) if (instance[key] === void 0 && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key, options)) instance[key] = responseBody[key]; + } + return instance; + } + function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) { + const value = mapper.type.value; + if (!value || typeof value !== "object") throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}`); + if (responseBody) { + const tempDictionary = {}; + for (const key of Object.keys(responseBody)) tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options); + return tempDictionary; + } + return responseBody; + } + function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { + var _a$2; + let element = mapper.type.element; + if (!element || typeof element !== "object") throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); + if (responseBody) { + if (!Array.isArray(responseBody)) responseBody = [responseBody]; + if (element.type.name === "Composite" && element.type.className) element = (_a$2 = serializer.modelMappers[element.type.className]) !== null && _a$2 !== void 0 ? _a$2 : element; + const tempArray = []; + for (let i = 0; i < responseBody.length; i++) tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options); + return tempArray; + } + return responseBody; + } + function getIndexDiscriminator(discriminators, discriminatorValue, typeName) { + const typeNamesToCheck = [typeName]; + while (typeNamesToCheck.length) { + const currentName = typeNamesToCheck.shift(); + const indexDiscriminator = discriminatorValue === currentName ? discriminatorValue : currentName + "." + discriminatorValue; + if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) return discriminators[indexDiscriminator]; + else for (const [name, mapper] of Object.entries(discriminators)) if (name.startsWith(currentName + ".") && mapper.type.uberParent === currentName && mapper.type.className) typeNamesToCheck.push(mapper.type.className); + } + return void 0; + } + function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + var _a$2; + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName) { + if (polymorphicPropertyName === "serializedName") discriminatorName = discriminatorName.replace(/\\/gi, ""); + const discriminatorValue = object[discriminatorName]; + const typeName = (_a$2 = mapper.type.uberParent) !== null && _a$2 !== void 0 ? _a$2 : mapper.type.className; + if (typeof discriminatorValue === "string" && typeName) { + const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); + if (polymorphicMapper) mapper = polymorphicMapper; + } + } + } + return mapper; + } + function getPolymorphicDiscriminatorRecursively(serializer, mapper) { + return mapper.type.polymorphicDiscriminator || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className); + } + function getPolymorphicDiscriminatorSafely(serializer, typeName) { + return typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator; + } + /** + * Known types of Mappers + */ + exports.MapperTypeNames = { + Base64Url: "Base64Url", + Boolean: "Boolean", + ByteArray: "ByteArray", + Composite: "Composite", + Date: "Date", + DateTime: "DateTime", + DateTimeRfc1123: "DateTimeRfc1123", + Dictionary: "Dictionary", + Enum: "Enum", + Number: "Number", + Object: "Object", + Sequence: "Sequence", + String: "String", + Stream: "Stream", + TimeSpan: "TimeSpan", + UnixTime: "UnixTime" + }; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/state.js +var require_state = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/state.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.state = void 0; + /** + * Holds the singleton operationRequestMap, to be shared across CJS and ESM imports. + */ + exports.state = { operationRequestMap: new WeakMap() }; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/operationHelpers.js +var require_operationHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports.getOperationRequestInfo = getOperationRequestInfo; + const state_js_1 = require_state(); + /** + * @internal + * Retrieves the value to use for a given operation argument + * @param operationArguments - The arguments passed from the generated client + * @param parameter - The parameter description + * @param fallbackObject - If something isn't found in the arguments bag, look here. + * Generally used to look at the service client properties. + */ + function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { + let parameterPath = parameter.parameterPath; + const parameterMapper = parameter.mapper; + let value; + if (typeof parameterPath === "string") parameterPath = [parameterPath]; + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) if (parameterMapper.isConstant) value = parameterMapper.defaultValue; + else { + let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound && fallbackObject) propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath); + let useDefaultValue = false; + if (!propertySearchResult.propertyFound) useDefaultValue = parameterMapper.required || parameterPath[0] === "options" && parameterPath.length === 2; + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } + } else { + if (parameterMapper.required) value = {}; + for (const propertyName in parameterPath) { + const propertyMapper = parameterMapper.type.modelProperties[propertyName]; + const propertyPath = parameterPath[propertyName]; + const propertyValue = getOperationArgumentValueFromParameter(operationArguments, { + parameterPath: propertyPath, + mapper: propertyMapper + }, fallbackObject); + if (propertyValue !== void 0) { + if (!value) value = {}; + value[propertyName] = propertyValue; + } + } + } + return value; + } + function getPropertyFromParameterPath(parent, parameterPath) { + const result = { propertyFound: false }; + let i = 0; + for (; i < parameterPath.length; ++i) { + const parameterPathPart = parameterPath[i]; + if (parent && parameterPathPart in parent) parent = parent[parameterPathPart]; + else break; + } + if (i === parameterPath.length) { + result.propertyValue = parent; + result.propertyFound = true; + } + return result; + } + const originalRequestSymbol$1 = Symbol.for("@azure/core-client original request"); + function hasOriginalRequest(request) { + return originalRequestSymbol$1 in request; + } + function getOperationRequestInfo(request) { + if (hasOriginalRequest(request)) return getOperationRequestInfo(request[originalRequestSymbol$1]); + let info = state_js_1.state.operationRequestMap.get(request); + if (!info) { + info = {}; + state_js_1.state.operationRequestMap.set(request, info); + } + return info; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js +var require_deserializationPolicy = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.deserializationPolicyName = void 0; + exports.deserializationPolicy = deserializationPolicy; + const interfaces_js_1$2 = require_interfaces(); + const core_rest_pipeline_1$6 = require_commonjs$7(); + const serializer_js_1$3 = require_serializer(); + const operationHelpers_js_1$3 = require_operationHelpers(); + const defaultJsonContentTypes = ["application/json", "text/json"]; + const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; + /** + * The programmatic identifier of the deserializationPolicy. + */ + exports.deserializationPolicyName = "deserializationPolicy"; + /** + * This policy handles parsing out responses according to OperationSpecs on the request. + */ + function deserializationPolicy(options = {}) { + var _a$2, _b$1, _c$1, _d$1, _e, _f, _g; + const jsonContentTypes = (_b$1 = (_a$2 = options.expectedContentTypes) === null || _a$2 === void 0 ? void 0 : _a$2.json) !== null && _b$1 !== void 0 ? _b$1 : defaultJsonContentTypes; + const xmlContentTypes = (_d$1 = (_c$1 = options.expectedContentTypes) === null || _c$1 === void 0 ? void 0 : _c$1.xml) !== null && _d$1 !== void 0 ? _d$1 : defaultXmlContentTypes; + const parseXML$1 = options.parseXML; + const serializerOptions = options.serializerOptions; + const updatedOptions = { xml: { + rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", + includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, + xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1$2.XML_CHARKEY + } }; + return { + name: exports.deserializationPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML$1); + } + }; + } + function getOperationResponseMap(parsedResponse) { + let result; + const request = parsedResponse.request; + const operationInfo = (0, operationHelpers_js_1$3.getOperationRequestInfo)(request); + const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + if (operationSpec) if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) result = operationSpec.responses[parsedResponse.status]; + else result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + return result; + } + function shouldDeserializeResponse(parsedResponse) { + const request = parsedResponse.request; + const operationInfo = (0, operationHelpers_js_1$3.getOperationRequestInfo)(request); + const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + let result; + if (shouldDeserialize === void 0) result = true; + else if (typeof shouldDeserialize === "boolean") result = shouldDeserialize; + else result = shouldDeserialize(parsedResponse); + return result; + } + async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML$1) { + const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML$1); + if (!shouldDeserializeResponse(parsedResponse)) return parsedResponse; + const operationInfo = (0, operationHelpers_js_1$3.getOperationRequestInfo)(parsedResponse.request); + const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + if (!operationSpec || !operationSpec.responses) return parsedResponse; + const responseSpec = getOperationResponseMap(parsedResponse); + const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options); + if (error) throw error; + else if (shouldReturnResponse) return parsedResponse; + if (responseSpec) { + if (responseSpec.bodyMapper) { + let valueToDeserialize = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === serializer_js_1$3.MapperTypeNames.Sequence) valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] : []; + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options); + } catch (deserializeError) { + const restError = new core_rest_pipeline_1$6.RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { + statusCode: parsedResponse.status, + request: parsedResponse.request, + response: parsedResponse + }); + throw restError; + } + } else if (operationSpec.httpMethod === "HEAD") parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + if (responseSpec.headersMapper) parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { + xml: {}, + ignoreUnknownProperties: true + }); + } + return parsedResponse; + } + function isOperationSpecEmpty(operationSpec) { + const expectedStatusCodes = Object.keys(operationSpec.responses); + return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; + } + function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { + var _a$2, _b$1, _c$1, _d$1, _e; + const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; + const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; + if (isExpectedStatusCode) if (responseSpec) { + if (!responseSpec.isError) return { + error: null, + shouldReturnResponse: false + }; + } else return { + error: null, + shouldReturnResponse: false + }; + const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; + const initialErrorMessage = ((_a$2 = parsedResponse.request.streamResponseStatusCodes) === null || _a$2 === void 0 ? void 0 : _a$2.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const error = new core_rest_pipeline_1$6.RestError(initialErrorMessage, { + statusCode: parsedResponse.status, + request: parsedResponse.request, + response: parsedResponse + }); + if (!errorResponseSpec && !(((_c$1 = (_b$1 = parsedResponse.parsedBody) === null || _b$1 === void 0 ? void 0 : _b$1.error) === null || _c$1 === void 0 ? void 0 : _c$1.code) && ((_e = (_d$1 = parsedResponse.parsedBody) === null || _d$1 === void 0 ? void 0 : _d$1.error) === null || _e === void 0 ? void 0 : _e.message))) throw error; + const defaultBodyMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.bodyMapper; + const defaultHeadersMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.headersMapper; + try { + if (parsedResponse.parsedBody) { + const parsedBody = parsedResponse.parsedBody; + let deserializedError; + if (defaultBodyMapper) { + let valueToDeserialize = parsedBody; + if (operationSpec.isXML && defaultBodyMapper.type.name === serializer_js_1$3.MapperTypeNames.Sequence) { + valueToDeserialize = []; + const elementName = defaultBodyMapper.xmlElementName; + if (typeof parsedBody === "object" && elementName) valueToDeserialize = parsedBody[elementName]; + } + deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody", options); + } + const internalError = parsedBody.error || deserializedError || parsedBody; + error.code = internalError.code; + if (internalError.message) error.message = internalError.message; + if (defaultBodyMapper) error.response.parsedBody = deserializedError; + } + if (parsedResponse.headers && defaultHeadersMapper) error.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; + } + return { + error, + shouldReturnResponse: false + }; + } + async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML$1) { + var _a$2; + if (!((_a$2 = operationResponse.request.streamResponseStatusCodes) === null || _a$2 === void 0 ? void 0 : _a$2.has(operationResponse.status)) && operationResponse.bodyAsText) { + const text = operationResponse.bodyAsText; + const contentType$1 = operationResponse.headers.get("Content-Type") || ""; + const contentComponents = !contentType$1 ? [] : contentType$1.split(";").map((component) => component.toLowerCase()); + try { + if (contentComponents.length === 0 || contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) { + operationResponse.parsedBody = JSON.parse(text); + return operationResponse; + } else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) { + if (!parseXML$1) throw new Error("Parsing XML not supported."); + const body$1 = await parseXML$1(text, opts.xml); + operationResponse.parsedBody = body$1; + return operationResponse; + } + } catch (err) { + const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; + const errCode = err.code || core_rest_pipeline_1$6.RestError.PARSE_ERROR; + const e = new core_rest_pipeline_1$6.RestError(msg, { + code: errCode, + statusCode: operationResponse.status, + request: operationResponse.request, + response: operationResponse + }); + throw e; + } + } + return operationResponse; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js +var require_interfaceHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports.getPathStringFromParameter = getPathStringFromParameter; + const serializer_js_1$2 = require_serializer(); + /** + * Gets the list of status codes for streaming responses. + * @internal + */ + function getStreamingResponseStatusCodes(operationSpec) { + const result = new Set(); + for (const statusCode in operationSpec.responses) { + const operationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === serializer_js_1$2.MapperTypeNames.Stream) result.add(Number(statusCode)); + } + return result; + } + /** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter - The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + * @internal + */ + function getPathStringFromParameter(parameter) { + const { parameterPath, mapper } = parameter; + let result; + if (typeof parameterPath === "string") result = parameterPath; + else if (Array.isArray(parameterPath)) result = parameterPath.join("."); + else result = mapper.serializedName; + return result; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js +var require_serializationPolicy = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.serializationPolicyName = void 0; + exports.serializationPolicy = serializationPolicy; + exports.serializeHeaders = serializeHeaders; + exports.serializeRequestBody = serializeRequestBody; + const interfaces_js_1$1 = require_interfaces(); + const operationHelpers_js_1$2 = require_operationHelpers(); + const serializer_js_1$1 = require_serializer(); + const interfaceHelpers_js_1$2 = require_interfaceHelpers(); + /** + * The programmatic identifier of the serializationPolicy. + */ + exports.serializationPolicyName = "serializationPolicy"; + /** + * This policy handles assembling the request body and headers using + * an OperationSpec and OperationArguments on the request. + */ + function serializationPolicy(options = {}) { + const stringifyXML$1 = options.stringifyXML; + return { + name: exports.serializationPolicyName, + async sendRequest(request, next) { + const operationInfo = (0, operationHelpers_js_1$2.getOperationRequestInfo)(request); + const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + if (operationSpec && operationArguments) { + serializeHeaders(request, operationArguments, operationSpec); + serializeRequestBody(request, operationArguments, operationSpec, stringifyXML$1); + } + return next(request); + } + }; + } + /** + * @internal + */ + function serializeHeaders(request, operationArguments, operationSpec) { + var _a$2, _b$1; + if (operationSpec.headerParameters) for (const headerParameter of operationSpec.headerParameters) { + let headerValue = (0, operationHelpers_js_1$2.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); + if (headerValue !== null && headerValue !== void 0 || headerParameter.mapper.required) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(headerParameter)); + const headerCollectionPrefix = headerParameter.mapper.headerCollectionPrefix; + if (headerCollectionPrefix) for (const key of Object.keys(headerValue)) request.headers.set(headerCollectionPrefix + key, headerValue[key]); + else request.headers.set(headerParameter.mapper.serializedName || (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(headerParameter), headerValue); + } + } + const customHeaders = (_b$1 = (_a$2 = operationArguments.options) === null || _a$2 === void 0 ? void 0 : _a$2.requestOptions) === null || _b$1 === void 0 ? void 0 : _b$1.customHeaders; + if (customHeaders) for (const customHeaderName of Object.keys(customHeaders)) request.headers.set(customHeaderName, customHeaders[customHeaderName]); + } + /** + * @internal + */ + function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML$1 = function() { + throw new Error("XML serialization unsupported!"); + }) { + var _a$2, _b$1, _c$1, _d$1, _e; + const serializerOptions = (_a$2 = operationArguments.options) === null || _a$2 === void 0 ? void 0 : _a$2.serializerOptions; + const updatedOptions = { xml: { + rootName: (_b$1 = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b$1 !== void 0 ? _b$1 : "", + includeRoot: (_c$1 = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c$1 !== void 0 ? _c$1 : false, + xmlCharKey: (_d$1 = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d$1 !== void 0 ? _d$1 : interfaces_js_1$1.XML_CHARKEY + } }; + const xmlCharKey = updatedOptions.xml.xmlCharKey; + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + request.body = (0, operationHelpers_js_1$2.getOperationArgumentValueFromParameter)(operationArguments, operationSpec.requestBody); + const bodyMapper = operationSpec.requestBody.mapper; + const { required, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable } = bodyMapper; + const typeName = bodyMapper.type.name; + try { + if (request.body !== void 0 && request.body !== null || nullable && request.body === null || required) { + const requestBodyParameterPathString = (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(operationSpec.requestBody); + request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions); + const isStream = typeName === serializer_js_1$1.MapperTypeNames.Stream; + if (operationSpec.isXML) { + const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; + const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions); + if (typeName === serializer_js_1$1.MapperTypeNames.Sequence) request.body = stringifyXML$1(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { + rootName: xmlName || serializedName, + xmlCharKey + }); + else if (!isStream) request.body = stringifyXML$1(value, { + rootName: xmlName || serializedName, + xmlCharKey + }); + } else if (typeName === serializer_js_1$1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) return; + else if (!isStream) request.body = JSON.stringify(request.body); + } + } catch (error) { + throw new Error(`Error "${error.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, void 0, " ")}.`); + } + } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + request.formData = {}; + for (const formDataParameter of operationSpec.formDataParameters) { + const formDataParameterValue = (0, operationHelpers_js_1$2.getOperationArgumentValueFromParameter)(operationArguments, formDataParameter); + if (formDataParameterValue !== void 0 && formDataParameterValue !== null) { + const formDataParameterPropertyName = formDataParameter.mapper.serializedName || (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(formDataParameter); + request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, (0, interfaceHelpers_js_1$2.getPathStringFromParameter)(formDataParameter), updatedOptions); + } + } + } + } + /** + * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself + */ + function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { + if (xmlNamespace && ![ + "Composite", + "Sequence", + "Dictionary" + ].includes(typeName)) { + const result = {}; + result[options.xml.xmlCharKey] = serializedValue; + result[interfaces_js_1$1.XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; + return result; + } + return serializedValue; + } + function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { + if (!Array.isArray(obj)) obj = [obj]; + if (!xmlNamespaceKey || !xmlNamespace) return { [elementName]: obj }; + const result = { [elementName]: obj }; + result[interfaces_js_1$1.XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; + return result; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createClientPipeline = createClientPipeline; + const deserializationPolicy_js_1$1 = require_deserializationPolicy(); + const core_rest_pipeline_1$5 = require_commonjs$7(); + const serializationPolicy_js_1$1 = require_serializationPolicy(); + /** + * Creates a new Pipeline for use with a Service Client. + * Adds in deserializationPolicy by default. + * Also adds in bearerTokenAuthenticationPolicy if passed a TokenCredential. + * @param options - Options to customize the created pipeline. + */ + function createClientPipeline(options = {}) { + const pipeline = (0, core_rest_pipeline_1$5.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + if (options.credentialOptions) pipeline.addPolicy((0, core_rest_pipeline_1$5.bearerTokenAuthenticationPolicy)({ + credential: options.credentialOptions.credential, + scopes: options.credentialOptions.credentialScopes + })); + pipeline.addPolicy((0, serializationPolicy_js_1$1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); + pipeline.addPolicy((0, deserializationPolicy_js_1$1.deserializationPolicy)(options.deserializationOptions), { phase: "Deserialize" }); + return pipeline; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/httpClientCache.js +var require_httpClientCache = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient$1; + const core_rest_pipeline_1$4 = require_commonjs$7(); + let cachedHttpClient; + function getCachedDefaultHttpClient$1() { + if (!cachedHttpClient) cachedHttpClient = (0, core_rest_pipeline_1$4.createDefaultHttpClient)(); + return cachedHttpClient; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/urlHelpers.js +var require_urlHelpers = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getRequestUrl = getRequestUrl; + exports.appendQueryParams = appendQueryParams; + const operationHelpers_js_1$1 = require_operationHelpers(); + const interfaceHelpers_js_1$1 = require_interfaceHelpers(); + const CollectionFormatToDelimiterMap = { + CSV: ",", + SSV: " ", + Multi: "Multi", + TSV: " ", + Pipes: "|" + }; + function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) { + const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject); + let isAbsolutePath = false; + let requestUrl = replaceAll(baseUri, urlReplacements); + if (operationSpec.path) { + let path$8 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path$8.startsWith("/")) path$8 = path$8.substring(1); + if (isAbsoluteUrl(path$8)) { + requestUrl = path$8; + isAbsolutePath = true; + } else requestUrl = appendPath(requestUrl, path$8); + } + const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); + /** + * Notice that this call sets the `noOverwrite` parameter to true if the `requestUrl` + * is an absolute path. This ensures that existing query parameter values in `requestUrl` + * do not get overwritten. On the other hand when `requestUrl` is not absolute path, it + * is still being built so there is nothing to overwrite. + */ + requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); + return requestUrl; + } + function replaceAll(input, replacements) { + let result = input; + for (const [searchValue, replaceValue] of replacements) result = result.split(searchValue).join(replaceValue); + return result; + } + function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { + var _a$2; + const result = new Map(); + if ((_a$2 = operationSpec.urlParameters) === null || _a$2 === void 0 ? void 0 : _a$2.length) for (const urlParameter of operationSpec.urlParameters) { + let urlParameterValue = (0, operationHelpers_js_1$1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); + const parameterPathString = (0, interfaceHelpers_js_1$1.getPathStringFromParameter)(urlParameter); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString); + if (!urlParameter.skipEncoding) urlParameterValue = encodeURIComponent(urlParameterValue); + result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue); + } + return result; + } + function isAbsoluteUrl(url$1) { + return url$1.includes("://"); + } + function appendPath(url$1, pathToAppend) { + if (!pathToAppend) return url$1; + const parsedUrl = new URL(url$1); + let newPath = parsedUrl.pathname; + if (!newPath.endsWith("/")) newPath = `${newPath}/`; + if (pathToAppend.startsWith("/")) pathToAppend = pathToAppend.substring(1); + const searchStart = pathToAppend.indexOf("?"); + if (searchStart !== -1) { + const path$8 = pathToAppend.substring(0, searchStart); + const search = pathToAppend.substring(searchStart + 1); + newPath = newPath + path$8; + if (search) parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; + } else newPath = newPath + pathToAppend; + parsedUrl.pathname = newPath; + return parsedUrl.toString(); + } + function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { + var _a$2; + const result = new Map(); + const sequenceParams = new Set(); + if ((_a$2 = operationSpec.queryParameters) === null || _a$2 === void 0 ? void 0 : _a$2.length) for (const queryParameter of operationSpec.queryParameters) { + if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) sequenceParams.add(queryParameter.mapper.serializedName); + let queryParameterValue = (0, operationHelpers_js_1$1.getOperationArgumentValueFromParameter)(operationArguments, queryParameter, fallbackObject); + if (queryParameterValue !== void 0 && queryParameterValue !== null || queryParameter.mapper.required) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, (0, interfaceHelpers_js_1$1.getPathStringFromParameter)(queryParameter)); + const delimiter$1 = queryParameter.collectionFormat ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] : ""; + if (Array.isArray(queryParameterValue)) queryParameterValue = queryParameterValue.map((item) => { + if (item === null || item === void 0) return ""; + return item; + }); + if (queryParameter.collectionFormat === "Multi" && queryParameterValue.length === 0) continue; + else if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) queryParameterValue = queryParameterValue.join(delimiter$1); + if (!queryParameter.skipEncoding) if (Array.isArray(queryParameterValue)) queryParameterValue = queryParameterValue.map((item) => { + return encodeURIComponent(item); + }); + else queryParameterValue = encodeURIComponent(queryParameterValue); + if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) queryParameterValue = queryParameterValue.join(delimiter$1); + result.set(queryParameter.mapper.serializedName || (0, interfaceHelpers_js_1$1.getPathStringFromParameter)(queryParameter), queryParameterValue); + } + } + return { + queryParams: result, + sequenceParams + }; + } + function simpleParseQueryParams(queryString) { + const result = new Map(); + if (!queryString || queryString[0] !== "?") return result; + queryString = queryString.slice(1); + const pairs = queryString.split("&"); + for (const pair of pairs) { + const [name, value] = pair.split("=", 2); + const existingValue = result.get(name); + if (existingValue) if (Array.isArray(existingValue)) existingValue.push(value); + else result.set(name, [existingValue, value]); + else result.set(name, value); + } + return result; + } + /** @internal */ + function appendQueryParams(url$1, queryParams, sequenceParams, noOverwrite = false) { + if (queryParams.size === 0) return url$1; + const parsedUrl = new URL(url$1); + const combinedParams = simpleParseQueryParams(parsedUrl.search); + for (const [name, value] of queryParams) { + const existingValue = combinedParams.get(name); + if (Array.isArray(existingValue)) if (Array.isArray(value)) { + existingValue.push(...value); + const valueSet = new Set(existingValue); + combinedParams.set(name, Array.from(valueSet)); + } else existingValue.push(value); + else if (existingValue) { + if (Array.isArray(value)) value.unshift(existingValue); + else if (sequenceParams.has(name)) combinedParams.set(name, [existingValue, value]); + if (!noOverwrite) combinedParams.set(name, value); + } else combinedParams.set(name, value); + } + const searchPieces = []; + for (const [name, value] of combinedParams) if (typeof value === "string") searchPieces.push(`${name}=${value}`); + else if (Array.isArray(value)) for (const subValue of value) searchPieces.push(`${name}=${subValue}`); + else searchPieces.push(`${name}=${value}`); + parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return parsedUrl.toString(); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/log.js +var require_log = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/log.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.logger = void 0; + const logger_1$1 = require_commonjs$11(); + exports.logger = (0, logger_1$1.createClientLogger)("core-client"); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serviceClient.js +var require_serviceClient = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/serviceClient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ServiceClient = void 0; + const core_rest_pipeline_1$3 = require_commonjs$7(); + const pipeline_js_1$1 = require_pipeline(); + const utils_js_1 = require_utils(); + const httpClientCache_js_1 = require_httpClientCache(); + const operationHelpers_js_1 = require_operationHelpers(); + const urlHelpers_js_1 = require_urlHelpers(); + const interfaceHelpers_js_1 = require_interfaceHelpers(); + const log_js_1$1 = require_log(); + /** + * Initializes a new instance of the ServiceClient. + */ + var ServiceClient = class { + /** + * The ServiceClient constructor + * @param options - The service client options that govern the behavior of the client. + */ + constructor(options = {}) { + var _a$2, _b$1; + this._requestContentType = options.requestContentType; + this._endpoint = (_a$2 = options.endpoint) !== null && _a$2 !== void 0 ? _a$2 : options.baseUri; + if (options.baseUri) log_js_1$1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); + this._allowInsecureConnection = options.allowInsecureConnection; + this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); + this.pipeline = options.pipeline || createDefaultPipeline(options); + if ((_b$1 = options.additionalPolicies) === null || _b$1 === void 0 ? void 0 : _b$1.length) for (const { policy, position } of options.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + this.pipeline.addPolicy(policy, { afterPhase }); + } + } + /** + * Send the provided httpRequest. + */ + async sendRequest(request) { + return this.pipeline.sendRequest(this._httpClient, request); + } + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @typeParam T - The typed result of the request, based on the OperationSpec. + * @param operationArguments - The arguments that the HTTP request's templated values will be populated from. + * @param operationSpec - The OperationSpec to use to populate the httpRequest. + */ + async sendOperationRequest(operationArguments, operationSpec) { + const endpoint = operationSpec.baseUrl || this._endpoint; + if (!endpoint) throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); + const url$1 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const request = (0, core_rest_pipeline_1$3.createPipelineRequest)({ url: url$1 }); + request.method = operationSpec.httpMethod; + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + operationInfo.operationSpec = operationSpec; + operationInfo.operationArguments = operationArguments; + const contentType$1 = operationSpec.contentType || this._requestContentType; + if (contentType$1 && operationSpec.requestBody) request.headers.set("Content-Type", contentType$1); + const options = operationArguments.options; + if (options) { + const requestOptions = options.requestOptions; + if (requestOptions) { + if (requestOptions.timeout) request.timeout = requestOptions.timeout; + if (requestOptions.onUploadProgress) request.onUploadProgress = requestOptions.onUploadProgress; + if (requestOptions.onDownloadProgress) request.onDownloadProgress = requestOptions.onDownloadProgress; + if (requestOptions.shouldDeserialize !== void 0) operationInfo.shouldDeserialize = requestOptions.shouldDeserialize; + if (requestOptions.allowInsecureConnection) request.allowInsecureConnection = true; + } + if (options.abortSignal) request.abortSignal = options.abortSignal; + if (options.tracingOptions) request.tracingOptions = options.tracingOptions; + } + if (this._allowInsecureConnection) request.allowInsecureConnection = true; + if (request.streamResponseStatusCodes === void 0) request.streamResponseStatusCodes = (0, interfaceHelpers_js_1.getStreamingResponseStatusCodes)(operationSpec); + try { + const rawResponse = await this.sendRequest(request); + const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); + if (options === null || options === void 0 ? void 0 : options.onResponse) options.onResponse(rawResponse, flatResponse); + return flatResponse; + } catch (error) { + if (typeof error === "object" && (error === null || error === void 0 ? void 0 : error.response)) { + const rawResponse = error.response; + const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses["default"]); + error.details = flatResponse; + if (options === null || options === void 0 ? void 0 : options.onResponse) options.onResponse(rawResponse, flatResponse, error); + } + throw error; + } + } + }; + exports.ServiceClient = ServiceClient; + function createDefaultPipeline(options) { + const credentialScopes = getCredentialScopes(options); + const credentialOptions = options.credential && credentialScopes ? { + credentialScopes, + credential: options.credential + } : void 0; + return (0, pipeline_js_1$1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + } + function getCredentialScopes(options) { + if (options.credentialScopes) return options.credentialScopes; + if (options.endpoint) return `${options.endpoint}/.default`; + if (options.baseUri) return `${options.baseUri}/.default`; + if (options.credential && !options.credentialScopes) throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); + return void 0; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js +var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parseCAEChallenge = parseCAEChallenge; + exports.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + const log_js_1 = require_log(); + const base64_js_1 = require_base64$1(); + /** + * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`. + * Into: `[ { a: 'b', c: 'd' }, { d: 'e', f: 'g' } ]`. + * + * @internal + */ + function parseCAEChallenge(challenges) { + const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); + return bearerChallenges.map((challenge) => { + const challengeParts = `${challenge.trim()}, `.split("\", ").filter((x) => x); + const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("=\""))); + return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + }); + } + /** + * This function can be used as a callback for the `bearerTokenAuthenticationPolicy` of `@azure/core-rest-pipeline`, to support CAE challenges: + * [Continuous Access Evaluation](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation). + * + * Call the `bearerTokenAuthenticationPolicy` with the following options: + * + * ```ts snippet:AuthorizeRequestOnClaimChallenge + * import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; + * import { authorizeRequestOnClaimChallenge } from "@azure/core-client"; + * + * const policy = bearerTokenAuthenticationPolicy({ + * challengeCallbacks: { + * authorizeRequestOnChallenge: authorizeRequestOnClaimChallenge, + * }, + * scopes: ["https://service/.default"], + * }); + * ``` + * + * Once provided, the `bearerTokenAuthenticationPolicy` policy will internally handle Continuous Access Evaluation (CAE) challenges. + * When it can't complete a challenge it will return the 401 (unauthorized) response from ARM. + * + * Example challenge with claims: + * + * ``` + * Bearer authorization_uri="https://login.windows-ppe.net/", error="invalid_token", + * error_description="User session has been revoked", + * claims="eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwgInZhbHVlIjoiMTYwMzc0MjgwMCJ9fX0=" + * ``` + */ + async function authorizeRequestOnClaimChallenge(onChallengeOptions) { + var _a$2; + const { scopes, response } = onChallengeOptions; + const logger$2 = onChallengeOptions.logger || log_js_1.logger; + const challenge = response.headers.get("WWW-Authenticate"); + if (!challenge) { + logger$2.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`); + return false; + } + const challenges = parseCAEChallenge(challenge) || []; + const parsedChallenge = challenges.find((x) => x.claims); + if (!parsedChallenge) { + logger$2.info(`The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.`); + return false; + } + const accessToken = await onChallengeOptions.getAccessToken(parsedChallenge.scope ? [parsedChallenge.scope] : scopes, { claims: (0, base64_js_1.decodeStringToString)(parsedChallenge.claims) }); + if (!accessToken) return false; + onChallengeOptions.request.headers.set("Authorization", `${(_a$2 = accessToken.tokenType) !== null && _a$2 !== void 0 ? _a$2 : "Bearer"} ${accessToken.token}`); + return true; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnTenantChallenge.js +var require_authorizeRequestOnTenantChallenge = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnTenantChallenge.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.authorizeRequestOnTenantChallenge = void 0; + /** + * A set of constants used internally when processing requests. + */ + const Constants = { + DefaultScope: "/.default", + HeaderConstants: { AUTHORIZATION: "authorization" } + }; + function isUuid(text) { + return /^[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}$/.test(text); + } + /** + * Defines a callback to handle auth challenge for Storage APIs. + * This implements the bearer challenge process described here: https://learn.microsoft.com/rest/api/storageservices/authorize-with-azure-active-directory#bearer-challenge + * Handling has specific features for storage that departs to the general AAD challenge docs. + **/ + const authorizeRequestOnTenantChallenge = async (challengeOptions) => { + var _a$2; + const requestOptions = requestToOptions(challengeOptions.request); + const challenge = getChallenge(challengeOptions.response); + if (challenge) { + const challengeInfo = parseChallenge(challenge); + const challengeScopes = buildScopes(challengeOptions, challengeInfo); + const tenantId = extractTenantId(challengeInfo); + if (!tenantId) return false; + const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + if (!accessToken) return false; + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${(_a$2 = accessToken.tokenType) !== null && _a$2 !== void 0 ? _a$2 : "Bearer"} ${accessToken.token}`); + return true; + } + return false; + }; + exports.authorizeRequestOnTenantChallenge = authorizeRequestOnTenantChallenge; + /** + * Extracts the tenant id from the challenge information + * The tenant id is contained in the authorization_uri as the first + * path part. + */ + function extractTenantId(challengeInfo) { + const parsedAuthUri = new URL(challengeInfo.authorization_uri); + const pathSegments = parsedAuthUri.pathname.split("/"); + const tenantId = pathSegments[1]; + if (tenantId && isUuid(tenantId)) return tenantId; + return void 0; + } + /** + * Builds the authentication scopes based on the information that comes in the + * challenge information. Scopes url is present in the resource_id, if it is empty + * we keep using the original scopes. + */ + function buildScopes(challengeOptions, challengeInfo) { + if (!challengeInfo.resource_id) return challengeOptions.scopes; + const challengeScopes = new URL(challengeInfo.resource_id); + challengeScopes.pathname = Constants.DefaultScope; + let scope = challengeScopes.toString(); + if (scope === "https://disk.azure.com/.default") scope = "https://disk.azure.com//.default"; + return [scope]; + } + /** + * We will retrieve the challenge only if the response status code was 401, + * and if the response contained the header "WWW-Authenticate" with a non-empty value. + */ + function getChallenge(response) { + const challenge = response.headers.get("WWW-Authenticate"); + if (response.status === 401 && challenge) return challenge; + return; + } + /** + * Converts: `Bearer a="b" c="d"`. + * Into: `[ { a: 'b', c: 'd' }]`. + * + * @internal + */ + function parseChallenge(challenge) { + const bearerChallenge = challenge.slice(7); + const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); + const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); + return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + } + /** + * Extracts the options form a Pipeline Request for later re-use + */ + function requestToOptions(request) { + return { + abortSignal: request.abortSignal, + requestOptions: { timeout: request.timeout }, + tracingOptions: request.tracingOptions + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/index.js +var require_commonjs$5 = __commonJS({ "node_modules/.deno/@azure+core-client@1.9.4/node_modules/@azure/core-client/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.authorizeRequestOnTenantChallenge = exports.authorizeRequestOnClaimChallenge = exports.serializationPolicyName = exports.serializationPolicy = exports.deserializationPolicyName = exports.deserializationPolicy = exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.createClientPipeline = exports.ServiceClient = exports.MapperTypeNames = exports.createSerializer = void 0; + var serializer_js_1 = require_serializer(); + Object.defineProperty(exports, "createSerializer", { + enumerable: true, + get: function() { + return serializer_js_1.createSerializer; + } + }); + Object.defineProperty(exports, "MapperTypeNames", { + enumerable: true, + get: function() { + return serializer_js_1.MapperTypeNames; + } + }); + var serviceClient_js_1 = require_serviceClient(); + Object.defineProperty(exports, "ServiceClient", { + enumerable: true, + get: function() { + return serviceClient_js_1.ServiceClient; + } + }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports, "createClientPipeline", { + enumerable: true, + get: function() { + return pipeline_js_1.createClientPipeline; + } + }); + var interfaces_js_1 = require_interfaces(); + Object.defineProperty(exports, "XML_ATTRKEY", { + enumerable: true, + get: function() { + return interfaces_js_1.XML_ATTRKEY; + } + }); + Object.defineProperty(exports, "XML_CHARKEY", { + enumerable: true, + get: function() { + return interfaces_js_1.XML_CHARKEY; + } + }); + var deserializationPolicy_js_1 = require_deserializationPolicy(); + Object.defineProperty(exports, "deserializationPolicy", { + enumerable: true, + get: function() { + return deserializationPolicy_js_1.deserializationPolicy; + } + }); + Object.defineProperty(exports, "deserializationPolicyName", { + enumerable: true, + get: function() { + return deserializationPolicy_js_1.deserializationPolicyName; + } + }); + var serializationPolicy_js_1 = require_serializationPolicy(); + Object.defineProperty(exports, "serializationPolicy", { + enumerable: true, + get: function() { + return serializationPolicy_js_1.serializationPolicy; + } + }); + Object.defineProperty(exports, "serializationPolicyName", { + enumerable: true, + get: function() { + return serializationPolicy_js_1.serializationPolicyName; + } + }); + var authorizeRequestOnClaimChallenge_js_1 = require_authorizeRequestOnClaimChallenge(); + Object.defineProperty(exports, "authorizeRequestOnClaimChallenge", { + enumerable: true, + get: function() { + return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; + } + }); + var authorizeRequestOnTenantChallenge_js_1 = require_authorizeRequestOnTenantChallenge(); + Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", { + enumerable: true, + get: function() { + return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/util.js +var require_util$1 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpHeaders = void 0; + exports.toPipelineRequest = toPipelineRequest; + exports.toWebResourceLike = toWebResourceLike; + exports.toHttpHeadersLike = toHttpHeadersLike; + const core_rest_pipeline_1$2 = require_commonjs$7(); + const originalRequestSymbol = Symbol("Original PipelineRequest"); + const originalClientRequestSymbol = Symbol.for("@azure/core-client original request"); + function toPipelineRequest(webResource, options = {}) { + const compatWebResource = webResource; + const request = compatWebResource[originalRequestSymbol]; + const headers = (0, core_rest_pipeline_1$2.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true })); + if (request) { + request.headers = headers; + return request; + } else { + const newRequest = (0, core_rest_pipeline_1$2.createPipelineRequest)({ + url: webResource.url, + method: webResource.method, + headers, + withCredentials: webResource.withCredentials, + timeout: webResource.timeout, + requestId: webResource.requestId, + abortSignal: webResource.abortSignal, + body: webResource.body, + formData: webResource.formData, + disableKeepAlive: !!webResource.keepAlive, + onDownloadProgress: webResource.onDownloadProgress, + onUploadProgress: webResource.onUploadProgress, + proxySettings: webResource.proxySettings, + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides + }); + if (options.originalRequest) newRequest[originalClientRequestSymbol] = options.originalRequest; + return newRequest; + } + } + function toWebResourceLike(request, options) { + var _a$2; + const originalRequest = (_a$2 = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a$2 !== void 0 ? _a$2 : request; + const webResource = { + url: request.url, + method: request.method, + headers: toHttpHeadersLike(request.headers), + withCredentials: request.withCredentials, + timeout: request.timeout, + requestId: request.headers.get("x-ms-client-request-id") || request.requestId, + abortSignal: request.abortSignal, + body: request.body, + formData: request.formData, + keepAlive: !!request.disableKeepAlive, + onDownloadProgress: request.onDownloadProgress, + onUploadProgress: request.onUploadProgress, + proxySettings: request.proxySettings, + streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, + clone() { + throw new Error("Cannot clone a non-proxied WebResourceLike"); + }, + prepare() { + throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat"); + }, + validateRequestProperties() { + /** do nothing */ + } + }; + if (options === null || options === void 0 ? void 0 : options.createProxy) return new Proxy(webResource, { + get(target, prop, receiver) { + if (prop === originalRequestSymbol) return request; + else if (prop === "clone") return () => { + return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), { + createProxy: true, + originalRequest + }); + }; + return Reflect.get(target, prop, receiver); + }, + set(target, prop, value, receiver) { + if (prop === "keepAlive") request.disableKeepAlive = !value; + const passThroughProps = [ + "url", + "method", + "withCredentials", + "timeout", + "requestId", + "abortSignal", + "body", + "formData", + "onDownloadProgress", + "onUploadProgress", + "proxySettings", + "streamResponseStatusCodes", + "agent", + "requestOverrides" + ]; + if (typeof prop === "string" && passThroughProps.includes(prop)) request[prop] = value; + return Reflect.set(target, prop, value, receiver); + } + }); + else return webResource; + } + /** + * Converts HttpHeaders from core-rest-pipeline to look like + * HttpHeaders from core-http. + * @param headers - HttpHeaders from core-rest-pipeline + * @returns HttpHeaders as they looked in core-http + */ + function toHttpHeadersLike(headers) { + return new HttpHeaders(headers.toJSON({ preserveCase: true })); + } + /** + * A collection of HttpHeaders that can be sent with a HTTP request. + */ + function getHeaderKey(headerName) { + return headerName.toLowerCase(); + } + /** + * A collection of HTTP header key/value pairs. + */ + var HttpHeaders = class HttpHeaders { + constructor(rawHeaders) { + this._headersMap = {}; + if (rawHeaders) for (const headerName in rawHeaders) this.set(headerName, rawHeaders[headerName]); + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName - The name of the header to set. This value is case-insensitive. + * @param headerValue - The value of the header to set. + */ + set(headerName, headerValue) { + this._headersMap[getHeaderKey(headerName)] = { + name: headerName, + value: headerValue.toString() + }; + } + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName - The name of the header. + */ + get(headerName) { + const header = this._headersMap[getHeaderKey(headerName)]; + return !header ? void 0 : header.value; + } + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName) { + return !!this._headersMap[getHeaderKey(headerName)]; + } + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName - The name of the header to remove. + */ + remove(headerName) { + const result = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + } + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders() { + return this.toJson({ preserveCase: true }); + } + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray() { + const headers = []; + for (const headerKey in this._headersMap) headers.push(this._headersMap[headerKey]); + return headers; + } + /** + * Get the header names that are contained in this collection. + */ + headerNames() { + const headerNames = []; + const headers = this.headersArray(); + for (let i = 0; i < headers.length; ++i) headerNames.push(headers[i].name); + return headerNames; + } + /** + * Get the header values that are contained in this collection. + */ + headerValues() { + const headerValues = []; + const headers = this.headersArray(); + for (let i = 0; i < headers.length; ++i) headerValues.push(headers[i].value); + return headerValues; + } + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJson(options = {}) { + const result = {}; + if (options.preserveCase) for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + result[header.name] = header.value; + } + else for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + result[getHeaderKey(header.name)] = header.value; + } + return result; + } + /** + * Get the string representation of this HTTP header collection. + */ + toString() { + return JSON.stringify(this.toJson({ preserveCase: true })); + } + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone() { + const resultPreservingCasing = {}; + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + resultPreservingCasing[header.name] = header.value; + } + return new HttpHeaders(resultPreservingCasing); + } + }; + exports.HttpHeaders = HttpHeaders; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/response.js +var require_response = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toCompatResponse = toCompatResponse; + exports.toPipelineResponse = toPipelineResponse; + const core_rest_pipeline_1$1 = require_commonjs$7(); + const util_js_1$3 = require_util$1(); + const originalResponse = Symbol("Original FullOperationResponse"); + /** + * A helper to convert response objects from the new pipeline back to the old one. + * @param response - A response object from core-client. + * @returns A response compatible with `HttpOperationResponse` from core-http. + */ + function toCompatResponse(response, options) { + let request = (0, util_js_1$3.toWebResourceLike)(response.request); + let headers = (0, util_js_1$3.toHttpHeadersLike)(response.headers); + if (options === null || options === void 0 ? void 0 : options.createProxy) return new Proxy(response, { + get(target, prop, receiver) { + if (prop === "headers") return headers; + else if (prop === "request") return request; + else if (prop === originalResponse) return response; + return Reflect.get(target, prop, receiver); + }, + set(target, prop, value, receiver) { + if (prop === "headers") headers = value; + else if (prop === "request") request = value; + return Reflect.set(target, prop, value, receiver); + } + }); + else return Object.assign(Object.assign({}, response), { + request, + headers + }); + } + /** + * A helper to convert back to a PipelineResponse + * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http. + */ + function toPipelineResponse(compatResponse) { + const extendedCompatResponse = compatResponse; + const response = extendedCompatResponse[originalResponse]; + const headers = (0, core_rest_pipeline_1$1.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true })); + if (response) { + response.headers = headers; + return response; + } else return Object.assign(Object.assign({}, compatResponse), { + headers, + request: (0, util_js_1$3.toPipelineRequest)(compatResponse.request) + }); + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js +var require_extendedClient = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ExtendedServiceClient = void 0; + const disableKeepAlivePolicy_js_1$1 = require_disableKeepAlivePolicy(); + const core_rest_pipeline_1 = require_commonjs$7(); + const core_client_1 = require_commonjs$5(); + const response_js_1$2 = require_response(); + /** + * Client to provide compatability between core V1 & V2. + */ + var ExtendedServiceClient = class extends core_client_1.ServiceClient { + constructor(options) { + var _a$2, _b$1; + super(options); + if (((_a$2 = options.keepAliveOptions) === null || _a$2 === void 0 ? void 0 : _a$2.enable) === false && !(0, disableKeepAlivePolicy_js_1$1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1$1.createDisableKeepAlivePolicy)()); + if (((_b$1 = options.redirectOptions) === null || _b$1 === void 0 ? void 0 : _b$1.handleRedirects) === false) this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); + } + /** + * Compatible send operation request function. + * + * @param operationArguments - Operation arguments + * @param operationSpec - Operation Spec + * @returns + */ + async sendOperationRequest(operationArguments, operationSpec) { + var _a$2; + const userProvidedCallBack = (_a$2 = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a$2 === void 0 ? void 0 : _a$2.onResponse; + let lastResponse; + function onResponse(rawResponse, flatResponse, error) { + lastResponse = rawResponse; + if (userProvidedCallBack) userProvidedCallBack(rawResponse, flatResponse, error); + } + operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + const result = await super.sendOperationRequest(operationArguments, operationSpec); + if (lastResponse) Object.defineProperty(result, "_response", { value: (0, response_js_1$2.toCompatResponse)(lastResponse) }); + return result; + } + }; + exports.ExtendedServiceClient = ExtendedServiceClient; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js +var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.requestPolicyFactoryPolicyName = exports.HttpPipelineLogLevel = void 0; + exports.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; + const util_js_1$2 = require_util$1(); + const response_js_1$1 = require_response(); + /** + * An enum for compatibility with RequestPolicy + */ + var HttpPipelineLogLevel; + (function(HttpPipelineLogLevel$1) { + HttpPipelineLogLevel$1[HttpPipelineLogLevel$1["ERROR"] = 1] = "ERROR"; + HttpPipelineLogLevel$1[HttpPipelineLogLevel$1["INFO"] = 3] = "INFO"; + HttpPipelineLogLevel$1[HttpPipelineLogLevel$1["OFF"] = 0] = "OFF"; + HttpPipelineLogLevel$1[HttpPipelineLogLevel$1["WARNING"] = 2] = "WARNING"; + })(HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = HttpPipelineLogLevel = {})); + const mockRequestPolicyOptions = { + log(_logLevel, _message) {}, + shouldLog(_logLevel) { + return false; + } + }; + /** + * The name of the RequestPolicyFactoryPolicy + */ + exports.requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy"; + /** + * A policy that wraps policies written for core-http. + * @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline + */ + function createRequestPolicyFactoryPolicy(factories) { + const orderedFactories = factories.slice().reverse(); + return { + name: exports.requestPolicyFactoryPolicyName, + async sendRequest(request, next) { + let httpPipeline = { async sendRequest(httpRequest) { + const response$1 = await next((0, util_js_1$2.toPipelineRequest)(httpRequest)); + return (0, response_js_1$1.toCompatResponse)(response$1, { createProxy: true }); + } }; + for (const factory of orderedFactories) httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions); + const webResourceLike = (0, util_js_1$2.toWebResourceLike)(request, { createProxy: true }); + const response = await httpPipeline.sendRequest(webResourceLike); + return (0, response_js_1$1.toPipelineResponse)(response); + } + }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js +var require_httpClientAdapter = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.convertHttpClient = convertHttpClient; + const response_js_1 = require_response(); + const util_js_1$1 = require_util$1(); + /** + * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient. + * @param requestPolicyClient - A HttpClient compatible with core-http + * @returns A HttpClient compatible with core-rest-pipeline + */ + function convertHttpClient(requestPolicyClient) { + return { sendRequest: async (request) => { + const response = await requestPolicyClient.sendRequest((0, util_js_1$1.toWebResourceLike)(request, { createProxy: true })); + return (0, response_js_1.toPipelineResponse)(response); + } }; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/index.js +var require_commonjs$4 = __commonJS({ "node_modules/.deno/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toHttpHeadersLike = exports.convertHttpClient = exports.disableKeepAlivePolicyName = exports.HttpPipelineLogLevel = exports.createRequestPolicyFactoryPolicy = exports.requestPolicyFactoryPolicyName = exports.ExtendedServiceClient = void 0; + /** + * A Shim Library that provides compatibility between Core V1 & V2 Packages. + * + * @packageDocumentation + */ + var extendedClient_js_1 = require_extendedClient(); + Object.defineProperty(exports, "ExtendedServiceClient", { + enumerable: true, + get: function() { + return extendedClient_js_1.ExtendedServiceClient; + } + }); + var requestPolicyFactoryPolicy_js_1 = require_requestPolicyFactoryPolicy(); + Object.defineProperty(exports, "requestPolicyFactoryPolicyName", { + enumerable: true, + get: function() { + return requestPolicyFactoryPolicy_js_1.requestPolicyFactoryPolicyName; + } + }); + Object.defineProperty(exports, "createRequestPolicyFactoryPolicy", { + enumerable: true, + get: function() { + return requestPolicyFactoryPolicy_js_1.createRequestPolicyFactoryPolicy; + } + }); + Object.defineProperty(exports, "HttpPipelineLogLevel", { + enumerable: true, + get: function() { + return requestPolicyFactoryPolicy_js_1.HttpPipelineLogLevel; + } + }); + var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); + Object.defineProperty(exports, "disableKeepAlivePolicyName", { + enumerable: true, + get: function() { + return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; + } + }); + var httpClientAdapter_js_1 = require_httpClientAdapter(); + Object.defineProperty(exports, "convertHttpClient", { + enumerable: true, + get: function() { + return httpClientAdapter_js_1.convertHttpClient; + } + }); + var util_js_1 = require_util$1(); + Object.defineProperty(exports, "toHttpHeadersLike", { + enumerable: true, + get: function() { + return util_js_1.toHttpHeadersLike; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/fast-xml-parser@5.2.3/node_modules/fast-xml-parser/lib/fxp.cjs +var require_fxp = __commonJS({ "node_modules/.deno/fast-xml-parser@5.2.3/node_modules/fast-xml-parser/lib/fxp.cjs"(exports, module) { + (() => { + "use strict"; + var t = { + d: (e$1, n$1) => { + for (var i$1 in n$1) t.o(n$1, i$1) && !t.o(e$1, i$1) && Object.defineProperty(e$1, i$1, { + enumerable: !0, + get: n$1[i$1] + }); + }, + o: (t$1, e$1) => Object.prototype.hasOwnProperty.call(t$1, e$1), + r: (t$1) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t$1, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t$1, "__esModule", { value: !0 }); + } + }, e = {}; + t.r(e), t.d(e, { + XMLBuilder: () => ft, + XMLParser: () => st, + XMLValidator: () => mt + }); + const n = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", i = new RegExp("^[" + n + "][" + n + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s$1(t$1, e$1) { + const n$1 = []; + let i$1 = e$1.exec(t$1); + for (; i$1;) { + const s$2 = []; + s$2.startIndex = e$1.lastIndex - i$1[0].length; + const r$1 = i$1.length; + for (let t$2 = 0; t$2 < r$1; t$2++) s$2.push(i$1[t$2]); + n$1.push(s$2), i$1 = e$1.exec(t$1); + } + return n$1; + } + const r = function(t$1) { + return !(null == i.exec(t$1)); + }, o = { + allowBooleanAttributes: !1, + unpairedTags: [] + }; + function a(t$1, e$1) { + e$1 = Object.assign({}, o, e$1); + const n$1 = []; + let i$1 = !1, s$2 = !1; + "" === t$1[0] && (t$1 = t$1.substr(1)); + for (let o$1 = 0; o$1 < t$1.length; o$1++) if ("<" === t$1[o$1] && "?" === t$1[o$1 + 1]) { + if (o$1 += 2, o$1 = u(t$1, o$1), o$1.err) return o$1; + } else { + if ("<" !== t$1[o$1]) { + if (l(t$1[o$1])) continue; + return x("InvalidChar", "char '" + t$1[o$1] + "' is not expected.", N(t$1, o$1)); + } + { + let a$1 = o$1; + if (o$1++, "!" === t$1[o$1]) { + o$1 = h$1(t$1, o$1); + continue; + } + { + let d$2 = !1; + "/" === t$1[o$1] && (d$2 = !0, o$1++); + let f$1 = ""; + for (; o$1 < t$1.length && ">" !== t$1[o$1] && " " !== t$1[o$1] && " " !== t$1[o$1] && "\n" !== t$1[o$1] && "\r" !== t$1[o$1]; o$1++) f$1 += t$1[o$1]; + if (f$1 = f$1.trim(), "/" === f$1[f$1.length - 1] && (f$1 = f$1.substring(0, f$1.length - 1), o$1--), !r(f$1)) { + let e$2; + return e$2 = 0 === f$1.trim().length ? "Invalid space after '<'." : "Tag '" + f$1 + "' is an invalid name.", x("InvalidTag", e$2, N(t$1, o$1)); + } + const p$1 = c(t$1, o$1); + if (!1 === p$1) return x("InvalidAttr", "Attributes for '" + f$1 + "' have open quote.", N(t$1, o$1)); + let b$1 = p$1.value; + if (o$1 = p$1.index, "/" === b$1[b$1.length - 1]) { + const n$2 = o$1 - b$1.length; + b$1 = b$1.substring(0, b$1.length - 1); + const s$3 = g(b$1, e$1); + if (!0 !== s$3) return x(s$3.err.code, s$3.err.msg, N(t$1, n$2 + s$3.err.line)); + i$1 = !0; + } else if (d$2) { + if (!p$1.tagClosed) return x("InvalidTag", "Closing tag '" + f$1 + "' doesn't have proper closing.", N(t$1, o$1)); + if (b$1.trim().length > 0) return x("InvalidTag", "Closing tag '" + f$1 + "' can't have attributes or invalid starting.", N(t$1, a$1)); + if (0 === n$1.length) return x("InvalidTag", "Closing tag '" + f$1 + "' has not been opened.", N(t$1, a$1)); + { + const e$2 = n$1.pop(); + if (f$1 !== e$2.tagName) { + let n$2 = N(t$1, e$2.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e$2.tagName + "' (opened in line " + n$2.line + ", col " + n$2.col + ") instead of closing tag '" + f$1 + "'.", N(t$1, a$1)); + } + 0 == n$1.length && (s$2 = !0); + } + } else { + const r$1 = g(b$1, e$1); + if (!0 !== r$1) return x(r$1.err.code, r$1.err.msg, N(t$1, o$1 - b$1.length + r$1.err.line)); + if (!0 === s$2) return x("InvalidXml", "Multiple possible root nodes found.", N(t$1, o$1)); + -1 !== e$1.unpairedTags.indexOf(f$1) || n$1.push({ + tagName: f$1, + tagStartPos: a$1 + }), i$1 = !0; + } + for (o$1++; o$1 < t$1.length; o$1++) if ("<" === t$1[o$1]) { + if ("!" === t$1[o$1 + 1]) { + o$1++, o$1 = h$1(t$1, o$1); + continue; + } + if ("?" !== t$1[o$1 + 1]) break; + if (o$1 = u(t$1, ++o$1), o$1.err) return o$1; + } else if ("&" === t$1[o$1]) { + const e$2 = m$1(t$1, o$1); + if (-1 == e$2) return x("InvalidChar", "char '&' is not expected.", N(t$1, o$1)); + o$1 = e$2; + } else if (!0 === s$2 && !l(t$1[o$1])) return x("InvalidXml", "Extra text at the end", N(t$1, o$1)); + "<" === t$1[o$1] && o$1--; + } + } + } + return i$1 ? 1 == n$1.length ? x("InvalidTag", "Unclosed tag '" + n$1[0].tagName + "'.", N(t$1, n$1[0].tagStartPos)) : !(n$1.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(n$1.map((t$2) => t$2.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { + line: 1, + col: 1 + }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t$1) { + return " " === t$1 || " " === t$1 || "\n" === t$1 || "\r" === t$1; + } + function u(t$1, e$1) { + const n$1 = e$1; + for (; e$1 < t$1.length; e$1++) if ("?" != t$1[e$1] && " " != t$1[e$1]); + else { + const i$1 = t$1.substr(n$1, e$1 - n$1); + if (e$1 > 5 && "xml" === i$1) return x("InvalidXml", "XML declaration allowed only at the start of the document.", N(t$1, e$1)); + if ("?" == t$1[e$1] && ">" == t$1[e$1 + 1]) { + e$1++; + break; + } + } + return e$1; + } + function h$1(t$1, e$1) { + if (t$1.length > e$1 + 5 && "-" === t$1[e$1 + 1] && "-" === t$1[e$1 + 2]) { + for (e$1 += 3; e$1 < t$1.length; e$1++) if ("-" === t$1[e$1] && "-" === t$1[e$1 + 1] && ">" === t$1[e$1 + 2]) { + e$1 += 2; + break; + } + } else if (t$1.length > e$1 + 8 && "D" === t$1[e$1 + 1] && "O" === t$1[e$1 + 2] && "C" === t$1[e$1 + 3] && "T" === t$1[e$1 + 4] && "Y" === t$1[e$1 + 5] && "P" === t$1[e$1 + 6] && "E" === t$1[e$1 + 7]) { + let n$1 = 1; + for (e$1 += 8; e$1 < t$1.length; e$1++) if ("<" === t$1[e$1]) n$1++; + else if (">" === t$1[e$1] && (n$1--, 0 === n$1)) break; + } else if (t$1.length > e$1 + 9 && "[" === t$1[e$1 + 1] && "C" === t$1[e$1 + 2] && "D" === t$1[e$1 + 3] && "A" === t$1[e$1 + 4] && "T" === t$1[e$1 + 5] && "A" === t$1[e$1 + 6] && "[" === t$1[e$1 + 7]) { + for (e$1 += 8; e$1 < t$1.length; e$1++) if ("]" === t$1[e$1] && "]" === t$1[e$1 + 1] && ">" === t$1[e$1 + 2]) { + e$1 += 2; + break; + } + } + return e$1; + } + const d$1 = "\"", f = "'"; + function c(t$1, e$1) { + let n$1 = "", i$1 = "", s$2 = !1; + for (; e$1 < t$1.length; e$1++) { + if (t$1[e$1] === d$1 || t$1[e$1] === f) "" === i$1 ? i$1 = t$1[e$1] : i$1 !== t$1[e$1] || (i$1 = ""); + else if (">" === t$1[e$1] && "" === i$1) { + s$2 = !0; + break; + } + n$1 += t$1[e$1]; + } + return "" === i$1 && { + value: n$1, + index: e$1, + tagClosed: s$2 + }; + } + const p = new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g"); + function g(t$1, e$1) { + const n$1 = s$1(t$1, p), i$1 = {}; + for (let t$2 = 0; t$2 < n$1.length; t$2++) { + if (0 === n$1[t$2][1].length) return x("InvalidAttr", "Attribute '" + n$1[t$2][2] + "' has no space in starting.", E(n$1[t$2])); + if (void 0 !== n$1[t$2][3] && void 0 === n$1[t$2][4]) return x("InvalidAttr", "Attribute '" + n$1[t$2][2] + "' is without value.", E(n$1[t$2])); + if (void 0 === n$1[t$2][3] && !e$1.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + n$1[t$2][2] + "' is not allowed.", E(n$1[t$2])); + const s$2 = n$1[t$2][2]; + if (!b(s$2)) return x("InvalidAttr", "Attribute '" + s$2 + "' is an invalid name.", E(n$1[t$2])); + if (i$1.hasOwnProperty(s$2)) return x("InvalidAttr", "Attribute '" + s$2 + "' is repeated.", E(n$1[t$2])); + i$1[s$2] = 1; + } + return !0; + } + function m$1(t$1, e$1) { + if (";" === t$1[++e$1]) return -1; + if ("#" === t$1[e$1]) return function(t$2, e$2) { + let n$2 = /\d/; + for ("x" === t$2[e$2] && (e$2++, n$2 = /[\da-fA-F]/); e$2 < t$2.length; e$2++) { + if (";" === t$2[e$2]) return e$2; + if (!t$2[e$2].match(n$2)) break; + } + return -1; + }(t$1, ++e$1); + let n$1 = 0; + for (; e$1 < t$1.length; e$1++, n$1++) if (!(t$1[e$1].match(/\w/) && n$1 < 20)) { + if (";" === t$1[e$1]) break; + return -1; + } + return e$1; + } + function x(t$1, e$1, n$1) { + return { err: { + code: t$1, + msg: e$1, + line: n$1.line || n$1, + col: n$1.col + } }; + } + function b(t$1) { + return r(t$1); + } + function N(t$1, e$1) { + const n$1 = t$1.substring(0, e$1).split(/\r?\n/); + return { + line: n$1.length, + col: n$1[n$1.length - 1].length + 1 + }; + } + function E(t$1) { + return t$1.startIndex + t$1[1].length; + } + const v = { + preserveOrder: !1, + attributeNamePrefix: "@_", + attributesGroupName: !1, + textNodeName: "#text", + ignoreAttributes: !0, + removeNSPrefix: !1, + allowBooleanAttributes: !1, + parseTagValue: !0, + parseAttributeValue: !1, + trimValues: !0, + cdataPropName: !1, + numberParseOptions: { + hex: !0, + leadingZeros: !0, + eNotation: !0 + }, + tagValueProcessor: function(t$1, e$1) { + return e$1; + }, + attributeValueProcessor: function(t$1, e$1) { + return e$1; + }, + stopNodes: [], + alwaysCreateTextNode: !1, + isArray: () => !1, + commentPropName: !1, + unpairedTags: [], + processEntities: !0, + htmlEntities: !1, + ignoreDeclaration: !1, + ignorePiTags: !1, + transformTagName: !1, + transformAttributeName: !1, + updateTag: function(t$1, e$1, n$1) { + return t$1; + }, + captureMetaData: !1 + }; + let y$1; + y$1 = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata"); + class T { + constructor(t$1) { + this.tagname = t$1, this.child = [], this[":@"] = {}; + } + add(t$1, e$1) { + "__proto__" === t$1 && (t$1 = "#__proto__"), this.child.push({ [t$1]: e$1 }); + } + addChild(t$1, e$1) { + "__proto__" === t$1.tagname && (t$1.tagname = "#__proto__"), t$1[":@"] && Object.keys(t$1[":@"]).length > 0 ? this.child.push({ + [t$1.tagname]: t$1.child, + ":@": t$1[":@"] + }) : this.child.push({ [t$1.tagname]: t$1.child }), void 0 !== e$1 && (this.child[this.child.length - 1][y$1] = { startIndex: e$1 }); + } + static getMetaDataSymbol() { + return y$1; + } + } + function w$1(t$1, e$1) { + const n$1 = {}; + if ("O" !== t$1[e$1 + 3] || "C" !== t$1[e$1 + 4] || "T" !== t$1[e$1 + 5] || "Y" !== t$1[e$1 + 6] || "P" !== t$1[e$1 + 7] || "E" !== t$1[e$1 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e$1 += 9; + let i$1 = 1, s$2 = !1, r$1 = !1, o$1 = ""; + for (; e$1 < t$1.length; e$1++) if ("<" !== t$1[e$1] || r$1) if (">" === t$1[e$1]) { + if (r$1 ? "-" === t$1[e$1 - 1] && "-" === t$1[e$1 - 2] && (r$1 = !1, i$1--) : i$1--, 0 === i$1) break; + } else "[" === t$1[e$1] ? s$2 = !0 : o$1 += t$1[e$1]; + else { + if (s$2 && C(t$1, "!ENTITY", e$1)) { + let i$2, s$3; + e$1 += 7, [i$2, s$3, e$1] = O(t$1, e$1 + 1), -1 === s$3.indexOf("&") && (n$1[i$2] = { + regx: RegExp(`&${i$2};`, "g"), + val: s$3 + }); + } else if (s$2 && C(t$1, "!ELEMENT", e$1)) { + e$1 += 8; + const { index: n$2 } = S(t$1, e$1 + 1); + e$1 = n$2; + } else if (s$2 && C(t$1, "!ATTLIST", e$1)) e$1 += 8; + else if (s$2 && C(t$1, "!NOTATION", e$1)) { + e$1 += 9; + const { index: n$2 } = A(t$1, e$1 + 1); + e$1 = n$2; + } else { + if (!C(t$1, "!--", e$1)) throw new Error("Invalid DOCTYPE"); + r$1 = !0; + } + i$1++, o$1 = ""; + } + if (0 !== i$1) throw new Error("Unclosed DOCTYPE"); + } + return { + entities: n$1, + i: e$1 + }; + } + const P = (t$1, e$1) => { + for (; e$1 < t$1.length && /\s/.test(t$1[e$1]);) e$1++; + return e$1; + }; + function O(t$1, e$1) { + e$1 = P(t$1, e$1); + let n$1 = ""; + for (; e$1 < t$1.length && !/\s/.test(t$1[e$1]) && "\"" !== t$1[e$1] && "'" !== t$1[e$1];) n$1 += t$1[e$1], e$1++; + if ($(n$1), e$1 = P(t$1, e$1), "SYSTEM" === t$1.substring(e$1, e$1 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t$1[e$1]) throw new Error("Parameter entities are not supported"); + let i$1 = ""; + return [e$1, i$1] = I(t$1, e$1, "entity"), [ + n$1, + i$1, + --e$1 + ]; + } + function A(t$1, e$1) { + e$1 = P(t$1, e$1); + let n$1 = ""; + for (; e$1 < t$1.length && !/\s/.test(t$1[e$1]);) n$1 += t$1[e$1], e$1++; + $(n$1), e$1 = P(t$1, e$1); + const i$1 = t$1.substring(e$1, e$1 + 6).toUpperCase(); + if ("SYSTEM" !== i$1 && "PUBLIC" !== i$1) throw new Error(`Expected SYSTEM or PUBLIC, found "${i$1}"`); + e$1 += i$1.length, e$1 = P(t$1, e$1); + let s$2 = null, r$1 = null; + if ("PUBLIC" === i$1) [e$1, s$2] = I(t$1, e$1, "publicIdentifier"), "\"" !== t$1[e$1 = P(t$1, e$1)] && "'" !== t$1[e$1] || ([e$1, r$1] = I(t$1, e$1, "systemIdentifier")); + else if ("SYSTEM" === i$1 && ([e$1, r$1] = I(t$1, e$1, "systemIdentifier"), !r$1)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { + notationName: n$1, + publicIdentifier: s$2, + systemIdentifier: r$1, + index: --e$1 + }; + } + function I(t$1, e$1, n$1) { + let i$1 = ""; + const s$2 = t$1[e$1]; + if ("\"" !== s$2 && "'" !== s$2) throw new Error(`Expected quoted string, found "${s$2}"`); + for (e$1++; e$1 < t$1.length && t$1[e$1] !== s$2;) i$1 += t$1[e$1], e$1++; + if (t$1[e$1] !== s$2) throw new Error(`Unterminated ${n$1} value`); + return [++e$1, i$1]; + } + function S(t$1, e$1) { + e$1 = P(t$1, e$1); + let n$1 = ""; + for (; e$1 < t$1.length && !/\s/.test(t$1[e$1]);) n$1 += t$1[e$1], e$1++; + if (!$(n$1)) throw new Error(`Invalid element name: "${n$1}"`); + let i$1 = ""; + if ("E" === t$1[e$1 = P(t$1, e$1)] && C(t$1, "MPTY", e$1)) e$1 += 6; + else if ("A" === t$1[e$1] && C(t$1, "NY", e$1)) e$1 += 4; + else { + if ("(" !== t$1[e$1]) throw new Error(`Invalid Element Expression, found "${t$1[e$1]}"`); + for (e$1++; e$1 < t$1.length && ")" !== t$1[e$1];) i$1 += t$1[e$1], e$1++; + if (")" !== t$1[e$1]) throw new Error("Unterminated content model"); + } + return { + elementName: n$1, + contentModel: i$1.trim(), + index: e$1 + }; + } + function C(t$1, e$1, n$1) { + for (let i$1 = 0; i$1 < e$1.length; i$1++) if (e$1[i$1] !== t$1[n$1 + i$1 + 1]) return !1; + return !0; + } + function $(t$1) { + if (r(t$1)) return t$1; + throw new Error(`Invalid entity name ${t$1}`); + } + const j = /^[-+]?0x[a-fA-F0-9]+$/, D = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { + hex: !0, + leadingZeros: !0, + decimalPoint: ".", + eNotation: !0 + }; + const M = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function _(t$1) { + return "function" == typeof t$1 ? t$1 : Array.isArray(t$1) ? (e$1) => { + for (const n$1 of t$1) { + if ("string" == typeof n$1 && e$1 === n$1) return !0; + if (n$1 instanceof RegExp && n$1.test(e$1)) return !0; + } + } : () => !1; + } + class k { + constructor(t$1) { + this.options = t$1, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { + apos: { + regex: /&(apos|#39|#x27);/g, + val: "'" + }, + gt: { + regex: /&(gt|#62|#x3E);/g, + val: ">" + }, + lt: { + regex: /&(lt|#60|#x3C);/g, + val: "<" + }, + quot: { + regex: /&(quot|#34|#x22);/g, + val: "\"" + } + }, this.ampEntity = { + regex: /&(amp|#38|#x26);/g, + val: "&" + }, this.htmlEntities = { + space: { + regex: /&(nbsp|#160);/g, + val: " " + }, + cent: { + regex: /&(cent|#162);/g, + val: "¢" + }, + pound: { + regex: /&(pound|#163);/g, + val: "£" + }, + yen: { + regex: /&(yen|#165);/g, + val: "¥" + }, + euro: { + regex: /&(euro|#8364);/g, + val: "€" + }, + copyright: { + regex: /&(copy|#169);/g, + val: "©" + }, + reg: { + regex: /&(reg|#174);/g, + val: "®" + }, + inr: { + regex: /&(inr|#8377);/g, + val: "₹" + }, + num_dec: { + regex: /&#([0-9]{1,7});/g, + val: (t$2, e$1) => String.fromCodePoint(Number.parseInt(e$1, 10)) + }, + num_hex: { + regex: /&#x([0-9a-fA-F]{1,6});/g, + val: (t$2, e$1) => String.fromCodePoint(Number.parseInt(e$1, 16)) + } + }, this.addExternalEntities = F, this.parseXml = X, this.parseTextData = L, this.resolveNameSpace = B, this.buildAttributesMap = G, this.isItStopNode = Z, this.replaceEntitiesValue = R, this.readStopNodeData = J, this.saveTextToParentTag = q, this.addChild = Y, this.ignoreAttributesFn = _(this.options.ignoreAttributes); + } + } + function F(t$1) { + const e$1 = Object.keys(t$1); + for (let n$1 = 0; n$1 < e$1.length; n$1++) { + const i$1 = e$1[n$1]; + this.lastEntities[i$1] = { + regex: new RegExp("&" + i$1 + ";", "g"), + val: t$1[i$1] + }; + } + } + function L(t$1, e$1, n$1, i$1, s$2, r$1, o$1) { + if (void 0 !== t$1 && (this.options.trimValues && !i$1 && (t$1 = t$1.trim()), t$1.length > 0)) { + o$1 || (t$1 = this.replaceEntitiesValue(t$1)); + const i$2 = this.options.tagValueProcessor(e$1, t$1, n$1, s$2, r$1); + return null == i$2 ? t$1 : typeof i$2 != typeof t$1 || i$2 !== t$1 ? i$2 : this.options.trimValues || t$1.trim() === t$1 ? H(t$1, this.options.parseTagValue, this.options.numberParseOptions) : t$1; + } + } + function B(t$1) { + if (this.options.removeNSPrefix) { + const e$1 = t$1.split(":"), n$1 = "/" === t$1.charAt(0) ? "/" : ""; + if ("xmlns" === e$1[0]) return ""; + 2 === e$1.length && (t$1 = n$1 + e$1[1]); + } + return t$1; + } + const U = new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm"); + function G(t$1, e$1, n$1) { + if (!0 !== this.options.ignoreAttributes && "string" == typeof t$1) { + const n$2 = s$1(t$1, U), i$1 = n$2.length, r$1 = {}; + for (let t$2 = 0; t$2 < i$1; t$2++) { + const i$2 = this.resolveNameSpace(n$2[t$2][1]); + if (this.ignoreAttributesFn(i$2, e$1)) continue; + let s$2 = n$2[t$2][4], o$1 = this.options.attributeNamePrefix + i$2; + if (i$2.length) if (this.options.transformAttributeName && (o$1 = this.options.transformAttributeName(o$1)), "__proto__" === o$1 && (o$1 = "#__proto__"), void 0 !== s$2) { + this.options.trimValues && (s$2 = s$2.trim()), s$2 = this.replaceEntitiesValue(s$2); + const t$3 = this.options.attributeValueProcessor(i$2, s$2, e$1); + r$1[o$1] = null == t$3 ? s$2 : typeof t$3 != typeof s$2 || t$3 !== s$2 ? t$3 : H(s$2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r$1[o$1] = !0); + } + if (!Object.keys(r$1).length) return; + if (this.options.attributesGroupName) { + const t$2 = {}; + return t$2[this.options.attributesGroupName] = r$1, t$2; + } + return r$1; + } + } + const X = function(t$1) { + t$1 = t$1.replace(/\r\n?/g, "\n"); + const e$1 = new T("!xml"); + let n$1 = e$1, i$1 = "", s$2 = ""; + for (let r$1 = 0; r$1 < t$1.length; r$1++) if ("<" === t$1[r$1]) if ("/" === t$1[r$1 + 1]) { + const e$2 = W(t$1, ">", r$1, "Closing Tag is not closed."); + let o$1 = t$1.substring(r$1 + 2, e$2).trim(); + if (this.options.removeNSPrefix) { + const t$2 = o$1.indexOf(":"); + -1 !== t$2 && (o$1 = o$1.substr(t$2 + 1)); + } + this.options.transformTagName && (o$1 = this.options.transformTagName(o$1)), n$1 && (i$1 = this.saveTextToParentTag(i$1, n$1, s$2)); + const a$1 = s$2.substring(s$2.lastIndexOf(".") + 1); + if (o$1 && -1 !== this.options.unpairedTags.indexOf(o$1)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l$1 = 0; + a$1 && -1 !== this.options.unpairedTags.indexOf(a$1) ? (l$1 = s$2.lastIndexOf(".", s$2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l$1 = s$2.lastIndexOf("."), s$2 = s$2.substring(0, l$1), n$1 = this.tagsNodeStack.pop(), i$1 = "", r$1 = e$2; + } else if ("?" === t$1[r$1 + 1]) { + let e$2 = z(t$1, r$1, !1, "?>"); + if (!e$2) throw new Error("Pi Tag is not closed."); + if (i$1 = this.saveTextToParentTag(i$1, n$1, s$2), this.options.ignoreDeclaration && "?xml" === e$2.tagName || this.options.ignorePiTags); + else { + const t$2 = new T(e$2.tagName); + t$2.add(this.options.textNodeName, ""), e$2.tagName !== e$2.tagExp && e$2.attrExpPresent && (t$2[":@"] = this.buildAttributesMap(e$2.tagExp, s$2, e$2.tagName)), this.addChild(n$1, t$2, s$2, r$1); + } + r$1 = e$2.closeIndex + 1; + } else if ("!--" === t$1.substr(r$1 + 1, 3)) { + const e$2 = W(t$1, "-->", r$1 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const o$1 = t$1.substring(r$1 + 4, e$2 - 2); + i$1 = this.saveTextToParentTag(i$1, n$1, s$2), n$1.add(this.options.commentPropName, [{ [this.options.textNodeName]: o$1 }]); + } + r$1 = e$2; + } else if ("!D" === t$1.substr(r$1 + 1, 2)) { + const e$2 = w$1(t$1, r$1); + this.docTypeEntities = e$2.entities, r$1 = e$2.i; + } else if ("![" === t$1.substr(r$1 + 1, 2)) { + const e$2 = W(t$1, "]]>", r$1, "CDATA is not closed.") - 2, o$1 = t$1.substring(r$1 + 9, e$2); + i$1 = this.saveTextToParentTag(i$1, n$1, s$2); + let a$1 = this.parseTextData(o$1, n$1.tagname, s$2, !0, !1, !0, !0); + a$1 ??= "", this.options.cdataPropName ? n$1.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o$1 }]) : n$1.add(this.options.textNodeName, a$1), r$1 = e$2 + 2; + } else { + let o$1 = z(t$1, r$1, this.options.removeNSPrefix), a$1 = o$1.tagName; + const l$1 = o$1.rawTagName; + let u$1 = o$1.tagExp, h$2 = o$1.attrExpPresent, d$2 = o$1.closeIndex; + this.options.transformTagName && (a$1 = this.options.transformTagName(a$1)), n$1 && i$1 && "!xml" !== n$1.tagname && (i$1 = this.saveTextToParentTag(i$1, n$1, s$2, !1)); + const f$1 = n$1; + f$1 && -1 !== this.options.unpairedTags.indexOf(f$1.tagname) && (n$1 = this.tagsNodeStack.pop(), s$2 = s$2.substring(0, s$2.lastIndexOf("."))), a$1 !== e$1.tagname && (s$2 += s$2 ? "." + a$1 : a$1); + const c$1 = r$1; + if (this.isItStopNode(this.options.stopNodes, s$2, a$1)) { + let e$2 = ""; + if (u$1.length > 0 && u$1.lastIndexOf("/") === u$1.length - 1) "/" === a$1[a$1.length - 1] ? (a$1 = a$1.substr(0, a$1.length - 1), s$2 = s$2.substr(0, s$2.length - 1), u$1 = a$1) : u$1 = u$1.substr(0, u$1.length - 1), r$1 = o$1.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a$1)) r$1 = o$1.closeIndex; + else { + const n$2 = this.readStopNodeData(t$1, l$1, d$2 + 1); + if (!n$2) throw new Error(`Unexpected end of ${l$1}`); + r$1 = n$2.i, e$2 = n$2.tagContent; + } + const i$2 = new T(a$1); + a$1 !== u$1 && h$2 && (i$2[":@"] = this.buildAttributesMap(u$1, s$2, a$1)), e$2 && (e$2 = this.parseTextData(e$2, a$1, s$2, !0, h$2, !0, !0)), s$2 = s$2.substr(0, s$2.lastIndexOf(".")), i$2.add(this.options.textNodeName, e$2), this.addChild(n$1, i$2, s$2, c$1); + } else { + if (u$1.length > 0 && u$1.lastIndexOf("/") === u$1.length - 1) { + "/" === a$1[a$1.length - 1] ? (a$1 = a$1.substr(0, a$1.length - 1), s$2 = s$2.substr(0, s$2.length - 1), u$1 = a$1) : u$1 = u$1.substr(0, u$1.length - 1), this.options.transformTagName && (a$1 = this.options.transformTagName(a$1)); + const t$2 = new T(a$1); + a$1 !== u$1 && h$2 && (t$2[":@"] = this.buildAttributesMap(u$1, s$2, a$1)), this.addChild(n$1, t$2, s$2, c$1), s$2 = s$2.substr(0, s$2.lastIndexOf(".")); + } else { + const t$2 = new T(a$1); + this.tagsNodeStack.push(n$1), a$1 !== u$1 && h$2 && (t$2[":@"] = this.buildAttributesMap(u$1, s$2, a$1)), this.addChild(n$1, t$2, s$2, c$1), n$1 = t$2; + } + i$1 = "", r$1 = d$2; + } + } + else i$1 += t$1[r$1]; + return e$1.child; + }; + function Y(t$1, e$1, n$1, i$1) { + this.options.captureMetaData || (i$1 = void 0); + const s$2 = this.options.updateTag(e$1.tagname, n$1, e$1[":@"]); + !1 === s$2 || ("string" == typeof s$2 ? (e$1.tagname = s$2, t$1.addChild(e$1, i$1)) : t$1.addChild(e$1, i$1)); + } + const R = function(t$1) { + if (this.options.processEntities) { + for (let e$1 in this.docTypeEntities) { + const n$1 = this.docTypeEntities[e$1]; + t$1 = t$1.replace(n$1.regx, n$1.val); + } + for (let e$1 in this.lastEntities) { + const n$1 = this.lastEntities[e$1]; + t$1 = t$1.replace(n$1.regex, n$1.val); + } + if (this.options.htmlEntities) for (let e$1 in this.htmlEntities) { + const n$1 = this.htmlEntities[e$1]; + t$1 = t$1.replace(n$1.regex, n$1.val); + } + t$1 = t$1.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t$1; + }; + function q(t$1, e$1, n$1, i$1) { + return t$1 && (void 0 === i$1 && (i$1 = 0 === e$1.child.length), void 0 !== (t$1 = this.parseTextData(t$1, e$1.tagname, n$1, !1, !!e$1[":@"] && 0 !== Object.keys(e$1[":@"]).length, i$1)) && "" !== t$1 && e$1.add(this.options.textNodeName, t$1), t$1 = ""), t$1; + } + function Z(t$1, e$1, n$1) { + const i$1 = "*." + n$1; + for (const n$2 in t$1) { + const s$2 = t$1[n$2]; + if (i$1 === s$2 || e$1 === s$2) return !0; + } + return !1; + } + function W(t$1, e$1, n$1, i$1) { + const s$2 = t$1.indexOf(e$1, n$1); + if (-1 === s$2) throw new Error(i$1); + return s$2 + e$1.length - 1; + } + function z(t$1, e$1, n$1, i$1 = ">") { + const s$2 = function(t$2, e$2, n$2 = ">") { + let i$2, s$3 = ""; + for (let r$2 = e$2; r$2 < t$2.length; r$2++) { + let e$3 = t$2[r$2]; + if (i$2) e$3 === i$2 && (i$2 = ""); + else if ("\"" === e$3 || "'" === e$3) i$2 = e$3; + else if (e$3 === n$2[0]) { + if (!n$2[1]) return { + data: s$3, + index: r$2 + }; + if (t$2[r$2 + 1] === n$2[1]) return { + data: s$3, + index: r$2 + }; + } else " " === e$3 && (e$3 = " "); + s$3 += e$3; + } + }(t$1, e$1 + 1, i$1); + if (!s$2) return; + let r$1 = s$2.data; + const o$1 = s$2.index, a$1 = r$1.search(/\s/); + let l$1 = r$1, u$1 = !0; + -1 !== a$1 && (l$1 = r$1.substring(0, a$1), r$1 = r$1.substring(a$1 + 1).trimStart()); + const h$2 = l$1; + if (n$1) { + const t$2 = l$1.indexOf(":"); + -1 !== t$2 && (l$1 = l$1.substr(t$2 + 1), u$1 = l$1 !== s$2.data.substr(t$2 + 1)); + } + return { + tagName: l$1, + tagExp: r$1, + closeIndex: o$1, + attrExpPresent: u$1, + rawTagName: h$2 + }; + } + function J(t$1, e$1, n$1) { + const i$1 = n$1; + let s$2 = 1; + for (; n$1 < t$1.length; n$1++) if ("<" === t$1[n$1]) if ("/" === t$1[n$1 + 1]) { + const r$1 = W(t$1, ">", n$1, `${e$1} is not closed`); + if (t$1.substring(n$1 + 2, r$1).trim() === e$1 && (s$2--, 0 === s$2)) return { + tagContent: t$1.substring(i$1, n$1), + i: r$1 + }; + n$1 = r$1; + } else if ("?" === t$1[n$1 + 1]) n$1 = W(t$1, "?>", n$1 + 1, "StopNode is not closed."); + else if ("!--" === t$1.substr(n$1 + 1, 3)) n$1 = W(t$1, "-->", n$1 + 3, "StopNode is not closed."); + else if ("![" === t$1.substr(n$1 + 1, 2)) n$1 = W(t$1, "]]>", n$1, "StopNode is not closed.") - 2; + else { + const i$2 = z(t$1, n$1, ">"); + i$2 && ((i$2 && i$2.tagName) === e$1 && "/" !== i$2.tagExp[i$2.tagExp.length - 1] && s$2++, n$1 = i$2.closeIndex); + } + } + function H(t$1, e$1, n$1) { + if (e$1 && "string" == typeof t$1) { + const e$2 = t$1.trim(); + return "true" === e$2 || "false" !== e$2 && function(t$2, e$3 = {}) { + if (e$3 = Object.assign({}, V, e$3), !t$2 || "string" != typeof t$2) return t$2; + let n$2 = t$2.trim(); + if (void 0 !== e$3.skipLike && e$3.skipLike.test(n$2)) return t$2; + if ("0" === t$2) return 0; + if (e$3.hex && j.test(n$2)) return function(t$3) { + if (parseInt) return parseInt(t$3, 16); + if (Number.parseInt) return Number.parseInt(t$3, 16); + if (window && window.parseInt) return window.parseInt(t$3, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + }(n$2); + if (-1 !== n$2.search(/.+[eE].+/)) return function(t$3, e$4, n$3) { + if (!n$3.eNotation) return t$3; + const i$2 = e$4.match(M); + if (i$2) { + let s$2 = i$2[1] || ""; + const r$1 = -1 === i$2[3].indexOf("e") ? "E" : "e", o$1 = i$2[2], a$1 = s$2 ? t$3[o$1.length + 1] === r$1 : t$3[o$1.length] === r$1; + return o$1.length > 1 && a$1 ? t$3 : 1 !== o$1.length || !i$2[3].startsWith(`.${r$1}`) && i$2[3][0] !== r$1 ? n$3.leadingZeros && !a$1 ? (e$4 = (i$2[1] || "") + i$2[3], Number(e$4)) : t$3 : Number(e$4); + } + return t$3; + }(t$2, n$2, e$3); + { + const s$2 = D.exec(n$2); + if (s$2) { + const r$1 = s$2[1] || "", o$1 = s$2[2]; + let a$1 = (i$1 = s$2[3]) && -1 !== i$1.indexOf(".") ? ("." === (i$1 = i$1.replace(/0+$/, "")) ? i$1 = "0" : "." === i$1[0] ? i$1 = "0" + i$1 : "." === i$1[i$1.length - 1] && (i$1 = i$1.substring(0, i$1.length - 1)), i$1) : i$1; + const l$1 = r$1 ? "." === t$2[o$1.length + 1] : "." === t$2[o$1.length]; + if (!e$3.leadingZeros && (o$1.length > 1 || 1 === o$1.length && !l$1)) return t$2; + { + const i$2 = Number(n$2), s$3 = String(i$2); + if (0 === i$2 || -0 === i$2) return i$2; + if (-1 !== s$3.search(/[eE]/)) return e$3.eNotation ? i$2 : t$2; + if (-1 !== n$2.indexOf(".")) return "0" === s$3 || s$3 === a$1 || s$3 === `${r$1}${a$1}` ? i$2 : t$2; + let l$2 = o$1 ? a$1 : n$2; + return o$1 ? l$2 === s$3 || r$1 + l$2 === s$3 ? i$2 : t$2 : l$2 === s$3 || l$2 === r$1 + s$3 ? i$2 : t$2; + } + } + return t$2; + } + var i$1; + }(t$1, n$1); + } + return void 0 !== t$1 ? t$1 : ""; + } + const K = T.getMetaDataSymbol(); + function Q(t$1, e$1) { + return tt(t$1, e$1); + } + function tt(t$1, e$1, n$1) { + let i$1; + const s$2 = {}; + for (let r$1 = 0; r$1 < t$1.length; r$1++) { + const o$1 = t$1[r$1], a$1 = et(o$1); + let l$1 = ""; + if (l$1 = void 0 === n$1 ? a$1 : n$1 + "." + a$1, a$1 === e$1.textNodeName) void 0 === i$1 ? i$1 = o$1[a$1] : i$1 += "" + o$1[a$1]; + else { + if (void 0 === a$1) continue; + if (o$1[a$1]) { + let t$2 = tt(o$1[a$1], e$1, l$1); + const n$2 = it(t$2, e$1); + void 0 !== o$1[K] && (t$2[K] = o$1[K]), o$1[":@"] ? nt(t$2, o$1[":@"], l$1, e$1) : 1 !== Object.keys(t$2).length || void 0 === t$2[e$1.textNodeName] || e$1.alwaysCreateTextNode ? 0 === Object.keys(t$2).length && (e$1.alwaysCreateTextNode ? t$2[e$1.textNodeName] = "" : t$2 = "") : t$2 = t$2[e$1.textNodeName], void 0 !== s$2[a$1] && s$2.hasOwnProperty(a$1) ? (Array.isArray(s$2[a$1]) || (s$2[a$1] = [s$2[a$1]]), s$2[a$1].push(t$2)) : e$1.isArray(a$1, l$1, n$2) ? s$2[a$1] = [t$2] : s$2[a$1] = t$2; + } + } + } + return "string" == typeof i$1 ? i$1.length > 0 && (s$2[e$1.textNodeName] = i$1) : void 0 !== i$1 && (s$2[e$1.textNodeName] = i$1), s$2; + } + function et(t$1) { + const e$1 = Object.keys(t$1); + for (let t$2 = 0; t$2 < e$1.length; t$2++) { + const n$1 = e$1[t$2]; + if (":@" !== n$1) return n$1; + } + } + function nt(t$1, e$1, n$1, i$1) { + if (e$1) { + const s$2 = Object.keys(e$1), r$1 = s$2.length; + for (let o$1 = 0; o$1 < r$1; o$1++) { + const r$2 = s$2[o$1]; + i$1.isArray(r$2, n$1 + "." + r$2, !0, !0) ? t$1[r$2] = [e$1[r$2]] : t$1[r$2] = e$1[r$2]; + } + } + } + function it(t$1, e$1) { + const { textNodeName: n$1 } = e$1, i$1 = Object.keys(t$1).length; + return 0 === i$1 || !(1 !== i$1 || !t$1[n$1] && "boolean" != typeof t$1[n$1] && 0 !== t$1[n$1]); + } + class st { + constructor(t$1) { + this.externalEntities = {}, this.options = function(t$2) { + return Object.assign({}, v, t$2); + }(t$1); + } + parse(t$1, e$1) { + if ("string" == typeof t$1); + else { + if (!t$1.toString) throw new Error("XML data is accepted in String or Bytes[] form."); + t$1 = t$1.toString(); + } + if (e$1) { + !0 === e$1 && (e$1 = {}); + const n$2 = a(t$1, e$1); + if (!0 !== n$2) throw Error(`${n$2.err.msg}:${n$2.err.line}:${n$2.err.col}`); + } + const n$1 = new k(this.options); + n$1.addExternalEntities(this.externalEntities); + const i$1 = n$1.parseXml(t$1); + return this.options.preserveOrder || void 0 === i$1 ? i$1 : Q(i$1, this.options); + } + addEntity(t$1, e$1) { + if (-1 !== e$1.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t$1.indexOf("&") || -1 !== t$1.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e$1) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t$1] = e$1; + } + static getMetaDataSymbol() { + return T.getMetaDataSymbol(); + } + } + function rt(t$1, e$1) { + let n$1 = ""; + return e$1.format && e$1.indentBy.length > 0 && (n$1 = "\n"), ot(t$1, e$1, "", n$1); + } + function ot(t$1, e$1, n$1, i$1) { + let s$2 = "", r$1 = !1; + for (let o$1 = 0; o$1 < t$1.length; o$1++) { + const a$1 = t$1[o$1], l$1 = at(a$1); + if (void 0 === l$1) continue; + let u$1 = ""; + if (u$1 = 0 === n$1.length ? l$1 : `${n$1}.${l$1}`, l$1 === e$1.textNodeName) { + let t$2 = a$1[l$1]; + ut(u$1, e$1) || (t$2 = e$1.tagValueProcessor(l$1, t$2), t$2 = ht(t$2, e$1)), r$1 && (s$2 += i$1), s$2 += t$2, r$1 = !1; + continue; + } + if (l$1 === e$1.cdataPropName) { + r$1 && (s$2 += i$1), s$2 += ``, r$1 = !1; + continue; + } + if (l$1 === e$1.commentPropName) { + s$2 += i$1 + `\x3c!--${a$1[l$1][0][e$1.textNodeName]}--\x3e`, r$1 = !0; + continue; + } + if ("?" === l$1[0]) { + const t$2 = lt(a$1[":@"], e$1), n$2 = "?xml" === l$1 ? "" : i$1; + let o$2 = a$1[l$1][0][e$1.textNodeName]; + o$2 = 0 !== o$2.length ? " " + o$2 : "", s$2 += n$2 + `<${l$1}${o$2}${t$2}?>`, r$1 = !0; + continue; + } + let h$2 = i$1; + "" !== h$2 && (h$2 += e$1.indentBy); + const d$2 = i$1 + `<${l$1}${lt(a$1[":@"], e$1)}`, f$1 = ot(a$1[l$1], e$1, u$1, h$2); + -1 !== e$1.unpairedTags.indexOf(l$1) ? e$1.suppressUnpairedNode ? s$2 += d$2 + ">" : s$2 += d$2 + "/>" : f$1 && 0 !== f$1.length || !e$1.suppressEmptyNode ? f$1 && f$1.endsWith(">") ? s$2 += d$2 + `>${f$1}${i$1}` : (s$2 += d$2 + ">", f$1 && "" !== i$1 && (f$1.includes("/>") || f$1.includes("`) : s$2 += d$2 + "/>", r$1 = !0; + } + return s$2; + } + function at(t$1) { + const e$1 = Object.keys(t$1); + for (let n$1 = 0; n$1 < e$1.length; n$1++) { + const i$1 = e$1[n$1]; + if (t$1.hasOwnProperty(i$1) && ":@" !== i$1) return i$1; + } + } + function lt(t$1, e$1) { + let n$1 = ""; + if (t$1 && !e$1.ignoreAttributes) for (let i$1 in t$1) { + if (!t$1.hasOwnProperty(i$1)) continue; + let s$2 = e$1.attributeValueProcessor(i$1, t$1[i$1]); + s$2 = ht(s$2, e$1), !0 === s$2 && e$1.suppressBooleanAttributes ? n$1 += ` ${i$1.substr(e$1.attributeNamePrefix.length)}` : n$1 += ` ${i$1.substr(e$1.attributeNamePrefix.length)}="${s$2}"`; + } + return n$1; + } + function ut(t$1, e$1) { + let n$1 = (t$1 = t$1.substr(0, t$1.length - e$1.textNodeName.length - 1)).substr(t$1.lastIndexOf(".") + 1); + for (let i$1 in e$1.stopNodes) if (e$1.stopNodes[i$1] === t$1 || e$1.stopNodes[i$1] === "*." + n$1) return !0; + return !1; + } + function ht(t$1, e$1) { + if (t$1 && t$1.length > 0 && e$1.processEntities) for (let n$1 = 0; n$1 < e$1.entities.length; n$1++) { + const i$1 = e$1.entities[n$1]; + t$1 = t$1.replace(i$1.regex, i$1.val); + } + return t$1; + } + const dt = { + attributeNamePrefix: "@_", + attributesGroupName: !1, + textNodeName: "#text", + ignoreAttributes: !0, + cdataPropName: !1, + format: !1, + indentBy: " ", + suppressEmptyNode: !1, + suppressUnpairedNode: !0, + suppressBooleanAttributes: !0, + tagValueProcessor: function(t$1, e$1) { + return e$1; + }, + attributeValueProcessor: function(t$1, e$1) { + return e$1; + }, + preserveOrder: !1, + commentPropName: !1, + unpairedTags: [], + entities: [ + { + regex: new RegExp("&", "g"), + val: "&" + }, + { + regex: new RegExp(">", "g"), + val: ">" + }, + { + regex: new RegExp("<", "g"), + val: "<" + }, + { + regex: new RegExp("'", "g"), + val: "'" + }, + { + regex: new RegExp("\"", "g"), + val: """ + } + ], + processEntities: !0, + stopNodes: [], + oneListGroup: !1 + }; + function ft(t$1) { + this.options = Object.assign({}, dt, t$1), !0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return !1; + } : (this.ignoreAttributesFn = _(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = gt), this.processTextOrObjNode = ct, this.options.format ? (this.indentate = pt, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ct(t$1, e$1, n$1, i$1) { + const s$2 = this.j2x(t$1, n$1 + 1, i$1.concat(e$1)); + return void 0 !== t$1[this.options.textNodeName] && 1 === Object.keys(t$1).length ? this.buildTextValNode(t$1[this.options.textNodeName], e$1, s$2.attrStr, n$1) : this.buildObjectNode(s$2.val, e$1, s$2.attrStr, n$1); + } + function pt(t$1) { + return this.options.indentBy.repeat(t$1); + } + function gt(t$1) { + return !(!t$1.startsWith(this.options.attributeNamePrefix) || t$1 === this.options.textNodeName) && t$1.substr(this.attrPrefixLen); + } + ft.prototype.build = function(t$1) { + return this.options.preserveOrder ? rt(t$1, this.options) : (Array.isArray(t$1) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t$1 = { [this.options.arrayNodeName]: t$1 }), this.j2x(t$1, 0, []).val); + }, ft.prototype.j2x = function(t$1, e$1, n$1) { + let i$1 = "", s$2 = ""; + const r$1 = n$1.join("."); + for (let o$1 in t$1) if (Object.prototype.hasOwnProperty.call(t$1, o$1)) if (void 0 === t$1[o$1]) this.isAttribute(o$1) && (s$2 += ""); + else if (null === t$1[o$1]) this.isAttribute(o$1) || o$1 === this.options.cdataPropName ? s$2 += "" : "?" === o$1[0] ? s$2 += this.indentate(e$1) + "<" + o$1 + "?" + this.tagEndChar : s$2 += this.indentate(e$1) + "<" + o$1 + "/" + this.tagEndChar; + else if (t$1[o$1] instanceof Date) s$2 += this.buildTextValNode(t$1[o$1], o$1, "", e$1); + else if ("object" != typeof t$1[o$1]) { + const n$2 = this.isAttribute(o$1); + if (n$2 && !this.ignoreAttributesFn(n$2, r$1)) i$1 += this.buildAttrPairStr(n$2, "" + t$1[o$1]); + else if (!n$2) if (o$1 === this.options.textNodeName) { + let e$2 = this.options.tagValueProcessor(o$1, "" + t$1[o$1]); + s$2 += this.replaceEntitiesValue(e$2); + } else s$2 += this.buildTextValNode(t$1[o$1], o$1, "", e$1); + } else if (Array.isArray(t$1[o$1])) { + const i$2 = t$1[o$1].length; + let r$2 = "", a$1 = ""; + for (let l$1 = 0; l$1 < i$2; l$1++) { + const i$3 = t$1[o$1][l$1]; + if (void 0 === i$3); + else if (null === i$3) "?" === o$1[0] ? s$2 += this.indentate(e$1) + "<" + o$1 + "?" + this.tagEndChar : s$2 += this.indentate(e$1) + "<" + o$1 + "/" + this.tagEndChar; + else if ("object" == typeof i$3) if (this.options.oneListGroup) { + const t$2 = this.j2x(i$3, e$1 + 1, n$1.concat(o$1)); + r$2 += t$2.val, this.options.attributesGroupName && i$3.hasOwnProperty(this.options.attributesGroupName) && (a$1 += t$2.attrStr); + } else r$2 += this.processTextOrObjNode(i$3, o$1, e$1, n$1); + else if (this.options.oneListGroup) { + let t$2 = this.options.tagValueProcessor(o$1, i$3); + t$2 = this.replaceEntitiesValue(t$2), r$2 += t$2; + } else r$2 += this.buildTextValNode(i$3, o$1, "", e$1); + } + this.options.oneListGroup && (r$2 = this.buildObjectNode(r$2, o$1, a$1, e$1)), s$2 += r$2; + } else if (this.options.attributesGroupName && o$1 === this.options.attributesGroupName) { + const e$2 = Object.keys(t$1[o$1]), n$2 = e$2.length; + for (let s$3 = 0; s$3 < n$2; s$3++) i$1 += this.buildAttrPairStr(e$2[s$3], "" + t$1[o$1][e$2[s$3]]); + } else s$2 += this.processTextOrObjNode(t$1[o$1], o$1, e$1, n$1); + return { + attrStr: i$1, + val: s$2 + }; + }, ft.prototype.buildAttrPairStr = function(t$1, e$1) { + return e$1 = this.options.attributeValueProcessor(t$1, "" + e$1), e$1 = this.replaceEntitiesValue(e$1), this.options.suppressBooleanAttributes && "true" === e$1 ? " " + t$1 : " " + t$1 + "=\"" + e$1 + "\""; + }, ft.prototype.buildObjectNode = function(t$1, e$1, n$1, i$1) { + if ("" === t$1) return "?" === e$1[0] ? this.indentate(i$1) + "<" + e$1 + n$1 + "?" + this.tagEndChar : this.indentate(i$1) + "<" + e$1 + n$1 + this.closeTag(e$1) + this.tagEndChar; + { + let s$2 = "" + t$1 + s$2; + } + }, ft.prototype.closeTag = function(t$1) { + let e$1 = ""; + return -1 !== this.options.unpairedTags.indexOf(t$1) ? this.options.suppressUnpairedNode || (e$1 = "/") : e$1 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (!1 !== this.options.commentPropName && e$1 === this.options.commentPropName) return this.indentate(i$1) + `\x3c!--${t$1}--\x3e` + this.newLine; + if ("?" === e$1[0]) return this.indentate(i$1) + "<" + e$1 + n$1 + "?" + this.tagEndChar; + { + let s$2 = this.options.tagValueProcessor(e$1, t$1); + return s$2 = this.replaceEntitiesValue(s$2), "" === s$2 ? this.indentate(i$1) + "<" + e$1 + n$1 + this.closeTag(e$1) + this.tagEndChar : this.indentate(i$1) + "<" + e$1 + n$1 + ">" + s$2 + " 0 && this.options.processEntities) for (let e$1 = 0; e$1 < this.options.entities.length; e$1++) { + const n$1 = this.options.entities[e$1]; + t$1 = t$1.replace(n$1.regex, n$1.val); + } + return t$1; + }; + const mt = { validate: a }; + module.exports = e; + })(); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/xml.common.js +var require_xml_common = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/xml.common.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; + /** + * Default key used to access the XML attributes. + */ + exports.XML_ATTRKEY = "$"; + /** + * Default key used to access the XML value content. + */ + exports.XML_CHARKEY = "_"; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/xml.js +var require_xml = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/xml.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.stringifyXML = stringifyXML; + exports.parseXML = parseXML; + const fast_xml_parser_1 = require_fxp(); + const xml_common_js_1$1 = require_xml_common(); + function getCommonOptions(options) { + var _a$2; + return { + attributesGroupName: xml_common_js_1$1.XML_ATTRKEY, + textNodeName: (_a$2 = options.xmlCharKey) !== null && _a$2 !== void 0 ? _a$2 : xml_common_js_1$1.XML_CHARKEY, + ignoreAttributes: false, + suppressBooleanAttributes: false + }; + } + function getSerializerOptions(options = {}) { + var _a$2, _b$1; + return Object.assign(Object.assign({}, getCommonOptions(options)), { + attributeNamePrefix: "@_", + format: true, + suppressEmptyNode: true, + indentBy: "", + rootNodeName: (_a$2 = options.rootName) !== null && _a$2 !== void 0 ? _a$2 : "root", + cdataPropName: (_b$1 = options.cdataPropName) !== null && _b$1 !== void 0 ? _b$1 : "__cdata" + }); + } + function getParserOptions(options = {}) { + return Object.assign(Object.assign({}, getCommonOptions(options)), { + parseAttributeValue: false, + parseTagValue: false, + attributeNamePrefix: "", + stopNodes: options.stopNodes, + processEntities: true, + trimValues: false + }); + } + /** + * Converts given JSON object to XML string + * @param obj - JSON object to be converted into XML string + * @param opts - Options that govern the XML building of given JSON object + * `rootName` indicates the name of the root element in the resulting XML + */ + function stringifyXML(obj, opts = {}) { + const parserOptions = getSerializerOptions(opts); + const j2x = new fast_xml_parser_1.XMLBuilder(parserOptions); + const node = { [parserOptions.rootNodeName]: obj }; + const xmlData = j2x.build(node); + return `${xmlData}`.replace(/\n/g, ""); + } + /** + * Converts given XML string into JSON + * @param str - String containing the XML content to be parsed into JSON + * @param opts - Options that govern the parsing of given xml string + * `includeRoot` indicates whether the root element is to be included or not in the output + */ + async function parseXML(str, opts = {}) { + if (!str) throw new Error("Document is empty"); + const validation = fast_xml_parser_1.XMLValidator.validate(str); + if (validation !== true) throw validation; + const parser = new fast_xml_parser_1.XMLParser(getParserOptions(opts)); + const parsedXml = parser.parse(str); + if (parsedXml["?xml"]) delete parsedXml["?xml"]; + if (!opts.includeRoot) for (const key of Object.keys(parsedXml)) { + const value = parsedXml[key]; + return typeof value === "object" ? Object.assign({}, value) : value; + } + return parsedXml; + } +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/index.js +var require_commonjs$3 = __commonJS({ "node_modules/.deno/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.parseXML = exports.stringifyXML = void 0; + var xml_js_1 = require_xml(); + Object.defineProperty(exports, "stringifyXML", { + enumerable: true, + get: function() { + return xml_js_1.stringifyXML; + } + }); + Object.defineProperty(exports, "parseXML", { + enumerable: true, + get: function() { + return xml_js_1.parseXML; + } + }); + var xml_common_js_1 = require_xml_common(); + Object.defineProperty(exports, "XML_ATTRKEY", { + enumerable: true, + get: function() { + return xml_common_js_1.XML_ATTRKEY; + } + }); + Object.defineProperty(exports, "XML_CHARKEY", { + enumerable: true, + get: function() { + return xml_common_js_1.XML_CHARKEY; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.logger = void 0; + const logger_1 = require_commonjs$11(); + /** + * The `@azure/logger` configuration for this package. + * @internal + */ + exports.logger = (0, logger_1.createClientLogger)("core-lro"); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.terminalStates = exports.POLL_INTERVAL_IN_MS = void 0; + /** + * The default time interval to wait before sending the next polling request. + */ + exports.POLL_INTERVAL_IN_MS = 2e3; + /** + * The closed set of terminal states. + */ + exports.terminalStates = [ + "succeeded", + "canceled", + "failed" + ]; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation$2 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.pollOperation = exports.initOperation = exports.deserializeState = void 0; + const logger_js_1$2 = require_logger(); + const constants_js_1$2 = require_constants(); + /** + * Deserializes the state + */ + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports.deserializeState = deserializeState; + function setStateError(inputs) { + const { state: state$1, stateProxy, isOperationError: isOperationError$1 } = inputs; + return (error) => { + if (isOperationError$1(error)) { + stateProxy.setError(state$1, error); + stateProxy.setFailed(state$1); + } + throw error; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") message = message + "."; + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state: state$1, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state$1); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state$1, new Error(errStr)); + stateProxy.setFailed(state$1); + logger_js_1$2.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state$1); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state$1)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) stateProxy.setResult(state$1, buildResult({ + response, + state: state$1, + processResult + })); + } + function buildResult(inputs) { + const { processResult, response, state: state$1 } = inputs; + return processResult ? processResult(response, state$1) : response; + } + /** + * Initiates the long-running operation. + */ + async function initOperation(inputs) { + const { init: init$1, stateProxy, processResult, getOperationStatus: getOperationStatus$1, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata: metadata$1, response } = await init$1(); + if (operationLocation) withOperationLocation === null || withOperationLocation === void 0 || withOperationLocation(operationLocation, false); + const config = { + metadata: metadata$1, + operationLocation, + resourceLocation + }; + logger_js_1$2.logger.verbose(`LRO: Operation description:`, config); + const state$1 = stateProxy.initState(config); + const status = getOperationStatus$1({ + response, + state: state$1, + operationLocation + }); + processOperationStatus({ + state: state$1, + status, + stateProxy, + response, + setErrorAsResult, + processResult + }); + return state$1; + } + exports.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state: state$1, stateProxy, operationLocation, getOperationStatus: getOperationStatus$1, getResourceLocation: getResourceLocation$1, isOperationError: isOperationError$1, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state: state$1, + stateProxy, + isOperationError: isOperationError$1 + })); + const status = getOperationStatus$1(response, state$1); + logger_js_1$2.logger.verbose(`LRO: Status:\n\tPolling from: ${state$1.config.operationLocation}\n\tOperation status: ${status}\n\tPolling status: ${constants_js_1$2.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation$1(response, state$1); + if (resourceLocation !== void 0) return { + response: await poll(resourceLocation).catch(setStateError({ + state: state$1, + stateProxy, + isOperationError: isOperationError$1 + })), + status + }; + } + return { + response, + status + }; + } + /** Polls the long-running operation. */ + async function pollOperation(inputs) { + const { poll, state: state$1, stateProxy, options, getOperationStatus: getOperationStatus$1, getResourceLocation: getResourceLocation$1, getOperationLocation: getOperationLocation$1, isOperationError: isOperationError$1, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state$1.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus: getOperationStatus$1, + state: state$1, + stateProxy, + operationLocation, + getResourceLocation: getResourceLocation$1, + isOperationError: isOperationError$1, + options + }); + processOperationStatus({ + status, + response, + state: state$1, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1$2.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) setDelay(intervalInMs); + const location = getOperationLocation$1 === null || getOperationLocation$1 === void 0 ? void 0 : getOperationLocation$1(response, state$1); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state$1.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 || withOperationLocation(location, isUpdated); + } else withOperationLocation === null || withOperationLocation === void 0 || withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 || updateState(state$1, response); + } + } + exports.pollOperation = pollOperation; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation$1 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.pollHttpOperation = exports.isOperationError = exports.getResourceLocation = exports.getOperationStatus = exports.getOperationLocation = exports.initHttpOperation = exports.getStatusFromInitialResponse = exports.getErrorFromResponse = exports.parseRetryAfter = exports.inferLroMode = void 0; + const operation_js_1$4 = require_operation$2(); + const logger_js_1$1 = require_logger(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a$2; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": return requestPath; + case "DELETE": return void 0; + case "PATCH": return (_a$2 = getDefault()) !== null && _a$2 !== void 0 ? _a$2 : requestPath; + default: return getDefault(); + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": return void 0; + case "original-uri": return requestPath; + case "location": + default: return location; + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ + operationLocation, + azureAsyncOperation + }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + else if (location !== void 0) return { + mode: "ResourceLocation", + operationLocation: location + }; + else if (normalizedRequestMethod === "PUT" && requestPath) return { + mode: "Body", + operationLocation: requestPath + }; + else return void 0; + } + exports.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: return toOperationStatus(statusCode); + case "succeeded": return "succeeded"; + case "failed": return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": return "running"; + case "canceled": + case "cancelled": return "canceled"; + default: { + logger_js_1$1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a$2; + const { status } = (_a$2 = rawResponse.body) !== null && _a$2 !== void 0 ? _a$2 : {}; + return transformStatus({ + status, + statusCode: rawResponse.statusCode + }); + } + function getProvisioningState(rawResponse) { + var _a$2, _b$1; + const { properties, provisioningState } = (_a$2 = rawResponse.body) !== null && _a$2 !== void 0 ? _a$2 : {}; + const status = (_b$1 = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b$1 !== void 0 ? _b$1 : provisioningState; + return transformStatus({ + status, + statusCode: rawResponse.statusCode + }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) return "running"; + else if (statusCode < 300) return "succeeded"; + else return "failed"; + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error = accessBodyProperty(response, "error"); + if (!error) { + logger_js_1$1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error.code || !error.message) { + logger_js_1$1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error; + } + exports.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor(new Date().getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) return retryAfterTime - timeNow; + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state: state$1, operationLocation } = inputs; + function helper() { + var _a$2; + const mode = (_a$2 = state$1.config.metadata) === null || _a$2 === void 0 ? void 0 : _a$2["mode"]; + switch (mode) { + case void 0: return toOperationStatus(response.rawResponse.statusCode); + case "Body": return getOperationStatus(response, state$1); + default: return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports.getStatusFromInitialResponse = getStatusFromInitialResponse; + /** + * Initiates the long-running operation. + */ + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1$4.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ + response, + operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, + resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation + }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state$1) => processResult(flatResponse, state$1) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult + }); + } + exports.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state$1) { + var _a$2; + const mode = (_a$2 = state$1.config.metadata) === null || _a$2 === void 0 ? void 0 : _a$2["mode"]; + switch (mode) { + case "OperationLocation": return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + case "ResourceLocation": return getLocationHeader(rawResponse); + case "Body": + default: return void 0; + } + } + exports.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state$1) { + var _a$2; + const mode = (_a$2 = state$1.config.metadata) === null || _a$2 === void 0 ? void 0 : _a$2["mode"]; + switch (mode) { + case "OperationLocation": return getStatus(rawResponse); + case "ResourceLocation": return toOperationStatus(rawResponse.statusCode); + case "Body": return getProvisioningState(rawResponse); + default: throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a$2, _b$1; + return (_a$2 = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a$2 !== void 0 ? _a$2 : (_b$1 = rawResponse.body) === null || _b$1 === void 0 ? void 0 : _b$1[prop]; + } + function getResourceLocation(res, state$1) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") state$1.config.resourceLocation = loc; + return state$1.config.resourceLocation; + } + exports.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports.isOperationError = isOperationError; + /** Polls the long-running operation. */ + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state: state$1, setErrorAsResult } = inputs; + return (0, operation_js_1$4.pollOperation)({ + state: state$1, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports.pollHttpOperation = pollHttpOperation; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller$2 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.buildCreatePoller = void 0; + const operation_js_1$3 = require_operation$2(); + const constants_js_1$1 = require_constants(); + const core_util_1 = require_commonjs$9(); + const createStateProxy$1 = () => ({ + initState: (config) => ({ + status: "running", + config + }), + setCanceled: (state$1) => state$1.status = "canceled", + setError: (state$1, error) => state$1.error = error, + setResult: (state$1, result) => state$1.result = result, + setRunning: (state$1) => state$1.status = "running", + setSucceeded: (state$1) => state$1.status = "succeeded", + setFailed: (state$1) => state$1.status = "failed", + getError: (state$1) => state$1.error, + getResult: (state$1) => state$1.result, + isCanceled: (state$1) => state$1.status === "canceled", + isFailed: (state$1) => state$1.status === "failed", + isRunning: (state$1) => state$1.status === "running", + isSucceeded: (state$1) => state$1.status === "succeeded" + }); + /** + * Returns a poller factory. + */ + function buildCreatePoller(inputs) { + const { getOperationLocation: getOperationLocation$1, getStatusFromInitialResponse: getStatusFromInitialResponse$1, getStatusFromPollResponse, isOperationError: isOperationError$1, getResourceLocation: getResourceLocation$1, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init: init$1, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1$1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy$1(); + const withOperationLocation = withOperationLocationCallback ? (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) withOperationLocationCallback(operationLocation); + else if (!called) withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state$1 = restoreFrom ? (0, operation_js_1$3.deserializeState)(restoreFrom) : await (0, operation_js_1$3.initOperation)({ + init: init$1, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse$1, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController$1 = new AbortController(); + const handlers = new Map(); + const handleProgressEvents = async () => handlers.forEach((h$1) => h$1(state$1)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state$1, + getResult: () => state$1.result, + isDone: () => [ + "succeeded", + "failed", + "canceled" + ].includes(state$1.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController$1.abort(); + }, + toString: () => JSON.stringify({ state: state$1 }), + onProgress: (callback) => { + const s$1 = Symbol(); + handlers.set(s$1, callback); + return () => handlers.delete(s$1); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController$1.abort(); + } + const abortSignal$1 = abortController$1.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) abortController$1.abort(); + else if (!abortSignal$1.aborted) inputAbortSignal === null || inputAbortSignal === void 0 || inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal: abortSignal$1 }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal: abortSignal$1 }); + await poller.poll({ abortSignal: abortSignal$1 }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 || inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) return poller.getResult(); + else switch (state$1.status) { + case "succeeded": return poller.getResult(); + case "canceled": throw new Error(cancelErrMsg); + case "failed": throw state$1.error; + case "notStarted": + case "running": throw new Error(`Polling completed without succeeding or failing`); + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) return; + } else switch (state$1.status) { + case "succeeded": return; + case "canceled": throw new Error(cancelErrMsg); + case "failed": throw state$1.error; + } + await (0, operation_js_1$3.pollOperation)({ + poll, + state: state$1, + stateProxy, + getOperationLocation: getOperationLocation$1, + isOperationError: isOperationError$1, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation: getResourceLocation$1, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) switch (state$1.status) { + case "canceled": throw new Error(cancelErrMsg); + case "failed": throw state$1.error; + } + } + }; + return poller; + }; + } + exports.buildCreatePoller = buildCreatePoller; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller$1 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createHttpPoller = void 0; + const operation_js_1$2 = require_operation$1(); + const poller_js_1$2 = require_poller$2(); + /** + * Creates a poller that can be used to poll a long-running operation. + * @param lro - Description of the long-running operation + * @param options - options to configure the poller + * @returns an initialized poller + */ + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1$2.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1$2.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1$2.getOperationStatus, + isOperationError: operation_js_1$2.isOperationError, + getOperationLocation: operation_js_1$2.getOperationLocation, + getResourceLocation: operation_js_1$2.getResourceLocation, + getPollingInterval: operation_js_1$2.parseRetryAfter, + getError: operation_js_1$2.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1$2.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ + response, + operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, + resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation + }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state$1) => processResult(flatResponse, state$1) : ({ flatResponse }) => flatResponse + }); + } + exports.createHttpPoller = createHttpPoller; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.GenericPollOperation = void 0; + const operation_js_1$1 = require_operation$1(); + const logger_js_1 = require_logger(); + const createStateProxy = () => ({ + initState: (config) => ({ + config, + isStarted: true + }), + setCanceled: (state$1) => state$1.isCancelled = true, + setError: (state$1, error) => state$1.error = error, + setResult: (state$1, result) => state$1.result = result, + setRunning: (state$1) => state$1.isStarted = true, + setSucceeded: (state$1) => state$1.isCompleted = true, + setFailed: () => { + /** empty body */ + }, + getError: (state$1) => state$1.error, + getResult: (state$1) => state$1.result, + isCanceled: (state$1) => !!state$1.isCancelled, + isFailed: (state$1) => !!state$1.error, + isRunning: (state$1) => !!state$1.isStarted, + isSucceeded: (state$1) => Boolean(state$1.isCompleted && !state$1.isCancelled && !state$1.error) + }); + var GenericPollOperation = class { + constructor(state$1, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state$1; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a$2; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1$1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) await (0, operation_js_1$1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state$1, { rawResponse }) => updateState(state$1, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state$1) => isDone(flatResponse, state$1) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + (_a$2 = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a$2 === void 0 || _a$2.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ state: this.state }); + } + }; + exports.GenericPollOperation = GenericPollOperation; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Poller = exports.PollerCancelledError = exports.PollerStoppedError = void 0; + /** + * When a poller is manually stopped through the `stopPolling` method, + * the poller will be rejected with an instance of the PollerStoppedError. + */ + var PollerStoppedError = class PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, PollerStoppedError.prototype); + } + }; + exports.PollerStoppedError = PollerStoppedError; + /** + * When the operation is cancelled, the poller will be rejected with an instance + * of the PollerCancelledError. + */ + var PollerCancelledError = class PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, PollerCancelledError.prototype); + } + }; + exports.PollerCancelledError = PollerCancelledError; + /** + * A class that represents the definition of a program that polls through consecutive requests + * until it reaches a state of completion. + * + * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. + * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. + * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. + * + * ```ts + * const poller = new MyPoller(); + * + * // Polling just once: + * await poller.poll(); + * + * // We can try to cancel the request here, by calling: + * // + * // await poller.cancelOperation(); + * // + * + * // Getting the final result: + * const result = await poller.pollUntilDone(); + * ``` + * + * The Poller is defined by two types, a type representing the state of the poller, which + * must include a basic set of properties from `PollOperationState`, + * and a return type defined by `TResult`, which can be anything. + * + * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having + * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. + * + * ```ts + * class Client { + * public async makePoller: PollerLike { + * const poller = new MyPoller({}); + * // It might be preferred to return the poller after the first request is made, + * // so that some information can be obtained right away. + * await poller.poll(); + * return poller; + * } + * } + * + * const poller: PollerLike = myClient.makePoller(); + * ``` + * + * A poller can be created through its constructor, then it can be polled until it's completed. + * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. + * At any point in time, the intermediate forms of the result type can be requested without delay. + * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * + * ```ts + * const poller = myClient.makePoller(); + * const state: MyOperationState = poller.getOperationState(); + * + * // The intermediate result can be obtained at any time. + * const result: MyResult | undefined = poller.getResult(); + * + * // The final result can only be obtained after the poller finishes. + * const result: MyResult = await poller.pollUntilDone(); + * ``` + * + */ + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + /** controls whether to throw an error if the operation failed or was canceled. */ + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + this.promise.catch(() => {}); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) this.stopped = false; + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state$1) { + for (const callback of this.pollProgressCallbacks) callback(state$1); + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error = new PollerCancelledError("Operation was canceled"); + this.reject(error); + throw error; + } + } + if (this.isDone() && this.resolve) this.resolve(this.getResult()); + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) this.startPolling(pollOptions).catch(this.reject); + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state$1 = this.operation.state; + return Boolean(state$1.isCompleted || state$1.isCancelled || state$1.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) this.cancelPromise = this.cancelOnce(options); + else if (options.abortSignal) throw new Error("A cancel request is currently pending"); + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state$1 = this.operation.state; + return state$1.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports.Poller = Poller; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine$1 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.LroEngine = void 0; + const operation_js_1 = require_operation(); + const constants_js_1 = require_constants(); + const poller_js_1$1 = require_poller(); + const operation_js_2 = require_operation$2(); + /** + * The LRO Engine, a class that performs polling. + */ + var LroEngine = class extends poller_js_1$1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state$1 = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state$1, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs)); + } + }; + exports.LroEngine = LroEngine; +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine$1(); + Object.defineProperty(exports, "LroEngine", { + enumerable: true, + get: function() { + return lroEngine_js_1.LroEngine; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); +} }); + +//#endregion +//#region node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs$2 = __commonJS({ "node_modules/.deno/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createHttpPoller = void 0; + const tslib_1 = require_tslib(); + var poller_js_1 = require_poller$1(); + Object.defineProperty(exports, "createHttpPoller", { + enumerable: true, + get: function() { + return poller_js_1.createHttpPoller; + } + }); + /** + * This can be uncommented to expose the protocol-agnostic poller + */ + /** legacy */ + tslib_1.__exportStar(require_lroEngine(), exports); + tslib_1.__exportStar(require_poller(), exports); + tslib_1.__exportStar(require_pollOperation(), exports); +} }); + +//#endregion +//#region node_modules/.deno/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist/index.js +var require_dist$1 = __commonJS({ "node_modules/.deno/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + var coreRestPipeline = require_commonjs$7(); + var tslib = require_tslib(); + var coreAuth = require_commonjs$6(); + var coreUtil = require_commonjs$9(); + var coreHttpCompat = require_commonjs$4(); + var coreClient = require_commonjs$5(); + var coreXml = require_commonjs$3(); + var logger$1 = require_commonjs$11(); + var abortController = require_commonjs$10(); + var crypto = __require("crypto"); + var coreTracing = require_commonjs$8(); + var stream$1 = __require("stream"); + var coreLro = require_commonjs$2(); + var events = __require("events"); + var fs$2 = __require("fs"); + var util$1 = __require("util"); + var buffer$1 = __require("buffer"); + function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) Object.keys(e).forEach(function(k) { + if (k !== "default") { + var d$1 = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d$1.get ? d$1 : { + enumerable: true, + get: function() { + return e[k]; + } + }); + } + }); + n.default = e; + return Object.freeze(n); + } + var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); + var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs$2); + var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util$1); + /** + * The `@azure/logger` configuration for this package. + */ + const logger = logger$1.createClientLogger("storage-blob"); + /** + * The base class from which all request policies derive. + */ + var BaseRequestPolicy = class { + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + const SDK_VERSION = "12.27.0"; + const SERVICE_VERSION = "2025-05-05"; + const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + const BLOCK_BLOB_MAX_BLOCKS = 5e4; + const DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + const REQUEST_TIMEOUT = 100 * 1e3; + /** + * The OAuth scope to use with Azure Storage. + */ + const StorageOAuthScopes = "https://storage.azure.com/.default"; + const URLConstants = { Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } }; + const HTTPURLConnection = { HTTP_ACCEPTED: 202 }; + const HeaderConstants = { + AUTHORIZATION: "Authorization", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version" + }; + const ETagNone = ""; + const ETagAny = "*"; + const SIZE_1_MB = 1 * 1024 * 1024; + const BATCH_MAX_REQUEST = 256; + const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; + const HTTP_LINE_ENDING = "\r\n"; + const HTTP_VERSION_1_1 = "HTTP/1.1"; + const EncryptionAlgorithmAES25 = "AES256"; + const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + const StorageBlobLoggingAllowedHeaderNames = [ + "Access-Control-Allow-Origin", + "Cache-Control", + "Content-Length", + "Content-Type", + "Date", + "Request-Id", + "traceparent", + "Transfer-Encoding", + "User-Agent", + "x-ms-client-request-id", + "x-ms-date", + "x-ms-error-code", + "x-ms-request-id", + "x-ms-return-client-request-id", + "x-ms-version", + "Accept-Ranges", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-MD5", + "Content-Range", + "ETag", + "Last-Modified", + "Server", + "Vary", + "x-ms-content-crc64", + "x-ms-copy-action", + "x-ms-copy-completion-time", + "x-ms-copy-id", + "x-ms-copy-progress", + "x-ms-copy-status", + "x-ms-has-immutability-policy", + "x-ms-has-legal-hold", + "x-ms-lease-state", + "x-ms-lease-status", + "x-ms-range", + "x-ms-request-server-encrypted", + "x-ms-server-encrypted", + "x-ms-snapshot", + "x-ms-source-range", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "x-ms-access-tier", + "x-ms-access-tier-change-time", + "x-ms-access-tier-inferred", + "x-ms-account-kind", + "x-ms-archive-status", + "x-ms-blob-append-offset", + "x-ms-blob-cache-control", + "x-ms-blob-committed-block-count", + "x-ms-blob-condition-appendpos", + "x-ms-blob-condition-maxsize", + "x-ms-blob-content-disposition", + "x-ms-blob-content-encoding", + "x-ms-blob-content-language", + "x-ms-blob-content-length", + "x-ms-blob-content-md5", + "x-ms-blob-content-type", + "x-ms-blob-public-access", + "x-ms-blob-sequence-number", + "x-ms-blob-type", + "x-ms-copy-destination-snapshot", + "x-ms-creation-time", + "x-ms-default-encryption-scope", + "x-ms-delete-snapshots", + "x-ms-delete-type-permanent", + "x-ms-deny-encryption-scope-override", + "x-ms-encryption-algorithm", + "x-ms-if-sequence-number-eq", + "x-ms-if-sequence-number-le", + "x-ms-if-sequence-number-lt", + "x-ms-incremental-copy", + "x-ms-lease-action", + "x-ms-lease-break-period", + "x-ms-lease-duration", + "x-ms-lease-id", + "x-ms-lease-time", + "x-ms-page-write", + "x-ms-proposed-lease-id", + "x-ms-range-get-content-md5", + "x-ms-rehydrate-priority", + "x-ms-sequence-number-action", + "x-ms-sku-name", + "x-ms-source-content-md5", + "x-ms-source-if-match", + "x-ms-source-if-modified-since", + "x-ms-source-if-none-match", + "x-ms-source-if-unmodified-since", + "x-ms-tag-count", + "x-ms-encryption-key-sha256", + "x-ms-copy-source-error-code", + "x-ms-copy-source-status-code", + "x-ms-if-tags", + "x-ms-source-if-tags" + ]; + const StorageBlobLoggingAllowedQueryParameters = [ + "comp", + "maxresults", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "se", + "si", + "sip", + "sp", + "spr", + "sr", + "srt", + "ss", + "st", + "sv", + "include", + "marker", + "prefix", + "copyid", + "restype", + "blockid", + "blocklisttype", + "delimiter", + "prevsnapshot", + "ske", + "skoid", + "sks", + "skt", + "sktid", + "skv", + "snapshot" + ]; + const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + const BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + const PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + /** + * Reserved URL characters must be properly escaped for Storage services like Blob or File. + * + * ## URL encode and escape strategy for JS SDKs + * + * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. + * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL + * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. + * + * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. + * + * This is what legacy V2 SDK does, simple and works for most of the cases. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. + * + * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is + * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. + * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. + * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. + * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: + * + * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. + * + * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. + * + * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string + * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. + * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. + * And following URL strings are invalid: + * - "http://account.blob.core.windows.net/con/b%" + * - "http://account.blob.core.windows.net/con/b%2" + * - "http://account.blob.core.windows.net/con/b%G" + * + * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. + * + * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` + * + * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * + * @param url - + */ + function escapeURLPath(url$1) { + const urlParsed = new URL(url$1); + let path$8 = urlParsed.pathname; + path$8 = path$8 || "/"; + path$8 = escape(path$8); + urlParsed.pathname = path$8; + return urlParsed.toString(); + } + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) if (element.trim().startsWith("DevelopmentStorageProxyUri=")) proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) if (element.trim().startsWith(argument)) return element.trim().match(argument + "=(.*)")[1]; + return ""; + } + /** + * Extracts the parts of an Azure Storage account connection string. + * + * @param connectionString - Connection string. + * @returns String key value pairs of the storage account's url and credentials. + */ + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) throw new Error("Invalid EndpointSuffix in the provided Connection String"); + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) throw new Error("Invalid AccountName in the provided Connection String"); + else if (accountKey.length === 0) throw new Error("Invalid AccountKey in the provided Connection String"); + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) accountName = getAccountNameFromUrl(blobEndpoint); + if (!blobEndpoint) throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + else if (!accountSas) throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + if (accountSas.startsWith("?")) accountSas = accountSas.substring(1); + return { + kind: "SASConnString", + url: blobEndpoint, + accountName, + accountSas + }; + } + } + /** + * Internal escape method implemented Strategy Two mentioned in escapeURL() description. + * + * @param text - + */ + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + /** + * Append a string to URL path. Will remove duplicated "/" in front of the string + * when URL path ends with a "/". + * + * @param url - Source URL string + * @param name - String to be appended to URL + * @returns An updated URL string + */ + function appendToURLPath(url$1, name) { + const urlParsed = new URL(url$1); + let path$8 = urlParsed.pathname; + path$8 = path$8 ? path$8.endsWith("/") ? `${path$8}${name}` : `${path$8}/${name}` : name; + urlParsed.pathname = path$8; + return urlParsed.toString(); + } + /** + * Set URL parameter name and value. If name exists in URL parameters, old value + * will be replaced by name key. If not provide value, the parameter will be deleted. + * + * @param url - Source URL string + * @param name - Parameter name + * @param value - Parameter value + * @returns An updated URL string + */ + function setURLParameter(url$1, name, value) { + const urlParsed = new URL(url$1); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) searchPieces.push(pair); + } + if (encodedValue) searchPieces.push(`${encodedName}=${encodedValue}`); + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + /** + * Get URL parameter by name. + * + * @param url - + * @param name - + */ + function getURLParameter(url$1, name) { + var _a$2; + const urlParsed = new URL(url$1); + return (_a$2 = urlParsed.searchParams.get(name)) !== null && _a$2 !== void 0 ? _a$2 : void 0; + } + /** + * Set URL host. + * + * @param url - Source URL string + * @param host - New host string + * @returns An updated URL string + */ + function setURLHost(url$1, host) { + const urlParsed = new URL(url$1); + urlParsed.hostname = host; + return urlParsed.toString(); + } + /** + * Get URL path from an URL string. + * + * @param url - Source URL string + */ + function getURLPath(url$1) { + try { + const urlParsed = new URL(url$1); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + /** + * Get URL scheme from an URL string. + * + * @param url - Source URL string + */ + function getURLScheme(url$1) { + try { + const urlParsed = new URL(url$1); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + /** + * Get URL path and query from an URL string. + * + * @param url - Source URL string + */ + function getURLPathAndQuery(url$1) { + const urlParsed = new URL(url$1); + const pathString = urlParsed.pathname; + if (!pathString) throw new RangeError("Invalid url without valid path."); + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + return `${pathString}${queryString}`; + } + /** + * Get URL query key value pairs from an URL string. + * + * @param url - + */ + function getURLQueries(url$1) { + let queryString = new URL(url$1).search; + if (!queryString) return {}; + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + /** + * Append a string to URL query. + * + * @param url - Source URL string. + * @param queryParts - String to be appended to the URL query. + * @returns An updated URL string. + */ + function appendToURLQuery(url$1, queryParts) { + const urlParsed = new URL(url$1); + let query = urlParsed.search; + if (query) query += "&" + queryParts; + else query = queryParts; + urlParsed.search = query; + return urlParsed.toString(); + } + /** + * Rounds a date off to seconds. + * + * @param date - + * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; + * If false, YYYY-MM-DDThh:mm:ssZ will be returned. + * @returns Date string in ISO8061 format, with or without 7 milliseconds component + */ + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + /** + * Base64 encode. + * + * @param content - + */ + function base64encode$1(content) { + return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + } + /** + * Generate a 64 bytes base64 block ID string. + * + * @param blockIndex - + */ + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + const res = blockIDPrefix + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode$1(res); + } + /** + * Delay specified time interval. + * + * @param timeInMs - + * @param aborter - + * @param abortError - + */ + async function delay$1(timeInMs, aborter, abortError) { + return new Promise((resolve, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) clearTimeout(timeout); + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) aborter.removeEventListener("abort", abortHandler); + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) aborter.addEventListener("abort", abortHandler); + }); + } + /** + * String.prototype.padStart() + * + * @param currentString - + * @param targetLength - + * @param padString - + */ + function padStart(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) return currentString.padStart(targetLength, padString); + padString = padString || " "; + if (currentString.length > targetLength) return currentString; + else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) padString += padString.repeat(targetLength / padString.length); + return padString.slice(0, targetLength) + currentString; + } + } + /** + * If two strings are equal when compared case insensitive. + * + * @param str1 - + * @param str2 - + */ + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + /** + * Extracts account name from the url + * @param url - url to extract the account name from + * @returns with the account name + */ + function getAccountNameFromUrl(url$1) { + const parsedUrl = new URL(url$1); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") accountName = parsedUrl.hostname.split(".")[0]; + else if (isIpEndpointStyle(parsedUrl)) accountName = parsedUrl.pathname.split("/")[1]; + else accountName = ""; + return accountName; + } catch (error) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + } + /** + * Convert Tags to encoded string. + * + * @param tags - + */ + function toBlobTagsString(tags$1) { + if (tags$1 === void 0) return void 0; + const tagPairs = []; + for (const key in tags$1) if (Object.prototype.hasOwnProperty.call(tags$1, key)) { + const value = tags$1[key]; + tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); + } + return tagPairs.join("&"); + } + /** + * Convert Tags type to BlobTags. + * + * @param tags - + */ + function toBlobTags(tags$1) { + if (tags$1 === void 0) return void 0; + const res = { blobTagSet: [] }; + for (const key in tags$1) if (Object.prototype.hasOwnProperty.call(tags$1, key)) { + const value = tags$1[key]; + res.blobTagSet.push({ + key, + value + }); + } + return res; + } + /** + * Covert BlobTags to Tags type. + * + * @param tags - + */ + function toTags(tags$1) { + if (tags$1 === void 0) return void 0; + const res = {}; + for (const blobTag of tags$1.blobTagSet) res[blobTag.key] = blobTag.value; + return res; + } + /** + * Convert BlobQueryTextConfiguration to QuerySerialization type. + * + * @param textConfiguration - + */ + function toQuerySerialization(textConfiguration) { + if (textConfiguration === void 0) return void 0; + switch (textConfiguration.kind) { + case "csv": return { format: { + type: "delimited", + delimitedTextConfiguration: { + columnSeparator: textConfiguration.columnSeparator || ",", + fieldQuote: textConfiguration.fieldQuote || "", + recordSeparator: textConfiguration.recordSeparator, + escapeChar: textConfiguration.escapeCharacter || "", + headersPresent: textConfiguration.hasHeaders || false + } + } }; + case "json": return { format: { + type: "json", + jsonTextConfiguration: { recordSeparator: textConfiguration.recordSeparator } + } }; + case "arrow": return { format: { + type: "arrow", + arrowConfiguration: { schema: textConfiguration.schema } + } }; + case "parquet": return { format: { type: "parquet" } }; + default: throw Error("Invalid BlobQueryTextConfiguration."); + } + } + function parseObjectReplicationRecord(objectReplicationRecord) { + if (!objectReplicationRecord) return void 0; + if ("policy-id" in objectReplicationRecord) return void 0; + const orProperties = []; + for (const key in objectReplicationRecord) { + const ids = key.split("_"); + const policyPrefix = "or-"; + if (ids[0].startsWith(policyPrefix)) ids[0] = ids[0].substring(policyPrefix.length); + const rule = { + ruleId: ids[1], + replicationStatus: objectReplicationRecord[key] + }; + const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); + if (policyIndex > -1) orProperties[policyIndex].rules.push(rule); + else orProperties.push({ + policyId: ids[0], + rules: [rule] + }); + } + return orProperties; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function BlobNameToString(name) { + if (name.encoded) return decodeURIComponent(name.content); + else return name.content; + } + function ConvertInternalResponseOfListBlobFlat(internalResponse) { + return Object.assign(Object.assign({}, internalResponse), { segment: { blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); + return blobItem; + }) } }); + } + function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { + var _a$2; + return Object.assign(Object.assign({}, internalResponse), { segment: { + blobPrefixes: (_a$2 = internalResponse.segment.blobPrefixes) === null || _a$2 === void 0 ? void 0 : _a$2.map((blobPrefixInternal) => { + const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); + return blobItem; + }) + } }); + } + function* ExtractPageRangeInfoItems(getPageRangesSegment) { + let pageRange = []; + let clearRange = []; + if (getPageRangesSegment.pageRange) pageRange = getPageRangesSegment.pageRange; + if (getPageRangesSegment.clearRange) clearRange = getPageRangesSegment.clearRange; + let pageRangeIndex = 0; + let clearRangeIndex = 0; + while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { + yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false + }; + ++pageRangeIndex; + } else { + yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true + }; + ++clearRangeIndex; + } + for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false + }; + for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true + }; + } + /** + * Escape the blobName but keep path separator ('/'). + */ + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) split[i] = encodeURIComponent(split[i]); + return split.join("/"); + } + /** + * A typesafe helper for ensuring that a given response object has + * the original _response attached. + * @param response - A response object from calling a client operation + * @returns The same object, but with known _response property + */ + function assertResponse(response) { + if (`_response` in response) return response; + throw new TypeError(`Unexpected response object ${response}`); + } + /** + * RetryPolicy types. + */ + exports.StorageRetryPolicyType = void 0; + (function(StorageRetryPolicyType$1) { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + StorageRetryPolicyType$1[StorageRetryPolicyType$1["EXPONENTIAL"] = 0] = "EXPONENTIAL"; + /** + * Linear retry. Retry time delay grows linearly. + */ + StorageRetryPolicyType$1[StorageRetryPolicyType$1["FIXED"] = 1] = "FIXED"; + })(exports.StorageRetryPolicyType || (exports.StorageRetryPolicyType = {})); + const DEFAULT_RETRY_OPTIONS$1 = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + }; + const RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); + /** + * Retry policy with exponential retry and linear retry implemented. + */ + var StorageRetryPolicy = class extends BaseRequestPolicy { + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + if (this.retryOptions.tryTimeoutInMs) newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + let response; + try { + logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) return response; + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) throw err; + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors$1 = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + if (err) { + for (const retriableError of retriableErrors$1) if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { + logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal$1) { + let delayTimeInMs = 0; + if (isPrimaryRetry) switch (this.retryOptions.retryPolicyType) { + case exports.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case exports.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + else delayTimeInMs = Math.random() * 1e3; + logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delay$1(delayTimeInMs, abortSignal$1, RETRY_ABORT_ERROR$1); + } + }; + /** + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. + */ + var StorageRetryPolicyFactory = class { + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + /** + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. + */ + var CredentialPolicy = class extends BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + const table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + const table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + const table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [ + table_lv0, + table_lv2, + table_lv4 + ]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) return i > j; + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) ++i; + else if (weight2 === 0) ++j; + else return weight1 < weight2; + } + return false; + } + /** + * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. + */ + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, HeaderConstants.DATE), + this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) return ""; + if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") return ""; + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) return false; + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path$8 = getURLPath(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path$8}`; + const queries = getURLQueries(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + queryKeys.sort(); + for (const key of queryKeys) canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + return canonicalizedResourceString; + } + }; + /** + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. + */ + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * StorageSharedKeyCredential for account key authorization of Azure Storage service. + */ + var StorageSharedKeyCredential = class extends Credential { + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + /** + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). + */ + var AnonymousCredentialPolicy = class extends CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + /** + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). + */ + var AnonymousCredential = class extends Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy(nextPolicy, options); + } + }; + let _defaultHttpClient; + function getCachedDefaultHttpClient() { + if (!_defaultHttpClient) _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + return _defaultHttpClient; + } + /** + * The programmatic identifier of the StorageBrowserPolicy. + */ + const storageBrowserPolicyName = "storageBrowserPolicy"; + /** + * storageBrowserPolicy is a policy used to prevent browsers from caching requests + * and to remove cookies and explicit content-length headers. + */ + function storageBrowserPolicy() { + return { + name: storageBrowserPolicyName, + async sendRequest(request, next) { + if (coreUtil.isNode) return next(request); + if (request.method === "GET" || request.method === "HEAD") request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); + request.headers.delete(HeaderConstants.COOKIE); + request.headers.delete(HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + /** + * Name of the {@link storageRetryPolicy} + */ + const storageRetryPolicyName = "storageRetryPolicy"; + /** + * RetryPolicy types. + */ + var StorageRetryPolicyType; + (function(StorageRetryPolicyType$1) { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + StorageRetryPolicyType$1[StorageRetryPolicyType$1["EXPONENTIAL"] = 0] = "EXPONENTIAL"; + /** + * Linear retry. Retry time delay grows linearly. + */ + StorageRetryPolicyType$1[StorageRetryPolicyType$1["FIXED"] = 1] = "FIXED"; + })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + }; + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + /** + * Retry policy with exponential retry and linear retry implemented. + */ + function storageRetryPolicy(options = {}) { + var _a$2, _b$1, _c$1, _d$1, _e, _f; + const retryPolicyType = (_a$2 = options.retryPolicyType) !== null && _a$2 !== void 0 ? _a$2 : DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = (_b$1 = options.maxTries) !== null && _b$1 !== void 0 ? _b$1 : DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = (_c$1 = options.retryDelayInMs) !== null && _c$1 !== void 0 ? _c$1 : DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = (_d$1 = options.maxRetryDelayInMs) !== null && _d$1 !== void 0 ? _d$1 : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error }) { + var _a$3, _b$2; + if (attempt >= maxTries) { + logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error) { + for (const retriableError of retriableErrors) if (error.name.toUpperCase().includes(retriableError) || error.message.toUpperCase().includes(retriableError) || error.code && error.code.toString().toUpperCase() === retriableError) { + logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + if ((error === null || error === void 0 ? void 0 : error.code) === "PARSE_ERROR" && (error === null || error === void 0 ? void 0 : error.message.startsWith(`Error "Error: Unclosed root tag`))) { + logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error) { + const statusCode = (_b$2 = (_a$3 = response === null || response === void 0 ? void 0 : response.status) !== null && _a$3 !== void 0 ? _a$3 : error === null || error === void 0 ? void 0 : error.statusCode) !== null && _b$2 !== void 0 ? _b$2 : 0; + if (!isPrimaryRetry && statusCode === 404) { + logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) switch (retryPolicyType) { + case StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + else delayTimeInMs = Math.random() * 1e3; + logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || ![ + "GET", + "HEAD", + "OPTIONS" + ].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error = void 0; + try { + logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if (coreRestPipeline.isRestError(e)) { + logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error = e; + } else { + logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ + isPrimaryRetry, + attempt, + response, + error + }); + if (retryAgain) await delay$1(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + attempt++; + } + if (response) return response; + throw error !== null && error !== void 0 ? error : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + } + }; + } + /** + * The programmatic identifier of the storageSharedKeyCredentialPolicy. + */ + const storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + /** + * storageSharedKeyCredentialPolicy handles signing requests using storage account keys. + */ + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, HeaderConstants.DATE), + getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + */ + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) return ""; + if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") return ""; + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + */ + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) headersArray.push({ + name, + value + }); + headersArray.sort((a, b) => { + return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) return false; + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path$8 = getURLPath(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path$8}`; + const queries = getURLQueries(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + queryKeys.sort(); + for (const key of queryKeys) canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + return canonicalizedResourceString; + } + return { + name: storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + /** + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: + * + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. + * + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning + */ + var StorageBrowserPolicy = class extends BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (coreUtil.isNode) return this._nextPolicy.sendRequest(request); + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); + request.headers.remove(HeaderConstants.COOKIE); + request.headers.remove(HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + /** + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. + */ + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy(nextPolicy, options); + } + }; + /** + * The programmatic identifier of the storageCorrectContentLengthPolicy. + */ + const storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + /** + * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length. + */ + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + return { + name: storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + /** + * A helper to decide if a given argument satisfies the Pipeline contract + * @param pipeline - An argument that may be a Pipeline + * @returns true when the argument satisfies the Pipeline contract + */ + function isPipelineLike(pipeline) { + if (!pipeline || typeof pipeline !== "object") return false; + const castPipeline = pipeline; + return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; + } + /** + * A Pipeline class containing HTTP request policies. + * You can create a default Pipeline by calling {@link newPipeline}. + * Or you can create a Pipeline with your own policies by the constructor of Pipeline. + * + * Refer to {@link newPipeline} and provided policies before implementing your + * customized Pipeline. + */ + var Pipeline = class { + /** + * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. + * + * @param factories - + * @param options - + */ + constructor(factories, options = {}) { + this.factories = factories; + this.options = options; + } + /** + * Transfer Pipeline object to ServiceClientOptions object which is required by + * ServiceClient constructor. + * + * @returns The ServiceClientOptions object from this Pipeline. + */ + toServiceClientOptions() { + return { + httpClient: this.options.httpClient, + requestPolicyFactories: this.factories + }; + } + }; + /** + * Creates a new Pipeline object with Credential provided. + * + * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param pipelineOptions - Optional. Options. + * @returns A new Pipeline object. + */ + function newPipeline(credential, pipelineOptions = {}) { + if (!credential) credential = new AnonymousCredential(); + const pipeline = new Pipeline([], pipelineOptions); + pipeline._credential = credential; + return pipeline; + } + function processDownlevelPipeline(pipeline) { + const knownFactoryFunctions = [ + isAnonymousCredential, + isStorageSharedKeyCredential, + isCoreHttpBearerTokenFactory, + isStorageBrowserPolicyFactory, + isStorageRetryPolicyFactory, + isStorageTelemetryPolicyFactory, + isCoreHttpPolicyFactory + ]; + if (pipeline.factories.length) { + const novelFactories = pipeline.factories.filter((factory) => { + return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory)); + }); + if (novelFactories.length) { + const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); + return { + wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + afterRetry: hasInjector + }; + } + } + return void 0; + } + function getCoreClientOptions(pipeline) { + var _a$2; + const _b$1 = pipeline.options, { httpClient: v1Client } = _b$1, restOptions = tslib.__rest(_b$1, ["httpClient"]); + let httpClient = pipeline._coreHttpClient; + if (!httpClient) { + httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + pipeline._coreHttpClient = httpClient; + } + let corePipeline = pipeline._corePipeline; + if (!corePipeline) { + const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; + corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { + loggingOptions: { + additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, + logger: logger.info + }, + userAgentOptions: { userAgentPrefix }, + serializationOptions: { + stringifyXML: coreXml.stringifyXML, + serializerOptions: { xml: { xmlCharKey: "#" } } + }, + deserializationOptions: { + parseXML: coreXml.parseXML, + serializerOptions: { xml: { xmlCharKey: "#" } } + } + })); + corePipeline.removePolicy({ phase: "Retry" }); + corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); + corePipeline.addPolicy(storageCorrectContentLengthPolicy()); + corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy(storageBrowserPolicy()); + const downlevelResults = processDownlevelPipeline(pipeline); + if (downlevelResults) corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); + const credential = getCredentialFromPipeline(pipeline); + if (coreAuth.isTokenCredential(credential)) corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential, + scopes: (_a$2 = restOptions.audience) !== null && _a$2 !== void 0 ? _a$2 : StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + }), { phase: "Sign" }); + else if (credential instanceof StorageSharedKeyCredential) corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + accountName: credential.accountName, + accountKey: credential.accountKey + }), { phase: "Sign" }); + pipeline._corePipeline = corePipeline; + } + return Object.assign(Object.assign({}, restOptions), { + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }); + } + function getCredentialFromPipeline(pipeline) { + if (pipeline._credential) return pipeline._credential; + let credential = new AnonymousCredential(); + for (const factory of pipeline.factories) if (coreAuth.isTokenCredential(factory.credential)) credential = factory.credential; + else if (isStorageSharedKeyCredential(factory)) return factory; + return credential; + } + function isStorageSharedKeyCredential(factory) { + if (factory instanceof StorageSharedKeyCredential) return true; + return factory.constructor.name === "StorageSharedKeyCredential"; + } + function isAnonymousCredential(factory) { + if (factory instanceof AnonymousCredential) return true; + return factory.constructor.name === "AnonymousCredential"; + } + function isCoreHttpBearerTokenFactory(factory) { + return coreAuth.isTokenCredential(factory.credential); + } + function isStorageBrowserPolicyFactory(factory) { + if (factory instanceof StorageBrowserPolicyFactory) return true; + return factory.constructor.name === "StorageBrowserPolicyFactory"; + } + function isStorageRetryPolicyFactory(factory) { + if (factory instanceof StorageRetryPolicyFactory) return true; + return factory.constructor.name === "StorageRetryPolicyFactory"; + } + function isStorageTelemetryPolicyFactory(factory) { + return factory.constructor.name === "TelemetryPolicyFactory"; + } + function isInjectorPolicyFactory(factory) { + return factory.constructor.name === "InjectorPolicyFactory"; + } + function isCoreHttpPolicyFactory(factory) { + const knownPolicies = [ + "GenerateClientRequestIdPolicy", + "TracingPolicy", + "LogPolicy", + "ProxyPolicy", + "DisableResponseDecompressionPolicy", + "KeepAlivePolicy", + "DeserializationPolicy" + ]; + const mockHttpClient = { sendRequest: async (request) => { + return { + request, + headers: request.headers.clone(), + status: 500 + }; + } }; + const mockRequestPolicyOptions$1 = { + log(_logLevel, _message) {}, + shouldLog(_logLevel) { + return false; + } + }; + const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions$1); + const policyName = policyInstance.constructor.name; + return knownPolicies.some((knownPolicyName) => { + return policyName.startsWith(knownPolicyName); + }); + } + const BlobServiceProperties = { + serializedName: "BlobServiceProperties", + xmlName: "StorageServiceProperties", + type: { + name: "Composite", + className: "BlobServiceProperties", + modelProperties: { + blobAnalyticsLogging: { + serializedName: "Logging", + xmlName: "Logging", + type: { + name: "Composite", + className: "Logging" + } + }, + hourMetrics: { + serializedName: "HourMetrics", + xmlName: "HourMetrics", + type: { + name: "Composite", + className: "Metrics" + } + }, + minuteMetrics: { + serializedName: "MinuteMetrics", + xmlName: "MinuteMetrics", + type: { + name: "Composite", + className: "Metrics" + } + }, + cors: { + serializedName: "Cors", + xmlName: "Cors", + xmlIsWrapped: true, + xmlElementName: "CorsRule", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "CorsRule" + } } + } + }, + defaultServiceVersion: { + serializedName: "DefaultServiceVersion", + xmlName: "DefaultServiceVersion", + type: { name: "String" } + }, + deleteRetentionPolicy: { + serializedName: "DeleteRetentionPolicy", + xmlName: "DeleteRetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + }, + staticWebsite: { + serializedName: "StaticWebsite", + xmlName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite" + } + } + } + } + }; + const Logging = { + serializedName: "Logging", + type: { + name: "Composite", + className: "Logging", + modelProperties: { + version: { + serializedName: "Version", + required: true, + xmlName: "Version", + type: { name: "String" } + }, + deleteProperty: { + serializedName: "Delete", + required: true, + xmlName: "Delete", + type: { name: "Boolean" } + }, + read: { + serializedName: "Read", + required: true, + xmlName: "Read", + type: { name: "Boolean" } + }, + write: { + serializedName: "Write", + required: true, + xmlName: "Write", + type: { name: "Boolean" } + }, + retentionPolicy: { + serializedName: "RetentionPolicy", + xmlName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } + }; + const RetentionPolicy = { + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + modelProperties: { + enabled: { + serializedName: "Enabled", + required: true, + xmlName: "Enabled", + type: { name: "Boolean" } + }, + days: { + constraints: { InclusiveMinimum: 1 }, + serializedName: "Days", + xmlName: "Days", + type: { name: "Number" } + } + } + } + }; + const Metrics = { + serializedName: "Metrics", + type: { + name: "Composite", + className: "Metrics", + modelProperties: { + version: { + serializedName: "Version", + xmlName: "Version", + type: { name: "String" } + }, + enabled: { + serializedName: "Enabled", + required: true, + xmlName: "Enabled", + type: { name: "Boolean" } + }, + includeAPIs: { + serializedName: "IncludeAPIs", + xmlName: "IncludeAPIs", + type: { name: "Boolean" } + }, + retentionPolicy: { + serializedName: "RetentionPolicy", + xmlName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } + }; + const CorsRule = { + serializedName: "CorsRule", + type: { + name: "Composite", + className: "CorsRule", + modelProperties: { + allowedOrigins: { + serializedName: "AllowedOrigins", + required: true, + xmlName: "AllowedOrigins", + type: { name: "String" } + }, + allowedMethods: { + serializedName: "AllowedMethods", + required: true, + xmlName: "AllowedMethods", + type: { name: "String" } + }, + allowedHeaders: { + serializedName: "AllowedHeaders", + required: true, + xmlName: "AllowedHeaders", + type: { name: "String" } + }, + exposedHeaders: { + serializedName: "ExposedHeaders", + required: true, + xmlName: "ExposedHeaders", + type: { name: "String" } + }, + maxAgeInSeconds: { + constraints: { InclusiveMinimum: 0 }, + serializedName: "MaxAgeInSeconds", + required: true, + xmlName: "MaxAgeInSeconds", + type: { name: "Number" } + } + } + } + }; + const StaticWebsite = { + serializedName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite", + modelProperties: { + enabled: { + serializedName: "Enabled", + required: true, + xmlName: "Enabled", + type: { name: "Boolean" } + }, + indexDocument: { + serializedName: "IndexDocument", + xmlName: "IndexDocument", + type: { name: "String" } + }, + errorDocument404Path: { + serializedName: "ErrorDocument404Path", + xmlName: "ErrorDocument404Path", + type: { name: "String" } + }, + defaultIndexDocumentPath: { + serializedName: "DefaultIndexDocumentPath", + xmlName: "DefaultIndexDocumentPath", + type: { name: "String" } + } + } + } + }; + const StorageError = { + serializedName: "StorageError", + type: { + name: "Composite", + className: "StorageError", + modelProperties: { + message: { + serializedName: "Message", + xmlName: "Message", + type: { name: "String" } + }, + code: { + serializedName: "Code", + xmlName: "Code", + type: { name: "String" } + }, + authenticationErrorDetail: { + serializedName: "AuthenticationErrorDetail", + xmlName: "AuthenticationErrorDetail", + type: { name: "String" } + } + } + } + }; + const BlobServiceStatistics = { + serializedName: "BlobServiceStatistics", + xmlName: "StorageServiceStats", + type: { + name: "Composite", + className: "BlobServiceStatistics", + modelProperties: { geoReplication: { + serializedName: "GeoReplication", + xmlName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication" + } + } } + } + }; + const GeoReplication = { + serializedName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication", + modelProperties: { + status: { + serializedName: "Status", + required: true, + xmlName: "Status", + type: { + name: "Enum", + allowedValues: [ + "live", + "bootstrap", + "unavailable" + ] + } + }, + lastSyncOn: { + serializedName: "LastSyncTime", + required: true, + xmlName: "LastSyncTime", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const ListContainersSegmentResponse = { + serializedName: "ListContainersSegmentResponse", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "ListContainersSegmentResponse", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { name: "String" } + }, + prefix: { + serializedName: "Prefix", + xmlName: "Prefix", + type: { name: "String" } + }, + marker: { + serializedName: "Marker", + xmlName: "Marker", + type: { name: "String" } + }, + maxPageSize: { + serializedName: "MaxResults", + xmlName: "MaxResults", + type: { name: "Number" } + }, + containerItems: { + serializedName: "ContainerItems", + required: true, + xmlName: "Containers", + xmlIsWrapped: true, + xmlElementName: "Container", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "ContainerItem" + } } + } + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { name: "String" } + } + } + } + }; + const ContainerItem = { + serializedName: "ContainerItem", + xmlName: "Container", + type: { + name: "Composite", + className: "ContainerItem", + modelProperties: { + name: { + serializedName: "Name", + required: true, + xmlName: "Name", + type: { name: "String" } + }, + deleted: { + serializedName: "Deleted", + xmlName: "Deleted", + type: { name: "Boolean" } + }, + version: { + serializedName: "Version", + xmlName: "Version", + type: { name: "String" } + }, + properties: { + serializedName: "Properties", + xmlName: "Properties", + type: { + name: "Composite", + className: "ContainerProperties" + } + }, + metadata: { + serializedName: "Metadata", + xmlName: "Metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } + }; + const ContainerProperties = { + serializedName: "ContainerProperties", + type: { + name: "Composite", + className: "ContainerProperties", + modelProperties: { + lastModified: { + serializedName: "Last-Modified", + required: true, + xmlName: "Last-Modified", + type: { name: "DateTimeRfc1123" } + }, + etag: { + serializedName: "Etag", + required: true, + xmlName: "Etag", + type: { name: "String" } + }, + leaseStatus: { + serializedName: "LeaseStatus", + xmlName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"] + } + }, + leaseState: { + serializedName: "LeaseState", + xmlName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseDuration: { + serializedName: "LeaseDuration", + xmlName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"] + } + }, + publicAccess: { + serializedName: "PublicAccess", + xmlName: "PublicAccess", + type: { + name: "Enum", + allowedValues: ["container", "blob"] + } + }, + hasImmutabilityPolicy: { + serializedName: "HasImmutabilityPolicy", + xmlName: "HasImmutabilityPolicy", + type: { name: "Boolean" } + }, + hasLegalHold: { + serializedName: "HasLegalHold", + xmlName: "HasLegalHold", + type: { name: "Boolean" } + }, + defaultEncryptionScope: { + serializedName: "DefaultEncryptionScope", + xmlName: "DefaultEncryptionScope", + type: { name: "String" } + }, + preventEncryptionScopeOverride: { + serializedName: "DenyEncryptionScopeOverride", + xmlName: "DenyEncryptionScopeOverride", + type: { name: "Boolean" } + }, + deletedOn: { + serializedName: "DeletedTime", + xmlName: "DeletedTime", + type: { name: "DateTimeRfc1123" } + }, + remainingRetentionDays: { + serializedName: "RemainingRetentionDays", + xmlName: "RemainingRetentionDays", + type: { name: "Number" } + }, + isImmutableStorageWithVersioningEnabled: { + serializedName: "ImmutableStorageWithVersioningEnabled", + xmlName: "ImmutableStorageWithVersioningEnabled", + type: { name: "Boolean" } + } + } + } + }; + const KeyInfo = { + serializedName: "KeyInfo", + type: { + name: "Composite", + className: "KeyInfo", + modelProperties: { + startsOn: { + serializedName: "Start", + required: true, + xmlName: "Start", + type: { name: "String" } + }, + expiresOn: { + serializedName: "Expiry", + required: true, + xmlName: "Expiry", + type: { name: "String" } + } + } + } + }; + const UserDelegationKey = { + serializedName: "UserDelegationKey", + type: { + name: "Composite", + className: "UserDelegationKey", + modelProperties: { + signedObjectId: { + serializedName: "SignedOid", + required: true, + xmlName: "SignedOid", + type: { name: "String" } + }, + signedTenantId: { + serializedName: "SignedTid", + required: true, + xmlName: "SignedTid", + type: { name: "String" } + }, + signedStartsOn: { + serializedName: "SignedStart", + required: true, + xmlName: "SignedStart", + type: { name: "String" } + }, + signedExpiresOn: { + serializedName: "SignedExpiry", + required: true, + xmlName: "SignedExpiry", + type: { name: "String" } + }, + signedService: { + serializedName: "SignedService", + required: true, + xmlName: "SignedService", + type: { name: "String" } + }, + signedVersion: { + serializedName: "SignedVersion", + required: true, + xmlName: "SignedVersion", + type: { name: "String" } + }, + value: { + serializedName: "Value", + required: true, + xmlName: "Value", + type: { name: "String" } + } + } + } + }; + const FilterBlobSegment = { + serializedName: "FilterBlobSegment", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "FilterBlobSegment", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { name: "String" } + }, + where: { + serializedName: "Where", + required: true, + xmlName: "Where", + type: { name: "String" } + }, + blobs: { + serializedName: "Blobs", + required: true, + xmlName: "Blobs", + xmlIsWrapped: true, + xmlElementName: "Blob", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "FilterBlobItem" + } } + } + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { name: "String" } + } + } + } + }; + const FilterBlobItem = { + serializedName: "FilterBlobItem", + xmlName: "Blob", + type: { + name: "Composite", + className: "FilterBlobItem", + modelProperties: { + name: { + serializedName: "Name", + required: true, + xmlName: "Name", + type: { name: "String" } + }, + containerName: { + serializedName: "ContainerName", + required: true, + xmlName: "ContainerName", + type: { name: "String" } + }, + tags: { + serializedName: "Tags", + xmlName: "Tags", + type: { + name: "Composite", + className: "BlobTags" + } + } + } + } + }; + const BlobTags = { + serializedName: "BlobTags", + xmlName: "Tags", + type: { + name: "Composite", + className: "BlobTags", + modelProperties: { blobTagSet: { + serializedName: "BlobTagSet", + required: true, + xmlName: "TagSet", + xmlIsWrapped: true, + xmlElementName: "Tag", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "BlobTag" + } } + } + } } + } + }; + const BlobTag = { + serializedName: "BlobTag", + xmlName: "Tag", + type: { + name: "Composite", + className: "BlobTag", + modelProperties: { + key: { + serializedName: "Key", + required: true, + xmlName: "Key", + type: { name: "String" } + }, + value: { + serializedName: "Value", + required: true, + xmlName: "Value", + type: { name: "String" } + } + } + } + }; + const SignedIdentifier = { + serializedName: "SignedIdentifier", + xmlName: "SignedIdentifier", + type: { + name: "Composite", + className: "SignedIdentifier", + modelProperties: { + id: { + serializedName: "Id", + required: true, + xmlName: "Id", + type: { name: "String" } + }, + accessPolicy: { + serializedName: "AccessPolicy", + xmlName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy" + } + } + } + } + }; + const AccessPolicy = { + serializedName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy", + modelProperties: { + startsOn: { + serializedName: "Start", + xmlName: "Start", + type: { name: "String" } + }, + expiresOn: { + serializedName: "Expiry", + xmlName: "Expiry", + type: { name: "String" } + }, + permissions: { + serializedName: "Permission", + xmlName: "Permission", + type: { name: "String" } + } + } + } + }; + const ListBlobsFlatSegmentResponse = { + serializedName: "ListBlobsFlatSegmentResponse", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "ListBlobsFlatSegmentResponse", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { name: "String" } + }, + containerName: { + serializedName: "ContainerName", + required: true, + xmlName: "ContainerName", + xmlIsAttribute: true, + type: { name: "String" } + }, + prefix: { + serializedName: "Prefix", + xmlName: "Prefix", + type: { name: "String" } + }, + marker: { + serializedName: "Marker", + xmlName: "Marker", + type: { name: "String" } + }, + maxPageSize: { + serializedName: "MaxResults", + xmlName: "MaxResults", + type: { name: "Number" } + }, + segment: { + serializedName: "Segment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobFlatListSegment" + } + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { name: "String" } + } + } + } + }; + const BlobFlatListSegment = { + serializedName: "BlobFlatListSegment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobFlatListSegment", + modelProperties: { blobItems: { + serializedName: "BlobItems", + required: true, + xmlName: "BlobItems", + xmlElementName: "Blob", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "BlobItemInternal" + } } + } + } } + } + }; + const BlobItemInternal = { + serializedName: "BlobItemInternal", + xmlName: "Blob", + type: { + name: "Composite", + className: "BlobItemInternal", + modelProperties: { + name: { + serializedName: "Name", + xmlName: "Name", + type: { + name: "Composite", + className: "BlobName" + } + }, + deleted: { + serializedName: "Deleted", + required: true, + xmlName: "Deleted", + type: { name: "Boolean" } + }, + snapshot: { + serializedName: "Snapshot", + required: true, + xmlName: "Snapshot", + type: { name: "String" } + }, + versionId: { + serializedName: "VersionId", + xmlName: "VersionId", + type: { name: "String" } + }, + isCurrentVersion: { + serializedName: "IsCurrentVersion", + xmlName: "IsCurrentVersion", + type: { name: "Boolean" } + }, + properties: { + serializedName: "Properties", + xmlName: "Properties", + type: { + name: "Composite", + className: "BlobPropertiesInternal" + } + }, + metadata: { + serializedName: "Metadata", + xmlName: "Metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + blobTags: { + serializedName: "BlobTags", + xmlName: "Tags", + type: { + name: "Composite", + className: "BlobTags" + } + }, + objectReplicationMetadata: { + serializedName: "ObjectReplicationMetadata", + xmlName: "OrMetadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + hasVersionsOnly: { + serializedName: "HasVersionsOnly", + xmlName: "HasVersionsOnly", + type: { name: "Boolean" } + } + } + } + }; + const BlobName = { + serializedName: "BlobName", + type: { + name: "Composite", + className: "BlobName", + modelProperties: { + encoded: { + serializedName: "Encoded", + xmlName: "Encoded", + xmlIsAttribute: true, + type: { name: "Boolean" } + }, + content: { + serializedName: "content", + xmlName: "content", + xmlIsMsText: true, + type: { name: "String" } + } + } + } + }; + const BlobPropertiesInternal = { + serializedName: "BlobPropertiesInternal", + xmlName: "Properties", + type: { + name: "Composite", + className: "BlobPropertiesInternal", + modelProperties: { + createdOn: { + serializedName: "Creation-Time", + xmlName: "Creation-Time", + type: { name: "DateTimeRfc1123" } + }, + lastModified: { + serializedName: "Last-Modified", + required: true, + xmlName: "Last-Modified", + type: { name: "DateTimeRfc1123" } + }, + etag: { + serializedName: "Etag", + required: true, + xmlName: "Etag", + type: { name: "String" } + }, + contentLength: { + serializedName: "Content-Length", + xmlName: "Content-Length", + type: { name: "Number" } + }, + contentType: { + serializedName: "Content-Type", + xmlName: "Content-Type", + type: { name: "String" } + }, + contentEncoding: { + serializedName: "Content-Encoding", + xmlName: "Content-Encoding", + type: { name: "String" } + }, + contentLanguage: { + serializedName: "Content-Language", + xmlName: "Content-Language", + type: { name: "String" } + }, + contentMD5: { + serializedName: "Content-MD5", + xmlName: "Content-MD5", + type: { name: "ByteArray" } + }, + contentDisposition: { + serializedName: "Content-Disposition", + xmlName: "Content-Disposition", + type: { name: "String" } + }, + cacheControl: { + serializedName: "Cache-Control", + xmlName: "Cache-Control", + type: { name: "String" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + blobType: { + serializedName: "BlobType", + xmlName: "BlobType", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + leaseStatus: { + serializedName: "LeaseStatus", + xmlName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"] + } + }, + leaseState: { + serializedName: "LeaseState", + xmlName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseDuration: { + serializedName: "LeaseDuration", + xmlName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"] + } + }, + copyId: { + serializedName: "CopyId", + xmlName: "CopyId", + type: { name: "String" } + }, + copyStatus: { + serializedName: "CopyStatus", + xmlName: "CopyStatus", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + copySource: { + serializedName: "CopySource", + xmlName: "CopySource", + type: { name: "String" } + }, + copyProgress: { + serializedName: "CopyProgress", + xmlName: "CopyProgress", + type: { name: "String" } + }, + copyCompletedOn: { + serializedName: "CopyCompletionTime", + xmlName: "CopyCompletionTime", + type: { name: "DateTimeRfc1123" } + }, + copyStatusDescription: { + serializedName: "CopyStatusDescription", + xmlName: "CopyStatusDescription", + type: { name: "String" } + }, + serverEncrypted: { + serializedName: "ServerEncrypted", + xmlName: "ServerEncrypted", + type: { name: "Boolean" } + }, + incrementalCopy: { + serializedName: "IncrementalCopy", + xmlName: "IncrementalCopy", + type: { name: "Boolean" } + }, + destinationSnapshot: { + serializedName: "DestinationSnapshot", + xmlName: "DestinationSnapshot", + type: { name: "String" } + }, + deletedOn: { + serializedName: "DeletedTime", + xmlName: "DeletedTime", + type: { name: "DateTimeRfc1123" } + }, + remainingRetentionDays: { + serializedName: "RemainingRetentionDays", + xmlName: "RemainingRetentionDays", + type: { name: "Number" } + }, + accessTier: { + serializedName: "AccessTier", + xmlName: "AccessTier", + type: { + name: "Enum", + allowedValues: [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold" + ] + } + }, + accessTierInferred: { + serializedName: "AccessTierInferred", + xmlName: "AccessTierInferred", + type: { name: "Boolean" } + }, + archiveStatus: { + serializedName: "ArchiveStatus", + xmlName: "ArchiveStatus", + type: { + name: "Enum", + allowedValues: [ + "rehydrate-pending-to-hot", + "rehydrate-pending-to-cool", + "rehydrate-pending-to-cold" + ] + } + }, + customerProvidedKeySha256: { + serializedName: "CustomerProvidedKeySha256", + xmlName: "CustomerProvidedKeySha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "EncryptionScope", + xmlName: "EncryptionScope", + type: { name: "String" } + }, + accessTierChangedOn: { + serializedName: "AccessTierChangeTime", + xmlName: "AccessTierChangeTime", + type: { name: "DateTimeRfc1123" } + }, + tagCount: { + serializedName: "TagCount", + xmlName: "TagCount", + type: { name: "Number" } + }, + expiresOn: { + serializedName: "Expiry-Time", + xmlName: "Expiry-Time", + type: { name: "DateTimeRfc1123" } + }, + isSealed: { + serializedName: "Sealed", + xmlName: "Sealed", + type: { name: "Boolean" } + }, + rehydratePriority: { + serializedName: "RehydratePriority", + xmlName: "RehydratePriority", + type: { + name: "Enum", + allowedValues: ["High", "Standard"] + } + }, + lastAccessedOn: { + serializedName: "LastAccessTime", + xmlName: "LastAccessTime", + type: { name: "DateTimeRfc1123" } + }, + immutabilityPolicyExpiresOn: { + serializedName: "ImmutabilityPolicyUntilDate", + xmlName: "ImmutabilityPolicyUntilDate", + type: { name: "DateTimeRfc1123" } + }, + immutabilityPolicyMode: { + serializedName: "ImmutabilityPolicyMode", + xmlName: "ImmutabilityPolicyMode", + type: { + name: "Enum", + allowedValues: [ + "Mutable", + "Unlocked", + "Locked" + ] + } + }, + legalHold: { + serializedName: "LegalHold", + xmlName: "LegalHold", + type: { name: "Boolean" } + } + } + } + }; + const ListBlobsHierarchySegmentResponse = { + serializedName: "ListBlobsHierarchySegmentResponse", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "ListBlobsHierarchySegmentResponse", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { name: "String" } + }, + containerName: { + serializedName: "ContainerName", + required: true, + xmlName: "ContainerName", + xmlIsAttribute: true, + type: { name: "String" } + }, + prefix: { + serializedName: "Prefix", + xmlName: "Prefix", + type: { name: "String" } + }, + marker: { + serializedName: "Marker", + xmlName: "Marker", + type: { name: "String" } + }, + maxPageSize: { + serializedName: "MaxResults", + xmlName: "MaxResults", + type: { name: "Number" } + }, + delimiter: { + serializedName: "Delimiter", + xmlName: "Delimiter", + type: { name: "String" } + }, + segment: { + serializedName: "Segment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobHierarchyListSegment" + } + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { name: "String" } + } + } + } + }; + const BlobHierarchyListSegment = { + serializedName: "BlobHierarchyListSegment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobHierarchyListSegment", + modelProperties: { + blobPrefixes: { + serializedName: "BlobPrefixes", + xmlName: "BlobPrefixes", + xmlElementName: "BlobPrefix", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "BlobPrefix" + } } + } + }, + blobItems: { + serializedName: "BlobItems", + required: true, + xmlName: "BlobItems", + xmlElementName: "Blob", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "BlobItemInternal" + } } + } + } + } + } + }; + const BlobPrefix = { + serializedName: "BlobPrefix", + type: { + name: "Composite", + className: "BlobPrefix", + modelProperties: { name: { + serializedName: "Name", + xmlName: "Name", + type: { + name: "Composite", + className: "BlobName" + } + } } + } + }; + const BlockLookupList = { + serializedName: "BlockLookupList", + xmlName: "BlockList", + type: { + name: "Composite", + className: "BlockLookupList", + modelProperties: { + committed: { + serializedName: "Committed", + xmlName: "Committed", + xmlElementName: "Committed", + type: { + name: "Sequence", + element: { type: { name: "String" } } + } + }, + uncommitted: { + serializedName: "Uncommitted", + xmlName: "Uncommitted", + xmlElementName: "Uncommitted", + type: { + name: "Sequence", + element: { type: { name: "String" } } + } + }, + latest: { + serializedName: "Latest", + xmlName: "Latest", + xmlElementName: "Latest", + type: { + name: "Sequence", + element: { type: { name: "String" } } + } + } + } + } + }; + const BlockList = { + serializedName: "BlockList", + type: { + name: "Composite", + className: "BlockList", + modelProperties: { + committedBlocks: { + serializedName: "CommittedBlocks", + xmlName: "CommittedBlocks", + xmlIsWrapped: true, + xmlElementName: "Block", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "Block" + } } + } + }, + uncommittedBlocks: { + serializedName: "UncommittedBlocks", + xmlName: "UncommittedBlocks", + xmlIsWrapped: true, + xmlElementName: "Block", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "Block" + } } + } + } + } + } + }; + const Block = { + serializedName: "Block", + type: { + name: "Composite", + className: "Block", + modelProperties: { + name: { + serializedName: "Name", + required: true, + xmlName: "Name", + type: { name: "String" } + }, + size: { + serializedName: "Size", + required: true, + xmlName: "Size", + type: { name: "Number" } + } + } + } + }; + const PageList = { + serializedName: "PageList", + type: { + name: "Composite", + className: "PageList", + modelProperties: { + pageRange: { + serializedName: "PageRange", + xmlName: "PageRange", + xmlElementName: "PageRange", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "PageRange" + } } + } + }, + clearRange: { + serializedName: "ClearRange", + xmlName: "ClearRange", + xmlElementName: "ClearRange", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "ClearRange" + } } + } + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { name: "String" } + } + } + } + }; + const PageRange = { + serializedName: "PageRange", + xmlName: "PageRange", + type: { + name: "Composite", + className: "PageRange", + modelProperties: { + start: { + serializedName: "Start", + required: true, + xmlName: "Start", + type: { name: "Number" } + }, + end: { + serializedName: "End", + required: true, + xmlName: "End", + type: { name: "Number" } + } + } + } + }; + const ClearRange = { + serializedName: "ClearRange", + xmlName: "ClearRange", + type: { + name: "Composite", + className: "ClearRange", + modelProperties: { + start: { + serializedName: "Start", + required: true, + xmlName: "Start", + type: { name: "Number" } + }, + end: { + serializedName: "End", + required: true, + xmlName: "End", + type: { name: "Number" } + } + } + } + }; + const QueryRequest = { + serializedName: "QueryRequest", + xmlName: "QueryRequest", + type: { + name: "Composite", + className: "QueryRequest", + modelProperties: { + queryType: { + serializedName: "QueryType", + required: true, + xmlName: "QueryType", + type: { name: "String" } + }, + expression: { + serializedName: "Expression", + required: true, + xmlName: "Expression", + type: { name: "String" } + }, + inputSerialization: { + serializedName: "InputSerialization", + xmlName: "InputSerialization", + type: { + name: "Composite", + className: "QuerySerialization" + } + }, + outputSerialization: { + serializedName: "OutputSerialization", + xmlName: "OutputSerialization", + type: { + name: "Composite", + className: "QuerySerialization" + } + } + } + } + }; + const QuerySerialization = { + serializedName: "QuerySerialization", + type: { + name: "Composite", + className: "QuerySerialization", + modelProperties: { format: { + serializedName: "Format", + xmlName: "Format", + type: { + name: "Composite", + className: "QueryFormat" + } + } } + } + }; + const QueryFormat = { + serializedName: "QueryFormat", + type: { + name: "Composite", + className: "QueryFormat", + modelProperties: { + type: { + serializedName: "Type", + required: true, + xmlName: "Type", + type: { + name: "Enum", + allowedValues: [ + "delimited", + "json", + "arrow", + "parquet" + ] + } + }, + delimitedTextConfiguration: { + serializedName: "DelimitedTextConfiguration", + xmlName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration" + } + }, + jsonTextConfiguration: { + serializedName: "JsonTextConfiguration", + xmlName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration" + } + }, + arrowConfiguration: { + serializedName: "ArrowConfiguration", + xmlName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration" + } + }, + parquetTextConfiguration: { + serializedName: "ParquetTextConfiguration", + xmlName: "ParquetTextConfiguration", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } + }; + const DelimitedTextConfiguration = { + serializedName: "DelimitedTextConfiguration", + xmlName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration", + modelProperties: { + columnSeparator: { + serializedName: "ColumnSeparator", + xmlName: "ColumnSeparator", + type: { name: "String" } + }, + fieldQuote: { + serializedName: "FieldQuote", + xmlName: "FieldQuote", + type: { name: "String" } + }, + recordSeparator: { + serializedName: "RecordSeparator", + xmlName: "RecordSeparator", + type: { name: "String" } + }, + escapeChar: { + serializedName: "EscapeChar", + xmlName: "EscapeChar", + type: { name: "String" } + }, + headersPresent: { + serializedName: "HeadersPresent", + xmlName: "HasHeaders", + type: { name: "Boolean" } + } + } + } + }; + const JsonTextConfiguration = { + serializedName: "JsonTextConfiguration", + xmlName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration", + modelProperties: { recordSeparator: { + serializedName: "RecordSeparator", + xmlName: "RecordSeparator", + type: { name: "String" } + } } + } + }; + const ArrowConfiguration = { + serializedName: "ArrowConfiguration", + xmlName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration", + modelProperties: { schema: { + serializedName: "Schema", + required: true, + xmlName: "Schema", + xmlIsWrapped: true, + xmlElementName: "Field", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "ArrowField" + } } + } + } } + } + }; + const ArrowField = { + serializedName: "ArrowField", + xmlName: "Field", + type: { + name: "Composite", + className: "ArrowField", + modelProperties: { + type: { + serializedName: "Type", + required: true, + xmlName: "Type", + type: { name: "String" } + }, + name: { + serializedName: "Name", + xmlName: "Name", + type: { name: "String" } + }, + precision: { + serializedName: "Precision", + xmlName: "Precision", + type: { name: "Number" } + }, + scale: { + serializedName: "Scale", + xmlName: "Scale", + type: { name: "Number" } + } + } + } + }; + const ServiceSetPropertiesHeaders = { + serializedName: "Service_setPropertiesHeaders", + type: { + name: "Composite", + className: "ServiceSetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ServiceSetPropertiesExceptionHeaders = { + serializedName: "Service_setPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "ServiceSetPropertiesExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ServiceGetPropertiesHeaders = { + serializedName: "Service_getPropertiesHeaders", + type: { + name: "Composite", + className: "ServiceGetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ServiceGetPropertiesExceptionHeaders = { + serializedName: "Service_getPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetPropertiesExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ServiceGetStatisticsHeaders = { + serializedName: "Service_getStatisticsHeaders", + type: { + name: "Composite", + className: "ServiceGetStatisticsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ServiceGetStatisticsExceptionHeaders = { + serializedName: "Service_getStatisticsExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetStatisticsExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ServiceListContainersSegmentHeaders = { + serializedName: "Service_listContainersSegmentHeaders", + type: { + name: "Composite", + className: "ServiceListContainersSegmentHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ServiceListContainersSegmentExceptionHeaders = { + serializedName: "Service_listContainersSegmentExceptionHeaders", + type: { + name: "Composite", + className: "ServiceListContainersSegmentExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ServiceGetUserDelegationKeyHeaders = { + serializedName: "Service_getUserDelegationKeyHeaders", + type: { + name: "Composite", + className: "ServiceGetUserDelegationKeyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ServiceGetUserDelegationKeyExceptionHeaders = { + serializedName: "Service_getUserDelegationKeyExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetUserDelegationKeyExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ServiceGetAccountInfoHeaders = { + serializedName: "Service_getAccountInfoHeaders", + type: { + name: "Composite", + className: "ServiceGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + skuName: { + serializedName: "x-ms-sku-name", + xmlName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + } + }, + accountKind: { + serializedName: "x-ms-account-kind", + xmlName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ] + } + }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + xmlName: "x-ms-is-hns-enabled", + type: { name: "Boolean" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ServiceGetAccountInfoExceptionHeaders = { + serializedName: "Service_getAccountInfoExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetAccountInfoExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ServiceSubmitBatchHeaders = { + serializedName: "Service_submitBatchHeaders", + type: { + name: "Composite", + className: "ServiceSubmitBatchHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ServiceSubmitBatchExceptionHeaders = { + serializedName: "Service_submitBatchExceptionHeaders", + type: { + name: "Composite", + className: "ServiceSubmitBatchExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ServiceFilterBlobsHeaders = { + serializedName: "Service_filterBlobsHeaders", + type: { + name: "Composite", + className: "ServiceFilterBlobsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ServiceFilterBlobsExceptionHeaders = { + serializedName: "Service_filterBlobsExceptionHeaders", + type: { + name: "Composite", + className: "ServiceFilterBlobsExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerCreateHeaders = { + serializedName: "Container_createHeaders", + type: { + name: "Composite", + className: "ContainerCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerCreateExceptionHeaders = { + serializedName: "Container_createExceptionHeaders", + type: { + name: "Composite", + className: "ContainerCreateExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerGetPropertiesHeaders = { + serializedName: "Container_getPropertiesHeaders", + type: { + name: "Composite", + className: "ContainerGetPropertiesHeaders", + modelProperties: { + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + xmlName: "x-ms-blob-public-access", + type: { + name: "Enum", + allowedValues: ["container", "blob"] + } + }, + hasImmutabilityPolicy: { + serializedName: "x-ms-has-immutability-policy", + xmlName: "x-ms-has-immutability-policy", + type: { name: "Boolean" } + }, + hasLegalHold: { + serializedName: "x-ms-has-legal-hold", + xmlName: "x-ms-has-legal-hold", + type: { name: "Boolean" } + }, + defaultEncryptionScope: { + serializedName: "x-ms-default-encryption-scope", + xmlName: "x-ms-default-encryption-scope", + type: { name: "String" } + }, + denyEncryptionScopeOverride: { + serializedName: "x-ms-deny-encryption-scope-override", + xmlName: "x-ms-deny-encryption-scope-override", + type: { name: "Boolean" } + }, + isImmutableStorageWithVersioningEnabled: { + serializedName: "x-ms-immutable-storage-with-versioning-enabled", + xmlName: "x-ms-immutable-storage-with-versioning-enabled", + type: { name: "Boolean" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerGetPropertiesExceptionHeaders = { + serializedName: "Container_getPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "ContainerGetPropertiesExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerDeleteHeaders = { + serializedName: "Container_deleteHeaders", + type: { + name: "Composite", + className: "ContainerDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerDeleteExceptionHeaders = { + serializedName: "Container_deleteExceptionHeaders", + type: { + name: "Composite", + className: "ContainerDeleteExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerSetMetadataHeaders = { + serializedName: "Container_setMetadataHeaders", + type: { + name: "Composite", + className: "ContainerSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerSetMetadataExceptionHeaders = { + serializedName: "Container_setMetadataExceptionHeaders", + type: { + name: "Composite", + className: "ContainerSetMetadataExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerGetAccessPolicyHeaders = { + serializedName: "Container_getAccessPolicyHeaders", + type: { + name: "Composite", + className: "ContainerGetAccessPolicyHeaders", + modelProperties: { + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + xmlName: "x-ms-blob-public-access", + type: { + name: "Enum", + allowedValues: ["container", "blob"] + } + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerGetAccessPolicyExceptionHeaders = { + serializedName: "Container_getAccessPolicyExceptionHeaders", + type: { + name: "Composite", + className: "ContainerGetAccessPolicyExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerSetAccessPolicyHeaders = { + serializedName: "Container_setAccessPolicyHeaders", + type: { + name: "Composite", + className: "ContainerSetAccessPolicyHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerSetAccessPolicyExceptionHeaders = { + serializedName: "Container_setAccessPolicyExceptionHeaders", + type: { + name: "Composite", + className: "ContainerSetAccessPolicyExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerRestoreHeaders = { + serializedName: "Container_restoreHeaders", + type: { + name: "Composite", + className: "ContainerRestoreHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerRestoreExceptionHeaders = { + serializedName: "Container_restoreExceptionHeaders", + type: { + name: "Composite", + className: "ContainerRestoreExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerRenameHeaders = { + serializedName: "Container_renameHeaders", + type: { + name: "Composite", + className: "ContainerRenameHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerRenameExceptionHeaders = { + serializedName: "Container_renameExceptionHeaders", + type: { + name: "Composite", + className: "ContainerRenameExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerSubmitBatchHeaders = { + serializedName: "Container_submitBatchHeaders", + type: { + name: "Composite", + className: "ContainerSubmitBatchHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + } + } + } + }; + const ContainerSubmitBatchExceptionHeaders = { + serializedName: "Container_submitBatchExceptionHeaders", + type: { + name: "Composite", + className: "ContainerSubmitBatchExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerFilterBlobsHeaders = { + serializedName: "Container_filterBlobsHeaders", + type: { + name: "Composite", + className: "ContainerFilterBlobsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const ContainerFilterBlobsExceptionHeaders = { + serializedName: "Container_filterBlobsExceptionHeaders", + type: { + name: "Composite", + className: "ContainerFilterBlobsExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerAcquireLeaseHeaders = { + serializedName: "Container_acquireLeaseHeaders", + type: { + name: "Composite", + className: "ContainerAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { name: "String" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const ContainerAcquireLeaseExceptionHeaders = { + serializedName: "Container_acquireLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerAcquireLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerReleaseLeaseHeaders = { + serializedName: "Container_releaseLeaseHeaders", + type: { + name: "Composite", + className: "ContainerReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const ContainerReleaseLeaseExceptionHeaders = { + serializedName: "Container_releaseLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerReleaseLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerRenewLeaseHeaders = { + serializedName: "Container_renewLeaseHeaders", + type: { + name: "Composite", + className: "ContainerRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { name: "String" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const ContainerRenewLeaseExceptionHeaders = { + serializedName: "Container_renewLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerRenewLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerBreakLeaseHeaders = { + serializedName: "Container_breakLeaseHeaders", + type: { + name: "Composite", + className: "ContainerBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + leaseTime: { + serializedName: "x-ms-lease-time", + xmlName: "x-ms-lease-time", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const ContainerBreakLeaseExceptionHeaders = { + serializedName: "Container_breakLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerBreakLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerChangeLeaseHeaders = { + serializedName: "Container_changeLeaseHeaders", + type: { + name: "Composite", + className: "ContainerChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { name: "String" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const ContainerChangeLeaseExceptionHeaders = { + serializedName: "Container_changeLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerChangeLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerListBlobFlatSegmentHeaders = { + serializedName: "Container_listBlobFlatSegmentHeaders", + type: { + name: "Composite", + className: "ContainerListBlobFlatSegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { name: "String" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerListBlobFlatSegmentExceptionHeaders = { + serializedName: "Container_listBlobFlatSegmentExceptionHeaders", + type: { + name: "Composite", + className: "ContainerListBlobFlatSegmentExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerListBlobHierarchySegmentHeaders = { + serializedName: "Container_listBlobHierarchySegmentHeaders", + type: { + name: "Composite", + className: "ContainerListBlobHierarchySegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { name: "String" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const ContainerListBlobHierarchySegmentExceptionHeaders = { + serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", + type: { + name: "Composite", + className: "ContainerListBlobHierarchySegmentExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const ContainerGetAccountInfoHeaders = { + serializedName: "Container_getAccountInfoHeaders", + type: { + name: "Composite", + className: "ContainerGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + skuName: { + serializedName: "x-ms-sku-name", + xmlName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + } + }, + accountKind: { + serializedName: "x-ms-account-kind", + xmlName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ] + } + }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + xmlName: "x-ms-is-hns-enabled", + type: { name: "Boolean" } + } + } + } + }; + const ContainerGetAccountInfoExceptionHeaders = { + serializedName: "Container_getAccountInfoExceptionHeaders", + type: { + name: "Composite", + className: "ContainerGetAccountInfoExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobDownloadHeaders = { + serializedName: "Blob_downloadHeaders", + type: { + name: "Composite", + className: "BlobDownloadHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + createdOn: { + serializedName: "x-ms-creation-time", + xmlName: "x-ms-creation-time", + type: { name: "DateTimeRfc1123" } + }, + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + xmlName: "x-ms-or-policy-id", + type: { name: "String" } + }, + objectReplicationRules: { + serializedName: "x-ms-or", + headerCollectionPrefix: "x-ms-or-", + xmlName: "x-ms-or", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + contentLength: { + serializedName: "content-length", + xmlName: "content-length", + type: { name: "Number" } + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { name: "String" } + }, + contentRange: { + serializedName: "content-range", + xmlName: "content-range", + type: { name: "String" } + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + contentEncoding: { + serializedName: "content-encoding", + xmlName: "content-encoding", + type: { name: "String" } + }, + cacheControl: { + serializedName: "cache-control", + xmlName: "cache-control", + type: { name: "String" } + }, + contentDisposition: { + serializedName: "content-disposition", + xmlName: "content-disposition", + type: { name: "String" } + }, + contentLanguage: { + serializedName: "content-language", + xmlName: "content-language", + type: { name: "String" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + blobType: { + serializedName: "x-ms-blob-type", + xmlName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + xmlName: "x-ms-copy-completion-time", + type: { name: "DateTimeRfc1123" } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + xmlName: "x-ms-copy-status-description", + type: { name: "String" } + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { name: "String" } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + xmlName: "x-ms-copy-progress", + type: { name: "String" } + }, + copySource: { + serializedName: "x-ms-copy-source", + xmlName: "x-ms-copy-source", + type: { name: "String" } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + isCurrentVersion: { + serializedName: "x-ms-is-current-version", + xmlName: "x-ms-is-current-version", + type: { name: "Boolean" } + }, + acceptRanges: { + serializedName: "accept-ranges", + xmlName: "accept-ranges", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { name: "Number" } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + xmlName: "x-ms-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + xmlName: "x-ms-blob-content-md5", + type: { name: "ByteArray" } + }, + tagCount: { + serializedName: "x-ms-tag-count", + xmlName: "x-ms-tag-count", + type: { name: "Number" } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + xmlName: "x-ms-blob-sealed", + type: { name: "Boolean" } + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + xmlName: "x-ms-last-access-time", + type: { name: "DateTimeRfc1123" } + }, + immutabilityPolicyExpiresOn: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { name: "DateTimeRfc1123" } + }, + immutabilityPolicyMode: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: [ + "Mutable", + "Unlocked", + "Locked" + ] + } + }, + legalHold: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { name: "Boolean" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + } + } + } + }; + const BlobDownloadExceptionHeaders = { + serializedName: "Blob_downloadExceptionHeaders", + type: { + name: "Composite", + className: "BlobDownloadExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobGetPropertiesHeaders = { + serializedName: "Blob_getPropertiesHeaders", + type: { + name: "Composite", + className: "BlobGetPropertiesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + createdOn: { + serializedName: "x-ms-creation-time", + xmlName: "x-ms-creation-time", + type: { name: "DateTimeRfc1123" } + }, + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + xmlName: "x-ms-or-policy-id", + type: { name: "String" } + }, + objectReplicationRules: { + serializedName: "x-ms-or", + headerCollectionPrefix: "x-ms-or-", + xmlName: "x-ms-or", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + blobType: { + serializedName: "x-ms-blob-type", + xmlName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + xmlName: "x-ms-copy-completion-time", + type: { name: "DateTimeRfc1123" } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + xmlName: "x-ms-copy-status-description", + type: { name: "String" } + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { name: "String" } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + xmlName: "x-ms-copy-progress", + type: { name: "String" } + }, + copySource: { + serializedName: "x-ms-copy-source", + xmlName: "x-ms-copy-source", + type: { name: "String" } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + isIncrementalCopy: { + serializedName: "x-ms-incremental-copy", + xmlName: "x-ms-incremental-copy", + type: { name: "Boolean" } + }, + destinationSnapshot: { + serializedName: "x-ms-copy-destination-snapshot", + xmlName: "x-ms-copy-destination-snapshot", + type: { name: "String" } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"] + } + }, + contentLength: { + serializedName: "content-length", + xmlName: "content-length", + type: { name: "Number" } + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { name: "String" } + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + contentEncoding: { + serializedName: "content-encoding", + xmlName: "content-encoding", + type: { name: "String" } + }, + contentDisposition: { + serializedName: "content-disposition", + xmlName: "content-disposition", + type: { name: "String" } + }, + contentLanguage: { + serializedName: "content-language", + xmlName: "content-language", + type: { name: "String" } + }, + cacheControl: { + serializedName: "cache-control", + xmlName: "cache-control", + type: { name: "String" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + acceptRanges: { + serializedName: "accept-ranges", + xmlName: "accept-ranges", + type: { name: "String" } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { name: "Number" } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + xmlName: "x-ms-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + accessTier: { + serializedName: "x-ms-access-tier", + xmlName: "x-ms-access-tier", + type: { name: "String" } + }, + accessTierInferred: { + serializedName: "x-ms-access-tier-inferred", + xmlName: "x-ms-access-tier-inferred", + type: { name: "Boolean" } + }, + archiveStatus: { + serializedName: "x-ms-archive-status", + xmlName: "x-ms-archive-status", + type: { name: "String" } + }, + accessTierChangedOn: { + serializedName: "x-ms-access-tier-change-time", + xmlName: "x-ms-access-tier-change-time", + type: { name: "DateTimeRfc1123" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + isCurrentVersion: { + serializedName: "x-ms-is-current-version", + xmlName: "x-ms-is-current-version", + type: { name: "Boolean" } + }, + tagCount: { + serializedName: "x-ms-tag-count", + xmlName: "x-ms-tag-count", + type: { name: "Number" } + }, + expiresOn: { + serializedName: "x-ms-expiry-time", + xmlName: "x-ms-expiry-time", + type: { name: "DateTimeRfc1123" } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + xmlName: "x-ms-blob-sealed", + type: { name: "Boolean" } + }, + rehydratePriority: { + serializedName: "x-ms-rehydrate-priority", + xmlName: "x-ms-rehydrate-priority", + type: { + name: "Enum", + allowedValues: ["High", "Standard"] + } + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + xmlName: "x-ms-last-access-time", + type: { name: "DateTimeRfc1123" } + }, + immutabilityPolicyExpiresOn: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { name: "DateTimeRfc1123" } + }, + immutabilityPolicyMode: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: [ + "Mutable", + "Unlocked", + "Locked" + ] + } + }, + legalHold: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { name: "Boolean" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobGetPropertiesExceptionHeaders = { + serializedName: "Blob_getPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "BlobGetPropertiesExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobDeleteHeaders = { + serializedName: "Blob_deleteHeaders", + type: { + name: "Composite", + className: "BlobDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobDeleteExceptionHeaders = { + serializedName: "Blob_deleteExceptionHeaders", + type: { + name: "Composite", + className: "BlobDeleteExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobUndeleteHeaders = { + serializedName: "Blob_undeleteHeaders", + type: { + name: "Composite", + className: "BlobUndeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobUndeleteExceptionHeaders = { + serializedName: "Blob_undeleteExceptionHeaders", + type: { + name: "Composite", + className: "BlobUndeleteExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobSetExpiryHeaders = { + serializedName: "Blob_setExpiryHeaders", + type: { + name: "Composite", + className: "BlobSetExpiryHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const BlobSetExpiryExceptionHeaders = { + serializedName: "Blob_setExpiryExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetExpiryExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobSetHttpHeadersHeaders = { + serializedName: "Blob_setHttpHeadersHeaders", + type: { + name: "Composite", + className: "BlobSetHttpHeadersHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobSetHttpHeadersExceptionHeaders = { + serializedName: "Blob_setHttpHeadersExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetHttpHeadersExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobSetImmutabilityPolicyHeaders = { + serializedName: "Blob_setImmutabilityPolicyHeaders", + type: { + name: "Composite", + className: "BlobSetImmutabilityPolicyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + immutabilityPolicyExpiry: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { name: "DateTimeRfc1123" } + }, + immutabilityPolicyMode: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: [ + "Mutable", + "Unlocked", + "Locked" + ] + } + } + } + } + }; + const BlobSetImmutabilityPolicyExceptionHeaders = { + serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetImmutabilityPolicyExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobDeleteImmutabilityPolicyHeaders = { + serializedName: "Blob_deleteImmutabilityPolicyHeaders", + type: { + name: "Composite", + className: "BlobDeleteImmutabilityPolicyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const BlobDeleteImmutabilityPolicyExceptionHeaders = { + serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", + type: { + name: "Composite", + className: "BlobDeleteImmutabilityPolicyExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobSetLegalHoldHeaders = { + serializedName: "Blob_setLegalHoldHeaders", + type: { + name: "Composite", + className: "BlobSetLegalHoldHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + legalHold: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { name: "Boolean" } + } + } + } + }; + const BlobSetLegalHoldExceptionHeaders = { + serializedName: "Blob_setLegalHoldExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetLegalHoldExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobSetMetadataHeaders = { + serializedName: "Blob_setMetadataHeaders", + type: { + name: "Composite", + className: "BlobSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobSetMetadataExceptionHeaders = { + serializedName: "Blob_setMetadataExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetMetadataExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobAcquireLeaseHeaders = { + serializedName: "Blob_acquireLeaseHeaders", + type: { + name: "Composite", + className: "BlobAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { name: "String" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const BlobAcquireLeaseExceptionHeaders = { + serializedName: "Blob_acquireLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobAcquireLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobReleaseLeaseHeaders = { + serializedName: "Blob_releaseLeaseHeaders", + type: { + name: "Composite", + className: "BlobReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const BlobReleaseLeaseExceptionHeaders = { + serializedName: "Blob_releaseLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobReleaseLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobRenewLeaseHeaders = { + serializedName: "Blob_renewLeaseHeaders", + type: { + name: "Composite", + className: "BlobRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { name: "String" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const BlobRenewLeaseExceptionHeaders = { + serializedName: "Blob_renewLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobRenewLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobChangeLeaseHeaders = { + serializedName: "Blob_changeLeaseHeaders", + type: { + name: "Composite", + className: "BlobChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const BlobChangeLeaseExceptionHeaders = { + serializedName: "Blob_changeLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobChangeLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobBreakLeaseHeaders = { + serializedName: "Blob_breakLeaseHeaders", + type: { + name: "Composite", + className: "BlobBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + leaseTime: { + serializedName: "x-ms-lease-time", + xmlName: "x-ms-lease-time", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + } + } + } + }; + const BlobBreakLeaseExceptionHeaders = { + serializedName: "Blob_breakLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobBreakLeaseExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobCreateSnapshotHeaders = { + serializedName: "Blob_createSnapshotHeaders", + type: { + name: "Composite", + className: "BlobCreateSnapshotHeaders", + modelProperties: { + snapshot: { + serializedName: "x-ms-snapshot", + xmlName: "x-ms-snapshot", + type: { name: "String" } + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobCreateSnapshotExceptionHeaders = { + serializedName: "Blob_createSnapshotExceptionHeaders", + type: { + name: "Composite", + className: "BlobCreateSnapshotExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobStartCopyFromURLHeaders = { + serializedName: "Blob_startCopyFromURLHeaders", + type: { + name: "Composite", + className: "BlobStartCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { name: "String" } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobStartCopyFromURLExceptionHeaders = { + serializedName: "Blob_startCopyFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlobStartCopyFromURLExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobCopyFromURLHeaders = { + serializedName: "Blob_copyFromURLHeaders", + type: { + name: "Composite", + className: "BlobCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { name: "String" } + }, + copyStatus: { + defaultValue: "success", + isConstant: true, + serializedName: "x-ms-copy-status", + type: { name: "String" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobCopyFromURLExceptionHeaders = { + serializedName: "Blob_copyFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlobCopyFromURLExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobAbortCopyFromURLHeaders = { + serializedName: "Blob_abortCopyFromURLHeaders", + type: { + name: "Composite", + className: "BlobAbortCopyFromURLHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobAbortCopyFromURLExceptionHeaders = { + serializedName: "Blob_abortCopyFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlobAbortCopyFromURLExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobSetTierHeaders = { + serializedName: "Blob_setTierHeaders", + type: { + name: "Composite", + className: "BlobSetTierHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobSetTierExceptionHeaders = { + serializedName: "Blob_setTierExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetTierExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobGetAccountInfoHeaders = { + serializedName: "Blob_getAccountInfoHeaders", + type: { + name: "Composite", + className: "BlobGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + skuName: { + serializedName: "x-ms-sku-name", + xmlName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + } + }, + accountKind: { + serializedName: "x-ms-account-kind", + xmlName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ] + } + }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + xmlName: "x-ms-is-hns-enabled", + type: { name: "Boolean" } + } + } + } + }; + const BlobGetAccountInfoExceptionHeaders = { + serializedName: "Blob_getAccountInfoExceptionHeaders", + type: { + name: "Composite", + className: "BlobGetAccountInfoExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobQueryHeaders = { + serializedName: "Blob_queryHeaders", + type: { + name: "Composite", + className: "BlobQueryHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + contentLength: { + serializedName: "content-length", + xmlName: "content-length", + type: { name: "Number" } + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { name: "String" } + }, + contentRange: { + serializedName: "content-range", + xmlName: "content-range", + type: { name: "String" } + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + contentEncoding: { + serializedName: "content-encoding", + xmlName: "content-encoding", + type: { name: "String" } + }, + cacheControl: { + serializedName: "cache-control", + xmlName: "cache-control", + type: { name: "String" } + }, + contentDisposition: { + serializedName: "content-disposition", + xmlName: "content-disposition", + type: { name: "String" } + }, + contentLanguage: { + serializedName: "content-language", + xmlName: "content-language", + type: { name: "String" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + blobType: { + serializedName: "x-ms-blob-type", + xmlName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletionTime: { + serializedName: "x-ms-copy-completion-time", + xmlName: "x-ms-copy-completion-time", + type: { name: "DateTimeRfc1123" } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + xmlName: "x-ms-copy-status-description", + type: { name: "String" } + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { name: "String" } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + xmlName: "x-ms-copy-progress", + type: { name: "String" } + }, + copySource: { + serializedName: "x-ms-copy-source", + xmlName: "x-ms-copy-source", + type: { name: "String" } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + acceptRanges: { + serializedName: "accept-ranges", + xmlName: "accept-ranges", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { name: "Number" } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + xmlName: "x-ms-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + xmlName: "x-ms-blob-content-md5", + type: { name: "ByteArray" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + } + } + } + }; + const BlobQueryExceptionHeaders = { + serializedName: "Blob_queryExceptionHeaders", + type: { + name: "Composite", + className: "BlobQueryExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobGetTagsHeaders = { + serializedName: "Blob_getTagsHeaders", + type: { + name: "Composite", + className: "BlobGetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobGetTagsExceptionHeaders = { + serializedName: "Blob_getTagsExceptionHeaders", + type: { + name: "Composite", + className: "BlobGetTagsExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlobSetTagsHeaders = { + serializedName: "Blob_setTagsHeaders", + type: { + name: "Composite", + className: "BlobSetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlobSetTagsExceptionHeaders = { + serializedName: "Blob_setTagsExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetTagsExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const PageBlobCreateHeaders = { + serializedName: "PageBlob_createHeaders", + type: { + name: "Composite", + className: "PageBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const PageBlobCreateExceptionHeaders = { + serializedName: "PageBlob_createExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobCreateExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const PageBlobUploadPagesHeaders = { + serializedName: "PageBlob_uploadPagesHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const PageBlobUploadPagesExceptionHeaders = { + serializedName: "PageBlob_uploadPagesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const PageBlobClearPagesHeaders = { + serializedName: "PageBlob_clearPagesHeaders", + type: { + name: "Composite", + className: "PageBlobClearPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const PageBlobClearPagesExceptionHeaders = { + serializedName: "PageBlob_clearPagesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobClearPagesExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const PageBlobUploadPagesFromURLHeaders = { + serializedName: "PageBlob_uploadPagesFromURLHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const PageBlobUploadPagesFromURLExceptionHeaders = { + serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const PageBlobGetPageRangesHeaders = { + serializedName: "PageBlob_getPageRangesHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + xmlName: "x-ms-blob-content-length", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const PageBlobGetPageRangesExceptionHeaders = { + serializedName: "PageBlob_getPageRangesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const PageBlobGetPageRangesDiffHeaders = { + serializedName: "PageBlob_getPageRangesDiffHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesDiffHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + xmlName: "x-ms-blob-content-length", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const PageBlobGetPageRangesDiffExceptionHeaders = { + serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesDiffExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const PageBlobResizeHeaders = { + serializedName: "PageBlob_resizeHeaders", + type: { + name: "Composite", + className: "PageBlobResizeHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const PageBlobResizeExceptionHeaders = { + serializedName: "PageBlob_resizeExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobResizeExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const PageBlobUpdateSequenceNumberHeaders = { + serializedName: "PageBlob_updateSequenceNumberHeaders", + type: { + name: "Composite", + className: "PageBlobUpdateSequenceNumberHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const PageBlobUpdateSequenceNumberExceptionHeaders = { + serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUpdateSequenceNumberExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const PageBlobCopyIncrementalHeaders = { + serializedName: "PageBlob_copyIncrementalHeaders", + type: { + name: "Composite", + className: "PageBlobCopyIncrementalHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { name: "String" } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const PageBlobCopyIncrementalExceptionHeaders = { + serializedName: "PageBlob_copyIncrementalExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobCopyIncrementalExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const AppendBlobCreateHeaders = { + serializedName: "AppendBlob_createHeaders", + type: { + name: "Composite", + className: "AppendBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const AppendBlobCreateExceptionHeaders = { + serializedName: "AppendBlob_createExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobCreateExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const AppendBlobAppendBlockHeaders = { + serializedName: "AppendBlob_appendBlockHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + xmlName: "x-ms-blob-append-offset", + type: { name: "String" } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { name: "Number" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const AppendBlobAppendBlockExceptionHeaders = { + serializedName: "AppendBlob_appendBlockExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const AppendBlobAppendBlockFromUrlHeaders = { + serializedName: "AppendBlob_appendBlockFromUrlHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockFromUrlHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + xmlName: "x-ms-blob-append-offset", + type: { name: "String" } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { name: "Number" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const AppendBlobAppendBlockFromUrlExceptionHeaders = { + serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockFromUrlExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const AppendBlobSealHeaders = { + serializedName: "AppendBlob_sealHeaders", + type: { + name: "Composite", + className: "AppendBlobSealHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + xmlName: "x-ms-blob-sealed", + type: { name: "Boolean" } + } + } + } + }; + const AppendBlobSealExceptionHeaders = { + serializedName: "AppendBlob_sealExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobSealExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlockBlobUploadHeaders = { + serializedName: "BlockBlob_uploadHeaders", + type: { + name: "Composite", + className: "BlockBlobUploadHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlockBlobUploadExceptionHeaders = { + serializedName: "BlockBlob_uploadExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobUploadExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlockBlobPutBlobFromUrlHeaders = { + serializedName: "BlockBlob_putBlobFromUrlHeaders", + type: { + name: "Composite", + className: "BlockBlobPutBlobFromUrlHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlockBlobPutBlobFromUrlExceptionHeaders = { + serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobPutBlobFromUrlExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlockBlobStageBlockHeaders = { + serializedName: "BlockBlob_stageBlockHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlockBlobStageBlockExceptionHeaders = { + serializedName: "BlockBlob_stageBlockExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlockBlobStageBlockFromURLHeaders = { + serializedName: "BlockBlob_stageBlockFromURLHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockFromURLHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlockBlobStageBlockFromURLExceptionHeaders = { + serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockFromURLExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlockBlobCommitBlockListHeaders = { + serializedName: "BlockBlob_commitBlockListHeaders", + type: { + name: "Composite", + className: "BlockBlobCommitBlockListHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { name: "ByteArray" } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { name: "Boolean" } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlockBlobCommitBlockListExceptionHeaders = { + serializedName: "BlockBlob_commitBlockListExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobCommitBlockListExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + const BlockBlobGetBlockListHeaders = { + serializedName: "BlockBlob_getBlockListHeaders", + type: { + name: "Composite", + className: "BlockBlobGetBlockListHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { name: "DateTimeRfc1123" } + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { name: "String" } + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { name: "String" } + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + xmlName: "x-ms-blob-content-length", + type: { name: "Number" } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { name: "String" } + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { name: "String" } + }, + date: { + serializedName: "date", + xmlName: "date", + type: { name: "DateTimeRfc1123" } + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } + } + } + }; + const BlockBlobGetBlockListExceptionHeaders = { + serializedName: "BlockBlob_getBlockListExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobGetBlockListExceptionHeaders", + modelProperties: { errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { name: "String" } + } } + } + }; + var Mappers = /* @__PURE__ */ Object.freeze({ + __proto__: null, + AccessPolicy, + AppendBlobAppendBlockExceptionHeaders, + AppendBlobAppendBlockFromUrlExceptionHeaders, + AppendBlobAppendBlockFromUrlHeaders, + AppendBlobAppendBlockHeaders, + AppendBlobCreateExceptionHeaders, + AppendBlobCreateHeaders, + AppendBlobSealExceptionHeaders, + AppendBlobSealHeaders, + ArrowConfiguration, + ArrowField, + BlobAbortCopyFromURLExceptionHeaders, + BlobAbortCopyFromURLHeaders, + BlobAcquireLeaseExceptionHeaders, + BlobAcquireLeaseHeaders, + BlobBreakLeaseExceptionHeaders, + BlobBreakLeaseHeaders, + BlobChangeLeaseExceptionHeaders, + BlobChangeLeaseHeaders, + BlobCopyFromURLExceptionHeaders, + BlobCopyFromURLHeaders, + BlobCreateSnapshotExceptionHeaders, + BlobCreateSnapshotHeaders, + BlobDeleteExceptionHeaders, + BlobDeleteHeaders, + BlobDeleteImmutabilityPolicyExceptionHeaders, + BlobDeleteImmutabilityPolicyHeaders, + BlobDownloadExceptionHeaders, + BlobDownloadHeaders, + BlobFlatListSegment, + BlobGetAccountInfoExceptionHeaders, + BlobGetAccountInfoHeaders, + BlobGetPropertiesExceptionHeaders, + BlobGetPropertiesHeaders, + BlobGetTagsExceptionHeaders, + BlobGetTagsHeaders, + BlobHierarchyListSegment, + BlobItemInternal, + BlobName, + BlobPrefix, + BlobPropertiesInternal, + BlobQueryExceptionHeaders, + BlobQueryHeaders, + BlobReleaseLeaseExceptionHeaders, + BlobReleaseLeaseHeaders, + BlobRenewLeaseExceptionHeaders, + BlobRenewLeaseHeaders, + BlobServiceProperties, + BlobServiceStatistics, + BlobSetExpiryExceptionHeaders, + BlobSetExpiryHeaders, + BlobSetHttpHeadersExceptionHeaders, + BlobSetHttpHeadersHeaders, + BlobSetImmutabilityPolicyExceptionHeaders, + BlobSetImmutabilityPolicyHeaders, + BlobSetLegalHoldExceptionHeaders, + BlobSetLegalHoldHeaders, + BlobSetMetadataExceptionHeaders, + BlobSetMetadataHeaders, + BlobSetTagsExceptionHeaders, + BlobSetTagsHeaders, + BlobSetTierExceptionHeaders, + BlobSetTierHeaders, + BlobStartCopyFromURLExceptionHeaders, + BlobStartCopyFromURLHeaders, + BlobTag, + BlobTags, + BlobUndeleteExceptionHeaders, + BlobUndeleteHeaders, + Block, + BlockBlobCommitBlockListExceptionHeaders, + BlockBlobCommitBlockListHeaders, + BlockBlobGetBlockListExceptionHeaders, + BlockBlobGetBlockListHeaders, + BlockBlobPutBlobFromUrlExceptionHeaders, + BlockBlobPutBlobFromUrlHeaders, + BlockBlobStageBlockExceptionHeaders, + BlockBlobStageBlockFromURLExceptionHeaders, + BlockBlobStageBlockFromURLHeaders, + BlockBlobStageBlockHeaders, + BlockBlobUploadExceptionHeaders, + BlockBlobUploadHeaders, + BlockList, + BlockLookupList, + ClearRange, + ContainerAcquireLeaseExceptionHeaders, + ContainerAcquireLeaseHeaders, + ContainerBreakLeaseExceptionHeaders, + ContainerBreakLeaseHeaders, + ContainerChangeLeaseExceptionHeaders, + ContainerChangeLeaseHeaders, + ContainerCreateExceptionHeaders, + ContainerCreateHeaders, + ContainerDeleteExceptionHeaders, + ContainerDeleteHeaders, + ContainerFilterBlobsExceptionHeaders, + ContainerFilterBlobsHeaders, + ContainerGetAccessPolicyExceptionHeaders, + ContainerGetAccessPolicyHeaders, + ContainerGetAccountInfoExceptionHeaders, + ContainerGetAccountInfoHeaders, + ContainerGetPropertiesExceptionHeaders, + ContainerGetPropertiesHeaders, + ContainerItem, + ContainerListBlobFlatSegmentExceptionHeaders, + ContainerListBlobFlatSegmentHeaders, + ContainerListBlobHierarchySegmentExceptionHeaders, + ContainerListBlobHierarchySegmentHeaders, + ContainerProperties, + ContainerReleaseLeaseExceptionHeaders, + ContainerReleaseLeaseHeaders, + ContainerRenameExceptionHeaders, + ContainerRenameHeaders, + ContainerRenewLeaseExceptionHeaders, + ContainerRenewLeaseHeaders, + ContainerRestoreExceptionHeaders, + ContainerRestoreHeaders, + ContainerSetAccessPolicyExceptionHeaders, + ContainerSetAccessPolicyHeaders, + ContainerSetMetadataExceptionHeaders, + ContainerSetMetadataHeaders, + ContainerSubmitBatchExceptionHeaders, + ContainerSubmitBatchHeaders, + CorsRule, + DelimitedTextConfiguration, + FilterBlobItem, + FilterBlobSegment, + GeoReplication, + JsonTextConfiguration, + KeyInfo, + ListBlobsFlatSegmentResponse, + ListBlobsHierarchySegmentResponse, + ListContainersSegmentResponse, + Logging, + Metrics, + PageBlobClearPagesExceptionHeaders, + PageBlobClearPagesHeaders, + PageBlobCopyIncrementalExceptionHeaders, + PageBlobCopyIncrementalHeaders, + PageBlobCreateExceptionHeaders, + PageBlobCreateHeaders, + PageBlobGetPageRangesDiffExceptionHeaders, + PageBlobGetPageRangesDiffHeaders, + PageBlobGetPageRangesExceptionHeaders, + PageBlobGetPageRangesHeaders, + PageBlobResizeExceptionHeaders, + PageBlobResizeHeaders, + PageBlobUpdateSequenceNumberExceptionHeaders, + PageBlobUpdateSequenceNumberHeaders, + PageBlobUploadPagesExceptionHeaders, + PageBlobUploadPagesFromURLExceptionHeaders, + PageBlobUploadPagesFromURLHeaders, + PageBlobUploadPagesHeaders, + PageList, + PageRange, + QueryFormat, + QueryRequest, + QuerySerialization, + RetentionPolicy, + ServiceFilterBlobsExceptionHeaders, + ServiceFilterBlobsHeaders, + ServiceGetAccountInfoExceptionHeaders, + ServiceGetAccountInfoHeaders, + ServiceGetPropertiesExceptionHeaders, + ServiceGetPropertiesHeaders, + ServiceGetStatisticsExceptionHeaders, + ServiceGetStatisticsHeaders, + ServiceGetUserDelegationKeyExceptionHeaders, + ServiceGetUserDelegationKeyHeaders, + ServiceListContainersSegmentExceptionHeaders, + ServiceListContainersSegmentHeaders, + ServiceSetPropertiesExceptionHeaders, + ServiceSetPropertiesHeaders, + ServiceSubmitBatchExceptionHeaders, + ServiceSubmitBatchHeaders, + SignedIdentifier, + StaticWebsite, + StorageError, + UserDelegationKey + }); + const contentType = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Content-Type", + type: { name: "String" } + } + }; + const blobServiceProperties = { + parameterPath: "blobServiceProperties", + mapper: BlobServiceProperties + }; + const accept = { + parameterPath: "accept", + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Accept", + type: { name: "String" } + } + }; + const url = { + parameterPath: "url", + mapper: { + serializedName: "url", + required: true, + xmlName: "url", + type: { name: "String" } + }, + skipEncoding: true + }; + const restype = { + parameterPath: "restype", + mapper: { + defaultValue: "service", + isConstant: true, + serializedName: "restype", + type: { name: "String" } + } + }; + const comp = { + parameterPath: "comp", + mapper: { + defaultValue: "properties", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const timeoutInSeconds = { + parameterPath: ["options", "timeoutInSeconds"], + mapper: { + constraints: { InclusiveMinimum: 0 }, + serializedName: "timeout", + xmlName: "timeout", + type: { name: "Number" } + } + }; + const version = { + parameterPath: "version", + mapper: { + defaultValue: "2025-05-05", + isConstant: true, + serializedName: "x-ms-version", + type: { name: "String" } + } + }; + const requestId = { + parameterPath: ["options", "requestId"], + mapper: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { name: "String" } + } + }; + const accept1 = { + parameterPath: "accept", + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Accept", + type: { name: "String" } + } + }; + const comp1 = { + parameterPath: "comp", + mapper: { + defaultValue: "stats", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const comp2 = { + parameterPath: "comp", + mapper: { + defaultValue: "list", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const prefix = { + parameterPath: ["options", "prefix"], + mapper: { + serializedName: "prefix", + xmlName: "prefix", + type: { name: "String" } + } + }; + const marker = { + parameterPath: ["options", "marker"], + mapper: { + serializedName: "marker", + xmlName: "marker", + type: { name: "String" } + } + }; + const maxPageSize = { + parameterPath: ["options", "maxPageSize"], + mapper: { + constraints: { InclusiveMinimum: 1 }, + serializedName: "maxresults", + xmlName: "maxresults", + type: { name: "Number" } + } + }; + const include = { + parameterPath: ["options", "include"], + mapper: { + serializedName: "include", + xmlName: "include", + xmlElementName: "ListContainersIncludeType", + type: { + name: "Sequence", + element: { type: { + name: "Enum", + allowedValues: [ + "metadata", + "deleted", + "system" + ] + } } + } + }, + collectionFormat: "CSV" + }; + const keyInfo = { + parameterPath: "keyInfo", + mapper: KeyInfo + }; + const comp3 = { + parameterPath: "comp", + mapper: { + defaultValue: "userdelegationkey", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const restype1 = { + parameterPath: "restype", + mapper: { + defaultValue: "account", + isConstant: true, + serializedName: "restype", + type: { name: "String" } + } + }; + const body = { + parameterPath: "body", + mapper: { + serializedName: "body", + required: true, + xmlName: "body", + type: { name: "Stream" } + } + }; + const comp4 = { + parameterPath: "comp", + mapper: { + defaultValue: "batch", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const contentLength = { + parameterPath: "contentLength", + mapper: { + serializedName: "Content-Length", + required: true, + xmlName: "Content-Length", + type: { name: "Number" } + } + }; + const multipartContentType = { + parameterPath: "multipartContentType", + mapper: { + serializedName: "Content-Type", + required: true, + xmlName: "Content-Type", + type: { name: "String" } + } + }; + const comp5 = { + parameterPath: "comp", + mapper: { + defaultValue: "blobs", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const where = { + parameterPath: ["options", "where"], + mapper: { + serializedName: "where", + xmlName: "where", + type: { name: "String" } + } + }; + const restype2 = { + parameterPath: "restype", + mapper: { + defaultValue: "container", + isConstant: true, + serializedName: "restype", + type: { name: "String" } + } + }; + const metadata = { + parameterPath: ["options", "metadata"], + mapper: { + serializedName: "x-ms-meta", + xmlName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + }; + const access = { + parameterPath: ["options", "access"], + mapper: { + serializedName: "x-ms-blob-public-access", + xmlName: "x-ms-blob-public-access", + type: { + name: "Enum", + allowedValues: ["container", "blob"] + } + } + }; + const defaultEncryptionScope = { + parameterPath: [ + "options", + "containerEncryptionScope", + "defaultEncryptionScope" + ], + mapper: { + serializedName: "x-ms-default-encryption-scope", + xmlName: "x-ms-default-encryption-scope", + type: { name: "String" } + } + }; + const preventEncryptionScopeOverride = { + parameterPath: [ + "options", + "containerEncryptionScope", + "preventEncryptionScopeOverride" + ], + mapper: { + serializedName: "x-ms-deny-encryption-scope-override", + xmlName: "x-ms-deny-encryption-scope-override", + type: { name: "Boolean" } + } + }; + const leaseId = { + parameterPath: [ + "options", + "leaseAccessConditions", + "leaseId" + ], + mapper: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { name: "String" } + } + }; + const ifModifiedSince = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifModifiedSince" + ], + mapper: { + serializedName: "If-Modified-Since", + xmlName: "If-Modified-Since", + type: { name: "DateTimeRfc1123" } + } + }; + const ifUnmodifiedSince = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifUnmodifiedSince" + ], + mapper: { + serializedName: "If-Unmodified-Since", + xmlName: "If-Unmodified-Since", + type: { name: "DateTimeRfc1123" } + } + }; + const comp6 = { + parameterPath: "comp", + mapper: { + defaultValue: "metadata", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const comp7 = { + parameterPath: "comp", + mapper: { + defaultValue: "acl", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const containerAcl = { + parameterPath: ["options", "containerAcl"], + mapper: { + serializedName: "containerAcl", + xmlName: "SignedIdentifiers", + xmlIsWrapped: true, + xmlElementName: "SignedIdentifier", + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "SignedIdentifier" + } } + } + } + }; + const comp8 = { + parameterPath: "comp", + mapper: { + defaultValue: "undelete", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const deletedContainerName = { + parameterPath: ["options", "deletedContainerName"], + mapper: { + serializedName: "x-ms-deleted-container-name", + xmlName: "x-ms-deleted-container-name", + type: { name: "String" } + } + }; + const deletedContainerVersion = { + parameterPath: ["options", "deletedContainerVersion"], + mapper: { + serializedName: "x-ms-deleted-container-version", + xmlName: "x-ms-deleted-container-version", + type: { name: "String" } + } + }; + const comp9 = { + parameterPath: "comp", + mapper: { + defaultValue: "rename", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const sourceContainerName = { + parameterPath: "sourceContainerName", + mapper: { + serializedName: "x-ms-source-container-name", + required: true, + xmlName: "x-ms-source-container-name", + type: { name: "String" } + } + }; + const sourceLeaseId = { + parameterPath: ["options", "sourceLeaseId"], + mapper: { + serializedName: "x-ms-source-lease-id", + xmlName: "x-ms-source-lease-id", + type: { name: "String" } + } + }; + const comp10 = { + parameterPath: "comp", + mapper: { + defaultValue: "lease", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const action = { + parameterPath: "action", + mapper: { + defaultValue: "acquire", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { name: "String" } + } + }; + const duration = { + parameterPath: ["options", "duration"], + mapper: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { name: "Number" } + } + }; + const proposedLeaseId = { + parameterPath: ["options", "proposedLeaseId"], + mapper: { + serializedName: "x-ms-proposed-lease-id", + xmlName: "x-ms-proposed-lease-id", + type: { name: "String" } + } + }; + const action1 = { + parameterPath: "action", + mapper: { + defaultValue: "release", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { name: "String" } + } + }; + const leaseId1 = { + parameterPath: "leaseId", + mapper: { + serializedName: "x-ms-lease-id", + required: true, + xmlName: "x-ms-lease-id", + type: { name: "String" } + } + }; + const action2 = { + parameterPath: "action", + mapper: { + defaultValue: "renew", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { name: "String" } + } + }; + const action3 = { + parameterPath: "action", + mapper: { + defaultValue: "break", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { name: "String" } + } + }; + const breakPeriod = { + parameterPath: ["options", "breakPeriod"], + mapper: { + serializedName: "x-ms-lease-break-period", + xmlName: "x-ms-lease-break-period", + type: { name: "Number" } + } + }; + const action4 = { + parameterPath: "action", + mapper: { + defaultValue: "change", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { name: "String" } + } + }; + const proposedLeaseId1 = { + parameterPath: "proposedLeaseId", + mapper: { + serializedName: "x-ms-proposed-lease-id", + required: true, + xmlName: "x-ms-proposed-lease-id", + type: { name: "String" } + } + }; + const include1 = { + parameterPath: ["options", "include"], + mapper: { + serializedName: "include", + xmlName: "include", + xmlElementName: "ListBlobsIncludeItem", + type: { + name: "Sequence", + element: { type: { + name: "Enum", + allowedValues: [ + "copy", + "deleted", + "metadata", + "snapshots", + "uncommittedblobs", + "versions", + "tags", + "immutabilitypolicy", + "legalhold", + "deletedwithversions" + ] + } } + } + }, + collectionFormat: "CSV" + }; + const delimiter = { + parameterPath: "delimiter", + mapper: { + serializedName: "delimiter", + required: true, + xmlName: "delimiter", + type: { name: "String" } + } + }; + const snapshot = { + parameterPath: ["options", "snapshot"], + mapper: { + serializedName: "snapshot", + xmlName: "snapshot", + type: { name: "String" } + } + }; + const versionId = { + parameterPath: ["options", "versionId"], + mapper: { + serializedName: "versionid", + xmlName: "versionid", + type: { name: "String" } + } + }; + const range = { + parameterPath: ["options", "range"], + mapper: { + serializedName: "x-ms-range", + xmlName: "x-ms-range", + type: { name: "String" } + } + }; + const rangeGetContentMD5 = { + parameterPath: ["options", "rangeGetContentMD5"], + mapper: { + serializedName: "x-ms-range-get-content-md5", + xmlName: "x-ms-range-get-content-md5", + type: { name: "Boolean" } + } + }; + const rangeGetContentCRC64 = { + parameterPath: ["options", "rangeGetContentCRC64"], + mapper: { + serializedName: "x-ms-range-get-content-crc64", + xmlName: "x-ms-range-get-content-crc64", + type: { name: "Boolean" } + } + }; + const encryptionKey = { + parameterPath: [ + "options", + "cpkInfo", + "encryptionKey" + ], + mapper: { + serializedName: "x-ms-encryption-key", + xmlName: "x-ms-encryption-key", + type: { name: "String" } + } + }; + const encryptionKeySha256 = { + parameterPath: [ + "options", + "cpkInfo", + "encryptionKeySha256" + ], + mapper: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { name: "String" } + } + }; + const encryptionAlgorithm = { + parameterPath: [ + "options", + "cpkInfo", + "encryptionAlgorithm" + ], + mapper: { + serializedName: "x-ms-encryption-algorithm", + xmlName: "x-ms-encryption-algorithm", + type: { name: "String" } + } + }; + const ifMatch = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifMatch" + ], + mapper: { + serializedName: "If-Match", + xmlName: "If-Match", + type: { name: "String" } + } + }; + const ifNoneMatch = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifNoneMatch" + ], + mapper: { + serializedName: "If-None-Match", + xmlName: "If-None-Match", + type: { name: "String" } + } + }; + const ifTags = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifTags" + ], + mapper: { + serializedName: "x-ms-if-tags", + xmlName: "x-ms-if-tags", + type: { name: "String" } + } + }; + const deleteSnapshots = { + parameterPath: ["options", "deleteSnapshots"], + mapper: { + serializedName: "x-ms-delete-snapshots", + xmlName: "x-ms-delete-snapshots", + type: { + name: "Enum", + allowedValues: ["include", "only"] + } + } + }; + const blobDeleteType = { + parameterPath: ["options", "blobDeleteType"], + mapper: { + serializedName: "deletetype", + xmlName: "deletetype", + type: { name: "String" } + } + }; + const comp11 = { + parameterPath: "comp", + mapper: { + defaultValue: "expiry", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const expiryOptions = { + parameterPath: "expiryOptions", + mapper: { + serializedName: "x-ms-expiry-option", + required: true, + xmlName: "x-ms-expiry-option", + type: { name: "String" } + } + }; + const expiresOn = { + parameterPath: ["options", "expiresOn"], + mapper: { + serializedName: "x-ms-expiry-time", + xmlName: "x-ms-expiry-time", + type: { name: "String" } + } + }; + const blobCacheControl = { + parameterPath: [ + "options", + "blobHttpHeaders", + "blobCacheControl" + ], + mapper: { + serializedName: "x-ms-blob-cache-control", + xmlName: "x-ms-blob-cache-control", + type: { name: "String" } + } + }; + const blobContentType = { + parameterPath: [ + "options", + "blobHttpHeaders", + "blobContentType" + ], + mapper: { + serializedName: "x-ms-blob-content-type", + xmlName: "x-ms-blob-content-type", + type: { name: "String" } + } + }; + const blobContentMD5 = { + parameterPath: [ + "options", + "blobHttpHeaders", + "blobContentMD5" + ], + mapper: { + serializedName: "x-ms-blob-content-md5", + xmlName: "x-ms-blob-content-md5", + type: { name: "ByteArray" } + } + }; + const blobContentEncoding = { + parameterPath: [ + "options", + "blobHttpHeaders", + "blobContentEncoding" + ], + mapper: { + serializedName: "x-ms-blob-content-encoding", + xmlName: "x-ms-blob-content-encoding", + type: { name: "String" } + } + }; + const blobContentLanguage = { + parameterPath: [ + "options", + "blobHttpHeaders", + "blobContentLanguage" + ], + mapper: { + serializedName: "x-ms-blob-content-language", + xmlName: "x-ms-blob-content-language", + type: { name: "String" } + } + }; + const blobContentDisposition = { + parameterPath: [ + "options", + "blobHttpHeaders", + "blobContentDisposition" + ], + mapper: { + serializedName: "x-ms-blob-content-disposition", + xmlName: "x-ms-blob-content-disposition", + type: { name: "String" } + } + }; + const comp12 = { + parameterPath: "comp", + mapper: { + defaultValue: "immutabilityPolicies", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const immutabilityPolicyExpiry = { + parameterPath: ["options", "immutabilityPolicyExpiry"], + mapper: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { name: "DateTimeRfc1123" } + } + }; + const immutabilityPolicyMode = { + parameterPath: ["options", "immutabilityPolicyMode"], + mapper: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: [ + "Mutable", + "Unlocked", + "Locked" + ] + } + } + }; + const comp13 = { + parameterPath: "comp", + mapper: { + defaultValue: "legalhold", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const legalHold = { + parameterPath: "legalHold", + mapper: { + serializedName: "x-ms-legal-hold", + required: true, + xmlName: "x-ms-legal-hold", + type: { name: "Boolean" } + } + }; + const encryptionScope = { + parameterPath: ["options", "encryptionScope"], + mapper: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { name: "String" } + } + }; + const comp14 = { + parameterPath: "comp", + mapper: { + defaultValue: "snapshot", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const tier = { + parameterPath: ["options", "tier"], + mapper: { + serializedName: "x-ms-access-tier", + xmlName: "x-ms-access-tier", + type: { + name: "Enum", + allowedValues: [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold" + ] + } + } + }; + const rehydratePriority = { + parameterPath: ["options", "rehydratePriority"], + mapper: { + serializedName: "x-ms-rehydrate-priority", + xmlName: "x-ms-rehydrate-priority", + type: { + name: "Enum", + allowedValues: ["High", "Standard"] + } + } + }; + const sourceIfModifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfModifiedSince" + ], + mapper: { + serializedName: "x-ms-source-if-modified-since", + xmlName: "x-ms-source-if-modified-since", + type: { name: "DateTimeRfc1123" } + } + }; + const sourceIfUnmodifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfUnmodifiedSince" + ], + mapper: { + serializedName: "x-ms-source-if-unmodified-since", + xmlName: "x-ms-source-if-unmodified-since", + type: { name: "DateTimeRfc1123" } + } + }; + const sourceIfMatch = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfMatch" + ], + mapper: { + serializedName: "x-ms-source-if-match", + xmlName: "x-ms-source-if-match", + type: { name: "String" } + } + }; + const sourceIfNoneMatch = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfNoneMatch" + ], + mapper: { + serializedName: "x-ms-source-if-none-match", + xmlName: "x-ms-source-if-none-match", + type: { name: "String" } + } + }; + const sourceIfTags = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfTags" + ], + mapper: { + serializedName: "x-ms-source-if-tags", + xmlName: "x-ms-source-if-tags", + type: { name: "String" } + } + }; + const copySource = { + parameterPath: "copySource", + mapper: { + serializedName: "x-ms-copy-source", + required: true, + xmlName: "x-ms-copy-source", + type: { name: "String" } + } + }; + const blobTagsString = { + parameterPath: ["options", "blobTagsString"], + mapper: { + serializedName: "x-ms-tags", + xmlName: "x-ms-tags", + type: { name: "String" } + } + }; + const sealBlob = { + parameterPath: ["options", "sealBlob"], + mapper: { + serializedName: "x-ms-seal-blob", + xmlName: "x-ms-seal-blob", + type: { name: "Boolean" } + } + }; + const legalHold1 = { + parameterPath: ["options", "legalHold"], + mapper: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { name: "Boolean" } + } + }; + const xMsRequiresSync = { + parameterPath: "xMsRequiresSync", + mapper: { + defaultValue: "true", + isConstant: true, + serializedName: "x-ms-requires-sync", + type: { name: "String" } + } + }; + const sourceContentMD5 = { + parameterPath: ["options", "sourceContentMD5"], + mapper: { + serializedName: "x-ms-source-content-md5", + xmlName: "x-ms-source-content-md5", + type: { name: "ByteArray" } + } + }; + const copySourceAuthorization = { + parameterPath: ["options", "copySourceAuthorization"], + mapper: { + serializedName: "x-ms-copy-source-authorization", + xmlName: "x-ms-copy-source-authorization", + type: { name: "String" } + } + }; + const copySourceTags = { + parameterPath: ["options", "copySourceTags"], + mapper: { + serializedName: "x-ms-copy-source-tag-option", + xmlName: "x-ms-copy-source-tag-option", + type: { + name: "Enum", + allowedValues: ["REPLACE", "COPY"] + } + } + }; + const comp15 = { + parameterPath: "comp", + mapper: { + defaultValue: "copy", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const copyActionAbortConstant = { + parameterPath: "copyActionAbortConstant", + mapper: { + defaultValue: "abort", + isConstant: true, + serializedName: "x-ms-copy-action", + type: { name: "String" } + } + }; + const copyId = { + parameterPath: "copyId", + mapper: { + serializedName: "copyid", + required: true, + xmlName: "copyid", + type: { name: "String" } + } + }; + const comp16 = { + parameterPath: "comp", + mapper: { + defaultValue: "tier", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const tier1 = { + parameterPath: "tier", + mapper: { + serializedName: "x-ms-access-tier", + required: true, + xmlName: "x-ms-access-tier", + type: { + name: "Enum", + allowedValues: [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold" + ] + } + } + }; + const queryRequest = { + parameterPath: ["options", "queryRequest"], + mapper: QueryRequest + }; + const comp17 = { + parameterPath: "comp", + mapper: { + defaultValue: "query", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const comp18 = { + parameterPath: "comp", + mapper: { + defaultValue: "tags", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const tags = { + parameterPath: ["options", "tags"], + mapper: BlobTags + }; + const transactionalContentMD5 = { + parameterPath: ["options", "transactionalContentMD5"], + mapper: { + serializedName: "Content-MD5", + xmlName: "Content-MD5", + type: { name: "ByteArray" } + } + }; + const transactionalContentCrc64 = { + parameterPath: ["options", "transactionalContentCrc64"], + mapper: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { name: "ByteArray" } + } + }; + const blobType = { + parameterPath: "blobType", + mapper: { + defaultValue: "PageBlob", + isConstant: true, + serializedName: "x-ms-blob-type", + type: { name: "String" } + } + }; + const blobContentLength = { + parameterPath: "blobContentLength", + mapper: { + serializedName: "x-ms-blob-content-length", + required: true, + xmlName: "x-ms-blob-content-length", + type: { name: "Number" } + } + }; + const blobSequenceNumber = { + parameterPath: ["options", "blobSequenceNumber"], + mapper: { + defaultValue: 0, + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { name: "Number" } + } + }; + const contentType1 = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/octet-stream", + isConstant: true, + serializedName: "Content-Type", + type: { name: "String" } + } + }; + const body1 = { + parameterPath: "body", + mapper: { + serializedName: "body", + required: true, + xmlName: "body", + type: { name: "Stream" } + } + }; + const accept2 = { + parameterPath: "accept", + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Accept", + type: { name: "String" } + } + }; + const comp19 = { + parameterPath: "comp", + mapper: { + defaultValue: "page", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const pageWrite = { + parameterPath: "pageWrite", + mapper: { + defaultValue: "update", + isConstant: true, + serializedName: "x-ms-page-write", + type: { name: "String" } + } + }; + const ifSequenceNumberLessThanOrEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThanOrEqualTo" + ], + mapper: { + serializedName: "x-ms-if-sequence-number-le", + xmlName: "x-ms-if-sequence-number-le", + type: { name: "Number" } + } + }; + const ifSequenceNumberLessThan = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThan" + ], + mapper: { + serializedName: "x-ms-if-sequence-number-lt", + xmlName: "x-ms-if-sequence-number-lt", + type: { name: "Number" } + } + }; + const ifSequenceNumberEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberEqualTo" + ], + mapper: { + serializedName: "x-ms-if-sequence-number-eq", + xmlName: "x-ms-if-sequence-number-eq", + type: { name: "Number" } + } + }; + const pageWrite1 = { + parameterPath: "pageWrite", + mapper: { + defaultValue: "clear", + isConstant: true, + serializedName: "x-ms-page-write", + type: { name: "String" } + } + }; + const sourceUrl = { + parameterPath: "sourceUrl", + mapper: { + serializedName: "x-ms-copy-source", + required: true, + xmlName: "x-ms-copy-source", + type: { name: "String" } + } + }; + const sourceRange = { + parameterPath: "sourceRange", + mapper: { + serializedName: "x-ms-source-range", + required: true, + xmlName: "x-ms-source-range", + type: { name: "String" } + } + }; + const sourceContentCrc64 = { + parameterPath: ["options", "sourceContentCrc64"], + mapper: { + serializedName: "x-ms-source-content-crc64", + xmlName: "x-ms-source-content-crc64", + type: { name: "ByteArray" } + } + }; + const range1 = { + parameterPath: "range", + mapper: { + serializedName: "x-ms-range", + required: true, + xmlName: "x-ms-range", + type: { name: "String" } + } + }; + const comp20 = { + parameterPath: "comp", + mapper: { + defaultValue: "pagelist", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const prevsnapshot = { + parameterPath: ["options", "prevsnapshot"], + mapper: { + serializedName: "prevsnapshot", + xmlName: "prevsnapshot", + type: { name: "String" } + } + }; + const prevSnapshotUrl = { + parameterPath: ["options", "prevSnapshotUrl"], + mapper: { + serializedName: "x-ms-previous-snapshot-url", + xmlName: "x-ms-previous-snapshot-url", + type: { name: "String" } + } + }; + const sequenceNumberAction = { + parameterPath: "sequenceNumberAction", + mapper: { + serializedName: "x-ms-sequence-number-action", + required: true, + xmlName: "x-ms-sequence-number-action", + type: { + name: "Enum", + allowedValues: [ + "max", + "update", + "increment" + ] + } + } + }; + const comp21 = { + parameterPath: "comp", + mapper: { + defaultValue: "incrementalcopy", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const blobType1 = { + parameterPath: "blobType", + mapper: { + defaultValue: "AppendBlob", + isConstant: true, + serializedName: "x-ms-blob-type", + type: { name: "String" } + } + }; + const comp22 = { + parameterPath: "comp", + mapper: { + defaultValue: "appendblock", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const maxSize = { + parameterPath: [ + "options", + "appendPositionAccessConditions", + "maxSize" + ], + mapper: { + serializedName: "x-ms-blob-condition-maxsize", + xmlName: "x-ms-blob-condition-maxsize", + type: { name: "Number" } + } + }; + const appendPosition = { + parameterPath: [ + "options", + "appendPositionAccessConditions", + "appendPosition" + ], + mapper: { + serializedName: "x-ms-blob-condition-appendpos", + xmlName: "x-ms-blob-condition-appendpos", + type: { name: "Number" } + } + }; + const sourceRange1 = { + parameterPath: ["options", "sourceRange"], + mapper: { + serializedName: "x-ms-source-range", + xmlName: "x-ms-source-range", + type: { name: "String" } + } + }; + const comp23 = { + parameterPath: "comp", + mapper: { + defaultValue: "seal", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const blobType2 = { + parameterPath: "blobType", + mapper: { + defaultValue: "BlockBlob", + isConstant: true, + serializedName: "x-ms-blob-type", + type: { name: "String" } + } + }; + const copySourceBlobProperties = { + parameterPath: ["options", "copySourceBlobProperties"], + mapper: { + serializedName: "x-ms-copy-source-blob-properties", + xmlName: "x-ms-copy-source-blob-properties", + type: { name: "Boolean" } + } + }; + const comp24 = { + parameterPath: "comp", + mapper: { + defaultValue: "block", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const blockId = { + parameterPath: "blockId", + mapper: { + serializedName: "blockid", + required: true, + xmlName: "blockid", + type: { name: "String" } + } + }; + const blocks = { + parameterPath: "blocks", + mapper: BlockLookupList + }; + const comp25 = { + parameterPath: "comp", + mapper: { + defaultValue: "blocklist", + isConstant: true, + serializedName: "comp", + type: { name: "String" } + } + }; + const listType = { + parameterPath: "listType", + mapper: { + defaultValue: "committed", + serializedName: "blocklisttype", + required: true, + xmlName: "blocklisttype", + type: { + name: "Enum", + allowedValues: [ + "committed", + "uncommitted", + "all" + ] + } + } + }; + /** Class containing Service operations. */ + var ServiceImpl = class { + /** + * Initialize a new instance of the class Service class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; + } + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage + * Analytics and CORS (Cross-Origin Resource Sharing) rules + * @param blobServiceProperties The StorageService properties. + * @param options The options parameters. + */ + setProperties(blobServiceProperties$1, options) { + return this.client.sendOperationRequest({ + blobServiceProperties: blobServiceProperties$1, + options + }, setPropertiesOperationSpec); + } + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics + * and CORS (Cross-Origin Resource Sharing) rules. + * @param options The options parameters. + */ + getProperties(options) { + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + } + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the + * secondary location endpoint when read-access geo-redundant replication is enabled for the storage + * account. + * @param options The options parameters. + */ + getStatistics(options) { + return this.client.sendOperationRequest({ options }, getStatisticsOperationSpec); + } + /** + * The List Containers Segment operation returns a list of the containers under the specified account + * @param options The options parameters. + */ + listContainersSegment(options) { + return this.client.sendOperationRequest({ options }, listContainersSegmentOperationSpec); + } + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * @param keyInfo Key information + * @param options The options parameters. + */ + getUserDelegationKey(keyInfo$1, options) { + return this.client.sendOperationRequest({ + keyInfo: keyInfo$1, + options + }, getUserDelegationKeyOperationSpec); + } + /** + * Returns the sku name and account kind + * @param options The options parameters. + */ + getAccountInfo(options) { + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + } + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch + * boundary. Example header value: multipart/mixed; boundary=batch_ + * @param body Initial data + * @param options The options parameters. + */ + submitBatch(contentLength$1, multipartContentType$1, body$1, options) { + return this.client.sendOperationRequest({ + contentLength: contentLength$1, + multipartContentType: multipartContentType$1, + body: body$1, + options + }, submitBatchOperationSpec$1); + } + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a + * given search expression. Filter blobs searches across all containers within a storage account but + * can be scoped within the expression to a single container. + * @param options The options parameters. + */ + filterBlobs(options) { + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + } + }; + const xmlSerializer$5 = coreClient__namespace.createSerializer( + Mappers, + /* isXml */ + true +); + const setPropertiesOperationSpec = { + path: "/", + httpMethod: "PUT", + responses: { + 202: { headersMapper: ServiceSetPropertiesHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceSetPropertiesExceptionHeaders + } + }, + requestBody: blobServiceProperties, + queryParameters: [ + restype, + comp, + timeoutInSeconds + ], + urlParameters: [url], + headerParameters: [ + contentType, + accept, + version, + requestId + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer$5 + }; + const getPropertiesOperationSpec$2 = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: BlobServiceProperties, + headersMapper: ServiceGetPropertiesHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceGetPropertiesExceptionHeaders + } + }, + queryParameters: [ + restype, + comp, + timeoutInSeconds + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$5 + }; + const getStatisticsOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: BlobServiceStatistics, + headersMapper: ServiceGetStatisticsHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceGetStatisticsExceptionHeaders + } + }, + queryParameters: [ + restype, + timeoutInSeconds, + comp1 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$5 + }; + const listContainersSegmentOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: ListContainersSegmentResponse, + headersMapper: ServiceListContainersSegmentHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceListContainersSegmentExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + comp2, + prefix, + marker, + maxPageSize, + include + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$5 + }; + const getUserDelegationKeyOperationSpec = { + path: "/", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: UserDelegationKey, + headersMapper: ServiceGetUserDelegationKeyHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + } + }, + requestBody: keyInfo, + queryParameters: [ + restype, + timeoutInSeconds, + comp3 + ], + urlParameters: [url], + headerParameters: [ + contentType, + accept, + version, + requestId + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer$5 + }; + const getAccountInfoOperationSpec$2 = { + path: "/", + httpMethod: "GET", + responses: { + 200: { headersMapper: ServiceGetAccountInfoHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceGetAccountInfoExceptionHeaders + } + }, + queryParameters: [ + comp, + timeoutInSeconds, + restype1 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$5 + }; + const submitBatchOperationSpec$1 = { + path: "/", + httpMethod: "POST", + responses: { + 202: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse" + }, + headersMapper: ServiceSubmitBatchHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceSubmitBatchExceptionHeaders + } + }, + requestBody: body, + queryParameters: [timeoutInSeconds, comp4], + urlParameters: [url], + headerParameters: [ + accept, + version, + requestId, + contentLength, + multipartContentType + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer$5 + }; + const filterBlobsOperationSpec$1 = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: FilterBlobSegment, + headersMapper: ServiceFilterBlobsHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceFilterBlobsExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + marker, + maxPageSize, + comp5, + where + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$5 + }; + /** Class containing Container operations. */ + var ContainerImpl = class { + /** + * Initialize a new instance of the class Container class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; + } + /** + * creates a new container under the specified account. If the container with the same name already + * exists, the operation fails + * @param options The options parameters. + */ + create(options) { + return this.client.sendOperationRequest({ options }, createOperationSpec$2); + } + /** + * returns all user-defined metadata and system properties for the specified container. The data + * returned does not include the container's list of blobs + * @param options The options parameters. + */ + getProperties(options) { + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + } + /** + * operation marks the specified container for deletion. The container and any blobs contained within + * it are later deleted during garbage collection + * @param options The options parameters. + */ + delete(options) { + return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + } + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * @param options The options parameters. + */ + setMetadata(options) { + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + } + /** + * gets the permissions for the specified container. The permissions indicate whether container data + * may be accessed publicly. + * @param options The options parameters. + */ + getAccessPolicy(options) { + return this.client.sendOperationRequest({ options }, getAccessPolicyOperationSpec); + } + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a + * container may be accessed publicly. + * @param options The options parameters. + */ + setAccessPolicy(options) { + return this.client.sendOperationRequest({ options }, setAccessPolicyOperationSpec); + } + /** + * Restores a previously-deleted container. + * @param options The options parameters. + */ + restore(options) { + return this.client.sendOperationRequest({ options }, restoreOperationSpec); + } + /** + * Renames an existing container. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param options The options parameters. + */ + rename(sourceContainerName$1, options) { + return this.client.sendOperationRequest({ + sourceContainerName: sourceContainerName$1, + options + }, renameOperationSpec); + } + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch + * boundary. Example header value: multipart/mixed; boundary=batch_ + * @param body Initial data + * @param options The options parameters. + */ + submitBatch(contentLength$1, multipartContentType$1, body$1, options) { + return this.client.sendOperationRequest({ + contentLength: contentLength$1, + multipartContentType: multipartContentType$1, + body: body$1, + options + }, submitBatchOperationSpec); + } + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given + * search expression. Filter blobs searches within the given container. + * @param options The options parameters. + */ + filterBlobs(options) { + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); + } + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param options The options parameters. + */ + acquireLease(options) { + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + } + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + releaseLease(leaseId$1, options) { + return this.client.sendOperationRequest({ + leaseId: leaseId$1, + options + }, releaseLeaseOperationSpec$1); + } + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + renewLease(leaseId$1, options) { + return this.client.sendOperationRequest({ + leaseId: leaseId$1, + options + }, renewLeaseOperationSpec$1); + } + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param options The options parameters. + */ + breakLease(options) { + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + } + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 + * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor + * (String) for a list of valid GUID string formats. + * @param options The options parameters. + */ + changeLease(leaseId$1, proposedLeaseId$1, options) { + return this.client.sendOperationRequest({ + leaseId: leaseId$1, + proposedLeaseId: proposedLeaseId$1, + options + }, changeLeaseOperationSpec$1); + } + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container + * @param options The options parameters. + */ + listBlobFlatSegment(options) { + return this.client.sendOperationRequest({ options }, listBlobFlatSegmentOperationSpec); + } + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix + * element in the response body that acts as a placeholder for all blobs whose names begin with the + * same substring up to the appearance of the delimiter character. The delimiter may be a single + * character or a string. + * @param options The options parameters. + */ + listBlobHierarchySegment(delimiter$1, options) { + return this.client.sendOperationRequest({ + delimiter: delimiter$1, + options + }, listBlobHierarchySegmentOperationSpec); + } + /** + * Returns the sku name and account kind + * @param options The options parameters. + */ + getAccountInfo(options) { + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + } + }; + const xmlSerializer$4 = coreClient__namespace.createSerializer( + Mappers, + /* isXml */ + true +); + const createOperationSpec$2 = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: ContainerCreateHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerCreateExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, restype2], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + metadata, + access, + defaultEncryptionScope, + preventEncryptionScopeOverride + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const getPropertiesOperationSpec$1 = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { headersMapper: ContainerGetPropertiesHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerGetPropertiesExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, restype2], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const deleteOperationSpec$1 = { + path: "/{containerName}", + httpMethod: "DELETE", + responses: { + 202: { headersMapper: ContainerDeleteHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerDeleteExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, restype2], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const setMetadataOperationSpec$1 = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: ContainerSetMetadataHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerSetMetadataExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + restype2, + comp6 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + metadata, + leaseId, + ifModifiedSince + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const getAccessPolicyOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { + name: "Sequence", + element: { type: { + name: "Composite", + className: "SignedIdentifier" + } } + }, + serializedName: "SignedIdentifiers", + xmlName: "SignedIdentifiers", + xmlIsWrapped: true, + xmlElementName: "SignedIdentifier" + }, + headersMapper: ContainerGetAccessPolicyHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerGetAccessPolicyExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + restype2, + comp7 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const setAccessPolicyOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: ContainerSetAccessPolicyHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerSetAccessPolicyExceptionHeaders + } + }, + requestBody: containerAcl, + queryParameters: [ + timeoutInSeconds, + restype2, + comp7 + ], + urlParameters: [url], + headerParameters: [ + contentType, + accept, + version, + requestId, + access, + leaseId, + ifModifiedSince, + ifUnmodifiedSince + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer$4 + }; + const restoreOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: ContainerRestoreHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerRestoreExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + restype2, + comp8 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + deletedContainerName, + deletedContainerVersion + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const renameOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: ContainerRenameHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerRenameExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + restype2, + comp9 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + sourceContainerName, + sourceLeaseId + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const submitBatchOperationSpec = { + path: "/{containerName}", + httpMethod: "POST", + responses: { + 202: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse" + }, + headersMapper: ContainerSubmitBatchHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerSubmitBatchExceptionHeaders + } + }, + requestBody: body, + queryParameters: [ + timeoutInSeconds, + comp4, + restype2 + ], + urlParameters: [url], + headerParameters: [ + accept, + version, + requestId, + contentLength, + multipartContentType + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer$4 + }; + const filterBlobsOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: FilterBlobSegment, + headersMapper: ContainerFilterBlobsHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerFilterBlobsExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + marker, + maxPageSize, + comp5, + where, + restype2 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const acquireLeaseOperationSpec$1 = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: ContainerAcquireLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerAcquireLeaseExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + restype2, + comp10 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + action, + duration, + proposedLeaseId + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const releaseLeaseOperationSpec$1 = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: ContainerReleaseLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerReleaseLeaseExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + restype2, + comp10 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + action1, + leaseId1 + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const renewLeaseOperationSpec$1 = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: ContainerRenewLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerRenewLeaseExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + restype2, + comp10 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + leaseId1, + action2 + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const breakLeaseOperationSpec$1 = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 202: { headersMapper: ContainerBreakLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerBreakLeaseExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + restype2, + comp10 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + action3, + breakPeriod + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const changeLeaseOperationSpec$1 = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: ContainerChangeLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerChangeLeaseExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + restype2, + comp10 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + leaseId1, + action4, + proposedLeaseId1 + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const listBlobFlatSegmentOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: ListBlobsFlatSegmentResponse, + headersMapper: ContainerListBlobFlatSegmentHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + comp2, + prefix, + marker, + maxPageSize, + restype2, + include1 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const listBlobHierarchySegmentOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: ListBlobsHierarchySegmentResponse, + headersMapper: ContainerListBlobHierarchySegmentHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + comp2, + prefix, + marker, + maxPageSize, + restype2, + include1, + delimiter + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$4 + }; + const getAccountInfoOperationSpec$1 = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { headersMapper: ContainerGetAccountInfoHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerGetAccountInfoExceptionHeaders + } + }, + queryParameters: [ + comp, + timeoutInSeconds, + restype1 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$4 + }; + /** Class containing Blob operations. */ + var BlobImpl = class { + /** + * Initialize a new instance of the class Blob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; + } + /** + * The Download operation reads or downloads a blob from the system, including its metadata and + * properties. You can also call Download to read a snapshot. + * @param options The options parameters. + */ + download(options) { + return this.client.sendOperationRequest({ options }, downloadOperationSpec); + } + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system + * properties for the blob. It does not return the content of the blob. + * @param options The options parameters. + */ + getProperties(options) { + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); + } + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is + * permanently removed from the storage account. If the storage account's soft delete feature is + * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible + * immediately. However, the blob service retains the blob or snapshot for the number of days specified + * by the DeleteRetentionPolicy section of [Storage service properties] + * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is + * permanently removed from the storage account. Note that you continue to be charged for the + * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the + * "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You + * can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a + * soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 + * (ResourceNotFound). + * @param options The options parameters. + */ + delete(options) { + return this.client.sendOperationRequest({ options }, deleteOperationSpec); + } + /** + * Undelete a blob that was previously soft deleted + * @param options The options parameters. + */ + undelete(options) { + return this.client.sendOperationRequest({ options }, undeleteOperationSpec); + } + /** + * Sets the time a blob will expire and be deleted. + * @param expiryOptions Required. Indicates mode of the expiry time + * @param options The options parameters. + */ + setExpiry(expiryOptions$1, options) { + return this.client.sendOperationRequest({ + expiryOptions: expiryOptions$1, + options + }, setExpiryOperationSpec); + } + /** + * The Set HTTP Headers operation sets system properties on the blob + * @param options The options parameters. + */ + setHttpHeaders(options) { + return this.client.sendOperationRequest({ options }, setHttpHeadersOperationSpec); + } + /** + * The Set Immutability Policy operation sets the immutability policy on the blob + * @param options The options parameters. + */ + setImmutabilityPolicy(options) { + return this.client.sendOperationRequest({ options }, setImmutabilityPolicyOperationSpec); + } + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob + * @param options The options parameters. + */ + deleteImmutabilityPolicy(options) { + return this.client.sendOperationRequest({ options }, deleteImmutabilityPolicyOperationSpec); + } + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param options The options parameters. + */ + setLegalHold(legalHold$1, options) { + return this.client.sendOperationRequest({ + legalHold: legalHold$1, + options + }, setLegalHoldOperationSpec); + } + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more + * name-value pairs + * @param options The options parameters. + */ + setMetadata(options) { + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param options The options parameters. + */ + acquireLease(options) { + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + releaseLease(leaseId$1, options) { + return this.client.sendOperationRequest({ + leaseId: leaseId$1, + options + }, releaseLeaseOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + renewLease(leaseId$1, options) { + return this.client.sendOperationRequest({ + leaseId: leaseId$1, + options + }, renewLeaseOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 + * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor + * (String) for a list of valid GUID string formats. + * @param options The options parameters. + */ + changeLease(leaseId$1, proposedLeaseId$1, options) { + return this.client.sendOperationRequest({ + leaseId: leaseId$1, + proposedLeaseId: proposedLeaseId$1, + options + }, changeLeaseOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param options The options parameters. + */ + breakLease(options) { + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); + } + /** + * The Create Snapshot operation creates a read-only snapshot of a blob + * @param options The options parameters. + */ + createSnapshot(options) { + return this.client.sendOperationRequest({ options }, createSnapshotOperationSpec); + } + /** + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + startCopyFromURL(copySource$1, options) { + return this.client.sendOperationRequest({ + copySource: copySource$1, + options + }, startCopyFromURLOperationSpec); + } + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return + * a response until the copy is complete. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + copyFromURL(copySource$1, options) { + return this.client.sendOperationRequest({ + copySource: copySource$1, + options + }, copyFromURLOperationSpec); + } + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination + * blob with zero length and full metadata. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob + * operation. + * @param options The options parameters. + */ + abortCopyFromURL(copyId$1, options) { + return this.client.sendOperationRequest({ + copyId: copyId$1, + options + }, abortCopyFromURLOperationSpec); + } + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant storage only). A + * premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block + * blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's + * ETag. + * @param tier Indicates the tier to be set on the blob. + * @param options The options parameters. + */ + setTier(tier$1, options) { + return this.client.sendOperationRequest({ + tier: tier$1, + options + }, setTierOperationSpec); + } + /** + * Returns the sku name and account kind + * @param options The options parameters. + */ + getAccountInfo(options) { + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); + } + /** + * The Query operation enables users to select/project on blob data by providing simple query + * expressions. + * @param options The options parameters. + */ + query(options) { + return this.client.sendOperationRequest({ options }, queryOperationSpec); + } + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * @param options The options parameters. + */ + getTags(options) { + return this.client.sendOperationRequest({ options }, getTagsOperationSpec); + } + /** + * The Set Tags operation enables users to set tags on a blob. + * @param options The options parameters. + */ + setTags(options) { + return this.client.sendOperationRequest({ options }, setTagsOperationSpec); + } + }; + const xmlSerializer$3 = coreClient__namespace.createSerializer( + Mappers, + /* isXml */ + true +); + const downloadOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse" + }, + headersMapper: BlobDownloadHeaders + }, + 206: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse" + }, + headersMapper: BlobDownloadHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobDownloadExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + snapshot, + versionId + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + range, + rangeGetContentMD5, + rangeGetContentCRC64, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const getPropertiesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "HEAD", + responses: { + 200: { headersMapper: BlobGetPropertiesHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobGetPropertiesExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + snapshot, + versionId + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const deleteOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "DELETE", + responses: { + 202: { headersMapper: BlobDeleteHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobDeleteExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + snapshot, + versionId, + blobDeleteType + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + deleteSnapshots + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const undeleteOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobUndeleteHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobUndeleteExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp8], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const setExpiryOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobSetExpiryHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetExpiryExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp11], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + expiryOptions, + expiresOn + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const setHttpHeadersOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobSetHttpHeadersHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetHttpHeadersExceptionHeaders + } + }, + queryParameters: [comp, timeoutInSeconds], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + blobCacheControl, + blobContentType, + blobContentMD5, + blobContentEncoding, + blobContentLanguage, + blobContentDisposition + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const setImmutabilityPolicyOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobSetImmutabilityPolicyHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + snapshot, + versionId, + comp12 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifUnmodifiedSince, + immutabilityPolicyExpiry, + immutabilityPolicyMode + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const deleteImmutabilityPolicyOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "DELETE", + responses: { + 200: { headersMapper: BlobDeleteImmutabilityPolicyHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + snapshot, + versionId, + comp12 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const setLegalHoldOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobSetLegalHoldHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetLegalHoldExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + snapshot, + versionId, + comp13 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + legalHold + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const setMetadataOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobSetMetadataHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetMetadataExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp6], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + metadata, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + encryptionScope + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const acquireLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: BlobAcquireLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobAcquireLeaseExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp10], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + action, + duration, + proposedLeaseId, + ifMatch, + ifNoneMatch, + ifTags + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const releaseLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobReleaseLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobReleaseLeaseExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp10], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + action1, + leaseId1, + ifMatch, + ifNoneMatch, + ifTags + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const renewLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobRenewLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobRenewLeaseExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp10], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + leaseId1, + action2, + ifMatch, + ifNoneMatch, + ifTags + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const changeLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobChangeLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobChangeLeaseExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp10], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + leaseId1, + action4, + proposedLeaseId1, + ifMatch, + ifNoneMatch, + ifTags + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const breakLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { headersMapper: BlobBreakLeaseHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobBreakLeaseExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp10], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + action3, + breakPeriod, + ifMatch, + ifNoneMatch, + ifTags + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const createSnapshotOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: BlobCreateSnapshotHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobCreateSnapshotExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp14], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + metadata, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + encryptionScope + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const startCopyFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { headersMapper: BlobStartCopyFromURLHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobStartCopyFromURLExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + metadata, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + immutabilityPolicyExpiry, + immutabilityPolicyMode, + tier, + rehydratePriority, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch, + sourceIfTags, + copySource, + blobTagsString, + sealBlob, + legalHold1 + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const copyFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { headersMapper: BlobCopyFromURLHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobCopyFromURLExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + metadata, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + immutabilityPolicyExpiry, + immutabilityPolicyMode, + encryptionScope, + tier, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch, + copySource, + blobTagsString, + legalHold1, + xMsRequiresSync, + sourceContentMD5, + copySourceAuthorization, + copySourceTags + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const abortCopyFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 204: { headersMapper: BlobAbortCopyFromURLHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobAbortCopyFromURLExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + comp15, + copyId + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + copyActionAbortConstant + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const setTierOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: BlobSetTierHeaders }, + 202: { headersMapper: BlobSetTierHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetTierExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + snapshot, + versionId, + comp16 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifTags, + rehydratePriority, + tier1 + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const getAccountInfoOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { headersMapper: BlobGetAccountInfoHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobGetAccountInfoExceptionHeaders + } + }, + queryParameters: [ + comp, + timeoutInSeconds, + restype1 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1 + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const queryOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse" + }, + headersMapper: BlobQueryHeaders + }, + 206: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse" + }, + headersMapper: BlobQueryHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobQueryExceptionHeaders + } + }, + requestBody: queryRequest, + queryParameters: [ + timeoutInSeconds, + snapshot, + comp17 + ], + urlParameters: [url], + headerParameters: [ + contentType, + accept, + version, + requestId, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer$3 + }; + const getTagsOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: BlobTags, + headersMapper: BlobGetTagsHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobGetTagsExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + snapshot, + versionId, + comp18 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifTags + ], + isXML: true, + serializer: xmlSerializer$3 + }; + const setTagsOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 204: { headersMapper: BlobSetTagsHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetTagsExceptionHeaders + } + }, + requestBody: tags, + queryParameters: [ + timeoutInSeconds, + versionId, + comp18 + ], + urlParameters: [url], + headerParameters: [ + contentType, + accept, + version, + requestId, + leaseId, + ifTags, + transactionalContentMD5, + transactionalContentCrc64 + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer$3 + }; + /** Class containing PageBlob operations. */ + var PageBlobImpl = class { + /** + * Initialize a new instance of the class PageBlob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; + } + /** + * The Create operation creates a new page blob. + * @param contentLength The length of the request. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The + * page blob size must be aligned to a 512-byte boundary. + * @param options The options parameters. + */ + create(contentLength$1, blobContentLength$1, options) { + return this.client.sendOperationRequest({ + contentLength: contentLength$1, + blobContentLength: blobContentLength$1, + options + }, createOperationSpec$1); + } + /** + * The Upload Pages operation writes a range of pages to a page blob + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + uploadPages(contentLength$1, body$1, options) { + return this.client.sendOperationRequest({ + contentLength: contentLength$1, + body: body$1, + options + }, uploadPagesOperationSpec); + } + /** + * The Clear Pages operation clears a set of pages from a page blob + * @param contentLength The length of the request. + * @param options The options parameters. + */ + clearPages(contentLength$1, options) { + return this.client.sendOperationRequest({ + contentLength: contentLength$1, + options + }, clearPagesOperationSpec); + } + /** + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a + * URL + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should + * match the ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 + * aligned and range-end is required. + * @param options The options parameters. + */ + uploadPagesFromURL(sourceUrl$1, sourceRange$1, contentLength$1, range$2, options) { + return this.client.sendOperationRequest({ + sourceUrl: sourceUrl$1, + sourceRange: sourceRange$1, + contentLength: contentLength$1, + range: range$2, + options + }, uploadPagesFromURLOperationSpec); + } + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a + * page blob + * @param options The options parameters. + */ + getPageRanges(options) { + return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec); + } + /** + * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot. + * @param options The options parameters. + */ + getPageRangesDiff(options) { + return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec); + } + /** + * Resize the Blob + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The + * page blob size must be aligned to a 512-byte boundary. + * @param options The options parameters. + */ + resize(blobContentLength$1, options) { + return this.client.sendOperationRequest({ + blobContentLength: blobContentLength$1, + options + }, resizeOperationSpec); + } + /** + * Update the sequence number of the blob + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. + * This property applies to page blobs only. This property indicates how the service should modify the + * blob's sequence number + * @param options The options parameters. + */ + updateSequenceNumber(sequenceNumberAction$1, options) { + return this.client.sendOperationRequest({ + sequenceNumberAction: sequenceNumberAction$1, + options + }, updateSequenceNumberOperationSpec); + } + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. + * The snapshot is copied such that only the differential changes between the previously copied + * snapshot are transferred to the destination. The copied snapshots are complete copies of the + * original snapshot and can be read or copied from as usual. This API is supported since REST version + * 2016-05-31. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + copyIncremental(copySource$1, options) { + return this.client.sendOperationRequest({ + copySource: copySource$1, + options + }, copyIncrementalOperationSpec); + } + }; + const xmlSerializer$2 = coreClient__namespace.createSerializer( + Mappers, + /* isXml */ + true +); + const createOperationSpec$1 = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: PageBlobCreateHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobCreateExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + contentLength, + metadata, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + blobCacheControl, + blobContentType, + blobContentMD5, + blobContentEncoding, + blobContentLanguage, + blobContentDisposition, + immutabilityPolicyExpiry, + immutabilityPolicyMode, + encryptionScope, + tier, + blobTagsString, + legalHold1, + blobType, + blobContentLength, + blobSequenceNumber + ], + isXML: true, + serializer: xmlSerializer$2 + }; + const uploadPagesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: PageBlobUploadPagesHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobUploadPagesExceptionHeaders + } + }, + requestBody: body1, + queryParameters: [timeoutInSeconds, comp19], + urlParameters: [url], + headerParameters: [ + version, + requestId, + contentLength, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + range, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + encryptionScope, + transactionalContentMD5, + transactionalContentCrc64, + contentType1, + accept2, + pageWrite, + ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, + ifSequenceNumberEqualTo + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer$2 + }; + const clearPagesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: PageBlobClearPagesHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobClearPagesExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp19], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + contentLength, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + range, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + encryptionScope, + ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, + ifSequenceNumberEqualTo, + pageWrite1 + ], + isXML: true, + serializer: xmlSerializer$2 + }; + const uploadPagesFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: PageBlobUploadPagesFromURLHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp19], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + contentLength, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + encryptionScope, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch, + sourceContentMD5, + copySourceAuthorization, + pageWrite, + ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, + ifSequenceNumberEqualTo, + sourceUrl, + sourceRange, + sourceContentCrc64, + range1 + ], + isXML: true, + serializer: xmlSerializer$2 + }; + const getPageRangesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: PageList, + headersMapper: PageBlobGetPageRangesHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobGetPageRangesExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + marker, + maxPageSize, + snapshot, + comp20 + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + range, + ifMatch, + ifNoneMatch, + ifTags + ], + isXML: true, + serializer: xmlSerializer$2 + }; + const getPageRangesDiffOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: PageList, + headersMapper: PageBlobGetPageRangesDiffHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + marker, + maxPageSize, + snapshot, + comp20, + prevsnapshot + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + range, + ifMatch, + ifNoneMatch, + ifTags, + prevSnapshotUrl + ], + isXML: true, + serializer: xmlSerializer$2 + }; + const resizeOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: PageBlobResizeHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobResizeExceptionHeaders + } + }, + queryParameters: [comp, timeoutInSeconds], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + encryptionScope, + blobContentLength + ], + isXML: true, + serializer: xmlSerializer$2 + }; + const updateSequenceNumberOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: PageBlobUpdateSequenceNumberHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + } + }, + queryParameters: [comp, timeoutInSeconds], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + blobSequenceNumber, + sequenceNumberAction + ], + isXML: true, + serializer: xmlSerializer$2 + }; + const copyIncrementalOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { headersMapper: PageBlobCopyIncrementalHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobCopyIncrementalExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp21], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + copySource + ], + isXML: true, + serializer: xmlSerializer$2 + }; + /** Class containing AppendBlob operations. */ + var AppendBlobImpl = class { + /** + * Initialize a new instance of the class AppendBlob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; + } + /** + * The Create Append Blob operation creates a new append blob. + * @param contentLength The length of the request. + * @param options The options parameters. + */ + create(contentLength$1, options) { + return this.client.sendOperationRequest({ + contentLength: contentLength$1, + options + }, createOperationSpec); + } + /** + * The Append Block operation commits a new block of data to the end of an existing append blob. The + * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to + * AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + appendBlock(contentLength$1, body$1, options) { + return this.client.sendOperationRequest({ + contentLength: contentLength$1, + body: body$1, + options + }, appendBlockOperationSpec); + } + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where + * the contents are read from a source url. The Append Block operation is permitted only if the blob + * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version + * 2015-02-21 version or later. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param options The options parameters. + */ + appendBlockFromUrl(sourceUrl$1, contentLength$1, options) { + return this.client.sendOperationRequest({ + sourceUrl: sourceUrl$1, + contentLength: contentLength$1, + options + }, appendBlockFromUrlOperationSpec); + } + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version + * 2019-12-12 version or later. + * @param options The options parameters. + */ + seal(options) { + return this.client.sendOperationRequest({ options }, sealOperationSpec); + } + }; + const xmlSerializer$1 = coreClient__namespace.createSerializer( + Mappers, + /* isXml */ + true +); + const createOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: AppendBlobCreateHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: AppendBlobCreateExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + contentLength, + metadata, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + blobCacheControl, + blobContentType, + blobContentMD5, + blobContentEncoding, + blobContentLanguage, + blobContentDisposition, + immutabilityPolicyExpiry, + immutabilityPolicyMode, + encryptionScope, + blobTagsString, + legalHold1, + blobType1 + ], + isXML: true, + serializer: xmlSerializer$1 + }; + const appendBlockOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: AppendBlobAppendBlockHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: AppendBlobAppendBlockExceptionHeaders + } + }, + requestBody: body1, + queryParameters: [timeoutInSeconds, comp22], + urlParameters: [url], + headerParameters: [ + version, + requestId, + contentLength, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + encryptionScope, + transactionalContentMD5, + transactionalContentCrc64, + contentType1, + accept2, + maxSize, + appendPosition + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer$1 + }; + const appendBlockFromUrlOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: AppendBlobAppendBlockFromUrlHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp22], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + contentLength, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + encryptionScope, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch, + sourceContentMD5, + copySourceAuthorization, + transactionalContentMD5, + sourceUrl, + sourceContentCrc64, + maxSize, + appendPosition, + sourceRange1 + ], + isXML: true, + serializer: xmlSerializer$1 + }; + const sealOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { headersMapper: AppendBlobSealHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: AppendBlobSealExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds, comp23], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + appendPosition + ], + isXML: true, + serializer: xmlSerializer$1 + }; + /** Class containing BlockBlob operations. */ + var BlockBlobImpl = class { + /** + * Initialize a new instance of the class BlockBlob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; + } + /** + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing + * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put + * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a + * partial update of the content of a block blob, use the Put Block List operation. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + upload(contentLength$1, body$1, options) { + return this.client.sendOperationRequest({ + contentLength: contentLength$1, + body: body$1, + options + }, uploadOperationSpec); + } + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read + * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are + * not supported with Put Blob from URL; the content of an existing blob is overwritten with the + * content of the new blob. To perform partial updates to a block blob’s contents using a source URL, + * use the Put Block from URL API in conjunction with Put Block List. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + putBlobFromUrl(contentLength$1, copySource$1, options) { + return this.client.sendOperationRequest({ + contentLength: contentLength$1, + copySource: copySource$1, + options + }, putBlobFromUrlOperationSpec); + } + /** + * The Stage Block operation creates a new block to be committed as part of a blob + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string + * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified + * for the blockid parameter must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + stageBlock(blockId$1, contentLength$1, body$1, options) { + return this.client.sendOperationRequest({ + blockId: blockId$1, + contentLength: contentLength$1, + body: body$1, + options + }, stageBlockOperationSpec); + } + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents + * are read from a URL. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string + * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified + * for the blockid parameter must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param options The options parameters. + */ + stageBlockFromURL(blockId$1, contentLength$1, sourceUrl$1, options) { + return this.client.sendOperationRequest({ + blockId: blockId$1, + contentLength: contentLength$1, + sourceUrl: sourceUrl$1, + options + }, stageBlockFromURLOperationSpec); + } + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the + * blob. In order to be written as part of a blob, a block must have been successfully written to the + * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading + * only those blocks that have changed, then committing the new and existing blocks together. You can + * do this by specifying whether to commit a block from the committed block list or from the + * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list + * it may belong to. + * @param blocks Blob Blocks. + * @param options The options parameters. + */ + commitBlockList(blocks$1, options) { + return this.client.sendOperationRequest({ + blocks: blocks$1, + options + }, commitBlockListOperationSpec); + } + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block + * blob + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted + * blocks, or both lists together. + * @param options The options parameters. + */ + getBlockList(listType$1, options) { + return this.client.sendOperationRequest({ + listType: listType$1, + options + }, getBlockListOperationSpec); + } + }; + const xmlSerializer = coreClient__namespace.createSerializer( + Mappers, + /* isXml */ + true +); + const uploadOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: BlockBlobUploadHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobUploadExceptionHeaders + } + }, + requestBody: body1, + queryParameters: [timeoutInSeconds], + urlParameters: [url], + headerParameters: [ + version, + requestId, + contentLength, + metadata, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + blobCacheControl, + blobContentType, + blobContentMD5, + blobContentEncoding, + blobContentLanguage, + blobContentDisposition, + immutabilityPolicyExpiry, + immutabilityPolicyMode, + encryptionScope, + tier, + blobTagsString, + legalHold1, + transactionalContentMD5, + transactionalContentCrc64, + contentType1, + accept2, + blobType2 + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer + }; + const putBlobFromUrlOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: BlockBlobPutBlobFromUrlHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + } + }, + queryParameters: [timeoutInSeconds], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + contentLength, + metadata, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + blobCacheControl, + blobContentType, + blobContentMD5, + blobContentEncoding, + blobContentLanguage, + blobContentDisposition, + encryptionScope, + tier, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch, + sourceIfTags, + copySource, + blobTagsString, + sourceContentMD5, + copySourceAuthorization, + copySourceTags, + transactionalContentMD5, + blobType2, + copySourceBlobProperties + ], + isXML: true, + serializer: xmlSerializer + }; + const stageBlockOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: BlockBlobStageBlockHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobStageBlockExceptionHeaders + } + }, + requestBody: body1, + queryParameters: [ + timeoutInSeconds, + comp24, + blockId + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + contentLength, + leaseId, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + encryptionScope, + transactionalContentMD5, + transactionalContentCrc64, + contentType1, + accept2 + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer + }; + const stageBlockFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: BlockBlobStageBlockFromURLHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + comp24, + blockId + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + contentLength, + leaseId, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + encryptionScope, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch, + sourceContentMD5, + copySourceAuthorization, + sourceUrl, + sourceContentCrc64, + sourceRange1 + ], + isXML: true, + serializer: xmlSerializer + }; + const commitBlockListOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { headersMapper: BlockBlobCommitBlockListHeaders }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobCommitBlockListExceptionHeaders + } + }, + requestBody: blocks, + queryParameters: [timeoutInSeconds, comp25], + urlParameters: [url], + headerParameters: [ + contentType, + accept, + version, + requestId, + metadata, + leaseId, + ifModifiedSince, + ifUnmodifiedSince, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifMatch, + ifNoneMatch, + ifTags, + blobCacheControl, + blobContentType, + blobContentMD5, + blobContentEncoding, + blobContentLanguage, + blobContentDisposition, + immutabilityPolicyExpiry, + immutabilityPolicyMode, + encryptionScope, + tier, + blobTagsString, + legalHold1, + transactionalContentMD5, + transactionalContentCrc64 + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer + }; + const getBlockListOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: BlockList, + headersMapper: BlockBlobGetBlockListHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobGetBlockListExceptionHeaders + } + }, + queryParameters: [ + timeoutInSeconds, + snapshot, + comp25, + listType + ], + urlParameters: [url], + headerParameters: [ + version, + requestId, + accept1, + leaseId, + ifTags + ], + isXML: true, + serializer: xmlSerializer + }; + let StorageClient$1 = class StorageClient$2 extends coreHttpCompat__namespace.ExtendedServiceClient { + /** + * Initializes a new instance of the StorageClient class. + * @param url The URL of the service account, container, or blob that is the target of the desired + * operation. + * @param options The parameter options + */ + constructor(url$1, options) { + var _a$2, _b$1; + if (url$1 === void 0) throw new Error("'url' cannot be null"); + if (!options) options = {}; + const defaults = { requestContentType: "application/json; charset=utf-8" }; + const packageDetails = `azsdk-js-azure-storage-blob/12.27.0`; + const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; + const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { + userAgentOptions: { userAgentPrefix }, + endpoint: (_b$1 = (_a$2 = options.endpoint) !== null && _a$2 !== void 0 ? _a$2 : options.baseUri) !== null && _b$1 !== void 0 ? _b$1 : "{url}" + }); + super(optionsWithDefaults); + this.url = url$1; + this.version = options.version || "2025-05-05"; + this.service = new ServiceImpl(this); + this.container = new ContainerImpl(this); + this.blob = new BlobImpl(this); + this.pageBlob = new PageBlobImpl(this); + this.appendBlob = new AppendBlobImpl(this); + this.blockBlob = new BlockBlobImpl(this); + } + }; + /** + * @internal + */ + var StorageContextClient = class extends StorageClient$1 { + async sendOperationRequest(operationArguments, operationSpec) { + const operationSpecToSend = Object.assign({}, operationSpec); + if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") operationSpecToSend.path = ""; + return super.sendOperationRequest(operationArguments, operationSpecToSend); + } + }; + /** + * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} + * and etc. + */ + var StorageClient = class { + /** + * Creates an instance of StorageClient. + * @param url - url to resource + * @param pipeline - request policy pipeline. + */ + constructor(url$1, pipeline) { + this.url = escapeURLPath(url$1); + this.accountName = getAccountNameFromUrl(url$1); + this.pipeline = pipeline; + this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); + this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); + this.credential = getCredentialFromPipeline(pipeline); + const storageClientContext = this.storageClientContext; + storageClientContext.requestContentType = void 0; + } + }; + /** + * Creates a span using the global tracer. + * @internal + */ + const tracingClient = coreTracing.createTracingClient({ + packageName: "@azure/storage-blob", + packageVersion: SDK_VERSION, + namespace: "Microsoft.Storage" + }); + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting + * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all + * the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + */ + var BlobSASPermissions = class BlobSASPermissions { + constructor() { + /** + * Specifies Read access granted. + */ + this.read = false; + /** + * Specifies Add access granted. + */ + this.add = false; + /** + * Specifies Create access granted. + */ + this.create = false; + /** + * Specifies Write access granted. + */ + this.write = false; + /** + * Specifies Delete access granted. + */ + this.delete = false; + /** + * Specifies Delete version access granted. + */ + this.deleteVersion = false; + /** + * Specfies Tag access granted. + */ + this.tag = false; + /** + * Specifies Move access granted. + */ + this.move = false; + /** + * Specifies Execute access granted. + */ + this.execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + this.setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + this.permanentDelete = false; + } + /** + * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @param permissions - + */ + static parse(permissions) { + const blobSASPermissions = new BlobSASPermissions(); + for (const char of permissions) switch (char) { + case "r": + blobSASPermissions.read = true; + break; + case "a": + blobSASPermissions.add = true; + break; + case "c": + blobSASPermissions.create = true; + break; + case "w": + blobSASPermissions.write = true; + break; + case "d": + blobSASPermissions.delete = true; + break; + case "x": + blobSASPermissions.deleteVersion = true; + break; + case "t": + blobSASPermissions.tag = true; + break; + case "m": + blobSASPermissions.move = true; + break; + case "e": + blobSASPermissions.execute = true; + break; + case "i": + blobSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + blobSASPermissions.permanentDelete = true; + break; + default: throw new RangeError(`Invalid permission: ${char}`); + } + return blobSASPermissions; + } + /** + * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - + */ + static from(permissionLike) { + const blobSASPermissions = new BlobSASPermissions(); + if (permissionLike.read) blobSASPermissions.read = true; + if (permissionLike.add) blobSASPermissions.add = true; + if (permissionLike.create) blobSASPermissions.create = true; + if (permissionLike.write) blobSASPermissions.write = true; + if (permissionLike.delete) blobSASPermissions.delete = true; + if (permissionLike.deleteVersion) blobSASPermissions.deleteVersion = true; + if (permissionLike.tag) blobSASPermissions.tag = true; + if (permissionLike.move) blobSASPermissions.move = true; + if (permissionLike.execute) blobSASPermissions.execute = true; + if (permissionLike.setImmutabilityPolicy) blobSASPermissions.setImmutabilityPolicy = true; + if (permissionLike.permanentDelete) blobSASPermissions.permanentDelete = true; + return blobSASPermissions; + } + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * @returns A string which represents the BlobSASPermissions + */ + toString() { + const permissions = []; + if (this.read) permissions.push("r"); + if (this.add) permissions.push("a"); + if (this.create) permissions.push("c"); + if (this.write) permissions.push("w"); + if (this.delete) permissions.push("d"); + if (this.deleteVersion) permissions.push("x"); + if (this.tag) permissions.push("t"); + if (this.move) permissions.push("m"); + if (this.execute) permissions.push("e"); + if (this.setImmutabilityPolicy) permissions.push("i"); + if (this.permanentDelete) permissions.push("y"); + return permissions.join(""); + } + }; + /** + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. + * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. + * Once all the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + */ + var ContainerSASPermissions = class ContainerSASPermissions { + constructor() { + /** + * Specifies Read access granted. + */ + this.read = false; + /** + * Specifies Add access granted. + */ + this.add = false; + /** + * Specifies Create access granted. + */ + this.create = false; + /** + * Specifies Write access granted. + */ + this.write = false; + /** + * Specifies Delete access granted. + */ + this.delete = false; + /** + * Specifies Delete version access granted. + */ + this.deleteVersion = false; + /** + * Specifies List access granted. + */ + this.list = false; + /** + * Specfies Tag access granted. + */ + this.tag = false; + /** + * Specifies Move access granted. + */ + this.move = false; + /** + * Specifies Execute access granted. + */ + this.execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + this.setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + this.permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + this.filterByTags = false; + } + /** + * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @param permissions - + */ + static parse(permissions) { + const containerSASPermissions = new ContainerSASPermissions(); + for (const char of permissions) switch (char) { + case "r": + containerSASPermissions.read = true; + break; + case "a": + containerSASPermissions.add = true; + break; + case "c": + containerSASPermissions.create = true; + break; + case "w": + containerSASPermissions.write = true; + break; + case "d": + containerSASPermissions.delete = true; + break; + case "l": + containerSASPermissions.list = true; + break; + case "t": + containerSASPermissions.tag = true; + break; + case "x": + containerSASPermissions.deleteVersion = true; + break; + case "m": + containerSASPermissions.move = true; + break; + case "e": + containerSASPermissions.execute = true; + break; + case "i": + containerSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + containerSASPermissions.permanentDelete = true; + break; + case "f": + containerSASPermissions.filterByTags = true; + break; + default: throw new RangeError(`Invalid permission ${char}`); + } + return containerSASPermissions; + } + /** + * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - + */ + static from(permissionLike) { + const containerSASPermissions = new ContainerSASPermissions(); + if (permissionLike.read) containerSASPermissions.read = true; + if (permissionLike.add) containerSASPermissions.add = true; + if (permissionLike.create) containerSASPermissions.create = true; + if (permissionLike.write) containerSASPermissions.write = true; + if (permissionLike.delete) containerSASPermissions.delete = true; + if (permissionLike.list) containerSASPermissions.list = true; + if (permissionLike.deleteVersion) containerSASPermissions.deleteVersion = true; + if (permissionLike.tag) containerSASPermissions.tag = true; + if (permissionLike.move) containerSASPermissions.move = true; + if (permissionLike.execute) containerSASPermissions.execute = true; + if (permissionLike.setImmutabilityPolicy) containerSASPermissions.setImmutabilityPolicy = true; + if (permissionLike.permanentDelete) containerSASPermissions.permanentDelete = true; + if (permissionLike.filterByTags) containerSASPermissions.filterByTags = true; + return containerSASPermissions; + } + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * The order of the characters should be as specified here to ensure correctness. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + */ + toString() { + const permissions = []; + if (this.read) permissions.push("r"); + if (this.add) permissions.push("a"); + if (this.create) permissions.push("c"); + if (this.write) permissions.push("w"); + if (this.delete) permissions.push("d"); + if (this.deleteVersion) permissions.push("x"); + if (this.list) permissions.push("l"); + if (this.tag) permissions.push("t"); + if (this.move) permissions.push("m"); + if (this.execute) permissions.push("e"); + if (this.setImmutabilityPolicy) permissions.push("i"); + if (this.permanentDelete) permissions.push("y"); + if (this.filterByTags) permissions.push("f"); + return permissions.join(""); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * UserDelegationKeyCredential is only used for generation of user delegation SAS. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas + */ + var UserDelegationKeyCredential = class { + /** + * Creates an instance of UserDelegationKeyCredential. + * @param accountName - + * @param userDelegationKey - + */ + constructor(accountName, userDelegationKey) { + this.accountName = accountName; + this.userDelegationKey = userDelegationKey; + this.key = Buffer.from(userDelegationKey.value, "base64"); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + } + }; + /** + * Generate SasIPRange format string. For example: + * + * "8.8.8.8" or "1.1.1.1-255.255.255.255" + * + * @param ipRange - + */ + function ipRangeToString(ipRange) { + return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; + } + /** + * Protocols for generated SAS. + */ + exports.SASProtocol = void 0; + (function(SASProtocol) { + /** + * Protocol that allows HTTPS only + */ + SASProtocol["Https"] = "https"; + /** + * Protocol that allows both HTTPS and HTTP + */ + SASProtocol["HttpsAndHttp"] = "https,http"; + })(exports.SASProtocol || (exports.SASProtocol = {})); + /** + * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly + * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} + * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should + * be taken here in case there are existing query parameters, which might affect the appropriate means of appending + * these query parameters). + * + * NOTE: Instances of this class are immutable. + */ + var SASQueryParameters = class { + /** + * Optional. IP range allowed for this SAS. + * + * @readonly + */ + get ipRange() { + if (this.ipRangeInner) return { + end: this.ipRangeInner.end, + start: this.ipRangeInner.start + }; + return void 0; + } + constructor(version$1, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn$1, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType$1, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope$1) { + this.version = version$1; + this.signature = signature; + if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { + this.permissions = permissionsOrOptions.permissions; + this.services = permissionsOrOptions.services; + this.resourceTypes = permissionsOrOptions.resourceTypes; + this.protocol = permissionsOrOptions.protocol; + this.startsOn = permissionsOrOptions.startsOn; + this.expiresOn = permissionsOrOptions.expiresOn; + this.ipRangeInner = permissionsOrOptions.ipRange; + this.identifier = permissionsOrOptions.identifier; + this.encryptionScope = permissionsOrOptions.encryptionScope; + this.resource = permissionsOrOptions.resource; + this.cacheControl = permissionsOrOptions.cacheControl; + this.contentDisposition = permissionsOrOptions.contentDisposition; + this.contentEncoding = permissionsOrOptions.contentEncoding; + this.contentLanguage = permissionsOrOptions.contentLanguage; + this.contentType = permissionsOrOptions.contentType; + if (permissionsOrOptions.userDelegationKey) { + this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; + this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; + this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; + this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; + this.signedService = permissionsOrOptions.userDelegationKey.signedService; + this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; + this.correlationId = permissionsOrOptions.correlationId; + } + } else { + this.services = services; + this.resourceTypes = resourceTypes; + this.expiresOn = expiresOn$1; + this.permissions = permissionsOrOptions; + this.protocol = protocol; + this.startsOn = startsOn; + this.ipRangeInner = ipRange; + this.encryptionScope = encryptionScope$1; + this.identifier = identifier; + this.resource = resource; + this.cacheControl = cacheControl; + this.contentDisposition = contentDisposition; + this.contentEncoding = contentEncoding; + this.contentLanguage = contentLanguage; + this.contentType = contentType$1; + if (userDelegationKey) { + this.signedOid = userDelegationKey.signedObjectId; + this.signedTenantId = userDelegationKey.signedTenantId; + this.signedStartsOn = userDelegationKey.signedStartsOn; + this.signedExpiresOn = userDelegationKey.signedExpiresOn; + this.signedService = userDelegationKey.signedService; + this.signedVersion = userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; + this.correlationId = correlationId; + } + } + } + /** + * Encodes all SAS query parameters into a string that can be appended to a URL. + * + */ + toString() { + const params = [ + "sv", + "ss", + "srt", + "spr", + "st", + "se", + "sip", + "si", + "ses", + "skoid", + "sktid", + "skt", + "ske", + "sks", + "skv", + "sr", + "sp", + "sig", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "saoid", + "scid" + ]; + const queries = []; + for (const param of params) switch (param) { + case "sv": + this.tryAppendQueryParameter(queries, param, this.version); + break; + case "ss": + this.tryAppendQueryParameter(queries, param, this.services); + break; + case "srt": + this.tryAppendQueryParameter(queries, param, this.resourceTypes); + break; + case "spr": + this.tryAppendQueryParameter(queries, param, this.protocol); + break; + case "st": + this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + break; + case "se": + this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + break; + case "sip": + this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + break; + case "si": + this.tryAppendQueryParameter(queries, param, this.identifier); + break; + case "ses": + this.tryAppendQueryParameter(queries, param, this.encryptionScope); + break; + case "skoid": + this.tryAppendQueryParameter(queries, param, this.signedOid); + break; + case "sktid": + this.tryAppendQueryParameter(queries, param, this.signedTenantId); + break; + case "skt": + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + break; + case "ske": + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + break; + case "sks": + this.tryAppendQueryParameter(queries, param, this.signedService); + break; + case "skv": + this.tryAppendQueryParameter(queries, param, this.signedVersion); + break; + case "sr": + this.tryAppendQueryParameter(queries, param, this.resource); + break; + case "sp": + this.tryAppendQueryParameter(queries, param, this.permissions); + break; + case "sig": + this.tryAppendQueryParameter(queries, param, this.signature); + break; + case "rscc": + this.tryAppendQueryParameter(queries, param, this.cacheControl); + break; + case "rscd": + this.tryAppendQueryParameter(queries, param, this.contentDisposition); + break; + case "rsce": + this.tryAppendQueryParameter(queries, param, this.contentEncoding); + break; + case "rscl": + this.tryAppendQueryParameter(queries, param, this.contentLanguage); + break; + case "rsct": + this.tryAppendQueryParameter(queries, param, this.contentType); + break; + case "saoid": + this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); + break; + case "scid": + this.tryAppendQueryParameter(queries, param, this.correlationId); + break; + } + return queries.join("&"); + } + /** + * A private helper method used to filter and append query key/value pairs into an array. + * + * @param queries - + * @param key - + * @param value - + */ + tryAppendQueryParameter(queries, key, value) { + if (!value) return; + key = encodeURIComponent(key); + value = encodeURIComponent(value); + if (key.length > 0 && value.length > 0) queries.push(`${key}=${value}`); + } + }; + function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; + } + function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + const version$1 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + let userDelegationKeyCredential; + if (sharedKeyCredential === void 0 && accountName !== void 0) userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); + if (version$1 >= "2020-12-06") if (sharedKeyCredential !== void 0) return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); + else return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version$1 >= "2018-11-09") if (sharedKeyCredential !== void 0) return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); + else if (version$1 >= "2020-02-10") return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); + else return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); + if (version$1 >= "2015-04-05") if (sharedKeyCredential !== void 0) return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); + else throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); + throw new RangeError("'version' must be >= '2015-04-05'."); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - + */ + function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + let resource = "c"; + if (blobSASSignatureValues.blobName) resource = "b"; + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - + */ + function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - + */ + function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ + function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-02-10. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ + function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + stringToSign + }; + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ + function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) resource = "bs"; + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) if (blobSASSignatureValues.blobName) verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + else verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function getCanonicalName(accountName, containerName, blobName) { + const elements = [`/blob/${accountName}/${containerName}`]; + if (blobName) elements.push(`/${blobName}`); + return elements.join(""); + } + function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { + const version$1 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version$1 < "2018-11-09") throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); + if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); + if (blobSASSignatureValues.versionId && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); + if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) throw RangeError("Must provide 'blobName' when providing 'versionId'."); + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version$1 < "2020-08-04") throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version$1 < "2019-12-12") throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); + if (version$1 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); + if (version$1 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); + if (version$1 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); + if (blobSASSignatureValues.encryptionScope && version$1 < "2020-12-06") throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); + blobSASSignatureValues.version = version$1; + return blobSASSignatureValues; + } + /** + * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. + */ + var BlobLeaseClient = class { + /** + * Gets the lease Id. + * + * @readonly + */ + get leaseId() { + return this._leaseId; + } + /** + * Gets the url. + * + * @readonly + */ + get url() { + return this._url; + } + /** + * Creates an instance of BlobLeaseClient. + * @param client - The client to make the lease operation requests. + * @param leaseId - Initial proposed lease id. + */ + constructor(client, leaseId$1) { + const clientContext = client.storageClientContext; + this._url = client.url; + if (client.name === void 0) { + this._isContainer = true; + this._containerOrBlobOperation = clientContext.container; + } else { + this._isContainer = false; + this._containerOrBlobOperation = clientContext.blob; + } + if (!leaseId$1) leaseId$1 = coreUtil.randomUUID(); + this._leaseId = leaseId$1; + } + /** + * Establishes and manages a lock on a container for delete operations, or on a blob + * for write and delete operations. + * The lock duration can be 15 to 60 seconds, or can be infinite. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param duration - Must be between 15 to 60 seconds, or infinite (-1) + * @param options - option to configure lease management operations. + * @returns Response data for acquire lease operation. + */ + async acquireLease(duration$1, options = {}) { + var _a$2, _b$1, _c$1, _d$1, _e; + if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + var _a$3; + return assertResponse(await this._containerOrBlobOperation.acquireLease({ + abortSignal: options.abortSignal, + duration: duration$1, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), + proposedLeaseId: this._leaseId, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * To change the ID of the lease. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param proposedLeaseId - the proposed new lease Id. + * @param options - option to configure lease management operations. + * @returns Response data for change lease operation. + */ + async changeLease(proposedLeaseId$1, options = {}) { + var _a$2, _b$1, _c$1, _d$1, _e; + if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + var _a$3; + const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId$1, { + abortSignal: options.abortSignal, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + })); + this._leaseId = proposedLeaseId$1; + return response; + }); + } + /** + * To free the lease if it is no longer needed so that another client may + * immediately acquire a lease against the container or the blob. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param options - option to configure lease management operations. + * @returns Response data for release lease operation. + */ + async releaseLease(options = {}) { + var _a$2, _b$1, _c$1, _d$1, _e; + if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + var _a$3; + return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * To renew the lease. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param options - Optional option to configure lease management operations. + * @returns Response data for renew lease operation. + */ + async renewLease(options = {}) { + var _a$2, _b$1, _c$1, _d$1, _e; + if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { + var _a$3; + return this._containerOrBlobOperation.renewLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + }); + }); + } + /** + * To end the lease but ensure that another client cannot acquire a new lease + * until the current lease period has expired. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param breakPeriod - Break period + * @param options - Optional options to configure lease management operations. + * @returns Response data for break lease operation. + */ + async breakLease(breakPeriod$1, options = {}) { + var _a$2, _b$1, _c$1, _d$1, _e; + if (this._isContainer && (((_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.ifMatch) && ((_b$1 = options.conditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch) !== ETagNone || ((_c$1 = options.conditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifNoneMatch) && ((_d$1 = options.conditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { + var _a$3; + const operationOptions = { + abortSignal: options.abortSignal, + breakPeriod: breakPeriod$1, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + }; + return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + }); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends. + */ + var RetriableReadableStream = class extends stream$1.Readable { + /** + * Creates an instance of RetriableReadableStream. + * + * @param source - The current ReadableStream returned from getter + * @param getter - A method calling downloading request returning + * a new ReadableStream from specified offset + * @param offset - Offset position in original data source to read + * @param count - How much data in original data source to read + * @param options - + */ + constructor(source, getter, offset, count, options = {}) { + super({ highWaterMark: options.highWaterMark }); + this.retries = 0; + this.sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) this.onProgress({ loadedBytes: this.offset - this.start }); + if (!this.push(data)) this.source.pause(); + }; + this.sourceAbortedHandler = () => { + const abortError = new abortController.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + this.sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) this.push(null); + else if (this.offset <= this.end) if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error) => { + this.destroy(error); + }); + } else this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + else this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + }; + this.getter = getter; + this.source = source; + this.start = offset; + this.offset = offset; + this.end = offset + count - 1; + this.maxRetryRequests = options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; + this.onProgress = options.onProgress; + this.options = options; + this.setSourceEventHandlers(); + } + _read() { + this.source.resume(); + } + setSourceEventHandlers() { + this.source.on("data", this.sourceDataHandler); + this.source.on("end", this.sourceErrorOrEndHandler); + this.source.on("error", this.sourceErrorOrEndHandler); + this.source.on("aborted", this.sourceAbortedHandler); + } + removeSourceEventHandlers() { + this.source.removeListener("data", this.sourceDataHandler); + this.source.removeListener("end", this.sourceErrorOrEndHandler); + this.source.removeListener("error", this.sourceErrorOrEndHandler); + this.source.removeListener("aborted", this.sourceAbortedHandler); + } + _destroy(error, callback) { + this.removeSourceEventHandlers(); + this.source.destroy(); + callback(error === null ? void 0 : error); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will + * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot + * trigger retries defined in pipeline retry policy.) + * + * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js + * Readable stream. + */ + var BlobDownloadResponse = class { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + */ + get acceptRanges() { + return this.originalResponse.acceptRanges; + } + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + */ + get cacheControl() { + return this.originalResponse.cacheControl; + } + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + */ + get contentDisposition() { + return this.originalResponse.contentDisposition; + } + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + */ + get contentEncoding() { + return this.originalResponse.contentEncoding; + } + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + */ + get contentLanguage() { + return this.originalResponse.contentLanguage; + } + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + */ + get blobSequenceNumber() { + return this.originalResponse.blobSequenceNumber; + } + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + */ + get blobType() { + return this.originalResponse.blobType; + } + /** + * The number of bytes present in the + * response body. + * + * @readonly + */ + get contentLength() { + return this.originalResponse.contentLength; + } + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + */ + get contentMD5() { + return this.originalResponse.contentMD5; + } + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + */ + get contentRange() { + return this.originalResponse.contentRange; + } + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + */ + get contentType() { + return this.originalResponse.contentType; + } + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + */ + get copyCompletedOn() { + return this.originalResponse.copyCompletedOn; + } + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + */ + get copyId() { + return this.originalResponse.copyId; + } + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + */ + get copyProgress() { + return this.originalResponse.copyProgress; + } + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + */ + get copySource() { + return this.originalResponse.copySource; + } + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + */ + get copyStatus() { + return this.originalResponse.copyStatus; + } + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + */ + get copyStatusDescription() { + return this.originalResponse.copyStatusDescription; + } + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + */ + get leaseDuration() { + return this.originalResponse.leaseDuration; + } + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + */ + get leaseState() { + return this.originalResponse.leaseState; + } + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + */ + get leaseStatus() { + return this.originalResponse.leaseStatus; + } + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + */ + get date() { + return this.originalResponse.date; + } + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + */ + get blobCommittedBlockCount() { + return this.originalResponse.blobCommittedBlockCount; + } + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + */ + get etag() { + return this.originalResponse.etag; + } + /** + * The number of tags associated with the blob + * + * @readonly + */ + get tagCount() { + return this.originalResponse.tagCount; + } + /** + * The error code. + * + * @readonly + */ + get errorCode() { + return this.originalResponse.errorCode; + } + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + */ + get isServerEncrypted() { + return this.originalResponse.isServerEncrypted; + } + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + */ + get blobContentMD5() { + return this.originalResponse.blobContentMD5; + } + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + */ + get lastModified() { + return this.originalResponse.lastModified; + } + /** + * Returns the UTC date and time generated by the service that indicates the time at which the blob was + * last read or written to. + * + * @readonly + */ + get lastAccessed() { + return this.originalResponse.lastAccessed; + } + /** + * Returns the date and time the blob was created. + * + * @readonly + */ + get createdOn() { + return this.originalResponse.createdOn; + } + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + */ + get metadata() { + return this.originalResponse.metadata; + } + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + */ + get requestId() { + return this.originalResponse.requestId; + } + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + */ + get clientRequestId() { + return this.originalResponse.clientRequestId; + } + /** + * Indicates the version of the Blob service used + * to execute the request. + * + * @readonly + */ + get version() { + return this.originalResponse.version; + } + /** + * Indicates the versionId of the downloaded blob version. + * + * @readonly + */ + get versionId() { + return this.originalResponse.versionId; + } + /** + * Indicates whether version of this blob is a current version. + * + * @readonly + */ + get isCurrentVersion() { + return this.originalResponse.isCurrentVersion; + } + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + */ + get encryptionKeySha256() { + return this.originalResponse.encryptionKeySha256; + } + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + get contentCrc64() { + return this.originalResponse.contentCrc64; + } + /** + * Object Replication Policy Id of the destination blob. + * + * @readonly + */ + get objectReplicationDestinationPolicyId() { + return this.originalResponse.objectReplicationDestinationPolicyId; + } + /** + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. + * + * @readonly + */ + get objectReplicationSourceProperties() { + return this.originalResponse.objectReplicationSourceProperties; + } + /** + * If this blob has been sealed. + * + * @readonly + */ + get isSealed() { + return this.originalResponse.isSealed; + } + /** + * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. + * + * @readonly + */ + get immutabilityPolicyExpiresOn() { + return this.originalResponse.immutabilityPolicyExpiresOn; + } + /** + * Indicates immutability policy mode. + * + * @readonly + */ + get immutabilityPolicyMode() { + return this.originalResponse.immutabilityPolicyMode; + } + /** + * Indicates if a legal hold is present on the blob. + * + * @readonly + */ + get legalHold() { + return this.originalResponse.legalHold; + } + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + */ + get contentAsBlob() { + return this.originalResponse.blobBody; + } + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will automatically retry when internal read stream unexpected ends. + * + * @readonly + */ + get readableStreamBody() { + return coreUtil.isNode ? this.blobDownloadStream : void 0; + } + /** + * The HTTP response. + */ + get _response() { + return this.originalResponse._response; + } + /** + * Creates an instance of BlobDownloadResponse. + * + * @param originalResponse - + * @param getter - + * @param offset - + * @param count - + * @param options - + */ + constructor(originalResponse$1, getter, offset, count, options = {}) { + this.originalResponse = originalResponse$1; + this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + } + }; + const AVRO_SYNC_MARKER_SIZE = 16; + const AVRO_INIT_BYTES = new Uint8Array([ + 79, + 98, + 106, + 1 + ]); + const AVRO_CODEC_KEY = "avro.codec"; + const AVRO_SCHEMA_KEY = "avro.schema"; + var AvroParser = class AvroParser { + /** + * Reads a fixed number of bytes from the stream. + * + * @param stream - + * @param length - + * @param options - + */ + static async readFixedBytes(stream$2, length, options = {}) { + const bytes = await stream$2.read(length, { abortSignal: options.abortSignal }); + if (bytes.length !== length) throw new Error("Hit stream end."); + return bytes; + } + /** + * Reads a single byte from the stream. + * + * @param stream - + * @param options - + */ + static async readByte(stream$2, options = {}) { + const buf = await AvroParser.readFixedBytes(stream$2, 1, options); + return buf[0]; + } + static async readZigZagLong(stream$2, options = {}) { + let zigZagEncoded = 0; + let significanceInBit = 0; + let byte, haveMoreByte, significanceInFloat; + do { + byte = await AvroParser.readByte(stream$2, options); + haveMoreByte = byte & 128; + zigZagEncoded |= (byte & 127) << significanceInBit; + significanceInBit += 7; + } while (haveMoreByte && significanceInBit < 28); + if (haveMoreByte) { + zigZagEncoded = zigZagEncoded; + significanceInFloat = 268435456; + do { + byte = await AvroParser.readByte(stream$2, options); + zigZagEncoded += (byte & 127) * significanceInFloat; + significanceInFloat *= 128; + } while (byte & 128); + const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; + if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) throw new Error("Integer overflow."); + return res; + } + return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); + } + static async readLong(stream$2, options = {}) { + return AvroParser.readZigZagLong(stream$2, options); + } + static async readInt(stream$2, options = {}) { + return AvroParser.readZigZagLong(stream$2, options); + } + static async readNull() { + return null; + } + static async readBoolean(stream$2, options = {}) { + const b = await AvroParser.readByte(stream$2, options); + if (b === 1) return true; + else if (b === 0) return false; + else throw new Error("Byte was not a boolean."); + } + static async readFloat(stream$2, options = {}) { + const u8arr = await AvroParser.readFixedBytes(stream$2, 4, options); + const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return view.getFloat32(0, true); + } + static async readDouble(stream$2, options = {}) { + const u8arr = await AvroParser.readFixedBytes(stream$2, 8, options); + const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return view.getFloat64(0, true); + } + static async readBytes(stream$2, options = {}) { + const size = await AvroParser.readLong(stream$2, options); + if (size < 0) throw new Error("Bytes size was negative."); + return stream$2.read(size, { abortSignal: options.abortSignal }); + } + static async readString(stream$2, options = {}) { + const u8arr = await AvroParser.readBytes(stream$2, options); + const utf8decoder = new TextDecoder(); + return utf8decoder.decode(u8arr); + } + static async readMapPair(stream$2, readItemMethod, options = {}) { + const key = await AvroParser.readString(stream$2, options); + const value = await readItemMethod(stream$2, options); + return { + key, + value + }; + } + static async readMap(stream$2, readItemMethod, options = {}) { + const readPairMethod = (s$1, opts = {}) => { + return AvroParser.readMapPair(s$1, readItemMethod, opts); + }; + const pairs = await AvroParser.readArray(stream$2, readPairMethod, options); + const dict = {}; + for (const pair of pairs) dict[pair.key] = pair.value; + return dict; + } + static async readArray(stream$2, readItemMethod, options = {}) { + const items = []; + for (let count = await AvroParser.readLong(stream$2, options); count !== 0; count = await AvroParser.readLong(stream$2, options)) { + if (count < 0) { + await AvroParser.readLong(stream$2, options); + count = -count; + } + while (count--) { + const item = await readItemMethod(stream$2, options); + items.push(item); + } + } + return items; + } + }; + var AvroComplex; + (function(AvroComplex$1) { + AvroComplex$1["RECORD"] = "record"; + AvroComplex$1["ENUM"] = "enum"; + AvroComplex$1["ARRAY"] = "array"; + AvroComplex$1["MAP"] = "map"; + AvroComplex$1["UNION"] = "union"; + AvroComplex$1["FIXED"] = "fixed"; + })(AvroComplex || (AvroComplex = {})); + var AvroPrimitive; + (function(AvroPrimitive$1) { + AvroPrimitive$1["NULL"] = "null"; + AvroPrimitive$1["BOOLEAN"] = "boolean"; + AvroPrimitive$1["INT"] = "int"; + AvroPrimitive$1["LONG"] = "long"; + AvroPrimitive$1["FLOAT"] = "float"; + AvroPrimitive$1["DOUBLE"] = "double"; + AvroPrimitive$1["BYTES"] = "bytes"; + AvroPrimitive$1["STRING"] = "string"; + })(AvroPrimitive || (AvroPrimitive = {})); + var AvroType = class AvroType { + /** + * Determines the AvroType from the Avro Schema. + */ + static fromSchema(schema) { + if (typeof schema === "string") return AvroType.fromStringSchema(schema); + else if (Array.isArray(schema)) return AvroType.fromArraySchema(schema); + else return AvroType.fromObjectSchema(schema); + } + static fromStringSchema(schema) { + switch (schema) { + case AvroPrimitive.NULL: + case AvroPrimitive.BOOLEAN: + case AvroPrimitive.INT: + case AvroPrimitive.LONG: + case AvroPrimitive.FLOAT: + case AvroPrimitive.DOUBLE: + case AvroPrimitive.BYTES: + case AvroPrimitive.STRING: return new AvroPrimitiveType(schema); + default: throw new Error(`Unexpected Avro type ${schema}`); + } + } + static fromArraySchema(schema) { + return new AvroUnionType(schema.map(AvroType.fromSchema)); + } + static fromObjectSchema(schema) { + const type = schema.type; + try { + return AvroType.fromStringSchema(type); + } catch (_a$2) {} + switch (type) { + case AvroComplex.RECORD: + if (schema.aliases) throw new Error(`aliases currently is not supported, schema: ${schema}`); + if (!schema.name) throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); + const fields = {}; + if (!schema.fields) throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); + for (const field of schema.fields) fields[field.name] = AvroType.fromSchema(field.type); + return new AvroRecordType(fields, schema.name); + case AvroComplex.ENUM: + if (schema.aliases) throw new Error(`aliases currently is not supported, schema: ${schema}`); + if (!schema.symbols) throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); + return new AvroEnumType(schema.symbols); + case AvroComplex.MAP: + if (!schema.values) throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); + return new AvroMapType(AvroType.fromSchema(schema.values)); + case AvroComplex.ARRAY: + case AvroComplex.FIXED: + default: throw new Error(`Unexpected Avro type ${type} in ${schema}`); + } + } + }; + var AvroPrimitiveType = class extends AvroType { + constructor(primitive) { + super(); + this._primitive = primitive; + } + read(stream$2, options = {}) { + switch (this._primitive) { + case AvroPrimitive.NULL: return AvroParser.readNull(); + case AvroPrimitive.BOOLEAN: return AvroParser.readBoolean(stream$2, options); + case AvroPrimitive.INT: return AvroParser.readInt(stream$2, options); + case AvroPrimitive.LONG: return AvroParser.readLong(stream$2, options); + case AvroPrimitive.FLOAT: return AvroParser.readFloat(stream$2, options); + case AvroPrimitive.DOUBLE: return AvroParser.readDouble(stream$2, options); + case AvroPrimitive.BYTES: return AvroParser.readBytes(stream$2, options); + case AvroPrimitive.STRING: return AvroParser.readString(stream$2, options); + default: throw new Error("Unknown Avro Primitive"); + } + } + }; + var AvroEnumType = class extends AvroType { + constructor(symbols) { + super(); + this._symbols = symbols; + } + async read(stream$2, options = {}) { + const value = await AvroParser.readInt(stream$2, options); + return this._symbols[value]; + } + }; + var AvroUnionType = class extends AvroType { + constructor(types) { + super(); + this._types = types; + } + async read(stream$2, options = {}) { + const typeIndex = await AvroParser.readInt(stream$2, options); + return this._types[typeIndex].read(stream$2, options); + } + }; + var AvroMapType = class extends AvroType { + constructor(itemType) { + super(); + this._itemType = itemType; + } + read(stream$2, options = {}) { + const readItemMethod = (s$1, opts) => { + return this._itemType.read(s$1, opts); + }; + return AvroParser.readMap(stream$2, readItemMethod, options); + } + }; + var AvroRecordType = class extends AvroType { + constructor(fields, name) { + super(); + this._fields = fields; + this._name = name; + } + async read(stream$2, options = {}) { + const record = {}; + record["$schema"] = this._name; + for (const key in this._fields) if (Object.prototype.hasOwnProperty.call(this._fields, key)) record[key] = await this._fields[key].read(stream$2, options); + return record; + } + }; + function arraysEqual(a, b) { + if (a === b) return true; + if (a == null || b == null) return false; + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; ++i) if (a[i] !== b[i]) return false; + return true; + } + var AvroReader = class { + get blockOffset() { + return this._blockOffset; + } + get objectIndex() { + return this._objectIndex; + } + constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { + this._dataStream = dataStream; + this._headerStream = headerStream || dataStream; + this._initialized = false; + this._blockOffset = currentBlockOffset || 0; + this._objectIndex = indexWithinCurrentBlock || 0; + this._initialBlockOffset = currentBlockOffset || 0; + } + async initialize(options = {}) { + const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); + if (!arraysEqual(header, AVRO_INIT_BYTES)) throw new Error("Stream is not an Avro file."); + this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { abortSignal: options.abortSignal }); + const codec = this._metadata[AVRO_CODEC_KEY]; + if (!(codec === void 0 || codec === null || codec === "null")) throw new Error("Codecs are not supported"); + this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); + const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); + this._itemType = AvroType.fromSchema(schema); + if (this._blockOffset === 0) this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + this._initialized = true; + if (this._objectIndex && this._objectIndex > 0) for (let i = 0; i < this._objectIndex; i++) { + await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); + this._itemsRemainingInBlock--; + } + } + hasNext() { + return !this._initialized || this._itemsRemainingInBlock > 0; + } + parseObjects() { + return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { + if (!this._initialized) yield tslib.__await(this.initialize(options)); + while (this.hasNext()) { + const result = yield tslib.__await(this._itemType.read(this._dataStream, { abortSignal: options.abortSignal })); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker$1 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal })); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!arraysEqual(this._syncMarker, marker$1)) throw new Error("Stream is not a valid Avro file."); + try { + this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); + } catch (_a$2) { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); + } + yield yield tslib.__await(result); + } + }); + } + }; + var AvroReadable = class {}; + const ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable { + toUint8Array(data) { + if (typeof data === "string") return Buffer.from(data); + return data; + } + constructor(readable) { + super(); + this._readable = readable; + this._position = 0; + } + get position() { + return this._position; + } + async read(size, options = {}) { + var _a$2; + if ((_a$2 = options.abortSignal) === null || _a$2 === void 0 ? void 0 : _a$2.aborted) throw ABORT_ERROR; + if (size < 0) throw new Error(`size parameter should be positive: ${size}`); + if (size === 0) return new Uint8Array(); + if (!this._readable.readable) throw new Error("Stream no longer readable."); + const chunk = this._readable.read(size); + if (chunk) { + this._position += chunk.length; + return this.toUint8Array(chunk); + } else return new Promise((resolve, reject) => { + const cleanUp = () => { + this._readable.removeListener("readable", readableCallback); + this._readable.removeListener("error", rejectCallback); + this._readable.removeListener("end", rejectCallback); + this._readable.removeListener("close", rejectCallback); + if (options.abortSignal) options.abortSignal.removeEventListener("abort", abortHandler); + }; + const readableCallback = () => { + const callbackChunk = this._readable.read(size); + if (callbackChunk) { + this._position += callbackChunk.length; + cleanUp(); + resolve(this.toUint8Array(callbackChunk)); + } + }; + const rejectCallback = () => { + cleanUp(); + reject(); + }; + const abortHandler = () => { + cleanUp(); + reject(ABORT_ERROR); + }; + this._readable.on("readable", readableCallback); + this._readable.once("error", rejectCallback); + this._readable.once("end", rejectCallback); + this._readable.once("close", rejectCallback); + if (options.abortSignal) options.abortSignal.addEventListener("abort", abortHandler); + }); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query. + */ + var BlobQuickQueryStream = class extends stream$1.Readable { + /** + * Creates an instance of BlobQuickQueryStream. + * + * @param source - The current ReadableStream returned from getter + * @param options - + */ + constructor(source, options = {}) { + super(); + this.avroPaused = true; + this.source = source; + this.onProgress = options.onProgress; + this.onError = options.onError; + this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); + } + _read() { + if (this.avroPaused) this.readInternal().catch((err) => { + this.emit("error", err); + }); + } + async readInternal() { + this.avroPaused = false; + let avroNext; + do { + avroNext = await this.avroIter.next(); + if (avroNext.done) break; + const obj = avroNext.value; + const schema = obj.$schema; + if (typeof schema !== "string") throw Error("Missing schema in avro record."); + switch (schema) { + case "com.microsoft.azure.storage.queryBlobContents.resultData": + { + const data = obj.data; + if (data instanceof Uint8Array === false) throw Error("Invalid data in avro result record."); + if (!this.push(Buffer.from(data))) this.avroPaused = true; + } + break; + case "com.microsoft.azure.storage.queryBlobContents.progress": + { + const bytesScanned = obj.bytesScanned; + if (typeof bytesScanned !== "number") throw Error("Invalid bytesScanned in avro progress record."); + if (this.onProgress) this.onProgress({ loadedBytes: bytesScanned }); + } + break; + case "com.microsoft.azure.storage.queryBlobContents.end": + if (this.onProgress) { + const totalBytes = obj.totalBytes; + if (typeof totalBytes !== "number") throw Error("Invalid totalBytes in avro end record."); + this.onProgress({ loadedBytes: totalBytes }); + } + this.push(null); + break; + case "com.microsoft.azure.storage.queryBlobContents.error": + if (this.onError) { + const fatal = obj.fatal; + if (typeof fatal !== "boolean") throw Error("Invalid fatal in avro error record."); + const name = obj.name; + if (typeof name !== "string") throw Error("Invalid name in avro error record."); + const description = obj.description; + if (typeof description !== "string") throw Error("Invalid description in avro error record."); + const position = obj.position; + if (typeof position !== "number") throw Error("Invalid position in avro error record."); + this.onError({ + position, + name, + isFatal: fatal, + description + }); + } + break; + default: throw Error(`Unknown schema ${schema} in avro progress record.`); + } + } while (!avroNext.done && !this.avroPaused); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will + * parse avor data returned by blob query. + */ + var BlobQueryResponse = class { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + */ + get acceptRanges() { + return this.originalResponse.acceptRanges; + } + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + */ + get cacheControl() { + return this.originalResponse.cacheControl; + } + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + */ + get contentDisposition() { + return this.originalResponse.contentDisposition; + } + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + */ + get contentEncoding() { + return this.originalResponse.contentEncoding; + } + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + */ + get contentLanguage() { + return this.originalResponse.contentLanguage; + } + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + */ + get blobSequenceNumber() { + return this.originalResponse.blobSequenceNumber; + } + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + */ + get blobType() { + return this.originalResponse.blobType; + } + /** + * The number of bytes present in the + * response body. + * + * @readonly + */ + get contentLength() { + return this.originalResponse.contentLength; + } + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + */ + get contentMD5() { + return this.originalResponse.contentMD5; + } + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + */ + get contentRange() { + return this.originalResponse.contentRange; + } + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + */ + get contentType() { + return this.originalResponse.contentType; + } + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + */ + get copyCompletedOn() { + return void 0; + } + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + */ + get copyId() { + return this.originalResponse.copyId; + } + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + */ + get copyProgress() { + return this.originalResponse.copyProgress; + } + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + */ + get copySource() { + return this.originalResponse.copySource; + } + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + */ + get copyStatus() { + return this.originalResponse.copyStatus; + } + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + */ + get copyStatusDescription() { + return this.originalResponse.copyStatusDescription; + } + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + */ + get leaseDuration() { + return this.originalResponse.leaseDuration; + } + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + */ + get leaseState() { + return this.originalResponse.leaseState; + } + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + */ + get leaseStatus() { + return this.originalResponse.leaseStatus; + } + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + */ + get date() { + return this.originalResponse.date; + } + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + */ + get blobCommittedBlockCount() { + return this.originalResponse.blobCommittedBlockCount; + } + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + */ + get etag() { + return this.originalResponse.etag; + } + /** + * The error code. + * + * @readonly + */ + get errorCode() { + return this.originalResponse.errorCode; + } + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + */ + get isServerEncrypted() { + return this.originalResponse.isServerEncrypted; + } + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + */ + get blobContentMD5() { + return this.originalResponse.blobContentMD5; + } + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + */ + get lastModified() { + return this.originalResponse.lastModified; + } + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + */ + get metadata() { + return this.originalResponse.metadata; + } + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + */ + get requestId() { + return this.originalResponse.requestId; + } + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + */ + get clientRequestId() { + return this.originalResponse.clientRequestId; + } + /** + * Indicates the version of the File service used + * to execute the request. + * + * @readonly + */ + get version() { + return this.originalResponse.version; + } + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + */ + get encryptionKeySha256() { + return this.originalResponse.encryptionKeySha256; + } + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + get contentCrc64() { + return this.originalResponse.contentCrc64; + } + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + */ + get blobBody() { + return void 0; + } + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will parse avor data returned by blob query. + * + * @readonly + */ + get readableStreamBody() { + return coreUtil.isNode ? this.blobDownloadStream : void 0; + } + /** + * The HTTP response. + */ + get _response() { + return this.originalResponse._response; + } + /** + * Creates an instance of BlobQueryResponse. + * + * @param originalResponse - + * @param options - + */ + constructor(originalResponse$1, options = {}) { + this.originalResponse = originalResponse$1; + this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + } + }; + /** + * Represents the access tier on a blob. + * For detailed information about block blob level tiering see {@link https://learn.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} + */ + exports.BlockBlobTier = void 0; + (function(BlockBlobTier) { + /** + * Optimized for storing data that is accessed frequently. + */ + BlockBlobTier["Hot"] = "Hot"; + /** + * Optimized for storing data that is infrequently accessed and stored for at least 30 days. + */ + BlockBlobTier["Cool"] = "Cool"; + /** + * Optimized for storing data that is rarely accessed. + */ + BlockBlobTier["Cold"] = "Cold"; + /** + * Optimized for storing data that is rarely accessed and stored for at least 180 days + * with flexible latency requirements (on the order of hours). + */ + BlockBlobTier["Archive"] = "Archive"; + })(exports.BlockBlobTier || (exports.BlockBlobTier = {})); + /** + * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. + * Please see {@link https://learn.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} + * for detailed information on the corresponding IOPS and throughput per PageBlobTier. + */ + exports.PremiumPageBlobTier = void 0; + (function(PremiumPageBlobTier) { + /** + * P4 Tier. + */ + PremiumPageBlobTier["P4"] = "P4"; + /** + * P6 Tier. + */ + PremiumPageBlobTier["P6"] = "P6"; + /** + * P10 Tier. + */ + PremiumPageBlobTier["P10"] = "P10"; + /** + * P15 Tier. + */ + PremiumPageBlobTier["P15"] = "P15"; + /** + * P20 Tier. + */ + PremiumPageBlobTier["P20"] = "P20"; + /** + * P30 Tier. + */ + PremiumPageBlobTier["P30"] = "P30"; + /** + * P40 Tier. + */ + PremiumPageBlobTier["P40"] = "P40"; + /** + * P50 Tier. + */ + PremiumPageBlobTier["P50"] = "P50"; + /** + * P60 Tier. + */ + PremiumPageBlobTier["P60"] = "P60"; + /** + * P70 Tier. + */ + PremiumPageBlobTier["P70"] = "P70"; + /** + * P80 Tier. + */ + PremiumPageBlobTier["P80"] = "P80"; + })(exports.PremiumPageBlobTier || (exports.PremiumPageBlobTier = {})); + function toAccessTier(tier$1) { + if (tier$1 === void 0) return void 0; + return tier$1; + } + function ensureCpkIfSpecified(cpk, isHttps) { + if (cpk && !isHttps) throw new RangeError("Customer-provided encryption key must be used over HTTPS."); + if (cpk && !cpk.encryptionAlgorithm) cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + } + /** + * Defines the known cloud audiences for Storage. + */ + exports.StorageBlobAudience = void 0; + (function(StorageBlobAudience) { + /** + * The OAuth scope to use to retrieve an AAD token for Azure Storage. + */ + StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + /** + * The OAuth scope to use to retrieve an AAD token for Azure Disk. + */ + StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(exports.StorageBlobAudience || (exports.StorageBlobAudience = {})); + /** + * + * To get OAuth audience for a storage account for blob service. + */ + function getBlobServiceAccountAudience(storageAccountName) { + return `https://${storageAccountName}.blob.core.windows.net/.default`; + } + /** + * Function that converts PageRange and ClearRange to a common Range object. + * PageRange and ClearRange have start and end while Range offset and count + * this function normalizes to Range. + * @param response - Model PageBlob Range response + */ + function rangeResponseFromModel(response) { + const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ + offset: x.start, + count: x.end - x.start + })); + const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ + offset: x.start, + count: x.end - x.start + })); + return Object.assign(Object.assign({}, response), { + pageRange, + clearRange, + _response: Object.assign(Object.assign({}, response._response), { parsedBody: { + pageRange, + clearRange + } }) + }); + } + /** + * This is the poller returned by {@link BlobClient.beginCopyFromURL}. + * This can not be instantiated directly outside of this package. + * + * @hidden + */ + var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + constructor(options) { + const { blobClient, copySource: copySource$1, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + let state$1; + if (resumeFrom) state$1 = JSON.parse(resumeFrom).state; + const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state$1), { + blobClient, + copySource: copySource$1, + startCopyFromURLOptions + })); + super(operation); + if (typeof onProgress === "function") this.onProgress(onProgress); + this.intervalInMs = intervalInMs; + } + delay() { + return coreUtil.delay(this.intervalInMs); + } + }; + /** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ + const cancel = async function cancel$1(options = {}) { + const state$1 = this.state; + const { copyId: copyId$1 } = state$1; + if (state$1.isCompleted) return makeBlobBeginCopyFromURLPollOperation(state$1); + if (!copyId$1) { + state$1.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state$1); + } + await state$1.blobClient.abortCopyFromURL(copyId$1, { abortSignal: options.abortSignal }); + state$1.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state$1); + }; + /** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ + const update = async function update$1(options = {}) { + const state$1 = this.state; + const { blobClient, copySource: copySource$1, startCopyFromURLOptions } = state$1; + if (!state$1.isStarted) { + state$1.isStarted = true; + const result = await blobClient.startCopyFromURL(copySource$1, startCopyFromURLOptions); + state$1.copyId = result.copyId; + if (result.copyStatus === "success") { + state$1.result = result; + state$1.isCompleted = true; + } + } else if (!state$1.isCompleted) try { + const result = await state$1.blobClient.getProperties({ abortSignal: options.abortSignal }); + const { copyStatus, copyProgress } = result; + const prevCopyProgress = state$1.copyProgress; + if (copyProgress) state$1.copyProgress = copyProgress; + if (copyStatus === "pending" && copyProgress !== prevCopyProgress && typeof options.fireProgress === "function") options.fireProgress(state$1); + else if (copyStatus === "success") { + state$1.result = result; + state$1.isCompleted = true; + } else if (copyStatus === "failed") { + state$1.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); + state$1.isCompleted = true; + } + } catch (err) { + state$1.error = err; + state$1.isCompleted = true; + } + return makeBlobBeginCopyFromURLPollOperation(state$1); + }; + /** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ + const toString = function toString$1() { + return JSON.stringify({ state: this.state }, (key, value) => { + if (key === "blobClient") return void 0; + return value; + }); + }; + /** + * Creates a poll operation given the provided state. + * @hidden + */ + function makeBlobBeginCopyFromURLPollOperation(state$1) { + return { + state: Object.assign({}, state$1), + cancel, + toString, + update + }; + } + /** + * Generate a range string. For example: + * + * "bytes=255-" or "bytes=0-511" + * + * @param iRange - + */ + function rangeToString(iRange) { + if (iRange.offset < 0) throw new RangeError(`Range.offset cannot be smaller than 0.`); + if (iRange.count && iRange.count <= 0) throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); + return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; + } + /** + * States for Batch. + */ + var BatchStates; + (function(BatchStates$1) { + BatchStates$1[BatchStates$1["Good"] = 0] = "Good"; + BatchStates$1[BatchStates$1["Error"] = 1] = "Error"; + })(BatchStates || (BatchStates = {})); + /** + * Batch provides basic parallel execution with concurrency limits. + * Will stop execute left operations when one of the executed operation throws an error. + * But Batch cannot cancel ongoing operations, you need to cancel them by yourself. + */ + var Batch = class { + /** + * Creates an instance of Batch. + * @param concurrency - + */ + constructor(concurrency = 5) { + /** + * Number of active operations under execution. + */ + this.actives = 0; + /** + * Number of completed operations under execution. + */ + this.completed = 0; + /** + * Offset of next operation to be executed. + */ + this.offset = 0; + /** + * Operation array to be executed. + */ + this.operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + this.state = BatchStates.Good; + if (concurrency < 1) throw new RangeError("concurrency must be larger than 0"); + this.concurrency = concurrency; + this.emitter = new events.EventEmitter(); + } + /** + * Add a operation into queue. + * + * @param operation - + */ + addOperation(operation) { + this.operations.push(async () => { + try { + this.actives++; + await operation(); + this.actives--; + this.completed++; + this.parallelExecute(); + } catch (error) { + this.emitter.emit("error", error); + } + }); + } + /** + * Start execute operations in the queue. + * + */ + async do() { + if (this.operations.length === 0) return Promise.resolve(); + this.parallelExecute(); + return new Promise((resolve, reject) => { + this.emitter.on("finish", resolve); + this.emitter.on("error", (error) => { + this.state = BatchStates.Error; + reject(error); + }); + }); + } + /** + * Get next operation to be executed. Return null when reaching ends. + * + */ + nextOperation() { + if (this.offset < this.operations.length) return this.operations[this.offset++]; + return null; + } + /** + * Start execute operations. One one the most important difference between + * this method with do() is that do() wraps as an sync method. + * + */ + parallelExecute() { + if (this.state === BatchStates.Error) return; + if (this.completed >= this.operations.length) { + this.emitter.emit("finish"); + return; + } + while (this.actives < this.concurrency) { + const operation = this.nextOperation(); + if (operation) operation(); + else return; + } + } + }; + /** + * This class generates a readable stream from the data in an array of buffers. + */ + var BuffersStream = class extends stream$1.Readable { + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) buffersLength += buf.byteLength; + if (buffersLength < this.byteLength) throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) this.push(null); + if (!size) size = this.readableHighWaterMark; + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else this.byteOffsetInCurrentBuffer = end; + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) this.push(Buffer.concat(outBuffers)); + else if (outBuffers.length === 1) this.push(outBuffers[0]); + } + }; + const maxBufferLength = buffer$1.constants.MAX_LENGTH; + /** + * This class provides a buffer container which conceptually has no hard size limit. + * It accepts a capacity, an array of input buffers and the total length of input data. + * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers + * into the internal "buffer" serially with respect to the total length. + * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream + * assembled from all the data in the internal "buffer". + */ + var PooledBuffer = class { + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + this.buffers = []; + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) len = maxBufferLength; + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) this.fill(buffers, totalLength); + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) buffers[0] = buffers[0].slice(sourceOffset); + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream(this.buffers, this.size); + } + }; + /** + * This class accepts a Node.js Readable stream as input, and keeps reading data + * from the stream into the internal buffer structure, until it reaches maxBuffers. + * Every available buffer will try to trigger outgoingHandler. + * + * The internal buffer structure includes an incoming buffer array, and a outgoing + * buffer array. The incoming buffer array includes the "empty" buffers can be filled + * with new incoming data. The outgoing array includes the filled buffers to be + * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize. + * + * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING + * + * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers + * + * PERFORMANCE IMPROVEMENT TIPS: + * 1. Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * 2. concurrency should set a smaller value than maxBuffers, which is helpful to + * reduce the possibility when a outgoing handler waits for the stream data. + * in this situation, outgoing handlers are blocked. + * Outgoing queue shouldn't be empty. + */ + var BufferScheduler = class { + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + /** + * An internal event emitter. + */ + this.emitter = new events.EventEmitter(); + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + this.offset = 0; + /** + * An internal marker to track whether stream is end. + */ + this.isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + this.isError = false; + /** + * How many handlers are executing. + */ + this.executingOutgoingHandlers = 0; + /** + * How many buffers have been allocated. + */ + this.numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + this.unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + this.unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + this.incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + this.outgoing = []; + if (bufferSize <= 0) throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + if (maxBuffers <= 0) throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + if (concurrency <= 0) throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) this.readable.pause(); + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer$2 = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer$2.getReadableStream(), buffer$2.size, this.offset).then(resolve).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) return; + else resolve(); + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer$2) { + if (!buffer$2) buffer$2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + else buffer$2.fill(this.unresolvedDataArray, this.unresolvedLength); + this.unresolvedLength -= buffer$2.size; + return buffer$2; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer$2; + if (this.incoming.length > 0) { + buffer$2 = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer$2); + } else if (this.numBuffers < this.maxBuffers) { + buffer$2 = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else return false; + this.outgoing.push(buffer$2); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer$2; + do { + if (this.executingOutgoingHandlers >= this.concurrency) return; + buffer$2 = this.outgoing.shift(); + if (buffer$2) this.triggerOutgoingHandler(buffer$2); + } while (buffer$2); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer$2) { + const bufferLength = buffer$2.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer$2.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer$2); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer$2) { + this.incoming.push(buffer$2); + if (!this.isError && this.resolveData() && !this.isStreamEnd) this.readable.resume(); + } + }; + /** + * Reads a readable stream into buffer. Fill the buffer from offset to end. + * + * @param stream - A Node.js Readable stream + * @param buffer - Buffer to be filled, length must greater than or equal to offset + * @param offset - From which position in the buffer to be filled, inclusive + * @param end - To which position in the buffer to be filled, exclusive + * @param encoding - Encoding of the Readable stream + */ + async function streamToBuffer(stream$2, buffer$2, offset, end, encoding) { + let pos = 0; + const count = end - offset; + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); + stream$2.on("readable", () => { + if (pos >= count) { + clearTimeout(timeout); + resolve(); + return; + } + let chunk = stream$2.read(); + if (!chunk) return; + if (typeof chunk === "string") chunk = Buffer.from(chunk, encoding); + const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; + buffer$2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + pos += chunkLength; + }); + stream$2.on("end", () => { + clearTimeout(timeout); + if (pos < count) reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); + resolve(); + }); + stream$2.on("error", (msg) => { + clearTimeout(timeout); + reject(msg); + }); + }); + } + /** + * Reads a readable stream into buffer entirely. + * + * @param stream - A Node.js Readable stream + * @param buffer - Buffer to be filled, length must greater than or equal to offset + * @param encoding - Encoding of the Readable stream + * @returns with the count of bytes read. + * @throws `RangeError` If buffer size is not big enough. + */ + async function streamToBuffer2(stream$2, buffer$2, encoding) { + let pos = 0; + const bufferSize = buffer$2.length; + return new Promise((resolve, reject) => { + stream$2.on("readable", () => { + let chunk = stream$2.read(); + if (!chunk) return; + if (typeof chunk === "string") chunk = Buffer.from(chunk, encoding); + if (pos + chunk.length > bufferSize) { + reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); + return; + } + buffer$2.fill(chunk, pos, pos + chunk.length); + pos += chunk.length; + }); + stream$2.on("end", () => { + resolve(pos); + }); + stream$2.on("error", reject); + }); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed. + * + * @param rs - The read stream. + * @param file - Destination file path. + */ + async function readStreamToLocalFile(rs, file) { + return new Promise((resolve, reject) => { + const ws = fs__namespace.createWriteStream(file); + rs.on("error", (err) => { + reject(err); + }); + ws.on("error", (err) => { + reject(err); + }); + ws.on("close", resolve); + rs.pipe(ws); + }); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Promisified version of fs.stat(). + */ + const fsStat = util__namespace.promisify(fs__namespace.stat); + const fsCreateReadStream = fs__namespace.createReadStream; + /** + * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, + * append blob, or page blob. + */ + var BlobClient = class BlobClient extends StorageClient { + /** + * The name of the blob. + */ + get name() { + return this._name; + } + /** + * The name of the storage container the blob is associated with. + */ + get containerName() { + return this._containerName; + } + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + options = options || {}; + let pipeline; + let url$1; + if (isPipelineLike(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url$1 = urlOrConnectionString; + if (blobNameOrOptions && typeof blobNameOrOptions !== "string") options = blobNameOrOptions; + pipeline = newPipeline(new AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { + const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + super(url$1, pipeline); + ({blobName: this._name, containerName: this._containerName} = this.getBlobAndContainerNamesFromUrl()); + this.blobContext = this.storageClientContext.blob; + this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); + this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + } + /** + * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp + */ + withSnapshot(snapshot$1) { + return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot$1.length === 0 ? void 0 : snapshot$1), this.pipeline); + } + /** + * Creates a new BlobClient object pointing to a version of this blob. + * Provide "" will remove the versionId and return a Client to the base blob. + * + * @param versionId - The versionId. + * @returns A new BlobClient object pointing to the version of this blob. + */ + withVersion(versionId$1) { + return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId$1.length === 0 ? void 0 : versionId$1), this.pipeline); + } + /** + * Creates a AppendBlobClient object. + * + */ + getAppendBlobClient() { + return new AppendBlobClient(this.url, this.pipeline); + } + /** + * Creates a BlockBlobClient object. + * + */ + getBlockBlobClient() { + return new BlockBlobClient(this.url, this.pipeline); + } + /** + * Creates a PageBlobClient object. + * + */ + getPageBlobClient() { + return new PageBlobClient(this.url, this.pipeline); + } + /** + * Reads or downloads a blob from the system, including its metadata and properties. + * You can also call Get Blob to read a snapshot. + * + * * In Node.js, data returns in a Readable stream readableStreamBody + * * In browsers, data returns in a promise blobBody + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob + * + * @param offset - From which position of the blob to download, greater than or equal to 0 + * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined + * @param options - Optional options to Blob Download operation. + * + * + * Example usage (Node.js): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); + * console.log("Downloaded blob content:", downloaded.toString()); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(typeof data === "string" ? Buffer.from(data) : data); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * Example usage (browser): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); + * console.log( + * "Downloaded blob content", + * downloaded + * ); + * + * async function blobToString(blob: Blob): Promise { + * const fileReader = new FileReader(); + * return new Promise((resolve, reject) => { + * fileReader.onloadend = (ev: any) => { + * resolve(ev.target!.result); + * }; + * fileReader.onerror = reject; + * fileReader.readAsText(blob); + * }); + * } + * ``` + */ + async download(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + var _a$2; + const res = assertResponse(await this.blobContext.download({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + requestOptions: { onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress }, + range: offset === 0 && !count ? void 0 : rangeToString({ + offset, + count + }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedRes = Object.assign(Object.assign({}, res), { + _response: res._response, + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) + }); + if (!coreUtil.isNode) return wrappedRes; + if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + if (res.contentLength === void 0) throw new RangeError(`File download response doesn't contain valid content length header`); + if (!res.etag) throw new RangeError(`File download response doesn't contain valid etag header`); + return new BlobDownloadResponse(wrappedRes, async (start) => { + var _a$3; + const updatedDownloadOptions = { + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ifMatch: options.conditions.ifMatch || res.etag, + ifModifiedSince: options.conditions.ifModifiedSince, + ifNoneMatch: options.conditions.ifNoneMatch, + ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, + ifTags: (_a$3 = options.conditions) === null || _a$3 === void 0 ? void 0 : _a$3.tagConditions + }, + range: rangeToString({ + count: offset + res.contentLength - start, + offset: start + }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey + }; + return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + }, offset, res.contentLength, { + maxRetryRequests: options.maxRetryRequests, + onProgress: options.onProgress + }); + }); + } + /** + * Returns true if the Azure blob resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing blob might be deleted by other clients or + * applications. Vice versa new blobs might be added by other clients or applications after this + * function completes. + * + * @param options - options to Exists operation. + */ + async exists(options = {}) { + return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + try { + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + await this.getProperties({ + abortSignal: options.abortSignal, + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + }); + return true; + } catch (e) { + if (e.statusCode === 404) return false; + else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) return true; + throw e; + } + }); + } + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which + * will retain their original casing. + * + * @param options - Optional options to Get Properties operation. + */ + async getProperties(options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + var _a$2; + const res = assertResponse(await this.blobContext.getProperties({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions + })); + return Object.assign(Object.assign({}, res), { + _response: res._response, + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) + }); + }); + } + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param options - Optional options to Blob Delete operation. + */ + async delete(options = {}) { + options.conditions = options.conditions || {}; + return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.blobContext.delete({ + abortSignal: options.abortSignal, + deleteSnapshots: options.deleteSnapshots, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param options - Optional options to Blob Delete operation. + */ + async deleteIfExists(options = {}) { + return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { + var _a$2, _b$1; + try { + const res = assertResponse(await this.delete(updatedOptions)); + return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + } catch (e) { + if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "BlobNotFound") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); + throw e; + } + }); + } + /** + * Restores the contents and metadata of soft deleted blob and any associated + * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 + * or later. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * + * @param options - Optional options to Blob Undelete operation. + */ + async undelete(options = {}) { + return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return assertResponse(await this.blobContext.undelete({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Sets system properties on the blob. + * + * If no value provided, or no value provided for the specified blob HTTP headers, + * these blob HTTP headers without a value will be cleared. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param blobHTTPHeaders - If no value provided, or no value provided for + * the specified blob HTTP headers, these blob HTTP + * headers without a value will be cleared. + * A common header to set is `blobContentType` + * enabling the browser to provide functionality + * based on file type. + * @param options - Optional options to Blob Set HTTP Headers operation. + */ + async setHTTPHeaders(blobHTTPHeaders, options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.blobContext.setHttpHeaders({ + abortSignal: options.abortSignal, + blobHttpHeaders: blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Sets user-defined metadata for the specified blob as one or more name-value pairs. + * + * If no option provided, or no metadata defined in the parameter, the blob + * metadata will be removed. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * + * @param metadata - Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param options - Optional options to Set Metadata operation. + */ + async setMetadata(metadata$1, options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.blobContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: metadata$1, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Sets tags on the underlying blob. + * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. + * Valid tag key and value characters include lower and upper case letters, digits (0-9), + * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). + * + * @param tags - + * @param options - + */ + async setTags(tags$1, options = {}) { + return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.blobContext.setTags({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + tracingOptions: updatedOptions.tracingOptions, + tags: toBlobTags(tags$1) + })); + }); + } + /** + * Gets the tags associated with the underlying blob. + * + * @param options - + */ + async getTags(options = {}) { + return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + var _a$2; + const response = assertResponse(await this.blobContext.getTags({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = Object.assign(Object.assign({}, response), { + _response: response._response, + tags: toTags({ blobTagSet: response.blobTagSet }) || {} + }); + return wrappedResponse; + }); + } + /** + * Get a {@link BlobLeaseClient} that manages leases on the blob. + * + * @param proposeLeaseId - Initial proposed lease Id. + * @returns A new BlobLeaseClient object for managing leases on the blob. + */ + getBlobLeaseClient(proposeLeaseId) { + return new BlobLeaseClient(this, proposeLeaseId); + } + /** + * Creates a read-only snapshot of a blob. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * + * @param options - Optional options to the Blob Create Snapshot operation. + */ + async createSnapshot(options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.blobContext.createSnapshot({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Asynchronously copies a blob to a destination within the storage account. + * This method returns a long running operation poller that allows you to wait + * indefinitely until the copy is completed. + * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * Note that the onProgress callback will not be invoked if the operation completes in the first + * request, and attempting to cancel a completed copy will result in an error being thrown. + * + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * Example using automatic polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using manual polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * while (!poller.isDone()) { + * await poller.poll(); + * } + * const result = copyPoller.getResult(); + * ``` + * + * Example using progress updates: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * onProgress(state) { + * console.log(`Progress: ${state.copyProgress}`); + * } + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using a changing polling interval (default 15 seconds): + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * intervalInMs: 1000 // poll blob every 1 second for copy progress + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using copy cancellation: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // cancel operation after starting it. + * try { + * await copyPoller.cancelOperation(); + * // calls to get the result now throw PollerCancelledError + * await copyPoller.getResult(); + * } catch (err) { + * if (err.name === 'PollerCancelledError') { + * console.log('The copy was cancelled.'); + * } + * } + * ``` + * + * @param copySource - url to the source Azure Blob/File. + * @param options - Optional options to the Blob Start Copy From URL operation. + */ + async beginCopyFromURL(copySource$1, options = {}) { + const client = { + abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), + getProperties: (...args) => this.getProperties(...args), + startCopyFromURL: (...args) => this.startCopyFromURL(...args) + }; + const poller = new BlobBeginCopyFromUrlPoller({ + blobClient: client, + copySource: copySource$1, + intervalInMs: options.intervalInMs, + onProgress: options.onProgress, + resumeFrom: options.resumeFrom, + startCopyFromURLOptions: options + }); + await poller.poll(); + return poller; + } + /** + * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero + * length and full metadata. Version 2012-02-12 and newer. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * + * @param copyId - Id of the Copy From URL operation. + * @param options - Optional options to the Blob Abort Copy From URL operation. + */ + async abortCopyFromURL(copyId$1, options = {}) { + return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return assertResponse(await this.blobContext.abortCopyFromURL(copyId$1, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not + * return a response until the copy is complete. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * + * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication + * @param options - + */ + async syncCopyFromURL(copySource$1, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + var _a$2, _b$1, _c$1, _d$1, _e, _f, _g; + return assertResponse(await this.blobContext.copyFromURL(copySource$1, { + abortSignal: options.abortSignal, + metadata: options.metadata, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: (_b$1 = options.sourceConditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch, + sourceIfModifiedSince: (_c$1 = options.sourceConditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifModifiedSince, + sourceIfNoneMatch: (_d$1 = options.sourceConditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch, + sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + }, + sourceContentMD5: options.sourceContentMD5, + copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, + immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + legalHold: options.legalHold, + encryptionScope: options.encryptionScope, + copySourceTags: options.copySourceTags, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * + * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. + * @param options - Optional options to the Blob Set Tier operation. + */ + async setAccessTier(tier$1, options = {}) { + return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.blobContext.setTier(toAccessTier(tier$1), { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + rehydratePriority: options.rehydratePriority, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + async downloadToBuffer(param1, param2, param3, param4 = {}) { + var _a$2; + let buffer$2; + let offset = 0; + let count = 0; + let options = param4; + if (param1 instanceof Buffer) { + buffer$2 = param1; + offset = param2 || 0; + count = typeof param3 === "number" ? param3 : 0; + } else { + offset = typeof param1 === "number" ? param1 : 0; + count = typeof param2 === "number" ? param2 : 0; + options = param3 || {}; + } + let blockSize = (_a$2 = options.blockSize) !== null && _a$2 !== void 0 ? _a$2 : 0; + if (blockSize < 0) throw new RangeError("blockSize option must be >= 0"); + if (blockSize === 0) blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + if (offset < 0) throw new RangeError("offset option must be >= 0"); + if (count && count <= 0) throw new RangeError("count option must be greater than 0"); + if (!options.conditions) options.conditions = {}; + return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + if (!count) { + const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + count = response.contentLength - offset; + if (count < 0) throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); + } + if (!buffer$2) try { + buffer$2 = Buffer.alloc(count); + } catch (error) { + throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${error.message}`); + } + if (buffer$2.length < count) throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); + let transferProgress = 0; + const batch = new Batch(options.concurrency); + for (let off = offset; off < offset + count; off = off + blockSize) batch.addOperation(async () => { + let chunkEnd = offset + count; + if (off + blockSize < chunkEnd) chunkEnd = off + blockSize; + const response = await this.download(off, chunkEnd - off, { + abortSignal: options.abortSignal, + conditions: options.conditions, + maxRetryRequests: options.maxRetryRequestsPerBlock, + customerProvidedKey: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions + }); + const stream$2 = response.readableStreamBody; + await streamToBuffer(stream$2, buffer$2, off - offset, chunkEnd - offset); + transferProgress += chunkEnd - off; + if (options.onProgress) options.onProgress({ loadedBytes: transferProgress }); + }); + await batch.do(); + return buffer$2; + }); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob to a local file. + * Fails if the the given file path already exits. + * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. + * + * @param filePath - + * @param offset - From which position of the block blob to download. + * @param count - How much data to be downloaded. Will download to the end when passing undefined. + * @param options - Options to Blob download options. + * @returns The response data for blob download operation, + * but with readableStreamBody set to undefined since its + * content is already read and written into a local file + * at the specified path. + */ + async downloadToFile(filePath, offset = 0, count, options = {}) { + return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + if (response.readableStreamBody) await readStreamToLocalFile(response.readableStreamBody, filePath); + response.blobDownloadStream = void 0; + return response; + }); + } + getBlobAndContainerNamesFromUrl() { + let containerName; + let blobName; + try { + const parsedUrl = new URL(this.url); + if (parsedUrl.host.split(".")[1] === "blob") { + const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } else if (isIpEndpointStyle(parsedUrl)) { + const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); + containerName = pathComponents[2]; + blobName = pathComponents[4]; + } else { + const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + containerName = decodeURIComponent(containerName); + blobName = decodeURIComponent(blobName); + blobName = blobName.replace(/\\/g, "/"); + if (!containerName) throw new Error("Provided containerName is invalid."); + return { + blobName, + containerName + }; + } catch (error) { + throw new Error("Unable to extract blobName and containerName with provided information."); + } + } + /** + * Asynchronously copies a blob to a destination within the storage account. + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * @param copySource - url to the source Azure Blob/File. + * @param options - Optional options to the Blob Start Copy From URL operation. + */ + async startCopyFromURL(copySource$1, options = {}) { + return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { + var _a$2, _b$1, _c$1; + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + return assertResponse(await this.blobContext.startCopyFromURL(copySource$1, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions.tagConditions + }, + immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, + immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, + legalHold: options.legalHold, + rehydratePriority: options.rehydratePriority, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + sealBlob: options.sealBlob, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasUrl(options) { + return new Promise((resolve) => { + if (!(this.credential instanceof StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + const sas = generateBlobSASQueryParameters(Object.assign({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId + }, options), this.credential).toString(); + resolve(appendToURLQuery(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasStringToSign(options) { + if (!(this.credential instanceof StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + return generateBlobSASQueryParametersInternal(Object.assign({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId + }, options), this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve) => { + const sas = generateBlobSASQueryParameters(Object.assign({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId + }, options), userDelegationKey, this.accountName).toString(); + resolve(appendToURLQuery(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return generateBlobSASQueryParametersInternal(Object.assign({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId + }, options), userDelegationKey, this.accountName).stringToSign; + } + /** + * Delete the immutablility policy on the blob. + * + * @param options - Optional options to delete immutability policy on the blob. + */ + async deleteImmutabilityPolicy(options = {}) { + return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); + }); + } + /** + * Set immutability policy on the blob. + * + * @param options - Optional options to set immutability policy on the blob. + */ + async setImmutabilityPolicy(immutabilityPolicy, options = {}) { + return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return assertResponse(await this.blobContext.setImmutabilityPolicy({ + immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, + immutabilityPolicyMode: immutabilityPolicy.policyMode, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Set legal hold on the blob. + * + * @param options - Optional options to set legal hold on the blob. + */ + async setLegalHold(legalHoldEnabled, options = {}) { + return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); + }); + } + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return assertResponse(await this.blobContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + }; + /** + * AppendBlobClient defines a set of operations applicable to append blobs. + */ + var AppendBlobClient = class AppendBlobClient extends BlobClient { + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + let pipeline; + let url$1; + options = options || {}; + if (isPipelineLike(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url$1 = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { + const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + super(url$1, pipeline); + this.appendBlobContext = this.storageClientContext.appendBlob; + } + /** + * Creates a new AppendBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot$1) { + return new AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot$1.length === 0 ? void 0 : snapshot$1), this.pipeline); + } + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param options - Options to the Append Block Create operation. + * + * + * Example usage: + * + * ```js + * const appendBlobClient = containerClient.getAppendBlobClient(""); + * await appendBlobClient.create(); + * ``` + */ + async create(options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + var _a$2, _b$1, _c$1; + return assertResponse(await this.appendBlobContext.create(0, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, + immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, + legalHold: options.legalHold, + blobTagsString: toBlobTagsString(options.tags), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * If the blob with the same name already exists, the content of the existing blob will remain unchanged. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param options - + */ + async createIfNotExists(options = {}) { + const conditions = { ifNoneMatch: ETagAny }; + return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { + var _a$2, _b$1; + try { + const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); + return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + } catch (e) { + if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "BlobAlreadyExists") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); + throw e; + } + }); + } + /** + * Seals the append blob, making it read only. + * + * @param options - + */ + async seal(options = {}) { + options.conditions = options.conditions || {}; + return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.appendBlobContext.seal({ + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Commits a new block of data to the end of the existing append blob. + * @see https://learn.microsoft.com/rest/api/storageservices/append-block + * + * @param body - Data to be appended. + * @param contentLength - Length of the body in bytes. + * @param options - Options to the Append Block operation. + * + * + * Example usage: + * + * ```js + * const content = "Hello World!"; + * + * // Create a new append blob and append data to the blob. + * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * await newAppendBlobClient.create(); + * await newAppendBlobClient.appendBlock(content, content.length); + * + * // Append data to an existing append blob. + * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * await existingAppendBlobClient.appendBlock(content, content.length); + * ``` + */ + async appendBlock(body$1, contentLength$1, options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.appendBlobContext.appendBlock(contentLength$1, body$1, { + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + requestOptions: { onUploadProgress: options.onProgress }, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * The Append Block operation commits a new block of data to the end of an existing append blob + * where the contents are read from a source url. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * + * @param sourceURL - + * The url to the blob that will be the source of the copy. A source blob in the same storage account can + * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob + * must either be public or must be authenticated via a shared access signature. If the source blob is + * public, no authentication is required to perform the operation. + * @param sourceOffset - Offset in source to be appended + * @param count - Number of bytes to be appended as a block + * @param options - + */ + async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + var _a$2, _b$1, _c$1, _d$1, _e; + return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + abortSignal: options.abortSignal, + sourceRange: rangeToString({ + offset: sourceOffset, + count + }), + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + appendPositionAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: (_b$1 = options.sourceConditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch, + sourceIfModifiedSince: (_c$1 = options.sourceConditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifModifiedSince, + sourceIfNoneMatch: (_d$1 = options.sourceConditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch, + sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + }, + copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + }; + /** + * BlockBlobClient defines a set of operations applicable to block blobs. + */ + var BlockBlobClient = class BlockBlobClient extends BlobClient { + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + let pipeline; + let url$1; + options = options || {}; + if (isPipelineLike(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url$1 = urlOrConnectionString; + if (blobNameOrOptions && typeof blobNameOrOptions !== "string") options = blobNameOrOptions; + pipeline = newPipeline(new AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { + const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + super(url$1, pipeline); + this.blockBlobContext = this.storageClientContext.blockBlob; + this._blobContext = this.storageClientContext.blob; + } + /** + * Creates a new BlockBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a URL to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot$1) { + return new BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot$1.length === 0 ? void 0 : snapshot$1), this.pipeline); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Quick query for a JSON or CSV formatted blob. + * + * Example usage (Node.js): + * + * ```js + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); + * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); + * console.log("Query blob content:", downloaded); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(typeof data === "string" ? Buffer.from(data) : data); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * @param query - + * @param options - + */ + async query(query, options = {}) { + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + if (!coreUtil.isNode) throw new Error("This operation currently is only supported in Node.js."); + return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + var _a$2; + const response = assertResponse(await this._blobContext.query({ + abortSignal: options.abortSignal, + queryRequest: { + queryType: "SQL", + expression: query, + inputSerialization: toQuerySerialization(options.inputTextConfiguration), + outputSerialization: toQuerySerialization(options.outputTextConfiguration) + }, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions + })); + return new BlobQueryResponse(response, { + abortSignal: options.abortSignal, + onProgress: options.onProgress, + onError: options.onError + }); + }); + } + /** + * Creates a new block blob, or updates the content of an existing block blob. + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link stageBlock} and {@link commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link uploadFile}, + * {@link uploadStream} or {@link uploadBrowserData} for better performance + * with concurrency uploading. + * + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param options - Options to the Block Blob Upload operation. + * @returns Response data for the Block Blob Upload operation. + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + async upload(body$1, contentLength$1, options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + var _a$2, _b$1, _c$1; + return assertResponse(await this.blockBlobContext.upload(contentLength$1, body$1, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + requestOptions: { onUploadProgress: options.onProgress }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, + immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, + legalHold: options.legalHold, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Creates a new Block Blob where the contents of the blob are read from a given URL. + * This API is supported beginning with the 2020-04-08 version. Partial updates + * are not supported with Put Blob from URL; the content of an existing blob is overwritten with + * the content of the new blob. To perform partial updates to a block blob’s contents using a + * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}. + * + * @param sourceURL - Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param options - Optional parameters. + */ + async syncUploadFromURL(sourceURL, options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + var _a$2, _b$1, _c$1, _d$1, _e, _f; + return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: (_b$1 = options.sourceConditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch, + sourceIfModifiedSince: (_c$1 = options.sourceConditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifModifiedSince, + sourceIfNoneMatch: (_d$1 = options.sourceConditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch, + sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, + sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + copySourceTags: options.copySourceTags, + tracingOptions: updatedOptions.tracingOptions + }))); + }); + } + /** + * Uploads the specified block to the block blob's "staging area" to be later + * committed by a call to commitBlockList. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block + * + * @param blockId - A 64-byte value that is base64-encoded + * @param body - Data to upload to the staging area. + * @param contentLength - Number of bytes to upload. + * @param options - Options to the Block Blob Stage Block operation. + * @returns Response data for the Block Blob Stage Block operation. + */ + async stageBlock(blockId$1, body$1, contentLength$1, options = {}) { + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return assertResponse(await this.blockBlobContext.stageBlock(blockId$1, contentLength$1, body$1, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + requestOptions: { onUploadProgress: options.onProgress }, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * The Stage Block From URL operation creates a new block to be committed as part + * of a blob where the contents are read from a URL. + * This API is available starting in version 2018-03-28. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * + * @param blockId - A 64-byte value that is base64-encoded + * @param sourceURL - Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param offset - From which position of the blob to download, greater than or equal to 0 + * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined + * @param options - Options to the Block Blob Stage Block From URL operation. + * @returns Response data for the Block Blob Stage Block From URL operation. + */ + async stageBlockFromURL(blockId$1, sourceURL, offset = 0, count, options = {}) { + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId$1, 0, sourceURL, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + sourceRange: offset === 0 && !count ? void 0 : rangeToString({ + offset, + count + }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Writes a blob by specifying the list of block IDs that make up the blob. + * In order to be written as part of a blob, a block must have been successfully written + * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to + * update a blob by uploading only those blocks that have changed, then committing the new and existing + * blocks together. Any blocks not specified in the block list and permanently deleted. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list + * + * @param blocks - Array of 64-byte value that is base64-encoded + * @param options - Options to the Block Blob Commit Block List operation. + * @returns Response data for the Block Blob Commit Block List operation. + */ + async commitBlockList(blocks$1, options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + var _a$2, _b$1, _c$1; + return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks$1 }, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, + immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, + legalHold: options.legalHold, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Returns the list of blocks that have been uploaded as part of a block blob + * using the specified block list filter. + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list + * + * @param listType - Specifies whether to return the list of committed blocks, + * the list of uncommitted blocks, or both lists together. + * @param options - Options to the Block Blob Get Block List operation. + * @returns Response data for the Block Blob Get Block List operation. + */ + async getBlockList(listType$1, options = {}) { + return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + var _a$2; + const res = assertResponse(await this.blockBlobContext.getBlockList(listType$1, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + })); + if (!res.committedBlocks) res.committedBlocks = []; + if (!res.uncommittedBlocks) res.uncommittedBlocks = []; + return res; + }); + } + /** + * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is + * `blobContentType`, enabling the browser to provide + * functionality based on file type. + * + * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView + * @param options - + */ + async uploadData(data, options = {}) { + return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (coreUtil.isNode) { + let buffer$2; + if (data instanceof Buffer) buffer$2 = data; + else if (data instanceof ArrayBuffer) buffer$2 = Buffer.from(data); + else { + data = data; + buffer$2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + } + return this.uploadSeekableInternal((offset, size) => buffer$2.slice(offset, offset + size), buffer$2.byteLength, updatedOptions); + } else { + const browserBlob = new Blob([data]); + return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); + } + }); + } + /** + * ONLY AVAILABLE IN BROWSERS. + * + * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. + * + * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call + * {@link commitBlockList} to commit the block list. + * + * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is + * `blobContentType`, enabling the browser to provide + * functionality based on file type. + * + * @deprecated Use {@link uploadData} instead. + * + * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView + * @param options - Options to upload browser data. + * @returns Response data for the Blob Upload operation. + */ + async uploadBrowserData(browserData, options = {}) { + return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + const browserBlob = new Blob([browserData]); + return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); + }); + } + /** + * + * Uploads data to block blob. Requires a bodyFactory as the data source, + * which need to return a {@link HttpRequestBody} object with the offset and size provided. + * + * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @param bodyFactory - + * @param size - size of the data to upload. + * @param options - Options to Upload to Block Blob operation. + * @returns Response data for the Blob Upload operation. + */ + async uploadSeekableInternal(bodyFactory, size, options = {}) { + var _a$2, _b$1; + let blockSize = (_a$2 = options.blockSize) !== null && _a$2 !== void 0 ? _a$2 : 0; + if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + const maxSingleShotSize = (_b$1 = options.maxSingleShotSize) !== null && _b$1 !== void 0 ? _b$1 : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + if (blockSize === 0) { + if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) throw new RangeError(`${size} is too larger to upload to a block blob.`); + if (size > maxSingleShotSize) { + blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + } + } + if (!options.blobHTTPHeaders) options.blobHTTPHeaders = {}; + if (!options.conditions) options.conditions = {}; + return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + if (size <= maxSingleShotSize) return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + const numBlocks = Math.floor((size - 1) / blockSize) + 1; + if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + const blockList = []; + const blockIDPrefix = coreUtil.randomUUID(); + let transferProgress = 0; + const batch = new Batch(options.concurrency); + for (let i = 0; i < numBlocks; i++) batch.addOperation(async () => { + const blockID = generateBlockID(blockIDPrefix, i); + const start = blockSize * i; + const end = i === numBlocks - 1 ? size : start + blockSize; + const contentLength$1 = end - start; + blockList.push(blockID); + await this.stageBlock(blockID, bodyFactory(start, contentLength$1), contentLength$1, { + abortSignal: options.abortSignal, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + }); + transferProgress += contentLength$1; + if (options.onProgress) options.onProgress({ loadedBytes: transferProgress }); + }); + await batch.do(); + return this.commitBlockList(blockList, updatedOptions); + }); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a local file in blocks to a block blob. + * + * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList + * to commit the block list. + * + * @param filePath - Full path of local file + * @param options - Options to Upload to Block Blob operation. + * @returns Response data for the Blob Upload operation. + */ + async uploadFile(filePath, options = {}) { + return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await fsStat(filePath)).size; + return this.uploadSeekableInternal((offset, count) => { + return () => fsCreateReadStream(filePath, { + autoClose: true, + end: count ? offset + count - 1 : Infinity, + start: offset + }); + }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a Node.js Readable stream into block blob. + * + * PERFORMANCE IMPROVEMENT TIPS: + * * Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * + * @param stream - Node.js Readable stream + * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB + * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated, + * positive correlation with max uploading concurrency. Default value is 5 + * @param options - Options to Upload Stream to Block Blob operation. + * @returns Response data for the Blob Upload operation. + */ + async uploadStream(stream$2, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + if (!options.blobHTTPHeaders) options.blobHTTPHeaders = {}; + if (!options.conditions) options.conditions = {}; + return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + let blockNum = 0; + const blockIDPrefix = coreUtil.randomUUID(); + let transferProgress = 0; + const blockList = []; + const scheduler = new BufferScheduler( + stream$2, + bufferSize, + maxConcurrency, + async (body$1, length) => { + const blockID = generateBlockID(blockIDPrefix, blockNum); + blockList.push(blockID); + blockNum++; + await this.stageBlock(blockID, body$1, length, { + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + }); + transferProgress += length; + if (options.onProgress) options.onProgress({ loadedBytes: transferProgress }); + }, + // concurrency should set a smaller value than maxConcurrency, which is helpful to + // reduce the possibility when a outgoing handler waits for stream data, in + // this situation, outgoing handlers are blocked. + // Outgoing queue shouldn't be empty. + Math.ceil(maxConcurrency / 4 * 3) +); + await scheduler.do(); + return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + }); + } + }; + /** + * PageBlobClient defines a set of operations applicable to page blobs. + */ + var PageBlobClient = class PageBlobClient extends BlobClient { + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + let pipeline; + let url$1; + options = options || {}; + if (isPipelineLike(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url$1 = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { + const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url$1 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + super(url$1, pipeline); + this.pageBlobContext = this.storageClientContext.pageBlob; + } + /** + * Creates a new PageBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot$1) { + return new PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot$1.length === 0 ? void 0 : snapshot$1), this.pipeline); + } + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param size - size of the page blob. + * @param options - Options to the Page Blob Create operation. + * @returns Response data for the Page Blob Create operation. + */ + async create(size, options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + var _a$2, _b$1, _c$1; + return assertResponse(await this.pageBlobContext.create(0, size, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + blobSequenceNumber: options.blobSequenceNumber, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: (_b$1 = options.immutabilityPolicy) === null || _b$1 === void 0 ? void 0 : _b$1.expiriesOn, + immutabilityPolicyMode: (_c$1 = options.immutabilityPolicy) === null || _c$1 === void 0 ? void 0 : _c$1.policyMode, + legalHold: options.legalHold, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. If the blob with the same name already exists, the content + * of the existing blob will remain unchanged. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param size - size of the page blob. + * @param options - + */ + async createIfNotExists(size, options = {}) { + return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { + var _a$2, _b$1; + try { + const conditions = { ifNoneMatch: ETagAny }; + const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { + conditions, + tracingOptions: updatedOptions.tracingOptions + }))); + return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + } catch (e) { + if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "BlobAlreadyExists") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); + throw e; + } + }); + } + /** + * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page + * + * @param body - Data to upload + * @param offset - Offset of destination page blob + * @param count - Content length of the body, also number of bytes to be uploaded + * @param options - Options to the Page Blob Upload Pages operation. + * @returns Response data for the Page Blob Upload Pages operation. + */ + async uploadPages(body$1, offset, count, options = {}) { + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.pageBlobContext.uploadPages(count, body$1, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + requestOptions: { onUploadProgress: options.onProgress }, + range: rangeToString({ + offset, + count + }), + sequenceNumberAccessConditions: options.conditions, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * The Upload Pages operation writes a range of pages to a page blob where the + * contents are read from a URL. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * + * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication + * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob + * @param destOffset - Offset of destination page blob + * @param count - Number of bytes to be uploaded from source page blob + * @param options - + */ + async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + var _a$2, _b$1, _c$1, _d$1, _e; + return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ + offset: sourceOffset, + count + }), 0, rangeToString({ + offset: destOffset, + count + }), { + abortSignal: options.abortSignal, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + sequenceNumberAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: (_b$1 = options.sourceConditions) === null || _b$1 === void 0 ? void 0 : _b$1.ifMatch, + sourceIfModifiedSince: (_c$1 = options.sourceConditions) === null || _c$1 === void 0 ? void 0 : _c$1.ifModifiedSince, + sourceIfNoneMatch: (_d$1 = options.sourceConditions) === null || _d$1 === void 0 ? void 0 : _d$1.ifNoneMatch, + sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Frees the specified pages from the page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page + * + * @param offset - Starting byte position of the pages to clear. + * @param count - Number of bytes to clear. + * @param options - Options to the Page Blob Clear Pages operation. + * @returns Response data for the Page Blob Clear Pages operation. + */ + async clearPages(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.pageBlobContext.clearPages(0, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + range: rangeToString({ + offset, + count + }), + sequenceNumberAccessConditions: options.conditions, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns Response data for the Page Blob Get Ranges operation. + */ + async getPageRanges(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + var _a$2; + const response = assertResponse(await this.pageBlobContext.getPageRanges({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + range: rangeToString({ + offset, + count + }), + tracingOptions: updatedOptions.tracingOptions + })); + return rangeResponseFromModel(response); + }); + } + /** + * getPageRangesSegment returns a single segment of page ranges starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call getPageRangesSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to PageBlob Get Page Ranges Segment operation. + */ + async listPageRangesSegment(offset = 0, count, marker$1, options = {}) { + return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.pageBlobContext.getPageRanges({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + range: rangeToString({ + offset, + count + }), + marker: marker$1, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel} + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param marker - A string value that identifies the portion of + * the get of page ranges to be returned with the next getting operation. The + * operation returns the ContinuationToken value within the response body if the + * getting operation did not return all page ranges remaining within the current page. + * The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of get + * items. The marker value is opaque to the client. + * @param options - Options to List Page Ranges operation. + */ + listPageRangeItemSegments() { + return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker$1, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker$1 || marker$1 === void 0) do { + getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker$1, options)); + marker$1 = getPageRangeItemSegmentsResponse.continuationToken; + yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); + } while (marker$1); + }); + } + /** + * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to List Page Ranges operation. + */ + listPageRangeItems() { + return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { + var _a$2, e_1, _b$1, _c$1; + let marker$1; + try { + for (var _d$1 = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { + _c$1 = _f.value; + _d$1 = false; + const getPageRangesSegment = _c$1; + yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); + } finally { + if (e_1) throw e_1.error; + } + } + }); + } + /** + * Returns an async iterable iterator to list of page ranges for a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * .byPage() returns an async iterable iterator to list of page ranges for a page blob. + * + * Example using `for await` syntax: + * + * ```js + * // Get the pageBlobClient before you run these snippets, + * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * let i = 1; + * for await (const pageRange of pageBlobClient.listPageRanges()) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * let iter = pageBlobClient.listPageRanges(); + * let pageRangeItem = await iter.next(); + * while (!pageRangeItem.done) { + * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); + * pageRangeItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of response) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 page ranges + * for (const pageRange of response) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * + * // Passing next marker as continuationToken + * + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 page ranges + * for (const blob of response) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * ``` + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns An asyncIterableIterator that supports paging. + */ + listPageRanges(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + const iter = this.listPageRangeItems(offset, count, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + } + }; + } + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page blob + * @param count - Number of bytes to get ranges diff. + * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * @returns Response data for the Page Blob Get Page Range Diff operation. + */ + async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { + options.conditions = options.conditions || {}; + return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + var _a$2; + const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + prevsnapshot: prevSnapshot, + range: rangeToString({ + offset, + count + }), + tracingOptions: updatedOptions.tracingOptions + })); + return rangeResponseFromModel(result); + }); + } + /** + * getPageRangesDiffSegment returns a single segment of page ranges starting from the + * specified Marker for difference between previous snapshot and the target page blob. + * Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call getPageRangesDiffSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker$1, options = {}) { + return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, + leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a$2 = options === null || options === void 0 ? void 0 : options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + prevsnapshot: prevSnapshotOrUrl, + range: rangeToString({ + offset, + count + }), + marker: marker$1, + maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel} + * + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param marker - A string value that identifies the portion of + * the get of page ranges to be returned with the next getting operation. The + * operation returns the ContinuationToken value within the response body if the + * getting operation did not return all page ranges remaining within the current page. + * The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of get + * items. The marker value is opaque to the client. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker$1, options) { + return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { + let getPageRangeItemSegmentsResponse; + if (!!marker$1 || marker$1 === void 0) do { + getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker$1, options)); + marker$1 = getPageRangeItemSegmentsResponse.continuationToken; + yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); + } while (marker$1); + }); + } + /** + * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { + var _a$2, e_2, _b$1, _c$1; + let marker$1; + try { + for (var _d$1 = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { + _c$1 = _f.value; + _d$1 = false; + const getPageRangesSegment = _c$1; + yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); + } finally { + if (e_2) throw e_2.error; + } + } + }); + } + /** + * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. + * + * Example using `for await` syntax: + * + * ```js + * // Get the pageBlobClient before you run these snippets, + * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * let i = 1; + * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * let iter = pageBlobClient.listPageRangesDiff(); + * let pageRangeItem = await iter.next(); + * while (!pageRangeItem.done) { + * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); + * pageRangeItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { + * for (const pageRange of response) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 page ranges + * for (const pageRange of response) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * + * // Passing next marker as continuationToken + * + * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 page ranges + * for (const blob of response) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * ``` + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns An asyncIterableIterator that supports paging. + */ + listPageRangesDiff(offset, count, prevSnapshot, options = {}) { + options.conditions = options.conditions || {}; + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + } + }; + } + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page blob + * @param count - Number of bytes to get ranges diff. + * @param prevSnapshotUrl - URL of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * @returns Response data for the Page Blob Get Page Range Diff operation. + */ + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl$1, options = {}) { + options.conditions = options.conditions || {}; + return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + var _a$2; + const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + prevSnapshotUrl: prevSnapshotUrl$1, + range: rangeToString({ + offset, + count + }), + tracingOptions: updatedOptions.tracingOptions + })); + return rangeResponseFromModel(response); + }); + } + /** + * Resizes the page blob to the specified size (which must be a multiple of 512). + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param size - Target size + * @param options - Options to the Page Blob Resize operation. + * @returns Response data for the Page Blob Resize operation. + */ + async resize(size, options = {}) { + options.conditions = options.conditions || {}; + return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.pageBlobContext.resize(size, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Sets a page blob's sequence number. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. + * @param sequenceNumber - Required if sequenceNumberAction is max or update + * @param options - Options to the Page Blob Update Sequence Number operation. + * @returns Response data for the Page Blob Update Sequence Number operation. + */ + async updateSequenceNumber(sequenceNumberAction$1, sequenceNumber, options = {}) { + options.conditions = options.conditions || {}; + return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction$1, { + abortSignal: options.abortSignal, + blobSequenceNumber: sequenceNumber, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. + * The snapshot is copied such that only the differential changes between the previously + * copied snapshot are transferred to the destination. + * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * + * @param copySource - Specifies the name of the source page blob snapshot. For example, + * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param options - Options to the Page Blob Copy Incremental operation. + * @returns Response data for the Page Blob Copy Incremental operation. + */ + async startCopyIncremental(copySource$1, options = {}) { + return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + var _a$2; + return assertResponse(await this.pageBlobContext.copyIncremental(copySource$1, { + abortSignal: options.abortSignal, + modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a$2 = options.conditions) === null || _a$2 === void 0 ? void 0 : _a$2.tagConditions }), + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + }; + async function getBodyAsText(batchResponse) { + let buffer$2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer$2); + buffer$2 = buffer$2.slice(0, responseLength); + return buffer$2.toString(); + } + function utf8ByteLength(str) { + return Buffer.byteLength(str); + } + const HTTP_HEADER_DELIMITER = ": "; + const SPACE_DELIMITER = " "; + const NOT_FOUND = -1; + /** + * Util class for parsing batch response. + */ + var BatchResponseParser = class { + constructor(batchResponse, subRequests) { + if (!batchResponse || !batchResponse.contentType) throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); + if (!subRequests || subRequests.size === 0) throw new RangeError("Invalid state: subRequests is not provided or size is 0."); + this.batchResponse = batchResponse; + this.subRequests = subRequests; + this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; + this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.batchResponseEnding = `--${this.responseBatchBoundary}--`; + } + async parseBatchResponse() { + if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); + const responseBodyAsText = await getBodyAsText(this.batchResponse); + const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); + const subResponseCount = subResponses.length; + if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); + const deserializedSubResponses = new Array(subResponseCount); + let subResponsesSucceededCount = 0; + let subResponsesFailedCount = 0; + for (let index = 0; index < subResponseCount; index++) { + const subResponse = subResponses[index]; + const deserializedSubResponse = {}; + deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); + const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + let subRespHeaderStartFound = false; + let subRespHeaderEndFound = false; + let subRespFailed = false; + let contentId = NOT_FOUND; + for (const responseLine of responseLines) { + if (!subRespHeaderStartFound) { + if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); + if (responseLine.startsWith(HTTP_VERSION_1_1)) { + subRespHeaderStartFound = true; + const tokens = responseLine.split(SPACE_DELIMITER); + deserializedSubResponse.status = parseInt(tokens[1]); + deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); + } + continue; + } + if (responseLine.trim() === "") { + if (!subRespHeaderEndFound) subRespHeaderEndFound = true; + continue; + } + if (!subRespHeaderEndFound) { + if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`); + const tokens = responseLine.split(HTTP_HEADER_DELIMITER); + deserializedSubResponse.headers.set(tokens[0], tokens[1]); + if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + deserializedSubResponse.errorCode = tokens[1]; + subRespFailed = true; + } + } else { + if (!deserializedSubResponse.bodyAsText) deserializedSubResponse.bodyAsText = ""; + deserializedSubResponse.bodyAsText += responseLine; + } + } + if (contentId !== NOT_FOUND && Number.isInteger(contentId) && contentId >= 0 && contentId < this.subRequests.size && deserializedSubResponses[contentId] === void 0) { + deserializedSubResponse._request = this.subRequests.get(contentId); + deserializedSubResponses[contentId] = deserializedSubResponse; + } else logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + if (subRespFailed) subResponsesFailedCount++; + else subResponsesSucceededCount++; + } + return { + subResponses: deserializedSubResponses, + subResponsesSucceededCount, + subResponsesFailedCount + }; + } + }; + var MutexLockStatus; + (function(MutexLockStatus$1) { + MutexLockStatus$1[MutexLockStatus$1["LOCKED"] = 0] = "LOCKED"; + MutexLockStatus$1[MutexLockStatus$1["UNLOCKED"] = 1] = "UNLOCKED"; + })(MutexLockStatus || (MutexLockStatus = {})); + /** + * An async mutex lock. + */ + var Mutex = class { + /** + * Lock for a specific key. If the lock has been acquired by another customer, then + * will wait until getting the lock. + * + * @param key - lock key + */ + static async lock(key) { + return new Promise((resolve) => { + if (this.keys[key] === void 0 || this.keys[key] === MutexLockStatus.UNLOCKED) { + this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + } else this.onUnlockEvent(key, () => { + this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + }); + }); + } + /** + * Unlock a key. + * + * @param key - + */ + static async unlock(key) { + return new Promise((resolve) => { + if (this.keys[key] === MutexLockStatus.LOCKED) this.emitUnlockEvent(key); + delete this.keys[key]; + resolve(); + }); + } + static onUnlockEvent(key, handler) { + if (this.listeners[key] === void 0) this.listeners[key] = [handler]; + else this.listeners[key].push(handler); + } + static emitUnlockEvent(key) { + if (this.listeners[key] !== void 0 && this.listeners[key].length > 0) { + const handler = this.listeners[key].shift(); + setImmediate(() => { + handler.call(this); + }); + } + } + }; + Mutex.keys = {}; + Mutex.listeners = {}; + /** + * A BlobBatch represents an aggregated set of operations on blobs. + * Currently, only `delete` and `setAccessTier` are supported. + */ + var BlobBatch = class { + constructor() { + this.batch = "batch"; + this.batchRequest = new InnerBatchRequest(); + } + /** + * Get the value of Content-Type for a batch request. + * The value must be multipart/mixed with a batch boundary. + * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 + */ + getMultiPartContentType() { + return this.batchRequest.getMultipartContentType(); + } + /** + * Get assembled HTTP request body for sub requests. + */ + getHttpRequestBody() { + return this.batchRequest.getHttpRequestBody(); + } + /** + * Get sub requests that are added into the batch request. + */ + getSubRequests() { + return this.batchRequest.getSubRequests(); + } + async addSubRequestInternal(subRequest, assembleSubRequestFunc) { + await Mutex.lock(this.batch); + try { + this.batchRequest.preAddSubRequest(subRequest); + await assembleSubRequestFunc(); + this.batchRequest.postAddSubRequest(subRequest); + } finally { + await Mutex.unlock(this.batch); + } + } + setBatchType(batchType) { + if (!this.batchType) this.batchType = batchType; + if (this.batchType !== batchType) throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`); + } + async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { + let url$1; + let credential; + if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { + url$1 = urlOrBlobClient; + credential = credentialOrOptions; + } else if (urlOrBlobClient instanceof BlobClient) { + url$1 = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + options = credentialOrOptions; + } else throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + if (!options) options = {}; + return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + this.setBatchType("delete"); + await this.addSubRequestInternal({ + url: url$1, + credential + }, async () => { + await new BlobClient(url$1, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + }); + }); + } + async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { + let url$1; + let credential; + let tier$1; + if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { + url$1 = urlOrBlobClient; + credential = credentialOrTier; + tier$1 = tierOrOptions; + } else if (urlOrBlobClient instanceof BlobClient) { + url$1 = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + tier$1 = credentialOrTier; + options = tierOrOptions; + } else throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + if (!options) options = {}; + return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + this.setBatchType("setAccessTier"); + await this.addSubRequestInternal({ + url: url$1, + credential + }, async () => { + await new BlobClient(url$1, this.batchRequest.createPipeline(credential)).setAccessTier(tier$1, updatedOptions); + }); + }); + } + }; + /** + * Inner batch request class which is responsible for assembling and serializing sub requests. + * See https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled. + */ + var InnerBatchRequest = class { + constructor() { + this.operationCount = 0; + this.body = ""; + const tempGuid = coreUtil.randomUUID(); + this.boundary = `batch_${tempGuid}`; + this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; + this.batchRequestEnding = `--${this.boundary}--`; + this.subRequests = new Map(); + } + /** + * Create pipeline to assemble sub requests. The idea here is to use existing + * credential and serialization/deserialization components, with additional policies to + * filter unnecessary headers, assemble sub requests into request's body + * and intercept request from going to wire. + * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + createPipeline(credential) { + const corePipeline = coreRestPipeline.createEmptyPipeline(); + corePipeline.addPolicy(coreClient.serializationPolicy({ + stringifyXML: coreXml.stringifyXML, + serializerOptions: { xml: { xmlCharKey: "#" } } + }), { phase: "Serialize" }); + corePipeline.addPolicy(batchHeaderFilterPolicy()); + corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); + if (coreAuth.isTokenCredential(credential)) corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential, + scopes: StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + }), { phase: "Sign" }); + else if (credential instanceof StorageSharedKeyCredential) corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + accountName: credential.accountName, + accountKey: credential.accountKey + }), { phase: "Sign" }); + const pipeline = new Pipeline([]); + pipeline._credential = credential; + pipeline._corePipeline = corePipeline; + return pipeline; + } + appendSubRequestToBody(request) { + this.body += [ + this.subRequestPrefix, + `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + "", + `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + ].join(HTTP_LINE_ENDING); + for (const [name, value] of request.headers) this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += HTTP_LINE_ENDING; + } + preAddSubRequest(subRequest) { + if (this.operationCount >= BATCH_MAX_REQUEST) throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + const path$8 = getURLPath(subRequest.url); + if (!path$8 || path$8 === "") throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); + } + postAddSubRequest(subRequest) { + this.subRequests.set(this.operationCount, subRequest); + this.operationCount++; + } + getHttpRequestBody() { + return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + } + getMultipartContentType() { + return this.multipartContentType; + } + getSubRequests() { + return this.subRequests; + } + }; + function batchRequestAssemblePolicy(batchRequest) { + return { + name: "batchRequestAssemblePolicy", + async sendRequest(request) { + batchRequest.appendSubRequestToBody(request); + return { + request, + status: 200, + headers: coreRestPipeline.createHttpHeaders() + }; + } + }; + } + function batchHeaderFilterPolicy() { + return { + name: "batchHeaderFilterPolicy", + async sendRequest(request, next) { + let xMsHeaderName = ""; + for (const [name] of request.headers) if (iEqual(name, HeaderConstants.X_MS_VERSION)) xMsHeaderName = name; + if (xMsHeaderName !== "") request.headers.delete(xMsHeaderName); + return next(request); + } + }; + } + /** + * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch + */ + var BlobBatchClient = class { + constructor(url$1, credentialOrPipeline, options) { + let pipeline; + if (isPipelineLike(credentialOrPipeline)) pipeline = credentialOrPipeline; + else if (!credentialOrPipeline) pipeline = newPipeline(new AnonymousCredential(), options); + else pipeline = newPipeline(credentialOrPipeline, options); + const storageClientContext = new StorageContextClient(url$1, getCoreClientOptions(pipeline)); + const path$8 = getURLPath(url$1); + if (path$8 && path$8 !== "/") this.serviceOrContainerContext = storageClientContext.container; + else this.serviceOrContainerContext = storageClientContext.service; + } + /** + * Creates a {@link BlobBatch}. + * A BlobBatch represents an aggregated set of operations on blobs. + */ + createBatch() { + return new BlobBatch(); + } + async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { + const batch = new BlobBatch(); + for (const urlOrBlobClient of urlsOrBlobClients) if (typeof urlOrBlobClient === "string") await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); + else await batch.deleteBlob(urlOrBlobClient, credentialOrOptions); + return this.submitBatch(batch); + } + async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { + const batch = new BlobBatch(); + for (const urlOrBlobClient of urlsOrBlobClients) if (typeof urlOrBlobClient === "string") await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); + else await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions); + return this.submitBatch(batch); + } + /** + * Submit batch request which consists of multiple subrequests. + * + * Get `blobBatchClient` and other details before running the snippets. + * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` + * + * Example usage: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob(urlInString0, credential0); + * await batchRequest.deleteBlob(urlInString1, credential1, { + * deleteSnapshots: "include" + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * Example using a lease: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); + * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { + * conditions: { leaseId: leaseId } + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @param batchRequest - A set of Delete or SetTier operations. + * @param options - + */ + async submitBatch(batchRequest, options = {}) { + if (!batchRequest || batchRequest.getSubRequests().size === 0) throw new RangeError("Batch request should contain one or more sub requests."); + return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + const batchRequestBody = batchRequest.getHttpRequestBody(); + const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); + const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const responseSummary = await batchResponseParser.parseBatchResponse(); + const res = { + _response: rawBatchResponse._response, + contentType: rawBatchResponse.contentType, + errorCode: rawBatchResponse.errorCode, + requestId: rawBatchResponse.requestId, + clientRequestId: rawBatchResponse.clientRequestId, + version: rawBatchResponse.version, + subResponses: responseSummary.subResponses, + subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, + subResponsesFailedCount: responseSummary.subResponsesFailedCount + }; + return res; + }); + } + }; + /** + * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. + */ + var ContainerClient = class extends StorageClient { + /** + * The name of the container. + */ + get containerName() { + return this._containerName; + } + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { + let pipeline; + let url$1; + options = options || {}; + if (isPipelineLike(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { + url$1 = urlOrConnectionString; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { + url$1 = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { + const containerName = credentialOrPipelineOrContainerName; + const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { + const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url$1 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + url$1 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } else throw new Error("Expecting non-empty strings for containerName parameter"); + super(url$1, pipeline); + this._containerName = this.getContainerNameFromUrl(); + this.containerContext = this.storageClientContext.container; + } + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, the operation fails. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container + * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * + * @param options - Options to Container Create operation. + * + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * const createContainerResponse = await containerClient.create(); + * console.log("Container was created successfully", createContainerResponse.requestId); + * ``` + */ + async create(options = {}) { + return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return assertResponse(await this.containerContext.create(updatedOptions)); + }); + } + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, it is not changed. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container + * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * + * @param options - + */ + async createIfNotExists(options = {}) { + return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { + var _a$2, _b$1; + try { + const res = await this.create(updatedOptions); + return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + } catch (e) { + if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "ContainerAlreadyExists") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); + else throw e; + } + }); + } + /** + * Returns true if the Azure container resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing container might be deleted by other clients or + * applications. Vice versa new containers with the same name might be added by other clients or + * applications after this function completes. + * + * @param options - + */ + async exists(options = {}) { + return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + try { + await this.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + }); + return true; + } catch (e) { + if (e.statusCode === 404) return false; + throw e; + } + }); + } + /** + * Creates a {@link BlobClient} + * + * @param blobName - A blob name + * @returns A new BlobClient object for the given blob name. + */ + getBlobClient(blobName) { + return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + } + /** + * Creates an {@link AppendBlobClient} + * + * @param blobName - An append blob name + */ + getAppendBlobClient(blobName) { + return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + } + /** + * Creates a {@link BlockBlobClient} + * + * @param blobName - A block blob name + * + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * + * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + getBlockBlobClient(blobName) { + return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + } + /** + * Creates a {@link PageBlobClient} + * + * @param blobName - A page blob name + */ + getPageBlobClient(blobName) { + return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + } + /** + * Returns all user-defined metadata and system properties for the specified + * container. The data returned does not include the container's list of blobs. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which + * will retain their original casing. + * + * @param options - Options to Container Get Properties operation. + */ + async getProperties(options = {}) { + if (!options.conditions) options.conditions = {}; + return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + }); + } + /** + * Marks the specified container for deletion. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param options - Options to Container Delete operation. + */ + async delete(options = {}) { + if (!options.conditions) options.conditions = {}; + return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return assertResponse(await this.containerContext.delete({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Marks the specified container for deletion if it exists. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param options - Options to Container Delete operation. + */ + async deleteIfExists(options = {}) { + return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { + var _a$2, _b$1; + try { + const res = await this.delete(updatedOptions); + return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + } catch (e) { + if (((_a$2 = e.details) === null || _a$2 === void 0 ? void 0 : _a$2.errorCode) === "ContainerNotFound") return Object.assign(Object.assign({ succeeded: false }, (_b$1 = e.response) === null || _b$1 === void 0 ? void 0 : _b$1.parsedHeaders), { _response: e.response }); + throw e; + } + }); + } + /** + * Sets one or more user-defined name-value pairs for the specified container. + * + * If no option provided, or no metadata defined in the parameter, the container + * metadata will be removed. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * + * @param metadata - Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param options - Options to Container Set Metadata operation. + */ + async setMetadata(metadata$1, options = {}) { + if (!options.conditions) options.conditions = {}; + if (options.conditions.ifUnmodifiedSince) throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); + return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return assertResponse(await this.containerContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: metadata$1, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Gets the permissions for the specified container. The permissions indicate + * whether container data may be accessed publicly. + * + * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. + * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * + * @param options - Options to Container Get Access Policy operation. + */ + async getAccessPolicy(options = {}) { + if (!options.conditions) options.conditions = {}; + return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = assertResponse(await this.containerContext.getAccessPolicy({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + const res = { + _response: response._response, + blobPublicAccess: response.blobPublicAccess, + date: response.date, + etag: response.etag, + errorCode: response.errorCode, + lastModified: response.lastModified, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + signedIdentifiers: [], + version: response.version + }; + for (const identifier of response) { + let accessPolicy = void 0; + if (identifier.accessPolicy) { + accessPolicy = { permissions: identifier.accessPolicy.permissions }; + if (identifier.accessPolicy.expiresOn) accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); + if (identifier.accessPolicy.startsOn) accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); + } + res.signedIdentifiers.push({ + accessPolicy, + id: identifier.id + }); + } + return res; + }); + } + /** + * Sets the permissions for the specified container. The permissions indicate + * whether blobs in a container may be accessed publicly. + * + * When you set permissions for a container, the existing permissions are replaced. + * If no access or containerAcl provided, the existing container ACL will be + * removed. + * + * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. + * During this interval, a shared access signature that is associated with the stored access policy will + * fail with status code 403 (Forbidden), until the access policy becomes active. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * + * @param access - The level of public access to data in the container. + * @param containerAcl - Array of elements each having a unique Id and details of the access policy. + * @param options - Options to Container Set Access Policy operation. + */ + async setAccessPolicy(access$1, containerAcl$1, options = {}) { + options.conditions = options.conditions || {}; + return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + const acl = []; + for (const identifier of containerAcl$1 || []) acl.push({ + accessPolicy: { + expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + permissions: identifier.accessPolicy.permissions, + startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + }, + id: identifier.id + }); + return assertResponse(await this.containerContext.setAccessPolicy({ + abortSignal: options.abortSignal, + access: access$1, + containerAcl: acl, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Get a {@link BlobLeaseClient} that manages leases on the container. + * + * @param proposeLeaseId - Initial proposed lease Id. + * @returns A new BlobLeaseClient object for managing leases on the container. + */ + getBlobLeaseClient(proposeLeaseId) { + return new BlobLeaseClient(this, proposeLeaseId); + } + /** + * Creates a new block blob, or updates the content of an existing block blob. + * + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, + * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better + * performance with concurrency uploading. + * + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param blobName - Name of the block blob to create or update. + * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param options - Options to configure the Block Blob Upload operation. + * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. + */ + async uploadBlockBlob(blobName, body$1, contentLength$1, options = {}) { + return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + const blockBlobClient = this.getBlockBlobClient(blobName); + const response = await blockBlobClient.upload(body$1, contentLength$1, updatedOptions); + return { + blockBlobClient, + response + }; + }); + } + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param blobName - + * @param options - Options to Blob Delete operation. + * @returns Block blob deletion response data. + */ + async deleteBlob(blobName, options = {}) { + return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + let blobClient = this.getBlobClient(blobName); + if (options.versionId) blobClient = blobClient.withVersion(options.versionId); + return blobClient.delete(updatedOptions); + }); + } + /** + * listBlobFlatSegment returns a single segment of blobs starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call listBlobsFlatSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs + * + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to Container List Blob Flat Segment operation. + */ + async listBlobFlatSegment(marker$1, options = {}) { + return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker$1 }, options), { tracingOptions: updatedOptions.tracingOptions }))); + const wrappedResponse = Object.assign(Object.assign({}, response), { + _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), + segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = Object.assign(Object.assign({}, blobItemInternal), { + name: BlobNameToString(blobItemInternal.name), + tags: toTags(blobItemInternal.blobTags), + objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) + }); + return blobItem; + }) }) + }); + return wrappedResponse; + }); + } + /** + * listBlobHierarchySegment returns a single segment of blobs starting from + * the specified Marker. Use an empty Marker to start enumeration from the + * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment + * again (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to Container List Blob Hierarchy Segment operation. + */ + async listBlobHierarchySegment(delimiter$1, marker$1, options = {}) { + return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + var _a$2; + const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter$1, Object.assign(Object.assign({ marker: marker$1 }, options), { tracingOptions: updatedOptions.tracingOptions }))); + const wrappedResponse = Object.assign(Object.assign({}, response), { + _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), + segment: Object.assign(Object.assign({}, response.segment), { + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = Object.assign(Object.assign({}, blobItemInternal), { + name: BlobNameToString(blobItemInternal.name), + tags: toTags(blobItemInternal.blobTags), + objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) + }); + return blobItem; + }), + blobPrefixes: (_a$2 = response.segment.blobPrefixes) === null || _a$2 === void 0 ? void 0 : _a$2.map((blobPrefixInternal) => { + const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); + return blobPrefix; + }) + }) + }); + return wrappedResponse; + }); + } + /** + * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse + * + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list blobs operation. + */ + listSegments(marker_1) { + return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker$1, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker$1 || marker$1 === void 0) do { + listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker$1, options)); + marker$1 = listBlobsFlatSegmentResponse.continuationToken; + yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); + } while (marker$1); + }); + } + /** + * Returns an AsyncIterableIterator of {@link BlobItem} objects + * + * @param options - Options to list blobs operation. + */ + listItems() { + return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { + var _a$2, e_1, _b$1, _c$1; + let marker$1; + try { + for (var _d$1 = true, _e = tslib.__asyncValues(this.listSegments(marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { + _c$1 = _f.value; + _d$1 = false; + const listBlobsFlatSegmentResponse = _c$1; + yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); + } finally { + if (e_1) throw e_1.error; + } + } + }); + } + /** + * Returns an async iterable iterator to list all the blobs + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * Example using `for await` syntax: + * + * ```js + * // Get the containerClient before you run these snippets, + * // Can be obtained from `blobServiceClient.getContainerClient("");` + * let i = 1; + * for await (const blob of containerClient.listBlobsFlat()) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * let iter = containerClient.listBlobsFlat(); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * + * // Passing next marker as continuationToken + * + * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * @param options - Options to list blobs. + * @returns An asyncIterableIterator that supports paging. + */ + listBlobsFlat(options = {}) { + const include$1 = []; + if (options.includeCopy) include$1.push("copy"); + if (options.includeDeleted) include$1.push("deleted"); + if (options.includeMetadata) include$1.push("metadata"); + if (options.includeSnapshots) include$1.push("snapshots"); + if (options.includeVersions) include$1.push("versions"); + if (options.includeUncommitedBlobs) include$1.push("uncommittedblobs"); + if (options.includeTags) include$1.push("tags"); + if (options.includeDeletedWithVersions) include$1.push("deletedwithversions"); + if (options.includeImmutabilityPolicy) include$1.push("immutabilitypolicy"); + if (options.includeLegalHold) include$1.push("legalhold"); + if (options.prefix === "") options.prefix = void 0; + const updatedOptions = Object.assign(Object.assign({}, options), include$1.length > 0 ? { include: include$1 } : {}); + const iter = this.listItems(updatedOptions); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + } + }; + } + /** + * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list blobs operation. + */ + listHierarchySegments(delimiter_1, marker_1) { + return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter$1, marker$1, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker$1 || marker$1 === void 0) do { + listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter$1, marker$1, options)); + marker$1 = listBlobsHierarchySegmentResponse.continuationToken; + yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); + } while (marker$1); + }); + } + /** + * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param options - Options to list blobs operation. + */ + listItemsByHierarchy(delimiter_1) { + return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter$1, options = {}) { + var _a$2, e_2, _b$1, _c$1; + let marker$1; + try { + for (var _d$1 = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter$1, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { + _c$1 = _f.value; + _d$1 = false; + const listBlobsHierarchySegmentResponse = _c$1; + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) for (const prefix$1 of segment.blobPrefixes) yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix$1)); + for (const blob of segment.blobItems) yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); + } finally { + if (e_2) throw e_2.error; + } + } + }); + } + /** + * Returns an async iterable iterator to list all the blobs by hierarchy. + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. + * + * Example using `for await` syntax: + * + * ```js + * for await (const item of containerClient.listBlobsByHierarchy("/")) { + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}`); + * } + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); + * let entity = await iter.next(); + * while (!entity.done) { + * let item = entity.value; + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}`); + * } + * entity = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * console.log("Listing blobs by hierarchy by page"); + * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { + * const segment = response.segment; + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * ``` + * + * Example using paging with a max page size: + * + * ```js + * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * + * let i = 1; + * for await (const response of containerClient + * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) + * .byPage({ maxPageSize: 2 })) { + * console.log(`Page ${i++}`); + * const segment = response.segment; + * + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * ``` + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param options - Options to list blobs operation. + */ + listBlobsByHierarchy(delimiter$1, options = {}) { + if (delimiter$1 === "") throw new RangeError("delimiter should contain one or more characters"); + const include$1 = []; + if (options.includeCopy) include$1.push("copy"); + if (options.includeDeleted) include$1.push("deleted"); + if (options.includeMetadata) include$1.push("metadata"); + if (options.includeSnapshots) include$1.push("snapshots"); + if (options.includeVersions) include$1.push("versions"); + if (options.includeUncommitedBlobs) include$1.push("uncommittedblobs"); + if (options.includeTags) include$1.push("tags"); + if (options.includeDeletedWithVersions) include$1.push("deletedwithversions"); + if (options.includeImmutabilityPolicy) include$1.push("immutabilitypolicy"); + if (options.includeLegalHold) include$1.push("legalhold"); + if (options.prefix === "") options.prefix = void 0; + const updatedOptions = Object.assign(Object.assign({}, options), include$1.length > 0 ? { include: include$1 } : {}); + const iter = this.listItemsByHierarchy(delimiter$1, updatedOptions); + return { + async next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.listHierarchySegments(delimiter$1, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + } + }; + } + /** + * The Filter Blobs operation enables callers to list blobs in the container whose tags + * match a given search expression. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker$1, options = {}) { + return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = assertResponse(await this.containerContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker: marker$1, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = Object.assign(Object.assign({}, response), { + _response: response._response, + blobs: response.blobs.map((blob) => { + var _a$2; + let tagValue = ""; + if (((_a$2 = blob.tags) === null || _a$2 === void 0 ? void 0 : _a$2.blobTagSet.length) === 1) tagValue = blob.tags.blobTagSet[0].value; + return Object.assign(Object.assign({}, blob), { + tags: toTags(blob.tags), + tagValue + }); + }) + }); + return wrappedResponse; + }); + } + /** + * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { + return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker$1, options = {}) { + let response; + if (!!marker$1 || marker$1 === void 0) do { + response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker$1, options)); + response.blobs = response.blobs || []; + marker$1 = response.continuationToken; + yield yield tslib.__await(response); + } while (marker$1); + }); + } + /** + * Returns an AsyncIterableIterator for blobs. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to findBlobsByTagsItems. + */ + findBlobsByTagsItems(tagFilterSqlExpression_1) { + return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { + var _a$2, e_3, _b$1, _c$1; + let marker$1; + try { + for (var _d$1 = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { + _c$1 = _f.value; + _d$1 = false; + const segment = _c$1; + yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); + } + } catch (e_3_1) { + e_3 = { error: e_3_1 }; + } finally { + try { + if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); + } finally { + if (e_3) throw e_3.error; + } + } + }); + } + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified container. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to find blobs by tags. + */ + findBlobsByTags(tagFilterSqlExpression, options = {}) { + const listSegmentOptions = Object.assign({}, options); + const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + } + }; + } + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return assertResponse(await this.containerContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + getContainerNameFromUrl() { + let containerName; + try { + const parsedUrl = new URL(this.url); + if (parsedUrl.hostname.split(".")[1] === "blob") containerName = parsedUrl.pathname.split("/")[1]; + else if (isIpEndpointStyle(parsedUrl)) containerName = parsedUrl.pathname.split("/")[2]; + else containerName = parsedUrl.pathname.split("/")[1]; + containerName = decodeURIComponent(containerName); + if (!containerName) throw new Error("Provided containerName is invalid."); + return containerName; + } catch (error) { + throw new Error("Unable to extract containerName with provided information."); + } + } + /** + * Only available for ContainerClient constructed with a shared key credential. + * + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasUrl(options) { + return new Promise((resolve) => { + if (!(this.credential instanceof StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); + resolve(appendToURLQuery(this.url, sas)); + }); + } + /** + * Only available for ContainerClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasStringToSign(options) { + if (!(this.credential instanceof StorageSharedKeyCredential)) throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve) => { + const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).toString(); + resolve(appendToURLQuery(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).stringToSign; + } + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @returns A new BlobBatchClient object for this container. + */ + getBlobBatchClient() { + return new BlobBatchClient(this.url, this.pipeline); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the + * values are set, this should be serialized with toString and set as the permissions field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + */ + var AccountSASPermissions = class AccountSASPermissions { + constructor() { + /** + * Permission to read resources and list queues and tables granted. + */ + this.read = false; + /** + * Permission to write resources granted. + */ + this.write = false; + /** + * Permission to delete blobs and files granted. + */ + this.delete = false; + /** + * Permission to delete versions granted. + */ + this.deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + this.list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + this.add = false; + /** + * Permission to create blobs and files granted. + */ + this.create = false; + /** + * Permissions to update messages and table entities granted. + */ + this.update = false; + /** + * Permission to get and delete messages granted. + */ + this.process = false; + /** + * Specfies Tag access granted. + */ + this.tag = false; + /** + * Permission to filter blobs. + */ + this.filter = false; + /** + * Permission to set immutability policy. + */ + this.setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + this.permanentDelete = false; + } + /** + * Parse initializes the AccountSASPermissions fields from a string. + * + * @param permissions - + */ + static parse(permissions) { + const accountSASPermissions = new AccountSASPermissions(); + for (const c of permissions) switch (c) { + case "r": + accountSASPermissions.read = true; + break; + case "w": + accountSASPermissions.write = true; + break; + case "d": + accountSASPermissions.delete = true; + break; + case "x": + accountSASPermissions.deleteVersion = true; + break; + case "l": + accountSASPermissions.list = true; + break; + case "a": + accountSASPermissions.add = true; + break; + case "c": + accountSASPermissions.create = true; + break; + case "u": + accountSASPermissions.update = true; + break; + case "p": + accountSASPermissions.process = true; + break; + case "t": + accountSASPermissions.tag = true; + break; + case "f": + accountSASPermissions.filter = true; + break; + case "i": + accountSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + accountSASPermissions.permanentDelete = true; + break; + default: throw new RangeError(`Invalid permission character: ${c}`); + } + return accountSASPermissions; + } + /** + * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - + */ + static from(permissionLike) { + const accountSASPermissions = new AccountSASPermissions(); + if (permissionLike.read) accountSASPermissions.read = true; + if (permissionLike.write) accountSASPermissions.write = true; + if (permissionLike.delete) accountSASPermissions.delete = true; + if (permissionLike.deleteVersion) accountSASPermissions.deleteVersion = true; + if (permissionLike.filter) accountSASPermissions.filter = true; + if (permissionLike.tag) accountSASPermissions.tag = true; + if (permissionLike.list) accountSASPermissions.list = true; + if (permissionLike.add) accountSASPermissions.add = true; + if (permissionLike.create) accountSASPermissions.create = true; + if (permissionLike.update) accountSASPermissions.update = true; + if (permissionLike.process) accountSASPermissions.process = true; + if (permissionLike.setImmutabilityPolicy) accountSASPermissions.setImmutabilityPolicy = true; + if (permissionLike.permanentDelete) accountSASPermissions.permanentDelete = true; + return accountSASPermissions; + } + /** + * Produces the SAS permissions string for an Azure Storage account. + * Call this method to set AccountSASSignatureValues Permissions field. + * + * Using this method will guarantee the resource types are in + * an order accepted by the service. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + */ + toString() { + const permissions = []; + if (this.read) permissions.push("r"); + if (this.write) permissions.push("w"); + if (this.delete) permissions.push("d"); + if (this.deleteVersion) permissions.push("x"); + if (this.filter) permissions.push("f"); + if (this.tag) permissions.push("t"); + if (this.list) permissions.push("l"); + if (this.add) permissions.push("a"); + if (this.create) permissions.push("c"); + if (this.update) permissions.push("u"); + if (this.process) permissions.push("p"); + if (this.setImmutabilityPolicy) permissions.push("i"); + if (this.permanentDelete) permissions.push("y"); + return permissions.join(""); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the + * values are set, this should be serialized with toString and set as the resources field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but + * the order of the resources is particular and this class guarantees correctness. + */ + var AccountSASResourceTypes = class AccountSASResourceTypes { + constructor() { + /** + * Permission to access service level APIs granted. + */ + this.service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + this.container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + this.object = false; + } + /** + * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an + * Error if it encounters a character that does not correspond to a valid resource type. + * + * @param resourceTypes - + */ + static parse(resourceTypes) { + const accountSASResourceTypes = new AccountSASResourceTypes(); + for (const c of resourceTypes) switch (c) { + case "s": + accountSASResourceTypes.service = true; + break; + case "c": + accountSASResourceTypes.container = true; + break; + case "o": + accountSASResourceTypes.object = true; + break; + default: throw new RangeError(`Invalid resource type: ${c}`); + } + return accountSASResourceTypes; + } + /** + * Converts the given resource types to a string. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + */ + toString() { + const resourceTypes = []; + if (this.service) resourceTypes.push("s"); + if (this.container) resourceTypes.push("c"); + if (this.object) resourceTypes.push("o"); + return resourceTypes.join(""); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that service. Once all the + * values are set, this should be serialized with toString and set as the services field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but + * the order of the services is particular and this class guarantees correctness. + */ + var AccountSASServices = class AccountSASServices { + constructor() { + /** + * Permission to access blob resources granted. + */ + this.blob = false; + /** + * Permission to access file resources granted. + */ + this.file = false; + /** + * Permission to access queue resources granted. + */ + this.queue = false; + /** + * Permission to access table resources granted. + */ + this.table = false; + } + /** + * Creates an {@link AccountSASServices} from the specified services string. This method will throw an + * Error if it encounters a character that does not correspond to a valid service. + * + * @param services - + */ + static parse(services) { + const accountSASServices = new AccountSASServices(); + for (const c of services) switch (c) { + case "b": + accountSASServices.blob = true; + break; + case "f": + accountSASServices.file = true; + break; + case "q": + accountSASServices.queue = true; + break; + case "t": + accountSASServices.table = true; + break; + default: throw new RangeError(`Invalid service character: ${c}`); + } + return accountSASServices; + } + /** + * Converts the given services to a string. + * + */ + toString() { + const services = []; + if (this.blob) services.push("b"); + if (this.table) services.push("t"); + if (this.queue) services.push("q"); + if (this.file) services.push("f"); + return services.join(""); + } + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual + * REST request. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @param accountSASSignatureValues - + * @param sharedKeyCredential - + */ + function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { + return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; + } + function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { + const version$1 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version$1 < "2020-08-04") throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version$1 < "2019-10-10") throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version$1 < "2019-12-12") throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version$1 < "2019-12-12") throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); + if (accountSASSignatureValues.encryptionScope && version$1 < "2020-12-06") throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); + const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + let stringToSign; + if (version$1 >= "2020-12-06") stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", + truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version$1, + accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", + "" + ].join("\n"); + else stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", + truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version$1, + "" + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters(version$1, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + stringToSign + }; + } + /** + * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you + * to manipulate blob containers. + */ + var BlobServiceClient = class BlobServiceClient extends StorageClient { + /** + * + * Creates an instance of BlobServiceClient from connection string. + * + * @param connectionString - Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param options - Optional. Options to configure the HTTP pipeline. + */ + static fromConnectionString(connectionString, options) { + options = options || {}; + const extractedCreds = extractConnectionStringParts(connectionString); + if (extractedCreds.kind === "AccountConnString") if (coreUtil.isNode) { + const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (!options.proxyOptions) options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + const pipeline = newPipeline(sharedKeyCredential, options); + return new BlobServiceClient(extractedCreds.url, pipeline); + } else throw new Error("Account connection string is only supported in Node.js environment"); + else if (extractedCreds.kind === "SASConnString") { + const pipeline = newPipeline(new AnonymousCredential(), options); + return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); + } else throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + constructor(url$1, credentialOrPipeline, options) { + let pipeline; + if (isPipelineLike(credentialOrPipeline)) pipeline = credentialOrPipeline; + else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) pipeline = newPipeline(credentialOrPipeline, options); + else pipeline = newPipeline(new AnonymousCredential(), options); + super(url$1, pipeline); + this.serviceContext = this.storageClientContext.service; + } + /** + * Creates a {@link ContainerClient} object + * + * @param containerName - A container name + * @returns A new ContainerClient object for the given container name. + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * ``` + */ + getContainerClient(containerName) { + return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + } + /** + * Create a Blob container. @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container + * + * @param containerName - Name of the container to create. + * @param options - Options to configure Container Create operation. + * @returns Container creation response and the corresponding container client. + */ + async createContainer(containerName, options = {}) { + return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(containerName); + const containerCreateResponse = await containerClient.create(updatedOptions); + return { + containerClient, + containerCreateResponse + }; + }); + } + /** + * Deletes a Blob container. + * + * @param containerName - Name of the container to delete. + * @param options - Options to configure Container Delete operation. + * @returns Container deletion response. + */ + async deleteContainer(containerName, options = {}) { + return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(containerName); + return containerClient.delete(updatedOptions); + }); + } + /** + * Restore a previously deleted Blob container. + * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. + * + * @param deletedContainerName - Name of the previously deleted container. + * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container. + * @param options - Options to configure Container Restore operation. + * @returns Container deletion response. + */ + async undeleteContainer(deletedContainerName$1, deletedContainerVersion$1, options = {}) { + return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName$1); + const containerContext = containerClient["storageClientContext"].container; + const containerUndeleteResponse = assertResponse(await containerContext.restore({ + deletedContainerName: deletedContainerName$1, + deletedContainerVersion: deletedContainerVersion$1, + tracingOptions: updatedOptions.tracingOptions + })); + return { + containerClient, + containerUndeleteResponse + }; + }); + } + /** + * Rename an existing Blob Container. + * + * @param sourceContainerName - The name of the source container. + * @param destinationContainerName - The new name of the container. + * @param options - Options to configure Container Rename operation. + */ + async renameContainer(sourceContainerName$1, destinationContainerName, options = {}) { + return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { + var _a$2; + const containerClient = this.getContainerClient(destinationContainerName); + const containerContext = containerClient["storageClientContext"].container; + const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName$1, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a$2 = options.sourceCondition) === null || _a$2 === void 0 ? void 0 : _a$2.leaseId }))); + return { + containerClient, + containerRenameResponse + }; + }); + } + /** + * Gets the properties of a storage account’s Blob service, including properties + * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * @param options - Options to the Service Get Properties operation. + * @returns Response data for the Service Get Properties operation. + */ + async getProperties(options = {}) { + return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return assertResponse(await this.serviceContext.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Sets properties for a storage account’s Blob service endpoint, including properties + * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * + * @param properties - + * @param options - Options to the Service Set Properties operation. + * @returns Response data for the Service Set Properties operation. + */ + async setProperties(properties, options = {}) { + return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return assertResponse(await this.serviceContext.setProperties(properties, { + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Retrieves statistics related to replication for the Blob service. It is only + * available on the secondary location endpoint when read-access geo-redundant + * replication is enabled for the storage account. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * + * @param options - Options to the Service Get Statistics operation. + * @returns Response data for the Service Get Statistics operation. + */ + async getStatistics(options = {}) { + return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return assertResponse(await this.serviceContext.getStatistics({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return assertResponse(await this.serviceContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + }); + } + /** + * Returns a list of the containers under the specified account. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * + * @param marker - A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to the Service List Container Segment operation. + * @returns Response data for the Service List Container Segment operation. + */ + async listContainersSegment(marker$1, options = {}) { + return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ + abortSignal: options.abortSignal, + marker: marker$1 + }, options), { + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + }))); + }); + } + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags + * match a given search expression. Filter blobs searches across all containers within a + * storage account but can be scoped within the expression to a single container. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker$1, options = {}) { + return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = assertResponse(await this.serviceContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker: marker$1, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = Object.assign(Object.assign({}, response), { + _response: response._response, + blobs: response.blobs.map((blob) => { + var _a$2; + let tagValue = ""; + if (((_a$2 = blob.tags) === null || _a$2 === void 0 ? void 0 : _a$2.blobTagSet.length) === 1) tagValue = blob.tags.blobTagSet[0].value; + return Object.assign(Object.assign({}, blob), { + tags: toTags(blob.tags), + tagValue + }); + }) + }); + return wrappedResponse; + }); + } + /** + * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { + return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker$1, options = {}) { + let response; + if (!!marker$1 || marker$1 === void 0) do { + response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker$1, options)); + response.blobs = response.blobs || []; + marker$1 = response.continuationToken; + yield yield tslib.__await(response); + } while (marker$1); + }); + } + /** + * Returns an AsyncIterableIterator for blobs. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to findBlobsByTagsItems. + */ + findBlobsByTagsItems(tagFilterSqlExpression_1) { + return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { + var _a$2, e_1, _b$1, _c$1; + let marker$1; + try { + for (var _d$1 = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { + _c$1 = _f.value; + _d$1 = false; + const segment = _c$1; + yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); + } finally { + if (e_1) throw e_1.error; + } + } + }); + } + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to find blobs by tags. + */ + findBlobsByTags(tagFilterSqlExpression, options = {}) { + const listSegmentOptions = Object.assign({}, options); + const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + } + }; + } + /** + * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses + * + * @param marker - A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list containers operation. + */ + listSegments(marker_1) { + return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker$1, options = {}) { + let listContainersSegmentResponse; + if (!!marker$1 || marker$1 === void 0) do { + listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker$1, options)); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker$1 = listContainersSegmentResponse.continuationToken; + yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); + } while (marker$1); + }); + } + /** + * Returns an AsyncIterableIterator for Container Items + * + * @param options - Options to list containers operation. + */ + listItems() { + return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { + var _a$2, e_2, _b$1, _c$1; + let marker$1; + try { + for (var _d$1 = true, _e = tslib.__asyncValues(this.listSegments(marker$1, options)), _f; _f = yield tslib.__await(_e.next()), _a$2 = _f.done, !_a$2; _d$1 = true) { + _c$1 = _f.value; + _d$1 = false; + const segment = _c$1; + yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (!_d$1 && !_a$2 && (_b$1 = _e.return)) yield tslib.__await(_b$1.call(_e)); + } finally { + if (e_2) throw e_2.error; + } + } + }); + } + /** + * Returns an async iterable iterator to list all the containers + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the containers in pages. + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const container of blobServiceClient.listContainers()) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.listContainers(); + * let containerItem = await iter.next(); + * while (!containerItem.done) { + * console.log(`Container ${i++}: ${containerItem.value.name}`); + * containerItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .listContainers() + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * ``` + * + * @param options - Options to list containers. + * @returns An asyncIterableIterator that supports paging. + */ + listContainers(options = {}) { + if (options.prefix === "") options.prefix = void 0; + const include$1 = []; + if (options.includeDeleted) include$1.push("deleted"); + if (options.includeMetadata) include$1.push("metadata"); + if (options.includeSystem) include$1.push("system"); + const listSegmentOptions = Object.assign(Object.assign({}, options), include$1.length > 0 ? { include: include$1 } : {}); + const iter = this.listItems(listSegmentOptions); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings = {}) => { + return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + } + }; + } + /** + * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * + * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time + * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time + */ + async getUserDelegationKey(startsOn, expiresOn$1, options = {}) { + return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = assertResponse(await this.serviceContext.getUserDelegationKey({ + startsOn: truncatedISO8061Date(startsOn, false), + expiresOn: truncatedISO8061Date(expiresOn$1, false) + }, { + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions + })); + const userDelegationKey = { + signedObjectId: response.signedObjectId, + signedTenantId: response.signedTenantId, + signedStartsOn: new Date(response.signedStartsOn), + signedExpiresOn: new Date(response.signedExpiresOn), + signedService: response.signedService, + signedVersion: response.signedVersion, + value: response.value + }; + const res = Object.assign({ + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode + }, userDelegationKey); + return res; + }); + } + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @returns A new BlobBatchClient object for this service. + */ + getBlobBatchClient() { + return new BlobBatchClient(this.url, this.pipeline); + } + /** + * Only available for BlobServiceClient constructed with a shared key credential. + * + * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * + * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. + * @param permissions - Specifies the list of permissions to be associated with the SAS. + * @param resourceTypes - Specifies the resource types associated with the shared access signature. + * @param options - Optional parameters. + * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateAccountSasUrl(expiresOn$1, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential)) throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); + if (expiresOn$1 === void 0) { + const now = new Date(); + expiresOn$1 = new Date(now.getTime() + 3600 * 1e3); + } + const sas = generateAccountSASQueryParameters(Object.assign({ + permissions, + expiresOn: expiresOn$1, + resourceTypes, + services: AccountSASServices.parse("b").toString() + }, options), this.credential).toString(); + return appendToURLQuery(this.url, sas); + } + /** + * Only available for BlobServiceClient constructed with a shared key credential. + * + * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * + * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. + * @param permissions - Specifies the list of permissions to be associated with the SAS. + * @param resourceTypes - Specifies the resource types associated with the shared access signature. + * @param options - Optional parameters. + * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasStringToSign(expiresOn$1, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential)) throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); + if (expiresOn$1 === void 0) { + const now = new Date(); + expiresOn$1 = new Date(now.getTime() + 3600 * 1e3); + } + return generateAccountSASQueryParametersInternal(Object.assign({ + permissions, + expiresOn: expiresOn$1, + resourceTypes, + services: AccountSASServices.parse("b").toString() + }, options), this.credential).stringToSign; + } + }; + /** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ + exports.KnownEncryptionAlgorithmType = void 0; + (function(KnownEncryptionAlgorithmType) { + KnownEncryptionAlgorithmType["AES256"] = "AES256"; + })(exports.KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = {})); + Object.defineProperty(exports, "RestError", { + enumerable: true, + get: function() { + return coreRestPipeline.RestError; + } + }); + exports.AccountSASPermissions = AccountSASPermissions; + exports.AccountSASResourceTypes = AccountSASResourceTypes; + exports.AccountSASServices = AccountSASServices; + exports.AnonymousCredential = AnonymousCredential; + exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + exports.AppendBlobClient = AppendBlobClient; + exports.BaseRequestPolicy = BaseRequestPolicy; + exports.BlobBatch = BlobBatch; + exports.BlobBatchClient = BlobBatchClient; + exports.BlobClient = BlobClient; + exports.BlobLeaseClient = BlobLeaseClient; + exports.BlobSASPermissions = BlobSASPermissions; + exports.BlobServiceClient = BlobServiceClient; + exports.BlockBlobClient = BlockBlobClient; + exports.ContainerClient = ContainerClient; + exports.ContainerSASPermissions = ContainerSASPermissions; + exports.Credential = Credential; + exports.CredentialPolicy = CredentialPolicy; + exports.PageBlobClient = PageBlobClient; + exports.Pipeline = Pipeline; + exports.SASQueryParameters = SASQueryParameters; + exports.StorageBrowserPolicy = StorageBrowserPolicy; + exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + exports.StorageOAuthScopes = StorageOAuthScopes; + exports.StorageRetryPolicy = StorageRetryPolicy; + exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + exports.StorageSharedKeyCredential = StorageSharedKeyCredential; + exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + exports.isPipelineLike = isPipelineLike; + exports.logger = logger; + exports.newPipeline = newPipeline; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/errors.js +var require_errors = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/errors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.UsageError = exports.NetworkError = exports.GHESNotSupportedError = exports.CacheNotFoundError = exports.InvalidResponseError = exports.FilesNotFoundError = void 0; + var FilesNotFoundError = class extends Error { + constructor(files = []) { + let message = "No files were found to upload"; + if (files.length > 0) message += `: ${files.join(", ")}`; + super(message); + this.files = files; + this.name = "FilesNotFoundError"; + } + }; + exports.FilesNotFoundError = FilesNotFoundError; + var InvalidResponseError = class extends Error { + constructor(message) { + super(message); + this.name = "InvalidResponseError"; + } + }; + exports.InvalidResponseError = InvalidResponseError; + var CacheNotFoundError = class extends Error { + constructor(message = "Cache not found") { + super(message); + this.name = "CacheNotFoundError"; + } + }; + exports.CacheNotFoundError = CacheNotFoundError; + var GHESNotSupportedError = class extends Error { + constructor(message = "@actions/cache v4.1.4+, actions/cache/save@v4+ and actions/cache/restore@v4+ are not currently supported on GHES.") { + super(message); + this.name = "GHESNotSupportedError"; + } + }; + exports.GHESNotSupportedError = GHESNotSupportedError; + var NetworkError = class extends Error { + constructor(code) { + const message = `Unable to make request: ${code}\nIf you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`; + super(message); + this.code = code; + this.name = "NetworkError"; + } + }; + exports.NetworkError = NetworkError; + NetworkError.isNetworkErrorCode = (code) => { + if (!code) return false; + return [ + "ECONNRESET", + "ENOTFOUND", + "ETIMEDOUT", + "ECONNREFUSED", + "EHOSTUNREACH" + ].includes(code); + }; + var UsageError = class extends Error { + constructor() { + const message = `Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.\nMore info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`; + super(message); + this.name = "UsageError"; + } + }; + exports.UsageError = UsageError; + UsageError.isUsageErrorMessage = (msg) => { + if (!msg) return false; + return msg.includes("insufficient usage"); + }; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/uploadUtils.js +var require_uploadUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports) { + var __createBinding$6 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$6 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$6 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$6(result, mod, k); + } + __setModuleDefault$6(result, mod); + return result; + }; + var __awaiter$11 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.uploadCacheArchiveSDK = exports.UploadProgress = void 0; + const core$5 = __importStar$6(require_core()); + const storage_blob_1$1 = require_dist$1(); + const errors_1$1 = require_errors(); + /** + * Class for tracking the upload state and displaying stats. + */ + var UploadProgress = class { + constructor(contentLength$1) { + this.contentLength = contentLength$1; + this.sentBytes = 0; + this.displayedComplete = false; + this.startTime = Date.now(); + } + /** + * Sets the number of bytes sent + * + * @param sentBytes the number of bytes sent + */ + setSentBytes(sentBytes) { + this.sentBytes = sentBytes; + } + /** + * Returns the total number of bytes transferred. + */ + getTransferredBytes() { + return this.sentBytes; + } + /** + * Returns true if the upload is complete. + */ + isDone() { + return this.getTransferredBytes() === this.contentLength; + } + /** + * Prints the current upload stats. Once the upload completes, this will print one + * last line and then stop. + */ + display() { + if (this.displayedComplete) return; + const transferredBytes = this.sentBytes; + const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); + const elapsedTime = Date.now() - this.startTime; + const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); + core$5.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + if (this.isDone()) this.displayedComplete = true; + } + /** + * Returns a function used to handle TransferProgressEvents. + */ + onProgress() { + return (progress) => { + this.setSentBytes(progress.loadedBytes); + }; + } + /** + * Starts the timer that displays the stats. + * + * @param delayInMs the delay between each write + */ + startDisplayTimer(delayInMs = 1e3) { + const displayCallback = () => { + this.display(); + if (!this.isDone()) this.timeoutHandle = setTimeout(displayCallback, delayInMs); + }; + this.timeoutHandle = setTimeout(displayCallback, delayInMs); + } + /** + * Stops the timer that displays the stats. As this typically indicates the upload + * is complete, this will display one last line, unless the last line has already + * been written. + */ + stopDisplayTimer() { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + this.timeoutHandle = void 0; + } + this.display(); + } + }; + exports.UploadProgress = UploadProgress; + /** + * Uploads a cache archive directly to Azure Blob Storage using the Azure SDK. + * This function will display progress information to the console. Concurrency of the + * upload is determined by the calling functions. + * + * @param signedUploadURL + * @param archivePath + * @param options + * @returns + */ + function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { + var _a$2; + return __awaiter$11(this, void 0, void 0, function* () { + const blobClient = new storage_blob_1$1.BlobClient(signedUploadURL); + const blockBlobClient = blobClient.getBlockBlobClient(); + const uploadProgress = new UploadProgress((_a$2 = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a$2 !== void 0 ? _a$2 : 0); + const uploadOptions = { + blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, + concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + maxSingleShotSize: 128 * 1024 * 1024, + onProgress: uploadProgress.onProgress() + }; + try { + uploadProgress.startDisplayTimer(); + core$5.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); + if (response._response.status >= 400) throw new errors_1$1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); + return response; + } catch (error) { + core$5.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error.message}`); + throw error; + } finally { + uploadProgress.stopDisplayTimer(); + } + }); + } + exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/requestUtils.js +var require_requestUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/requestUtils.js"(exports) { + var __createBinding$5 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$5 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$5 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$5(result, mod, k); + } + __setModuleDefault$5(result, mod); + return result; + }; + var __awaiter$10 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.retryHttpClientResponse = exports.retryTypedResponse = exports.retry = exports.isRetryableStatusCode = exports.isServerErrorStatusCode = exports.isSuccessStatusCode = void 0; + const core$4 = __importStar$5(require_core()); + const http_client_1$3 = require_lib(); + const constants_1$3 = require_constants$3(); + function isSuccessStatusCode(statusCode) { + if (!statusCode) return false; + return statusCode >= 200 && statusCode < 300; + } + exports.isSuccessStatusCode = isSuccessStatusCode; + function isServerErrorStatusCode(statusCode) { + if (!statusCode) return true; + return statusCode >= 500; + } + exports.isServerErrorStatusCode = isServerErrorStatusCode; + function isRetryableStatusCode(statusCode) { + if (!statusCode) return false; + const retryableStatusCodes = [ + http_client_1$3.HttpCodes.BadGateway, + http_client_1$3.HttpCodes.ServiceUnavailable, + http_client_1$3.HttpCodes.GatewayTimeout + ]; + return retryableStatusCodes.includes(statusCode); + } + exports.isRetryableStatusCode = isRetryableStatusCode; + function sleep(milliseconds) { + return __awaiter$10(this, void 0, void 0, function* () { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); + }); + } + function retry(name, method, getStatusCode, maxAttempts = constants_1$3.DefaultRetryAttempts, delay$4 = constants_1$3.DefaultRetryDelay, onError = void 0) { + return __awaiter$10(this, void 0, void 0, function* () { + let errorMessage = ""; + let attempt = 1; + while (attempt <= maxAttempts) { + let response = void 0; + let statusCode = void 0; + let isRetryable = false; + try { + response = yield method(); + } catch (error) { + if (onError) response = onError(error); + isRetryable = true; + errorMessage = error.message; + } + if (response) { + statusCode = getStatusCode(response); + if (!isServerErrorStatusCode(statusCode)) return response; + } + if (statusCode) { + isRetryable = isRetryableStatusCode(statusCode); + errorMessage = `Cache service responded with ${statusCode}`; + } + core$4.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + if (!isRetryable) { + core$4.debug(`${name} - Error is not retryable`); + break; + } + yield sleep(delay$4); + attempt++; + } + throw Error(`${name} failed: ${errorMessage}`); + }); + } + exports.retry = retry; + function retryTypedResponse(name, method, maxAttempts = constants_1$3.DefaultRetryAttempts, delay$4 = constants_1$3.DefaultRetryDelay) { + return __awaiter$10(this, void 0, void 0, function* () { + return yield retry( + name, + method, + (response) => response.statusCode, + maxAttempts, + delay$4, + // If the error object contains the statusCode property, extract it and return + // an TypedResponse so it can be processed by the retry logic. + (error) => { + if (error instanceof http_client_1$3.HttpClientError) return { + statusCode: error.statusCode, + result: null, + headers: {}, + error + }; + else return void 0; + } +); + }); + } + exports.retryTypedResponse = retryTypedResponse; + function retryHttpClientResponse(name, method, maxAttempts = constants_1$3.DefaultRetryAttempts, delay$4 = constants_1$3.DefaultRetryDelay) { + return __awaiter$10(this, void 0, void 0, function* () { + return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay$4); + }); + } + exports.retryHttpClientResponse = retryHttpClientResponse; +} }); + +//#endregion +//#region node_modules/.deno/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist/index.js +var require_dist = __commonJS({ "node_modules/.deno/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + const listenersMap = new WeakMap(); + const abortedMap = new WeakMap(); + /** + * An aborter instance implements AbortSignal interface, can abort HTTP requests. + * + * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. + * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation + * cannot or will not ever be cancelled. + * + * @example + * Abort without timeout + * ```ts + * await doAsyncWork(AbortSignal.none); + * ``` + */ + var AbortSignal$1 = class AbortSignal$1 { + constructor() { + /** + * onabort event listener. + */ + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) throw new TypeError("Expected `this` to be an instance of AbortSignal."); + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new AbortSignal$1(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) throw new TypeError("Expected `this` to be an instance of AbortSignal."); + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) throw new TypeError("Expected `this` to be an instance of AbortSignal."); + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) listeners.splice(index, 1); + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + /** + * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. + * Will try to trigger abort event for all linked AbortSignal nodes. + * + * - If there is a timeout, the timer will be cancelled. + * - If aborted is true, nothing will happen. + * + * @internal + */ + function abortSignal(signal) { + if (signal.aborted) return; + if (signal.onabort) signal.onabort.call(signal); + const listeners = listenersMap.get(signal); + if (listeners) listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + abortedMap.set(signal, true); + } + /** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + * ``` + */ + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + /** + * An AbortController provides an AbortSignal and the associated controls to signal + * that an asynchronous operation should be aborted. + * + * @example + * Abort an operation when another event fires + * ```ts + * const controller = new AbortController(); + * const signal = controller.signal; + * doAsyncWork(signal); + * button.addEventListener('click', () => controller.abort()); + * ``` + * + * @example + * Share aborter cross multiple operations in 30s + * ```ts + * // Upload the same data to 2 different data centers at the same time, + * // abort another when any of them is finished + * const controller = AbortController.withTimeout(30 * 1000); + * doAsyncWork(controller.signal).then(controller.abort); + * doAsyncWork(controller.signal).then(controller.abort); + *``` + * + * @example + * Cascaded aborting + * ```ts + * // All operations can't take more than 30 seconds + * const aborter = Aborter.timeout(30 * 1000); + * + * // Following 2 operations can't take more than 25 seconds + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * ``` + */ + var AbortController$1 = class { + constructor(parentSignals) { + this._signal = new AbortSignal$1(); + if (!parentSignals) return; + if (!Array.isArray(parentSignals)) parentSignals = arguments; + for (const parentSignal of parentSignals) if (parentSignal.aborted) this.abort(); + else parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal$1(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") timer.unref(); + return signal; + } + }; + exports.AbortController = AbortController$1; + exports.AbortError = AbortError; + exports.AbortSignal = AbortSignal$1; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/downloadUtils.js +var require_downloadUtils = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports) { + var __createBinding$4 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$4 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$4 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$4(result, mod, k); + } + __setModuleDefault$4(result, mod); + return result; + }; + var __awaiter$9 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.downloadCacheStorageSDK = exports.downloadCacheHttpClientConcurrent = exports.downloadCacheHttpClient = exports.DownloadProgress = void 0; + const core$3 = __importStar$4(require_core()); + const http_client_1$2 = require_lib(); + const storage_blob_1 = require_dist$1(); + const buffer = __importStar$4(__require("buffer")); + const fs$1 = __importStar$4(__require("fs")); + const stream = __importStar$4(__require("stream")); + const util = __importStar$4(__require("util")); + const utils$3 = __importStar$4(require_cacheUtils()); + const constants_1$2 = require_constants$3(); + const requestUtils_1$1 = require_requestUtils(); + const abort_controller_1 = require_dist(); + /** + * Pipes the body of a HTTP response to a stream + * + * @param response the HTTP response + * @param output the writable stream + */ + function pipeResponseToStream(response, output) { + return __awaiter$9(this, void 0, void 0, function* () { + const pipeline = util.promisify(stream.pipeline); + yield pipeline(response.message, output); + }); + } + /** + * Class for tracking the download state and displaying stats. + */ + var DownloadProgress = class { + constructor(contentLength$1) { + this.contentLength = contentLength$1; + this.segmentIndex = 0; + this.segmentSize = 0; + this.segmentOffset = 0; + this.receivedBytes = 0; + this.displayedComplete = false; + this.startTime = Date.now(); + } + /** + * Progress to the next segment. Only call this method when the previous segment + * is complete. + * + * @param segmentSize the length of the next segment + */ + nextSegment(segmentSize) { + this.segmentOffset = this.segmentOffset + this.segmentSize; + this.segmentIndex = this.segmentIndex + 1; + this.segmentSize = segmentSize; + this.receivedBytes = 0; + core$3.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + } + /** + * Sets the number of bytes received for the current segment. + * + * @param receivedBytes the number of bytes received + */ + setReceivedBytes(receivedBytes) { + this.receivedBytes = receivedBytes; + } + /** + * Returns the total number of bytes transferred. + */ + getTransferredBytes() { + return this.segmentOffset + this.receivedBytes; + } + /** + * Returns true if the download is complete. + */ + isDone() { + return this.getTransferredBytes() === this.contentLength; + } + /** + * Prints the current download stats. Once the download completes, this will print one + * last line and then stop. + */ + display() { + if (this.displayedComplete) return; + const transferredBytes = this.segmentOffset + this.receivedBytes; + const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); + const elapsedTime = Date.now() - this.startTime; + const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); + core$3.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + if (this.isDone()) this.displayedComplete = true; + } + /** + * Returns a function used to handle TransferProgressEvents. + */ + onProgress() { + return (progress) => { + this.setReceivedBytes(progress.loadedBytes); + }; + } + /** + * Starts the timer that displays the stats. + * + * @param delayInMs the delay between each write + */ + startDisplayTimer(delayInMs = 1e3) { + const displayCallback = () => { + this.display(); + if (!this.isDone()) this.timeoutHandle = setTimeout(displayCallback, delayInMs); + }; + this.timeoutHandle = setTimeout(displayCallback, delayInMs); + } + /** + * Stops the timer that displays the stats. As this typically indicates the download + * is complete, this will display one last line, unless the last line has already + * been written. + */ + stopDisplayTimer() { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + this.timeoutHandle = void 0; + } + this.display(); + } + }; + exports.DownloadProgress = DownloadProgress; + /** + * Download the cache using the Actions toolkit http-client + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + */ + function downloadCacheHttpClient(archiveLocation, archivePath) { + return __awaiter$9(this, void 0, void 0, function* () { + const writeStream = fs$1.createWriteStream(archivePath); + const httpClient = new http_client_1$2.HttpClient("actions/cache"); + const downloadResponse = yield (0, requestUtils_1$1.retryHttpClientResponse)("downloadCache", () => __awaiter$9(this, void 0, void 0, function* () { + return httpClient.get(archiveLocation); + })); + downloadResponse.message.socket.setTimeout(constants_1$2.SocketTimeout, () => { + downloadResponse.message.destroy(); + core$3.debug(`Aborting download, socket timed out after ${constants_1$2.SocketTimeout} ms`); + }); + yield pipeResponseToStream(downloadResponse, writeStream); + const contentLengthHeader = downloadResponse.message.headers["content-length"]; + if (contentLengthHeader) { + const expectedLength = parseInt(contentLengthHeader); + const actualLength = utils$3.getArchiveFileSizeInBytes(archivePath); + if (actualLength !== expectedLength) throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); + } else core$3.debug("Unable to validate download, no Content-Length header"); + }); + } + exports.downloadCacheHttpClient = downloadCacheHttpClient; + /** + * Download the cache using the Actions toolkit http-client concurrently + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + */ + function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { + var _a$2; + return __awaiter$9(this, void 0, void 0, function* () { + const archiveDescriptor = yield fs$1.promises.open(archivePath, "w"); + const httpClient = new http_client_1$2.HttpClient("actions/cache", void 0, { + socketTimeout: options.timeoutInMs, + keepAlive: true + }); + try { + const res = yield (0, requestUtils_1$1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter$9(this, void 0, void 0, function* () { + return yield httpClient.request("HEAD", archiveLocation, null, {}); + })); + const lengthHeader = res.message.headers["content-length"]; + if (lengthHeader === void 0 || lengthHeader === null) throw new Error("Content-Length not found on blob response"); + const length = parseInt(lengthHeader); + if (Number.isNaN(length)) throw new Error(`Could not interpret Content-Length: ${length}`); + const downloads = []; + const blockSize = 4 * 1024 * 1024; + for (let offset = 0; offset < length; offset += blockSize) { + const count = Math.min(blockSize, length - offset); + downloads.push({ + offset, + promiseGetter: () => __awaiter$9(this, void 0, void 0, function* () { + return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); + }) + }); + } + downloads.reverse(); + let actives = 0; + let bytesDownloaded = 0; + const progress = new DownloadProgress(length); + progress.startDisplayTimer(); + const progressFn = progress.onProgress(); + const activeDownloads = []; + let nextDownload; + const waitAndWrite = () => __awaiter$9(this, void 0, void 0, function* () { + const segment = yield Promise.race(Object.values(activeDownloads)); + yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); + actives--; + delete activeDownloads[segment.offset]; + bytesDownloaded += segment.count; + progressFn({ loadedBytes: bytesDownloaded }); + }); + while (nextDownload = downloads.pop()) { + activeDownloads[nextDownload.offset] = nextDownload.promiseGetter(); + actives++; + if (actives >= ((_a$2 = options.downloadConcurrency) !== null && _a$2 !== void 0 ? _a$2 : 10)) yield waitAndWrite(); + } + while (actives > 0) yield waitAndWrite(); + } finally { + httpClient.dispose(); + yield archiveDescriptor.close(); + } + }); + } + exports.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { + return __awaiter$9(this, void 0, void 0, function* () { + const retries = 5; + let failures = 0; + while (true) try { + const timeout = 3e4; + const result = yield promiseWithTimeout(timeout, downloadSegment(httpClient, archiveLocation, offset, count)); + if (typeof result === "string") throw new Error("downloadSegmentRetry failed due to timeout"); + return result; + } catch (err) { + if (failures >= retries) throw err; + failures++; + } + }); + } + function downloadSegment(httpClient, archiveLocation, offset, count) { + return __awaiter$9(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1$1.retryHttpClientResponse)("downloadCachePart", () => __awaiter$9(this, void 0, void 0, function* () { + return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); + })); + if (!partRes.readBodyBuffer) throw new Error("Expected HttpClientResponse to implement readBodyBuffer"); + return { + offset, + count, + buffer: yield partRes.readBodyBuffer() + }; + }); + } + /** + * Download the cache using the Azure Storage SDK. Only call this method if the + * URL points to an Azure Storage endpoint. + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + * @param options the download options with the defaults set + */ + function downloadCacheStorageSDK(archiveLocation, archivePath, options) { + var _a$2; + return __awaiter$9(this, void 0, void 0, function* () { + const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { tryTimeoutInMs: options.timeoutInMs } }); + const properties = yield client.getProperties(); + const contentLength$1 = (_a$2 = properties.contentLength) !== null && _a$2 !== void 0 ? _a$2 : -1; + if (contentLength$1 < 0) { + core$3.debug("Unable to determine content length, downloading file with http-client..."); + yield downloadCacheHttpClient(archiveLocation, archivePath); + } else { + const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); + const downloadProgress = new DownloadProgress(contentLength$1); + const fd = fs$1.openSync(archivePath, "w"); + try { + downloadProgress.startDisplayTimer(); + const controller = new abort_controller_1.AbortController(); + const abortSignal$1 = controller.signal; + while (!downloadProgress.isDone()) { + const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; + const segmentSize = Math.min(maxSegmentSize, contentLength$1 - segmentStart); + downloadProgress.nextSegment(segmentSize); + const result = yield promiseWithTimeout(options.segmentTimeoutInMs || 36e5, client.downloadToBuffer(segmentStart, segmentSize, { + abortSignal: abortSignal$1, + concurrency: options.downloadConcurrency, + onProgress: downloadProgress.onProgress() + })); + if (result === "timeout") { + controller.abort(); + throw new Error("Aborting cache download as the download time exceeded the timeout."); + } else if (Buffer.isBuffer(result)) fs$1.writeFileSync(fd, result); + } + } finally { + downloadProgress.stopDisplayTimer(); + fs$1.closeSync(fd); + } + } + }); + } + exports.downloadCacheStorageSDK = downloadCacheStorageSDK; + const promiseWithTimeout = (timeoutMs, promise) => __awaiter$9(void 0, void 0, void 0, function* () { + let timeoutHandle; + const timeoutPromise = new Promise((resolve) => { + timeoutHandle = setTimeout(() => resolve("timeout"), timeoutMs); + }); + return Promise.race([promise, timeoutPromise]).then((result) => { + clearTimeout(timeoutHandle); + return result; + }); + }); +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/options.js +var require_options = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/options.js"(exports) { + var __createBinding$3 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$3 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$3(result, mod, k); + } + __setModuleDefault$3(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getDownloadOptions = exports.getUploadOptions = void 0; + const core$2 = __importStar$3(require_core()); + /** + * Returns a copy of the upload options with defaults filled in. + * + * @param copy the original upload options + */ + function getUploadOptions(copy$1) { + const result = { + useAzureSdk: false, + uploadConcurrency: 4, + uploadChunkSize: 32 * 1024 * 1024 + }; + if (copy$1) { + if (typeof copy$1.useAzureSdk === "boolean") result.useAzureSdk = copy$1.useAzureSdk; + if (typeof copy$1.uploadConcurrency === "number") result.uploadConcurrency = copy$1.uploadConcurrency; + if (typeof copy$1.uploadChunkSize === "number") result.uploadChunkSize = copy$1.uploadChunkSize; + } + /** + * Add env var overrides + */ + result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; + result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; + core$2.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core$2.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core$2.debug(`Upload chunk size: ${result.uploadChunkSize}`); + return result; + } + exports.getUploadOptions = getUploadOptions; + /** + * Returns a copy of the download options with defaults filled in. + * + * @param copy the original download options + */ + function getDownloadOptions(copy$1) { + const result = { + useAzureSdk: false, + concurrentBlobDownloads: true, + downloadConcurrency: 8, + timeoutInMs: 3e4, + segmentTimeoutInMs: 6e5, + lookupOnly: false + }; + if (copy$1) { + if (typeof copy$1.useAzureSdk === "boolean") result.useAzureSdk = copy$1.useAzureSdk; + if (typeof copy$1.concurrentBlobDownloads === "boolean") result.concurrentBlobDownloads = copy$1.concurrentBlobDownloads; + if (typeof copy$1.downloadConcurrency === "number") result.downloadConcurrency = copy$1.downloadConcurrency; + if (typeof copy$1.timeoutInMs === "number") result.timeoutInMs = copy$1.timeoutInMs; + if (typeof copy$1.segmentTimeoutInMs === "number") result.segmentTimeoutInMs = copy$1.segmentTimeoutInMs; + if (typeof copy$1.lookupOnly === "boolean") result.lookupOnly = copy$1.lookupOnly; + } + const segmentDownloadTimeoutMins = process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]; + if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; + core$2.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core$2.debug(`Download concurrency: ${result.downloadConcurrency}`); + core$2.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core$2.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core$2.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core$2.debug(`Lookup only: ${result.lookupOnly}`); + return result; + } + exports.getDownloadOptions = getDownloadOptions; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/config.js +var require_config = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/config.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getCacheServiceURL = exports.getCacheServiceVersion = exports.isGhes = void 0; + function isGhes() { + const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); + const hostname = ghUrl.hostname.trimEnd().toUpperCase(); + const isGitHubHost = hostname === "GITHUB.COM"; + const isGheHost = hostname.endsWith(".GHE.COM"); + const isLocalHost = hostname.endsWith(".LOCALHOST"); + return !isGitHubHost && !isGheHost && !isLocalHost; + } + exports.isGhes = isGhes; + function getCacheServiceVersion() { + if (isGhes()) return "v1"; + return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; + } + exports.getCacheServiceVersion = getCacheServiceVersion; + function getCacheServiceURL() { + const version$1 = getCacheServiceVersion(); + switch (version$1) { + case "v1": return process.env["ACTIONS_CACHE_URL"] || process.env["ACTIONS_RESULTS_URL"] || ""; + case "v2": return process.env["ACTIONS_RESULTS_URL"] || ""; + default: throw new Error(`Unsupported cache service version: ${version$1}`); + } + } + exports.getCacheServiceURL = getCacheServiceURL; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/package.json +var require_package = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/package.json"(exports, module) { + module.exports = { + "name": "@actions/cache", + "version": "4.0.3", + "preview": true, + "description": "Actions cache lib", + "keywords": [ + "github", + "actions", + "cache" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/cache", + "license": "MIT", + "main": "lib/cache.js", + "types": "lib/cache.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": ["lib", "!.DS_Store"], + "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/cache" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "echo \"Error: run tests from root\" && exit 1", + "tsc": "tsc" + }, + "bugs": { "url": "https://github.com/actions/toolkit/issues" }, + "dependencies": { + "@actions/core": "^1.11.1", + "@actions/exec": "^1.0.1", + "@actions/glob": "^0.1.0", + "@actions/http-client": "^2.1.1", + "@actions/io": "^1.0.1", + "@azure/abort-controller": "^1.1.0", + "@azure/ms-rest-js": "^2.6.0", + "@azure/storage-blob": "^12.13.0", + "@protobuf-ts/plugin": "^2.9.4", + "semver": "^6.3.1" + }, + "devDependencies": { + "@types/node": "^22.13.9", + "@types/semver": "^6.0.0", + "typescript": "^5.2.2" + } + }; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/user-agent.js +var require_user_agent = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getUserAgentString = void 0; + const packageJson = require_package(); + /** + * Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package + */ + function getUserAgentString() { + return `@actions/cache-${packageJson.version}`; + } + exports.getUserAgentString = getUserAgentString; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheHttpClient.js +var require_cacheHttpClient = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports) { + var __createBinding$2 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$2(result, mod, k); + } + __setModuleDefault$2(result, mod); + return result; + }; + var __awaiter$8 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.saveCache = exports.reserveCache = exports.downloadCache = exports.getCacheEntry = void 0; + const core$1 = __importStar$2(require_core()); + const http_client_1$1 = require_lib(); + const auth_1$1 = require_auth(); + const fs = __importStar$2(__require("fs")); + const url_1 = __require("url"); + const utils$2 = __importStar$2(require_cacheUtils()); + const uploadUtils_1 = require_uploadUtils(); + const downloadUtils_1 = require_downloadUtils(); + const options_1 = require_options(); + const requestUtils_1 = require_requestUtils(); + const config_1$2 = require_config(); + const user_agent_1$1 = require_user_agent(); + function getCacheApiUrl(resource) { + const baseUrl = (0, config_1$2.getCacheServiceURL)(); + if (!baseUrl) throw new Error("Cache Service Url not found, unable to restore cache."); + const url$1 = `${baseUrl}_apis/artifactcache/${resource}`; + core$1.debug(`Resource Url: ${url$1}`); + return url$1; + } + function createAcceptHeader(type, apiVersion) { + return `${type};api-version=${apiVersion}`; + } + function getRequestOptions() { + const requestOptions = { headers: { Accept: createAcceptHeader("application/json", "6.0-preview.1") } }; + return requestOptions; + } + function createHttpClient() { + const token = process.env["ACTIONS_RUNTIME_TOKEN"] || ""; + const bearerCredentialHandler = new auth_1$1.BearerCredentialHandler(token); + return new http_client_1$1.HttpClient((0, user_agent_1$1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); + } + function getCacheEntry(keys, paths, options) { + return __awaiter$8(this, void 0, void 0, function* () { + const httpClient = createHttpClient(); + const version$1 = utils$2.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); + const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version$1}`; + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter$8(this, void 0, void 0, function* () { + return httpClient.getJson(getCacheApiUrl(resource)); + })); + if (response.statusCode === 204) { + if (core$1.isDebug()) yield printCachesListForDiagnostics(keys[0], httpClient, version$1); + return null; + } + if (!(0, requestUtils_1.isSuccessStatusCode)(response.statusCode)) throw new Error(`Cache service responded with ${response.statusCode}`); + const cacheResult = response.result; + const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; + if (!cacheDownloadUrl) throw new Error("Cache not found."); + core$1.setSecret(cacheDownloadUrl); + core$1.debug(`Cache Result:`); + core$1.debug(JSON.stringify(cacheResult)); + return cacheResult; + }); + } + exports.getCacheEntry = getCacheEntry; + function printCachesListForDiagnostics(key, httpClient, version$1) { + return __awaiter$8(this, void 0, void 0, function* () { + const resource = `caches?key=${encodeURIComponent(key)}`; + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter$8(this, void 0, void 0, function* () { + return httpClient.getJson(getCacheApiUrl(resource)); + })); + if (response.statusCode === 200) { + const cacheListResult = response.result; + const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; + if (totalCount && totalCount > 0) { + core$1.debug(`No matching cache found for cache key '${key}', version '${version$1} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`); + for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) core$1.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + } + } + }); + } + function downloadCache(archiveLocation, archivePath, options) { + return __awaiter$8(this, void 0, void 0, function* () { + const archiveUrl = new url_1.URL(archiveLocation); + const downloadOptions = (0, options_1.getDownloadOptions)(options); + if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) if (downloadOptions.useAzureSdk) yield (0, downloadUtils_1.downloadCacheStorageSDK)(archiveLocation, archivePath, downloadOptions); + else if (downloadOptions.concurrentBlobDownloads) yield (0, downloadUtils_1.downloadCacheHttpClientConcurrent)(archiveLocation, archivePath, downloadOptions); + else yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); + else yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); + }); + } + exports.downloadCache = downloadCache; + function reserveCache(key, paths, options) { + return __awaiter$8(this, void 0, void 0, function* () { + const httpClient = createHttpClient(); + const version$1 = utils$2.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); + const reserveCacheRequest = { + key, + version: version$1, + cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize + }; + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter$8(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); + })); + return response; + }); + } + exports.reserveCache = reserveCache; + function getContentRange(start, end) { + return `bytes ${start}-${end}/*`; + } + function uploadChunk(httpClient, resourceUrl, openStream, start, end) { + return __awaiter$8(this, void 0, void 0, function* () { + core$1.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + const additionalHeaders = { + "Content-Type": "application/octet-stream", + "Content-Range": getContentRange(start, end) + }; + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter$8(this, void 0, void 0, function* () { + return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); + })); + if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`); + }); + } + function uploadFile(httpClient, cacheId, archivePath, options) { + return __awaiter$8(this, void 0, void 0, function* () { + const fileSize = utils$2.getArchiveFileSizeInBytes(archivePath); + const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); + const fd = fs.openSync(archivePath, "r"); + const uploadOptions = (0, options_1.getUploadOptions)(options); + const concurrency = utils$2.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); + const maxChunkSize = utils$2.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); + const parallelUploads = [...new Array(concurrency).keys()]; + core$1.debug("Awaiting all uploads"); + let offset = 0; + try { + yield Promise.all(parallelUploads.map(() => __awaiter$8(this, void 0, void 0, function* () { + while (offset < fileSize) { + const chunkSize = Math.min(fileSize - offset, maxChunkSize); + const start = offset; + const end = offset + chunkSize - 1; + offset += maxChunkSize; + yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, { + fd, + start, + end, + autoClose: false + }).on("error", (error) => { + throw new Error(`Cache upload failed because file read failed with ${error.message}`); + }), start, end); + } + }))); + } finally { + fs.closeSync(fd); + } + return; + }); + } + function commitCache(httpClient, cacheId, filesize) { + return __awaiter$8(this, void 0, void 0, function* () { + const commitCacheRequest = { size: filesize }; + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter$8(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); + })); + }); + } + function saveCache$2(cacheId, archivePath, signedUploadURL, options) { + return __awaiter$8(this, void 0, void 0, function* () { + const uploadOptions = (0, options_1.getUploadOptions)(options); + if (uploadOptions.useAzureSdk) { + if (!signedUploadURL) throw new Error("Azure Storage SDK can only be used when a signed URL is provided."); + yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); + } else { + const httpClient = createHttpClient(); + core$1.debug("Upload cache"); + yield uploadFile(httpClient, cacheId, archivePath, options); + core$1.debug("Commiting cache"); + const cacheSize = utils$2.getArchiveFileSizeInBytes(archivePath); + core$1.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); + if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); + core$1.info("Cache saved successfully"); + } + }); + } + exports.saveCache = saveCache$2; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js +var require_json_typings = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isJsonObject = exports.typeofJsonValue = void 0; + /** + * Get the type of a JSON value. + * Distinguishes between array, null and object. + */ + function typeofJsonValue(value) { + let t = typeof value; + if (t == "object") { + if (Array.isArray(value)) return "array"; + if (value === null) return "null"; + } + return t; + } + exports.typeofJsonValue = typeofJsonValue; + /** + * Is this a JSON object (instead of an array or null)? + */ + function isJsonObject(value) { + return value !== null && typeof value == "object" && !Array.isArray(value); + } + exports.isJsonObject = isJsonObject; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/base64.js +var require_base64 = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/base64.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.base64encode = exports.base64decode = void 0; + let encTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); + let decTable = []; + for (let i = 0; i < encTable.length; i++) decTable[encTable[i].charCodeAt(0)] = i; + decTable["-".charCodeAt(0)] = encTable.indexOf("+"); + decTable["_".charCodeAt(0)] = encTable.indexOf("/"); + /** + * Decodes a base64 string to a byte array. + * + * - ignores white-space, including line breaks and tabs + * - allows inner padding (can decode concatenated base64 strings) + * - does not require padding + * - understands base64url encoding: + * "-" instead of "+", + * "_" instead of "/", + * no padding + */ + function base64decode(base64Str) { + let es = base64Str.length * 3 / 4; + if (base64Str[base64Str.length - 2] == "=") es -= 2; + else if (base64Str[base64Str.length - 1] == "=") es -= 1; + let bytes = new Uint8Array(es), bytePos = 0, groupPos = 0, b, p = 0; + for (let i = 0; i < base64Str.length; i++) { + b = decTable[base64Str.charCodeAt(i)]; + if (b === void 0) switch (base64Str[i]) { + case "=": groupPos = 0; + case "\n": + case "\r": + case " ": + case " ": continue; + default: throw Error(`invalid base64 string.`); + } + switch (groupPos) { + case 0: + p = b; + groupPos = 1; + break; + case 1: + bytes[bytePos++] = p << 2 | (b & 48) >> 4; + p = b; + groupPos = 2; + break; + case 2: + bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2; + p = b; + groupPos = 3; + break; + case 3: + bytes[bytePos++] = (p & 3) << 6 | b; + groupPos = 0; + break; + } + } + if (groupPos == 1) throw Error(`invalid base64 string.`); + return bytes.subarray(0, bytePos); + } + exports.base64decode = base64decode; + /** + * Encodes a byte array to a base64 string. + * Adds padding at the end. + * Does not insert newlines. + */ + function base64encode(bytes) { + let base64$1 = "", groupPos = 0, b, p = 0; + for (let i = 0; i < bytes.length; i++) { + b = bytes[i]; + switch (groupPos) { + case 0: + base64$1 += encTable[b >> 2]; + p = (b & 3) << 4; + groupPos = 1; + break; + case 1: + base64$1 += encTable[p | b >> 4]; + p = (b & 15) << 2; + groupPos = 2; + break; + case 2: + base64$1 += encTable[p | b >> 6]; + base64$1 += encTable[b & 63]; + groupPos = 0; + break; + } + } + if (groupPos) { + base64$1 += encTable[p]; + base64$1 += "="; + if (groupPos == 1) base64$1 += "="; + } + return base64$1; + } + exports.base64encode = base64encode; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js +var require_protobufjs_utf8 = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.utf8read = void 0; + const fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk); + /** + * @deprecated This function will no longer be exported with the next major + * release, since protobuf-ts has switch to TextDecoder API. If you need this + * function, please migrate to @protobufjs/utf8. For context, see + * https://github.com/timostamm/protobuf-ts/issues/184 + * + * Reads UTF8 bytes as a string. + * + * See [protobufjs / utf8](https://github.com/protobufjs/protobuf.js/blob/9893e35b854621cce64af4bf6be2cff4fb892796/lib/utf8/index.js#L40) + * + * Copyright (c) 2016, Daniel Wirtz + */ + function utf8read(bytes) { + if (bytes.length < 1) return ""; + let pos = 0, parts = [], chunk = [], i = 0, t; + let len = bytes.length; + while (pos < len) { + t = bytes[pos++]; + if (t < 128) chunk[i++] = t; + else if (t > 191 && t < 224) chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 65536; + chunk[i++] = 55296 + (t >> 10); + chunk[i++] = 56320 + (t & 1023); + } else chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63; + if (i > 8191) { + parts.push(fromCharCodes(chunk)); + i = 0; + } + } + if (parts.length) { + if (i) parts.push(fromCharCodes(chunk.slice(0, i))); + return parts.join(""); + } + return fromCharCodes(chunk.slice(0, i)); + } + exports.utf8read = utf8read; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js +var require_binary_format_contract = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.WireType = exports.mergeBinaryOptions = exports.UnknownFieldHandler = void 0; + /** + * This handler implements the default behaviour for unknown fields. + * When reading data, unknown fields are stored on the message, in a + * symbol property. + * When writing data, the symbol property is queried and unknown fields + * are serialized into the output again. + */ + var UnknownFieldHandler; + (function(UnknownFieldHandler$1) { + /** + * The symbol used to store unknown fields for a message. + * The property must conform to `UnknownFieldContainer`. + */ + UnknownFieldHandler$1.symbol = Symbol.for("protobuf-ts/unknown"); + /** + * Store an unknown field during binary read directly on the message. + * This method is compatible with `BinaryReadOptions.readUnknownField`. + */ + UnknownFieldHandler$1.onRead = (typeName, message, fieldNo, wireType, data) => { + let container = is(message) ? message[UnknownFieldHandler$1.symbol] : message[UnknownFieldHandler$1.symbol] = []; + container.push({ + no: fieldNo, + wireType, + data + }); + }; + /** + * Write unknown fields stored for the message to the writer. + * This method is compatible with `BinaryWriteOptions.writeUnknownFields`. + */ + UnknownFieldHandler$1.onWrite = (typeName, message, writer) => { + for (let { no, wireType, data } of UnknownFieldHandler$1.list(message)) writer.tag(no, wireType).raw(data); + }; + /** + * List unknown fields stored for the message. + * Note that there may be multiples fields with the same number. + */ + UnknownFieldHandler$1.list = (message, fieldNo) => { + if (is(message)) { + let all = message[UnknownFieldHandler$1.symbol]; + return fieldNo ? all.filter((uf) => uf.no == fieldNo) : all; + } + return []; + }; + /** + * Returns the last unknown field by field number. + */ + UnknownFieldHandler$1.last = (message, fieldNo) => UnknownFieldHandler$1.list(message, fieldNo).slice(-1)[0]; + const is = (message) => message && Array.isArray(message[UnknownFieldHandler$1.symbol]); + })(UnknownFieldHandler = exports.UnknownFieldHandler || (exports.UnknownFieldHandler = {})); + /** + * Merges binary write or read options. Later values override earlier values. + */ + function mergeBinaryOptions(a, b) { + return Object.assign(Object.assign({}, a), b); + } + exports.mergeBinaryOptions = mergeBinaryOptions; + /** + * Protobuf binary format wire types. + * + * A wire type provides just enough information to find the length of the + * following value. + * + * See https://developers.google.com/protocol-buffers/docs/encoding#structure + */ + var WireType; + (function(WireType$1) { + /** + * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum + */ + WireType$1[WireType$1["Varint"] = 0] = "Varint"; + /** + * Used for fixed64, sfixed64, double. + * Always 8 bytes with little-endian byte order. + */ + WireType$1[WireType$1["Bit64"] = 1] = "Bit64"; + /** + * Used for string, bytes, embedded messages, packed repeated fields + * + * Only repeated numeric types (types which use the varint, 32-bit, + * or 64-bit wire types) can be packed. In proto3, such fields are + * packed by default. + */ + WireType$1[WireType$1["LengthDelimited"] = 2] = "LengthDelimited"; + /** + * Used for groups + * @deprecated + */ + WireType$1[WireType$1["StartGroup"] = 3] = "StartGroup"; + /** + * Used for groups + * @deprecated + */ + WireType$1[WireType$1["EndGroup"] = 4] = "EndGroup"; + /** + * Used for fixed32, sfixed32, float. + * Always 4 bytes with little-endian byte order. + */ + WireType$1[WireType$1["Bit32"] = 5] = "Bit32"; + })(WireType = exports.WireType || (exports.WireType = {})); +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js +var require_goog_varint = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.varint32read = exports.varint32write = exports.int64toString = exports.int64fromString = exports.varint64write = exports.varint64read = void 0; + /** + * Read a 64 bit varint as two JS numbers. + * + * Returns tuple: + * [0]: low bits + * [0]: high bits + * + * Copyright 2008 Google Inc. All rights reserved. + * + * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175 + */ + function varint64read() { + let lowBits = 0; + let highBits = 0; + for (let shift = 0; shift < 28; shift += 7) { + let b = this.buf[this.pos++]; + lowBits |= (b & 127) << shift; + if ((b & 128) == 0) { + this.assertBounds(); + return [lowBits, highBits]; + } + } + let middleByte = this.buf[this.pos++]; + lowBits |= (middleByte & 15) << 28; + highBits = (middleByte & 112) >> 4; + if ((middleByte & 128) == 0) { + this.assertBounds(); + return [lowBits, highBits]; + } + for (let shift = 3; shift <= 31; shift += 7) { + let b = this.buf[this.pos++]; + highBits |= (b & 127) << shift; + if ((b & 128) == 0) { + this.assertBounds(); + return [lowBits, highBits]; + } + } + throw new Error("invalid varint"); + } + exports.varint64read = varint64read; + /** + * Write a 64 bit varint, given as two JS numbers, to the given bytes array. + * + * Copyright 2008 Google Inc. All rights reserved. + * + * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344 + */ + function varint64write(lo, hi, bytes) { + for (let i = 0; i < 28; i = i + 7) { + const shift = lo >>> i; + const hasNext = !(shift >>> 7 == 0 && hi == 0); + const byte = (hasNext ? shift | 128 : shift) & 255; + bytes.push(byte); + if (!hasNext) return; + } + const splitBits = lo >>> 28 & 15 | (hi & 7) << 4; + const hasMoreBits = !(hi >> 3 == 0); + bytes.push((hasMoreBits ? splitBits | 128 : splitBits) & 255); + if (!hasMoreBits) return; + for (let i = 3; i < 31; i = i + 7) { + const shift = hi >>> i; + const hasNext = !(shift >>> 7 == 0); + const byte = (hasNext ? shift | 128 : shift) & 255; + bytes.push(byte); + if (!hasNext) return; + } + bytes.push(hi >>> 31 & 1); + } + exports.varint64write = varint64write; + const TWO_PWR_32_DBL$1 = 65536 * 65536; + /** + * Parse decimal string of 64 bit integer value as two JS numbers. + * + * Returns tuple: + * [0]: minus sign? + * [1]: low bits + * [2]: high bits + * + * Copyright 2008 Google Inc. + */ + function int64fromString(dec) { + let minus = dec[0] == "-"; + if (minus) dec = dec.slice(1); + const base = 1e6; + let lowBits = 0; + let highBits = 0; + function add1e6digit(begin, end) { + const digit1e6 = Number(dec.slice(begin, end)); + highBits *= base; + lowBits = lowBits * base + digit1e6; + if (lowBits >= TWO_PWR_32_DBL$1) { + highBits = highBits + (lowBits / TWO_PWR_32_DBL$1 | 0); + lowBits = lowBits % TWO_PWR_32_DBL$1; + } + } + add1e6digit(-24, -18); + add1e6digit(-18, -12); + add1e6digit(-12, -6); + add1e6digit(-6); + return [ + minus, + lowBits, + highBits + ]; + } + exports.int64fromString = int64fromString; + /** + * Format 64 bit integer value (as two JS numbers) to decimal string. + * + * Copyright 2008 Google Inc. + */ + function int64toString(bitsLow, bitsHigh) { + if (bitsHigh >>> 0 <= 2097151) return "" + (TWO_PWR_32_DBL$1 * bitsHigh + (bitsLow >>> 0)); + let low = bitsLow & 16777215; + let mid = (bitsLow >>> 24 | bitsHigh << 8) >>> 0 & 16777215; + let high = bitsHigh >> 16 & 65535; + let digitA = low + mid * 6777216 + high * 6710656; + let digitB = mid + high * 8147497; + let digitC = high * 2; + let base = 1e7; + if (digitA >= base) { + digitB += Math.floor(digitA / base); + digitA %= base; + } + if (digitB >= base) { + digitC += Math.floor(digitB / base); + digitB %= base; + } + function decimalFrom1e7(digit1e7, needLeadingZeros) { + let partial = digit1e7 ? String(digit1e7) : ""; + if (needLeadingZeros) return "0000000".slice(partial.length) + partial; + return partial; + } + return decimalFrom1e7( + digitC, + /*needLeadingZeros=*/ + 0 +) + decimalFrom1e7( + digitB, + /*needLeadingZeros=*/ + digitC +) + decimalFrom1e7( + digitA, + /*needLeadingZeros=*/ + 1 +); + } + exports.int64toString = int64toString; + /** + * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)` + * + * Copyright 2008 Google Inc. All rights reserved. + * + * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144 + */ + function varint32write(value, bytes) { + if (value >= 0) { + while (value > 127) { + bytes.push(value & 127 | 128); + value = value >>> 7; + } + bytes.push(value); + } else { + for (let i = 0; i < 9; i++) { + bytes.push(value & 127 | 128); + value = value >> 7; + } + bytes.push(1); + } + } + exports.varint32write = varint32write; + /** + * Read an unsigned 32 bit varint. + * + * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220 + */ + function varint32read() { + let b = this.buf[this.pos++]; + let result = b & 127; + if ((b & 128) == 0) { + this.assertBounds(); + return result; + } + b = this.buf[this.pos++]; + result |= (b & 127) << 7; + if ((b & 128) == 0) { + this.assertBounds(); + return result; + } + b = this.buf[this.pos++]; + result |= (b & 127) << 14; + if ((b & 128) == 0) { + this.assertBounds(); + return result; + } + b = this.buf[this.pos++]; + result |= (b & 127) << 21; + if ((b & 128) == 0) { + this.assertBounds(); + return result; + } + b = this.buf[this.pos++]; + result |= (b & 15) << 28; + for (let readBytes = 5; (b & 128) !== 0 && readBytes < 10; readBytes++) b = this.buf[this.pos++]; + if ((b & 128) != 0) throw new Error("invalid varint"); + this.assertBounds(); + return result >>> 0; + } + exports.varint32read = varint32read; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js +var require_pb_long = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PbLong = exports.PbULong = exports.detectBi = void 0; + const goog_varint_1$2 = require_goog_varint(); + let BI; + function detectBi() { + const dv = new DataView(new ArrayBuffer(8)); + const ok = globalThis.BigInt !== void 0 && typeof dv.getBigInt64 === "function" && typeof dv.getBigUint64 === "function" && typeof dv.setBigInt64 === "function" && typeof dv.setBigUint64 === "function"; + BI = ok ? { + MIN: BigInt("-9223372036854775808"), + MAX: BigInt("9223372036854775807"), + UMIN: BigInt("0"), + UMAX: BigInt("18446744073709551615"), + C: BigInt, + V: dv + } : void 0; + } + exports.detectBi = detectBi; + detectBi(); + function assertBi(bi) { + if (!bi) throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support"); + } + const RE_DECIMAL_STR = /^-?[0-9]+$/; + const TWO_PWR_32_DBL = 4294967296; + const HALF_2_PWR_32 = 2147483648; + var SharedPbLong = class { + /** + * Create a new instance with the given bits. + */ + constructor(lo, hi) { + this.lo = lo | 0; + this.hi = hi | 0; + } + /** + * Is this instance equal to 0? + */ + isZero() { + return this.lo == 0 && this.hi == 0; + } + /** + * Convert to a native number. + */ + toNumber() { + let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0); + if (!Number.isSafeInteger(result)) throw new Error("cannot convert to safe number"); + return result; + } + }; + /** + * 64-bit unsigned integer as two 32-bit values. + * Converts between `string`, `number` and `bigint` representations. + */ + var PbULong = class PbULong extends SharedPbLong { + /** + * Create instance from a `string`, `number` or `bigint`. + */ + static from(value) { + if (BI) switch (typeof value) { + case "string": + if (value == "0") return this.ZERO; + if (value == "") throw new Error("string is no integer"); + value = BI.C(value); + case "number": + if (value === 0) return this.ZERO; + value = BI.C(value); + case "bigint": + if (!value) return this.ZERO; + if (value < BI.UMIN) throw new Error("signed value for ulong"); + if (value > BI.UMAX) throw new Error("ulong too large"); + BI.V.setBigUint64(0, value, true); + return new PbULong(BI.V.getInt32(0, true), BI.V.getInt32(4, true)); + } + else switch (typeof value) { + case "string": + if (value == "0") return this.ZERO; + value = value.trim(); + if (!RE_DECIMAL_STR.test(value)) throw new Error("string is no integer"); + let [minus, lo, hi] = goog_varint_1$2.int64fromString(value); + if (minus) throw new Error("signed value for ulong"); + return new PbULong(lo, hi); + case "number": + if (value == 0) return this.ZERO; + if (!Number.isSafeInteger(value)) throw new Error("number is no integer"); + if (value < 0) throw new Error("signed value for ulong"); + return new PbULong(value, value / TWO_PWR_32_DBL); + } + throw new Error("unknown value " + typeof value); + } + /** + * Convert to decimal string. + */ + toString() { + return BI ? this.toBigInt().toString() : goog_varint_1$2.int64toString(this.lo, this.hi); + } + /** + * Convert to native bigint. + */ + toBigInt() { + assertBi(BI); + BI.V.setInt32(0, this.lo, true); + BI.V.setInt32(4, this.hi, true); + return BI.V.getBigUint64(0, true); + } + }; + exports.PbULong = PbULong; + /** + * ulong 0 singleton. + */ + PbULong.ZERO = new PbULong(0, 0); + /** + * 64-bit signed integer as two 32-bit values. + * Converts between `string`, `number` and `bigint` representations. + */ + var PbLong = class PbLong extends SharedPbLong { + /** + * Create instance from a `string`, `number` or `bigint`. + */ + static from(value) { + if (BI) switch (typeof value) { + case "string": + if (value == "0") return this.ZERO; + if (value == "") throw new Error("string is no integer"); + value = BI.C(value); + case "number": + if (value === 0) return this.ZERO; + value = BI.C(value); + case "bigint": + if (!value) return this.ZERO; + if (value < BI.MIN) throw new Error("signed long too small"); + if (value > BI.MAX) throw new Error("signed long too large"); + BI.V.setBigInt64(0, value, true); + return new PbLong(BI.V.getInt32(0, true), BI.V.getInt32(4, true)); + } + else switch (typeof value) { + case "string": + if (value == "0") return this.ZERO; + value = value.trim(); + if (!RE_DECIMAL_STR.test(value)) throw new Error("string is no integer"); + let [minus, lo, hi] = goog_varint_1$2.int64fromString(value); + if (minus) { + if (hi > HALF_2_PWR_32 || hi == HALF_2_PWR_32 && lo != 0) throw new Error("signed long too small"); + } else if (hi >= HALF_2_PWR_32) throw new Error("signed long too large"); + let pbl = new PbLong(lo, hi); + return minus ? pbl.negate() : pbl; + case "number": + if (value == 0) return this.ZERO; + if (!Number.isSafeInteger(value)) throw new Error("number is no integer"); + return value > 0 ? new PbLong(value, value / TWO_PWR_32_DBL) : new PbLong(-value, -value / TWO_PWR_32_DBL).negate(); + } + throw new Error("unknown value " + typeof value); + } + /** + * Do we have a minus sign? + */ + isNegative() { + return (this.hi & HALF_2_PWR_32) !== 0; + } + /** + * Negate two's complement. + * Invert all the bits and add one to the result. + */ + negate() { + let hi = ~this.hi, lo = this.lo; + if (lo) lo = ~lo + 1; + else hi += 1; + return new PbLong(lo, hi); + } + /** + * Convert to decimal string. + */ + toString() { + if (BI) return this.toBigInt().toString(); + if (this.isNegative()) { + let n = this.negate(); + return "-" + goog_varint_1$2.int64toString(n.lo, n.hi); + } + return goog_varint_1$2.int64toString(this.lo, this.hi); + } + /** + * Convert to native bigint. + */ + toBigInt() { + assertBi(BI); + BI.V.setInt32(0, this.lo, true); + BI.V.setInt32(4, this.hi, true); + return BI.V.getBigInt64(0, true); + } + }; + exports.PbLong = PbLong; + /** + * long 0 singleton. + */ + PbLong.ZERO = new PbLong(0, 0); +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-reader.js +var require_binary_reader = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-reader.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BinaryReader = exports.binaryReadOptions = void 0; + const binary_format_contract_1$3 = require_binary_format_contract(); + const pb_long_1$6 = require_pb_long(); + const goog_varint_1$1 = require_goog_varint(); + const defaultsRead$1 = { + readUnknownField: true, + readerFactory: (bytes) => new BinaryReader(bytes) + }; + /** + * Make options for reading binary data form partial options. + */ + function binaryReadOptions(options) { + return options ? Object.assign(Object.assign({}, defaultsRead$1), options) : defaultsRead$1; + } + exports.binaryReadOptions = binaryReadOptions; + var BinaryReader = class { + constructor(buf, textDecoder) { + this.varint64 = goog_varint_1$1.varint64read; + /** + * Read a `uint32` field, an unsigned 32 bit varint. + */ + this.uint32 = goog_varint_1$1.varint32read; + this.buf = buf; + this.len = buf.length; + this.pos = 0; + this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + this.textDecoder = textDecoder !== null && textDecoder !== void 0 ? textDecoder : new TextDecoder("utf-8", { + fatal: true, + ignoreBOM: true + }); + } + /** + * Reads a tag - field number and wire type. + */ + tag() { + let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7; + if (fieldNo <= 0 || wireType < 0 || wireType > 5) throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType); + return [fieldNo, wireType]; + } + /** + * Skip one element on the wire and return the skipped data. + * Supports WireType.StartGroup since v2.0.0-alpha.23. + */ + skip(wireType) { + let start = this.pos; + switch (wireType) { + case binary_format_contract_1$3.WireType.Varint: + while (this.buf[this.pos++] & 128); + break; + case binary_format_contract_1$3.WireType.Bit64: this.pos += 4; + case binary_format_contract_1$3.WireType.Bit32: + this.pos += 4; + break; + case binary_format_contract_1$3.WireType.LengthDelimited: + let len = this.uint32(); + this.pos += len; + break; + case binary_format_contract_1$3.WireType.StartGroup: + let t; + while ((t = this.tag()[1]) !== binary_format_contract_1$3.WireType.EndGroup) this.skip(t); + break; + default: throw new Error("cant skip wire type " + wireType); + } + this.assertBounds(); + return this.buf.subarray(start, this.pos); + } + /** + * Throws error if position in byte array is out of range. + */ + assertBounds() { + if (this.pos > this.len) throw new RangeError("premature EOF"); + } + /** + * Read a `int32` field, a signed 32 bit varint. + */ + int32() { + return this.uint32() | 0; + } + /** + * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint. + */ + sint32() { + let zze = this.uint32(); + return zze >>> 1 ^ -(zze & 1); + } + /** + * Read a `int64` field, a signed 64-bit varint. + */ + int64() { + return new pb_long_1$6.PbLong(...this.varint64()); + } + /** + * Read a `uint64` field, an unsigned 64-bit varint. + */ + uint64() { + return new pb_long_1$6.PbULong(...this.varint64()); + } + /** + * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint. + */ + sint64() { + let [lo, hi] = this.varint64(); + let s$1 = -(lo & 1); + lo = (lo >>> 1 | (hi & 1) << 31) ^ s$1; + hi = hi >>> 1 ^ s$1; + return new pb_long_1$6.PbLong(lo, hi); + } + /** + * Read a `bool` field, a variant. + */ + bool() { + let [lo, hi] = this.varint64(); + return lo !== 0 || hi !== 0; + } + /** + * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer. + */ + fixed32() { + return this.view.getUint32((this.pos += 4) - 4, true); + } + /** + * Read a `sfixed32` field, a signed, fixed-length 32-bit integer. + */ + sfixed32() { + return this.view.getInt32((this.pos += 4) - 4, true); + } + /** + * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer. + */ + fixed64() { + return new pb_long_1$6.PbULong(this.sfixed32(), this.sfixed32()); + } + /** + * Read a `fixed64` field, a signed, fixed-length 64-bit integer. + */ + sfixed64() { + return new pb_long_1$6.PbLong(this.sfixed32(), this.sfixed32()); + } + /** + * Read a `float` field, 32-bit floating point number. + */ + float() { + return this.view.getFloat32((this.pos += 4) - 4, true); + } + /** + * Read a `double` field, a 64-bit floating point number. + */ + double() { + return this.view.getFloat64((this.pos += 8) - 8, true); + } + /** + * Read a `bytes` field, length-delimited arbitrary data. + */ + bytes() { + let len = this.uint32(); + let start = this.pos; + this.pos += len; + this.assertBounds(); + return this.buf.subarray(start, start + len); + } + /** + * Read a `string` field, length-delimited data converted to UTF-8 text. + */ + string() { + return this.textDecoder.decode(this.bytes()); + } + }; + exports.BinaryReader = BinaryReader; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/assert.js +var require_assert = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/assert.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.assertFloat32 = exports.assertUInt32 = exports.assertInt32 = exports.assertNever = exports.assert = void 0; + /** + * assert that condition is true or throw error (with message) + */ + function assert(condition, msg) { + if (!condition) throw new Error(msg); + } + exports.assert = assert; + /** + * assert that value cannot exist = type `never`. throw runtime error if it does. + */ + function assertNever(value, msg) { + throw new Error(msg !== null && msg !== void 0 ? msg : "Unexpected object: " + value); + } + exports.assertNever = assertNever; + const FLOAT32_MAX = 34028234663852886e22, FLOAT32_MIN = -34028234663852886e22, UINT32_MAX = 4294967295, INT32_MAX = 2147483647, INT32_MIN = -2147483648; + function assertInt32(arg) { + if (typeof arg !== "number") throw new Error("invalid int 32: " + typeof arg); + if (!Number.isInteger(arg) || arg > INT32_MAX || arg < INT32_MIN) throw new Error("invalid int 32: " + arg); + } + exports.assertInt32 = assertInt32; + function assertUInt32(arg) { + if (typeof arg !== "number") throw new Error("invalid uint 32: " + typeof arg); + if (!Number.isInteger(arg) || arg > UINT32_MAX || arg < 0) throw new Error("invalid uint 32: " + arg); + } + exports.assertUInt32 = assertUInt32; + function assertFloat32(arg) { + if (typeof arg !== "number") throw new Error("invalid float 32: " + typeof arg); + if (!Number.isFinite(arg)) return; + if (arg > FLOAT32_MAX || arg < FLOAT32_MIN) throw new Error("invalid float 32: " + arg); + } + exports.assertFloat32 = assertFloat32; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-writer.js +var require_binary_writer = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/binary-writer.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.BinaryWriter = exports.binaryWriteOptions = void 0; + const pb_long_1$5 = require_pb_long(); + const goog_varint_1 = require_goog_varint(); + const assert_1$4 = require_assert(); + const defaultsWrite$1 = { + writeUnknownFields: true, + writerFactory: () => new BinaryWriter() + }; + /** + * Make options for writing binary data form partial options. + */ + function binaryWriteOptions(options) { + return options ? Object.assign(Object.assign({}, defaultsWrite$1), options) : defaultsWrite$1; + } + exports.binaryWriteOptions = binaryWriteOptions; + var BinaryWriter = class { + constructor(textEncoder) { + /** + * Previous fork states. + */ + this.stack = []; + this.textEncoder = textEncoder !== null && textEncoder !== void 0 ? textEncoder : new TextEncoder(); + this.chunks = []; + this.buf = []; + } + /** + * Return all bytes written and reset this writer. + */ + finish() { + this.chunks.push(new Uint8Array(this.buf)); + let len = 0; + for (let i = 0; i < this.chunks.length; i++) len += this.chunks[i].length; + let bytes = new Uint8Array(len); + let offset = 0; + for (let i = 0; i < this.chunks.length; i++) { + bytes.set(this.chunks[i], offset); + offset += this.chunks[i].length; + } + this.chunks = []; + return bytes; + } + /** + * Start a new fork for length-delimited data like a message + * or a packed repeated field. + * + * Must be joined later with `join()`. + */ + fork() { + this.stack.push({ + chunks: this.chunks, + buf: this.buf + }); + this.chunks = []; + this.buf = []; + return this; + } + /** + * Join the last fork. Write its length and bytes, then + * return to the previous state. + */ + join() { + let chunk = this.finish(); + let prev = this.stack.pop(); + if (!prev) throw new Error("invalid state, fork stack empty"); + this.chunks = prev.chunks; + this.buf = prev.buf; + this.uint32(chunk.byteLength); + return this.raw(chunk); + } + /** + * Writes a tag (field number and wire type). + * + * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`. + * + * Generated code should compute the tag ahead of time and call `uint32()`. + */ + tag(fieldNo, type) { + return this.uint32((fieldNo << 3 | type) >>> 0); + } + /** + * Write a chunk of raw bytes. + */ + raw(chunk) { + if (this.buf.length) { + this.chunks.push(new Uint8Array(this.buf)); + this.buf = []; + } + this.chunks.push(chunk); + return this; + } + /** + * Write a `uint32` value, an unsigned 32 bit varint. + */ + uint32(value) { + assert_1$4.assertUInt32(value); + while (value > 127) { + this.buf.push(value & 127 | 128); + value = value >>> 7; + } + this.buf.push(value); + return this; + } + /** + * Write a `int32` value, a signed 32 bit varint. + */ + int32(value) { + assert_1$4.assertInt32(value); + goog_varint_1.varint32write(value, this.buf); + return this; + } + /** + * Write a `bool` value, a variant. + */ + bool(value) { + this.buf.push(value ? 1 : 0); + return this; + } + /** + * Write a `bytes` value, length-delimited arbitrary data. + */ + bytes(value) { + this.uint32(value.byteLength); + return this.raw(value); + } + /** + * Write a `string` value, length-delimited data converted to UTF-8 text. + */ + string(value) { + let chunk = this.textEncoder.encode(value); + this.uint32(chunk.byteLength); + return this.raw(chunk); + } + /** + * Write a `float` value, 32-bit floating point number. + */ + float(value) { + assert_1$4.assertFloat32(value); + let chunk = new Uint8Array(4); + new DataView(chunk.buffer).setFloat32(0, value, true); + return this.raw(chunk); + } + /** + * Write a `double` value, a 64-bit floating point number. + */ + double(value) { + let chunk = new Uint8Array(8); + new DataView(chunk.buffer).setFloat64(0, value, true); + return this.raw(chunk); + } + /** + * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer. + */ + fixed32(value) { + assert_1$4.assertUInt32(value); + let chunk = new Uint8Array(4); + new DataView(chunk.buffer).setUint32(0, value, true); + return this.raw(chunk); + } + /** + * Write a `sfixed32` value, a signed, fixed-length 32-bit integer. + */ + sfixed32(value) { + assert_1$4.assertInt32(value); + let chunk = new Uint8Array(4); + new DataView(chunk.buffer).setInt32(0, value, true); + return this.raw(chunk); + } + /** + * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint. + */ + sint32(value) { + assert_1$4.assertInt32(value); + value = (value << 1 ^ value >> 31) >>> 0; + goog_varint_1.varint32write(value, this.buf); + return this; + } + /** + * Write a `fixed64` value, a signed, fixed-length 64-bit integer. + */ + sfixed64(value) { + let chunk = new Uint8Array(8); + let view = new DataView(chunk.buffer); + let long = pb_long_1$5.PbLong.from(value); + view.setInt32(0, long.lo, true); + view.setInt32(4, long.hi, true); + return this.raw(chunk); + } + /** + * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer. + */ + fixed64(value) { + let chunk = new Uint8Array(8); + let view = new DataView(chunk.buffer); + let long = pb_long_1$5.PbULong.from(value); + view.setInt32(0, long.lo, true); + view.setInt32(4, long.hi, true); + return this.raw(chunk); + } + /** + * Write a `int64` value, a signed 64-bit varint. + */ + int64(value) { + let long = pb_long_1$5.PbLong.from(value); + goog_varint_1.varint64write(long.lo, long.hi, this.buf); + return this; + } + /** + * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint. + */ + sint64(value) { + let long = pb_long_1$5.PbLong.from(value), sign = long.hi >> 31, lo = long.lo << 1 ^ sign, hi = (long.hi << 1 | long.lo >>> 31) ^ sign; + goog_varint_1.varint64write(lo, hi, this.buf); + return this; + } + /** + * Write a `uint64` value, an unsigned 64-bit varint. + */ + uint64(value) { + let long = pb_long_1$5.PbULong.from(value); + goog_varint_1.varint64write(long.lo, long.hi, this.buf); + return this; + } + }; + exports.BinaryWriter = BinaryWriter; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/json-format-contract.js +var require_json_format_contract = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/json-format-contract.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.mergeJsonOptions = exports.jsonWriteOptions = exports.jsonReadOptions = void 0; + const defaultsWrite = { + emitDefaultValues: false, + enumAsInteger: false, + useProtoFieldName: false, + prettySpaces: 0 + }, defaultsRead = { ignoreUnknownFields: false }; + /** + * Make options for reading JSON data from partial options. + */ + function jsonReadOptions(options) { + return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead; + } + exports.jsonReadOptions = jsonReadOptions; + /** + * Make options for writing JSON data from partial options. + */ + function jsonWriteOptions(options) { + return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite; + } + exports.jsonWriteOptions = jsonWriteOptions; + /** + * Merges JSON write or read options. Later values override earlier values. Type registries are merged. + */ + function mergeJsonOptions(a, b) { + var _a$2, _b$1; + let c = Object.assign(Object.assign({}, a), b); + c.typeRegistry = [...(_a$2 = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a$2 !== void 0 ? _a$2 : [], ...(_b$1 = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b$1 !== void 0 ? _b$1 : []]; + return c; + } + exports.mergeJsonOptions = mergeJsonOptions; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/message-type-contract.js +var require_message_type_contract = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/message-type-contract.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MESSAGE_TYPE = void 0; + /** + * The symbol used as a key on message objects to store the message type. + * + * Note that this is an experimental feature - it is here to stay, but + * implementation details may change without notice. + */ + exports.MESSAGE_TYPE = Symbol.for("protobuf-ts/message-type"); +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/lower-camel-case.js +var require_lower_camel_case = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/lower-camel-case.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.lowerCamelCase = void 0; + /** + * Converts snake_case to lowerCamelCase. + * + * Should behave like protoc: + * https://github.com/protocolbuffers/protobuf/blob/e8ae137c96444ea313485ed1118c5e43b2099cf1/src/google/protobuf/compiler/java/java_helpers.cc#L118 + */ + function lowerCamelCase(snakeCase) { + let capNext = false; + const sb = []; + for (let i = 0; i < snakeCase.length; i++) { + let next = snakeCase.charAt(i); + if (next == "_") capNext = true; + else if (/\d/.test(next)) { + sb.push(next); + capNext = true; + } else if (capNext) { + sb.push(next.toUpperCase()); + capNext = false; + } else if (i == 0) sb.push(next.toLowerCase()); + else sb.push(next); + } + return sb.join(""); + } + exports.lowerCamelCase = lowerCamelCase; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-info.js +var require_reflection_info$1 = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-info.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = void 0; + const lower_camel_case_1$1 = require_lower_camel_case(); + /** + * Scalar value types. This is a subset of field types declared by protobuf + * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE + * are omitted, but the numerical values are identical. + */ + var ScalarType; + (function(ScalarType$1) { + ScalarType$1[ScalarType$1["DOUBLE"] = 1] = "DOUBLE"; + ScalarType$1[ScalarType$1["FLOAT"] = 2] = "FLOAT"; + ScalarType$1[ScalarType$1["INT64"] = 3] = "INT64"; + ScalarType$1[ScalarType$1["UINT64"] = 4] = "UINT64"; + ScalarType$1[ScalarType$1["INT32"] = 5] = "INT32"; + ScalarType$1[ScalarType$1["FIXED64"] = 6] = "FIXED64"; + ScalarType$1[ScalarType$1["FIXED32"] = 7] = "FIXED32"; + ScalarType$1[ScalarType$1["BOOL"] = 8] = "BOOL"; + ScalarType$1[ScalarType$1["STRING"] = 9] = "STRING"; + ScalarType$1[ScalarType$1["BYTES"] = 12] = "BYTES"; + ScalarType$1[ScalarType$1["UINT32"] = 13] = "UINT32"; + ScalarType$1[ScalarType$1["SFIXED32"] = 15] = "SFIXED32"; + ScalarType$1[ScalarType$1["SFIXED64"] = 16] = "SFIXED64"; + ScalarType$1[ScalarType$1["SINT32"] = 17] = "SINT32"; + ScalarType$1[ScalarType$1["SINT64"] = 18] = "SINT64"; + })(ScalarType = exports.ScalarType || (exports.ScalarType = {})); + /** + * JavaScript representation of 64 bit integral types. Equivalent to the + * field option "jstype". + * + * By default, protobuf-ts represents 64 bit types as `bigint`. + * + * You can change the default behaviour by enabling the plugin parameter + * `long_type_string`, which will represent 64 bit types as `string`. + * + * Alternatively, you can change the behaviour for individual fields + * with the field option "jstype": + * + * ```protobuf + * uint64 my_field = 1 [jstype = JS_STRING]; + * uint64 other_field = 2 [jstype = JS_NUMBER]; + * ``` + */ + var LongType; + (function(LongType$1) { + /** + * Use JavaScript `bigint`. + * + * Field option `[jstype = JS_NORMAL]`. + */ + LongType$1[LongType$1["BIGINT"] = 0] = "BIGINT"; + /** + * Use JavaScript `string`. + * + * Field option `[jstype = JS_STRING]`. + */ + LongType$1[LongType$1["STRING"] = 1] = "STRING"; + /** + * Use JavaScript `number`. + * + * Large values will loose precision. + * + * Field option `[jstype = JS_NUMBER]`. + */ + LongType$1[LongType$1["NUMBER"] = 2] = "NUMBER"; + })(LongType = exports.LongType || (exports.LongType = {})); + /** + * Protobuf 2.1.0 introduced packed repeated fields. + * Setting the field option `[packed = true]` enables packing. + * + * In proto3, all repeated fields are packed by default. + * Setting the field option `[packed = false]` disables packing. + * + * Packed repeated fields are encoded with a single tag, + * then a length-delimiter, then the element values. + * + * Unpacked repeated fields are encoded with a tag and + * value for each element. + * + * `bytes` and `string` cannot be packed. + */ + var RepeatType; + (function(RepeatType$1) { + /** + * The field is not repeated. + */ + RepeatType$1[RepeatType$1["NO"] = 0] = "NO"; + /** + * The field is repeated and should be packed. + * Invalid for `bytes` and `string`, they cannot be packed. + */ + RepeatType$1[RepeatType$1["PACKED"] = 1] = "PACKED"; + /** + * The field is repeated but should not be packed. + * The only valid repeat type for repeated `bytes` and `string`. + */ + RepeatType$1[RepeatType$1["UNPACKED"] = 2] = "UNPACKED"; + })(RepeatType = exports.RepeatType || (exports.RepeatType = {})); + /** + * Turns PartialFieldInfo into FieldInfo. + */ + function normalizeFieldInfo(field) { + var _a$2, _b$1, _c$1, _d$1; + field.localName = (_a$2 = field.localName) !== null && _a$2 !== void 0 ? _a$2 : lower_camel_case_1$1.lowerCamelCase(field.name); + field.jsonName = (_b$1 = field.jsonName) !== null && _b$1 !== void 0 ? _b$1 : lower_camel_case_1$1.lowerCamelCase(field.name); + field.repeat = (_c$1 = field.repeat) !== null && _c$1 !== void 0 ? _c$1 : RepeatType.NO; + field.opt = (_d$1 = field.opt) !== null && _d$1 !== void 0 ? _d$1 : field.repeat ? false : field.oneof ? false : field.kind == "message"; + return field; + } + exports.normalizeFieldInfo = normalizeFieldInfo; + /** + * Read custom field options from a generated message type. + * + * @deprecated use readFieldOption() + */ + function readFieldOptions(messageType, fieldName, extensionName, extensionType) { + var _a$2; + const options = (_a$2 = messageType.fields.find((m$1, i) => m$1.localName == fieldName || i == fieldName)) === null || _a$2 === void 0 ? void 0 : _a$2.options; + return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; + } + exports.readFieldOptions = readFieldOptions; + function readFieldOption(messageType, fieldName, extensionName, extensionType) { + var _a$2; + const options = (_a$2 = messageType.fields.find((m$1, i) => m$1.localName == fieldName || i == fieldName)) === null || _a$2 === void 0 ? void 0 : _a$2.options; + if (!options) return void 0; + const optionVal = options[extensionName]; + if (optionVal === void 0) return optionVal; + return extensionType ? extensionType.fromJson(optionVal) : optionVal; + } + exports.readFieldOption = readFieldOption; + function readMessageOption(messageType, extensionName, extensionType) { + const options = messageType.options; + const optionVal = options[extensionName]; + if (optionVal === void 0) return optionVal; + return extensionType ? extensionType.fromJson(optionVal) : optionVal; + } + exports.readMessageOption = readMessageOption; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/oneof.js +var require_oneof = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/oneof.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSelectedOneofValue = exports.clearOneofValue = exports.setUnknownOneofValue = exports.setOneofValue = exports.getOneofValue = exports.isOneofGroup = void 0; + /** + * Is the given value a valid oneof group? + * + * We represent protobuf `oneof` as algebraic data types (ADT) in generated + * code. But when working with messages of unknown type, the ADT does not + * help us. + * + * This type guard checks if the given object adheres to the ADT rules, which + * are as follows: + * + * 1) Must be an object. + * + * 2) Must have a "oneofKind" discriminator property. + * + * 3) If "oneofKind" is `undefined`, no member field is selected. The object + * must not have any other properties. + * + * 4) If "oneofKind" is a `string`, the member field with this name is + * selected. + * + * 5) If a member field is selected, the object must have a second property + * with this name. The property must not be `undefined`. + * + * 6) No extra properties are allowed. The object has either one property + * (no selection) or two properties (selection). + * + */ + function isOneofGroup(any) { + if (typeof any != "object" || any === null || !any.hasOwnProperty("oneofKind")) return false; + switch (typeof any.oneofKind) { + case "string": + if (any[any.oneofKind] === void 0) return false; + return Object.keys(any).length == 2; + case "undefined": return Object.keys(any).length == 1; + default: return false; + } + } + exports.isOneofGroup = isOneofGroup; + /** + * Returns the value of the given field in a oneof group. + */ + function getOneofValue(oneof, kind) { + return oneof[kind]; + } + exports.getOneofValue = getOneofValue; + function setOneofValue(oneof, kind, value) { + if (oneof.oneofKind !== void 0) delete oneof[oneof.oneofKind]; + oneof.oneofKind = kind; + if (value !== void 0) oneof[kind] = value; + } + exports.setOneofValue = setOneofValue; + function setUnknownOneofValue(oneof, kind, value) { + if (oneof.oneofKind !== void 0) delete oneof[oneof.oneofKind]; + oneof.oneofKind = kind; + if (value !== void 0 && kind !== void 0) oneof[kind] = value; + } + exports.setUnknownOneofValue = setUnknownOneofValue; + /** + * Removes the selected field in a oneof group. + * + * Note that the recommended way to modify a oneof group is to set + * a new object: + * + * ```ts + * message.result = { oneofKind: undefined }; + * ``` + */ + function clearOneofValue(oneof) { + if (oneof.oneofKind !== void 0) delete oneof[oneof.oneofKind]; + oneof.oneofKind = void 0; + } + exports.clearOneofValue = clearOneofValue; + /** + * Returns the selected value of the given oneof group. + * + * Not that the recommended way to access a oneof group is to check + * the "oneofKind" property and let TypeScript narrow down the union + * type for you: + * + * ```ts + * if (message.result.oneofKind === "error") { + * message.result.error; // string + * } + * ``` + * + * In the rare case you just need the value, and do not care about + * which protobuf field is selected, you can use this function + * for convenience. + */ + function getSelectedOneofValue(oneof) { + if (oneof.oneofKind === void 0) return void 0; + return oneof[oneof.oneofKind]; + } + exports.getSelectedOneofValue = getSelectedOneofValue; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-type-check.js +var require_reflection_type_check = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-type-check.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ReflectionTypeCheck = void 0; + const reflection_info_1$11 = require_reflection_info$1(); + const oneof_1$1 = require_oneof(); + var ReflectionTypeCheck = class { + constructor(info) { + var _a$2; + this.fields = (_a$2 = info.fields) !== null && _a$2 !== void 0 ? _a$2 : []; + } + prepare() { + if (this.data) return; + const req$1 = [], known = [], oneofs = []; + for (let field of this.fields) if (field.oneof) { + if (!oneofs.includes(field.oneof)) { + oneofs.push(field.oneof); + req$1.push(field.oneof); + known.push(field.oneof); + } + } else { + known.push(field.localName); + switch (field.kind) { + case "scalar": + case "enum": + if (!field.opt || field.repeat) req$1.push(field.localName); + break; + case "message": + if (field.repeat) req$1.push(field.localName); + break; + case "map": + req$1.push(field.localName); + break; + } + } + this.data = { + req: req$1, + known, + oneofs: Object.values(oneofs) + }; + } + /** + * Is the argument a valid message as specified by the + * reflection information? + * + * Checks all field types recursively. The `depth` + * specifies how deep into the structure the check will be. + * + * With a depth of 0, only the presence of fields + * is checked. + * + * With a depth of 1 or more, the field types are checked. + * + * With a depth of 2 or more, the members of map, repeated + * and message fields are checked. + * + * Message fields will be checked recursively with depth - 1. + * + * The number of map entries / repeated values being checked + * is < depth. + */ + is(message, depth, allowExcessProperties = false) { + if (depth < 0) return true; + if (message === null || message === void 0 || typeof message != "object") return false; + this.prepare(); + let keys = Object.keys(message), data = this.data; + if (keys.length < data.req.length || data.req.some((n) => !keys.includes(n))) return false; + if (!allowExcessProperties) { + if (keys.some((k) => !data.known.includes(k))) return false; + } + if (depth < 1) return true; + for (const name of data.oneofs) { + const group = message[name]; + if (!oneof_1$1.isOneofGroup(group)) return false; + if (group.oneofKind === void 0) continue; + const field = this.fields.find((f) => f.localName === group.oneofKind); + if (!field) return false; + if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth)) return false; + } + for (const field of this.fields) { + if (field.oneof !== void 0) continue; + if (!this.field(message[field.localName], field, allowExcessProperties, depth)) return false; + } + return true; + } + field(arg, field, allowExcessProperties, depth) { + let repeated = field.repeat; + switch (field.kind) { + case "scalar": + if (arg === void 0) return field.opt; + if (repeated) return this.scalars(arg, field.T, depth, field.L); + return this.scalar(arg, field.T, field.L); + case "enum": + if (arg === void 0) return field.opt; + if (repeated) return this.scalars(arg, reflection_info_1$11.ScalarType.INT32, depth); + return this.scalar(arg, reflection_info_1$11.ScalarType.INT32); + case "message": + if (arg === void 0) return true; + if (repeated) return this.messages(arg, field.T(), allowExcessProperties, depth); + return this.message(arg, field.T(), allowExcessProperties, depth); + case "map": + if (typeof arg != "object" || arg === null) return false; + if (depth < 2) return true; + if (!this.mapKeys(arg, field.K, depth)) return false; + switch (field.V.kind) { + case "scalar": return this.scalars(Object.values(arg), field.V.T, depth, field.V.L); + case "enum": return this.scalars(Object.values(arg), reflection_info_1$11.ScalarType.INT32, depth); + case "message": return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth); + } + break; + } + return true; + } + message(arg, type, allowExcessProperties, depth) { + if (allowExcessProperties) return type.isAssignable(arg, depth); + return type.is(arg, depth); + } + messages(arg, type, allowExcessProperties, depth) { + if (!Array.isArray(arg)) return false; + if (depth < 2) return true; + if (allowExcessProperties) { + for (let i = 0; i < arg.length && i < depth; i++) if (!type.isAssignable(arg[i], depth - 1)) return false; + } else for (let i = 0; i < arg.length && i < depth; i++) if (!type.is(arg[i], depth - 1)) return false; + return true; + } + scalar(arg, type, longType) { + let argType = typeof arg; + switch (type) { + case reflection_info_1$11.ScalarType.UINT64: + case reflection_info_1$11.ScalarType.FIXED64: + case reflection_info_1$11.ScalarType.INT64: + case reflection_info_1$11.ScalarType.SFIXED64: + case reflection_info_1$11.ScalarType.SINT64: switch (longType) { + case reflection_info_1$11.LongType.BIGINT: return argType == "bigint"; + case reflection_info_1$11.LongType.NUMBER: return argType == "number" && !isNaN(arg); + default: return argType == "string"; + } + case reflection_info_1$11.ScalarType.BOOL: return argType == "boolean"; + case reflection_info_1$11.ScalarType.STRING: return argType == "string"; + case reflection_info_1$11.ScalarType.BYTES: return arg instanceof Uint8Array; + case reflection_info_1$11.ScalarType.DOUBLE: + case reflection_info_1$11.ScalarType.FLOAT: return argType == "number" && !isNaN(arg); + default: return argType == "number" && Number.isInteger(arg); + } + } + scalars(arg, type, depth, longType) { + if (!Array.isArray(arg)) return false; + if (depth < 2) return true; + if (Array.isArray(arg)) { + for (let i = 0; i < arg.length && i < depth; i++) if (!this.scalar(arg[i], type, longType)) return false; + } + return true; + } + mapKeys(map, type, depth) { + let keys = Object.keys(map); + switch (type) { + case reflection_info_1$11.ScalarType.INT32: + case reflection_info_1$11.ScalarType.FIXED32: + case reflection_info_1$11.ScalarType.SFIXED32: + case reflection_info_1$11.ScalarType.SINT32: + case reflection_info_1$11.ScalarType.UINT32: return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type, depth); + case reflection_info_1$11.ScalarType.BOOL: return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type, depth); + default: return this.scalars(keys, type, depth, reflection_info_1$11.LongType.STRING); + } + } + }; + exports.ReflectionTypeCheck = ReflectionTypeCheck; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-long-convert.js +var require_reflection_long_convert = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-long-convert.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reflectionLongConvert = void 0; + const reflection_info_1$10 = require_reflection_info$1(); + /** + * Utility method to convert a PbLong or PbUlong to a JavaScript + * representation during runtime. + * + * Works with generated field information, `undefined` is equivalent + * to `STRING`. + */ + function reflectionLongConvert(long, type) { + switch (type) { + case reflection_info_1$10.LongType.BIGINT: return long.toBigInt(); + case reflection_info_1$10.LongType.NUMBER: return long.toNumber(); + default: return long.toString(); + } + } + exports.reflectionLongConvert = reflectionLongConvert; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-reader.js +var require_reflection_json_reader = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-reader.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ReflectionJsonReader = void 0; + const json_typings_1$2 = require_json_typings(); + const base64_1$2 = require_base64(); + const reflection_info_1$9 = require_reflection_info$1(); + const pb_long_1$4 = require_pb_long(); + const assert_1$3 = require_assert(); + const reflection_long_convert_1$2 = require_reflection_long_convert(); + /** + * Reads proto3 messages in canonical JSON format using reflection information. + * + * https://developers.google.com/protocol-buffers/docs/proto3#json + */ + var ReflectionJsonReader = class { + constructor(info) { + this.info = info; + } + prepare() { + var _a$2; + if (this.fMap === void 0) { + this.fMap = {}; + const fieldsInput = (_a$2 = this.info.fields) !== null && _a$2 !== void 0 ? _a$2 : []; + for (const field of fieldsInput) { + this.fMap[field.name] = field; + this.fMap[field.jsonName] = field; + this.fMap[field.localName] = field; + } + } + } + assert(condition, fieldName, jsonValue) { + if (!condition) { + let what = json_typings_1$2.typeofJsonValue(jsonValue); + if (what == "number" || what == "boolean") what = jsonValue.toString(); + throw new Error(`Cannot parse JSON ${what} for ${this.info.typeName}#${fieldName}`); + } + } + /** + * Reads a message from canonical JSON format into the target message. + * + * Repeated fields are appended. Map entries are added, overwriting + * existing keys. + * + * If a message field is already present, it will be merged with the + * new data. + */ + read(input, message, options) { + this.prepare(); + const oneofsHandled = []; + for (const [jsonKey, jsonValue] of Object.entries(input)) { + const field = this.fMap[jsonKey]; + if (!field) { + if (!options.ignoreUnknownFields) throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${jsonKey}`); + continue; + } + const localName = field.localName; + let target; + if (field.oneof) { + if (jsonValue === null && (field.kind !== "enum" || field.T()[0] !== "google.protobuf.NullValue")) continue; + if (oneofsHandled.includes(field.oneof)) throw new Error(`Multiple members of the oneof group "${field.oneof}" of ${this.info.typeName} are present in JSON.`); + oneofsHandled.push(field.oneof); + target = message[field.oneof] = { oneofKind: localName }; + } else target = message; + if (field.kind == "map") { + if (jsonValue === null) continue; + this.assert(json_typings_1$2.isJsonObject(jsonValue), field.name, jsonValue); + const fieldObj = target[localName]; + for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { + this.assert(jsonObjValue !== null, field.name + " map value", null); + let val; + switch (field.V.kind) { + case "message": + val = field.V.T().internalJsonRead(jsonObjValue, options); + break; + case "enum": + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; + break; + case "scalar": + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + break; + } + this.assert(val !== void 0, field.name + " map value", jsonObjValue); + let key = jsonObjKey; + if (field.K == reflection_info_1$9.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; + key = this.scalar(key, field.K, reflection_info_1$9.LongType.STRING, field.name).toString(); + fieldObj[key] = val; + } + } else if (field.repeat) { + if (jsonValue === null) continue; + this.assert(Array.isArray(jsonValue), field.name, jsonValue); + const fieldArr = target[localName]; + for (const jsonItem of jsonValue) { + this.assert(jsonItem !== null, field.name, null); + let val; + switch (field.kind) { + case "message": + val = field.T().internalJsonRead(jsonItem, options); + break; + case "enum": + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; + break; + case "scalar": + val = this.scalar(jsonItem, field.T, field.L, field.name); + break; + } + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); + } + } else switch (field.kind) { + case "message": + if (jsonValue === null && field.T().typeName != "google.protobuf.Value") { + this.assert(field.oneof === void 0, field.name + " (oneof member)", null); + continue; + } + target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]); + break; + case "enum": + if (jsonValue === null) continue; + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; + target[localName] = val; + break; + case "scalar": + if (jsonValue === null) continue; + target[localName] = this.scalar(jsonValue, field.T, field.L, field.name); + break; + } + } + } + /** + * Returns `false` for unrecognized string representations. + * + * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`). + */ + enum(type, json$1, fieldName, ignoreUnknownFields) { + if (type[0] == "google.protobuf.NullValue") assert_1$3.assert(json$1 === null || json$1 === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`); + if (json$1 === null) return 0; + switch (typeof json$1) { + case "number": + assert_1$3.assert(Number.isInteger(json$1), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json$1}.`); + return json$1; + case "string": + let localEnumName = json$1; + if (type[2] && json$1.substring(0, type[2].length) === type[2]) localEnumName = json$1.substring(type[2].length); + let enumNumber = type[1][localEnumName]; + if (typeof enumNumber === "undefined" && ignoreUnknownFields) return false; + assert_1$3.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for "${json$1}".`); + return enumNumber; + } + assert_1$3.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json$1}".`); + } + scalar(json$1, type, longType, fieldName) { + let e; + try { + switch (type) { + case reflection_info_1$9.ScalarType.DOUBLE: + case reflection_info_1$9.ScalarType.FLOAT: + if (json$1 === null) return 0; + if (json$1 === "NaN") return Number.NaN; + if (json$1 === "Infinity") return Number.POSITIVE_INFINITY; + if (json$1 === "-Infinity") return Number.NEGATIVE_INFINITY; + if (json$1 === "") { + e = "empty string"; + break; + } + if (typeof json$1 == "string" && json$1.trim().length !== json$1.length) { + e = "extra whitespace"; + break; + } + if (typeof json$1 != "string" && typeof json$1 != "number") break; + let float = Number(json$1); + if (Number.isNaN(float)) { + e = "not a number"; + break; + } + if (!Number.isFinite(float)) { + e = "too large or small"; + break; + } + if (type == reflection_info_1$9.ScalarType.FLOAT) assert_1$3.assertFloat32(float); + return float; + case reflection_info_1$9.ScalarType.INT32: + case reflection_info_1$9.ScalarType.FIXED32: + case reflection_info_1$9.ScalarType.SFIXED32: + case reflection_info_1$9.ScalarType.SINT32: + case reflection_info_1$9.ScalarType.UINT32: + if (json$1 === null) return 0; + let int32; + if (typeof json$1 == "number") int32 = json$1; + else if (json$1 === "") e = "empty string"; + else if (typeof json$1 == "string") if (json$1.trim().length !== json$1.length) e = "extra whitespace"; + else int32 = Number(json$1); + if (int32 === void 0) break; + if (type == reflection_info_1$9.ScalarType.UINT32) assert_1$3.assertUInt32(int32); + else assert_1$3.assertInt32(int32); + return int32; + case reflection_info_1$9.ScalarType.INT64: + case reflection_info_1$9.ScalarType.SFIXED64: + case reflection_info_1$9.ScalarType.SINT64: + if (json$1 === null) return reflection_long_convert_1$2.reflectionLongConvert(pb_long_1$4.PbLong.ZERO, longType); + if (typeof json$1 != "number" && typeof json$1 != "string") break; + return reflection_long_convert_1$2.reflectionLongConvert(pb_long_1$4.PbLong.from(json$1), longType); + case reflection_info_1$9.ScalarType.FIXED64: + case reflection_info_1$9.ScalarType.UINT64: + if (json$1 === null) return reflection_long_convert_1$2.reflectionLongConvert(pb_long_1$4.PbULong.ZERO, longType); + if (typeof json$1 != "number" && typeof json$1 != "string") break; + return reflection_long_convert_1$2.reflectionLongConvert(pb_long_1$4.PbULong.from(json$1), longType); + case reflection_info_1$9.ScalarType.BOOL: + if (json$1 === null) return false; + if (typeof json$1 !== "boolean") break; + return json$1; + case reflection_info_1$9.ScalarType.STRING: + if (json$1 === null) return ""; + if (typeof json$1 !== "string") { + e = "extra whitespace"; + break; + } + try { + encodeURIComponent(json$1); + } catch (e$1) { + e$1 = "invalid UTF8"; + break; + } + return json$1; + case reflection_info_1$9.ScalarType.BYTES: + if (json$1 === null || json$1 === "") return new Uint8Array(0); + if (typeof json$1 !== "string") break; + return base64_1$2.base64decode(json$1); + } + } catch (error) { + e = error.message; + } + this.assert(false, fieldName + (e ? " - " + e : ""), json$1); + } + }; + exports.ReflectionJsonReader = ReflectionJsonReader; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-writer.js +var require_reflection_json_writer = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-writer.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ReflectionJsonWriter = void 0; + const base64_1$1 = require_base64(); + const pb_long_1$3 = require_pb_long(); + const reflection_info_1$8 = require_reflection_info$1(); + const assert_1$2 = require_assert(); + /** + * Writes proto3 messages in canonical JSON format using reflection + * information. + * + * https://developers.google.com/protocol-buffers/docs/proto3#json + */ + var ReflectionJsonWriter = class { + constructor(info) { + var _a$2; + this.fields = (_a$2 = info.fields) !== null && _a$2 !== void 0 ? _a$2 : []; + } + /** + * Converts the message to a JSON object, based on the field descriptors. + */ + write(message, options) { + const json$1 = {}, source = message; + for (const field of this.fields) { + if (!field.oneof) { + let jsonValue$1 = this.field(field, source[field.localName], options); + if (jsonValue$1 !== void 0) json$1[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue$1; + continue; + } + const group = source[field.oneof]; + if (group.oneofKind !== field.localName) continue; + const opt = field.kind == "scalar" || field.kind == "enum" ? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options; + let jsonValue = this.field(field, group[field.localName], opt); + assert_1$2.assert(jsonValue !== void 0); + json$1[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; + } + return json$1; + } + field(field, value, options) { + let jsonValue = void 0; + if (field.kind == "map") { + assert_1$2.assert(typeof value == "object" && value !== null); + const jsonObj = {}; + switch (field.V.kind) { + case "scalar": + for (const [entryKey, entryValue] of Object.entries(value)) { + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1$2.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; + } + break; + case "message": + const messageType = field.V.T(); + for (const [entryKey, entryValue] of Object.entries(value)) { + const val = this.message(messageType, entryValue, field.name, options); + assert_1$2.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; + } + break; + case "enum": + const enumInfo = field.V.T(); + for (const [entryKey, entryValue] of Object.entries(value)) { + assert_1$2.assert(entryValue === void 0 || typeof entryValue == "number"); + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1$2.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; + } + break; + } + if (options.emitDefaultValues || Object.keys(jsonObj).length > 0) jsonValue = jsonObj; + } else if (field.repeat) { + assert_1$2.assert(Array.isArray(value)); + const jsonArr = []; + switch (field.kind) { + case "scalar": + for (let i = 0; i < value.length; i++) { + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1$2.assert(val !== void 0); + jsonArr.push(val); + } + break; + case "enum": + const enumInfo = field.T(); + for (let i = 0; i < value.length; i++) { + assert_1$2.assert(value[i] === void 0 || typeof value[i] == "number"); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1$2.assert(val !== void 0); + jsonArr.push(val); + } + break; + case "message": + const messageType = field.T(); + for (let i = 0; i < value.length; i++) { + const val = this.message(messageType, value[i], field.name, options); + assert_1$2.assert(val !== void 0); + jsonArr.push(val); + } + break; + } + if (options.emitDefaultValues || jsonArr.length > 0 || options.emitDefaultValues) jsonValue = jsonArr; + } else switch (field.kind) { + case "scalar": + jsonValue = this.scalar(field.T, value, field.name, field.opt, options.emitDefaultValues); + break; + case "enum": + jsonValue = this.enum(field.T(), value, field.name, field.opt, options.emitDefaultValues, options.enumAsInteger); + break; + case "message": + jsonValue = this.message(field.T(), value, field.name, options); + break; + } + return jsonValue; + } + /** + * Returns `null` as the default for google.protobuf.NullValue. + */ + enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) { + if (type[0] == "google.protobuf.NullValue") return !emitDefaultValues && !optional ? void 0 : null; + if (value === void 0) { + assert_1$2.assert(optional); + return void 0; + } + if (value === 0 && !emitDefaultValues && !optional) return void 0; + assert_1$2.assert(typeof value == "number"); + assert_1$2.assert(Number.isInteger(value)); + if (enumAsInteger || !type[1].hasOwnProperty(value)) return value; + if (type[2]) return type[2] + type[1][value]; + return type[1][value]; + } + message(type, value, fieldName, options) { + if (value === void 0) return options.emitDefaultValues ? null : void 0; + return type.internalJsonWrite(value, options); + } + scalar(type, value, fieldName, optional, emitDefaultValues) { + if (value === void 0) { + assert_1$2.assert(optional); + return void 0; + } + const ed = emitDefaultValues || optional; + switch (type) { + case reflection_info_1$8.ScalarType.INT32: + case reflection_info_1$8.ScalarType.SFIXED32: + case reflection_info_1$8.ScalarType.SINT32: + if (value === 0) return ed ? 0 : void 0; + assert_1$2.assertInt32(value); + return value; + case reflection_info_1$8.ScalarType.FIXED32: + case reflection_info_1$8.ScalarType.UINT32: + if (value === 0) return ed ? 0 : void 0; + assert_1$2.assertUInt32(value); + return value; + case reflection_info_1$8.ScalarType.FLOAT: assert_1$2.assertFloat32(value); + case reflection_info_1$8.ScalarType.DOUBLE: + if (value === 0) return ed ? 0 : void 0; + assert_1$2.assert(typeof value == "number"); + if (Number.isNaN(value)) return "NaN"; + if (value === Number.POSITIVE_INFINITY) return "Infinity"; + if (value === Number.NEGATIVE_INFINITY) return "-Infinity"; + return value; + case reflection_info_1$8.ScalarType.STRING: + if (value === "") return ed ? "" : void 0; + assert_1$2.assert(typeof value == "string"); + return value; + case reflection_info_1$8.ScalarType.BOOL: + if (value === false) return ed ? false : void 0; + assert_1$2.assert(typeof value == "boolean"); + return value; + case reflection_info_1$8.ScalarType.UINT64: + case reflection_info_1$8.ScalarType.FIXED64: + assert_1$2.assert(typeof value == "number" || typeof value == "string" || typeof value == "bigint"); + let ulong = pb_long_1$3.PbULong.from(value); + if (ulong.isZero() && !ed) return void 0; + return ulong.toString(); + case reflection_info_1$8.ScalarType.INT64: + case reflection_info_1$8.ScalarType.SFIXED64: + case reflection_info_1$8.ScalarType.SINT64: + assert_1$2.assert(typeof value == "number" || typeof value == "string" || typeof value == "bigint"); + let long = pb_long_1$3.PbLong.from(value); + if (long.isZero() && !ed) return void 0; + return long.toString(); + case reflection_info_1$8.ScalarType.BYTES: + assert_1$2.assert(value instanceof Uint8Array); + if (!value.byteLength) return ed ? "" : void 0; + return base64_1$1.base64encode(value); + } + } + }; + exports.ReflectionJsonWriter = ReflectionJsonWriter; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-scalar-default.js +var require_reflection_scalar_default = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-scalar-default.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reflectionScalarDefault = void 0; + const reflection_info_1$7 = require_reflection_info$1(); + const reflection_long_convert_1$1 = require_reflection_long_convert(); + const pb_long_1$2 = require_pb_long(); + /** + * Creates the default value for a scalar type. + */ + function reflectionScalarDefault(type, longType = reflection_info_1$7.LongType.STRING) { + switch (type) { + case reflection_info_1$7.ScalarType.BOOL: return false; + case reflection_info_1$7.ScalarType.UINT64: + case reflection_info_1$7.ScalarType.FIXED64: return reflection_long_convert_1$1.reflectionLongConvert(pb_long_1$2.PbULong.ZERO, longType); + case reflection_info_1$7.ScalarType.INT64: + case reflection_info_1$7.ScalarType.SFIXED64: + case reflection_info_1$7.ScalarType.SINT64: return reflection_long_convert_1$1.reflectionLongConvert(pb_long_1$2.PbLong.ZERO, longType); + case reflection_info_1$7.ScalarType.DOUBLE: + case reflection_info_1$7.ScalarType.FLOAT: return 0; + case reflection_info_1$7.ScalarType.BYTES: return new Uint8Array(0); + case reflection_info_1$7.ScalarType.STRING: return ""; + default: return 0; + } + } + exports.reflectionScalarDefault = reflectionScalarDefault; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-reader.js +var require_reflection_binary_reader = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-reader.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ReflectionBinaryReader = void 0; + const binary_format_contract_1$2 = require_binary_format_contract(); + const reflection_info_1$6 = require_reflection_info$1(); + const reflection_long_convert_1 = require_reflection_long_convert(); + const reflection_scalar_default_1$2 = require_reflection_scalar_default(); + /** + * Reads proto3 messages in binary format using reflection information. + * + * https://developers.google.com/protocol-buffers/docs/encoding + */ + var ReflectionBinaryReader = class { + constructor(info) { + this.info = info; + } + prepare() { + var _a$2; + if (!this.fieldNoToField) { + const fieldsInput = (_a$2 = this.info.fields) !== null && _a$2 !== void 0 ? _a$2 : []; + this.fieldNoToField = new Map(fieldsInput.map((field) => [field.no, field])); + } + } + /** + * Reads a message from binary format into the target message. + * + * Repeated fields are appended. Map entries are added, overwriting + * existing keys. + * + * If a message field is already present, it will be merged with the + * new data. + */ + read(reader, message, options, length) { + this.prepare(); + const end = length === void 0 ? reader.len : reader.pos + length; + while (reader.pos < end) { + const [fieldNo, wireType] = reader.tag(), field = this.fieldNoToField.get(fieldNo); + if (!field) { + let u = options.readUnknownField; + if (u == "throw") throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.info.typeName}`); + let d$1 = reader.skip(wireType); + if (u !== false) (u === true ? binary_format_contract_1$2.UnknownFieldHandler.onRead : u)(this.info.typeName, message, fieldNo, wireType, d$1); + continue; + } + let target = message, repeated = field.repeat, localName = field.localName; + if (field.oneof) { + target = target[field.oneof]; + if (target.oneofKind !== localName) target = message[field.oneof] = { oneofKind: localName }; + } + switch (field.kind) { + case "scalar": + case "enum": + let T = field.kind == "enum" ? reflection_info_1$6.ScalarType.INT32 : field.T; + let L = field.kind == "scalar" ? field.L : void 0; + if (repeated) { + let arr = target[localName]; + if (wireType == binary_format_contract_1$2.WireType.LengthDelimited && T != reflection_info_1$6.ScalarType.STRING && T != reflection_info_1$6.ScalarType.BYTES) { + let e = reader.uint32() + reader.pos; + while (reader.pos < e) arr.push(this.scalar(reader, T, L)); + } else arr.push(this.scalar(reader, T, L)); + } else target[localName] = this.scalar(reader, T, L); + break; + case "message": + if (repeated) { + let arr = target[localName]; + let msg = field.T().internalBinaryRead(reader, reader.uint32(), options); + arr.push(msg); + } else target[localName] = field.T().internalBinaryRead(reader, reader.uint32(), options, target[localName]); + break; + case "map": + let [mapKey, mapVal] = this.mapEntry(field, reader, options); + target[localName][mapKey] = mapVal; + break; + } + } + } + /** + * Read a map field, expecting key field = 1, value field = 2 + */ + mapEntry(field, reader, options) { + let length = reader.uint32(); + let end = reader.pos + length; + let key = void 0; + let val = void 0; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + if (field.K == reflection_info_1$6.ScalarType.BOOL) key = reader.bool().toString(); + else key = this.scalar(reader, field.K, reflection_info_1$6.LongType.STRING); + break; + case 2: + switch (field.V.kind) { + case "scalar": + val = this.scalar(reader, field.V.T, field.V.L); + break; + case "enum": + val = reader.int32(); + break; + case "message": + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + break; + } + break; + default: throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) in map entry for ${this.info.typeName}#${field.name}`); + } + } + if (key === void 0) { + let keyRaw = reflection_scalar_default_1$2.reflectionScalarDefault(field.K); + key = field.K == reflection_info_1$6.ScalarType.BOOL ? keyRaw.toString() : keyRaw; + } + if (val === void 0) switch (field.V.kind) { + case "scalar": + val = reflection_scalar_default_1$2.reflectionScalarDefault(field.V.T, field.V.L); + break; + case "enum": + val = 0; + break; + case "message": + val = field.V.T().create(); + break; + } + return [key, val]; + } + scalar(reader, type, longType) { + switch (type) { + case reflection_info_1$6.ScalarType.INT32: return reader.int32(); + case reflection_info_1$6.ScalarType.STRING: return reader.string(); + case reflection_info_1$6.ScalarType.BOOL: return reader.bool(); + case reflection_info_1$6.ScalarType.DOUBLE: return reader.double(); + case reflection_info_1$6.ScalarType.FLOAT: return reader.float(); + case reflection_info_1$6.ScalarType.INT64: return reflection_long_convert_1.reflectionLongConvert(reader.int64(), longType); + case reflection_info_1$6.ScalarType.UINT64: return reflection_long_convert_1.reflectionLongConvert(reader.uint64(), longType); + case reflection_info_1$6.ScalarType.FIXED64: return reflection_long_convert_1.reflectionLongConvert(reader.fixed64(), longType); + case reflection_info_1$6.ScalarType.FIXED32: return reader.fixed32(); + case reflection_info_1$6.ScalarType.BYTES: return reader.bytes(); + case reflection_info_1$6.ScalarType.UINT32: return reader.uint32(); + case reflection_info_1$6.ScalarType.SFIXED32: return reader.sfixed32(); + case reflection_info_1$6.ScalarType.SFIXED64: return reflection_long_convert_1.reflectionLongConvert(reader.sfixed64(), longType); + case reflection_info_1$6.ScalarType.SINT32: return reader.sint32(); + case reflection_info_1$6.ScalarType.SINT64: return reflection_long_convert_1.reflectionLongConvert(reader.sint64(), longType); + } + } + }; + exports.ReflectionBinaryReader = ReflectionBinaryReader; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-writer.js +var require_reflection_binary_writer = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-writer.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ReflectionBinaryWriter = void 0; + const binary_format_contract_1$1 = require_binary_format_contract(); + const reflection_info_1$5 = require_reflection_info$1(); + const assert_1$1 = require_assert(); + const pb_long_1$1 = require_pb_long(); + /** + * Writes proto3 messages in binary format using reflection information. + * + * https://developers.google.com/protocol-buffers/docs/encoding + */ + var ReflectionBinaryWriter = class { + constructor(info) { + this.info = info; + } + prepare() { + if (!this.fields) { + const fieldsInput = this.info.fields ? this.info.fields.concat() : []; + this.fields = fieldsInput.sort((a, b) => a.no - b.no); + } + } + /** + * Writes the message to binary format. + */ + write(message, writer, options) { + this.prepare(); + for (const field of this.fields) { + let value, emitDefault, repeated = field.repeat, localName = field.localName; + if (field.oneof) { + const group = message[field.oneof]; + if (group.oneofKind !== localName) continue; + value = group[localName]; + emitDefault = true; + } else { + value = message[localName]; + emitDefault = false; + } + switch (field.kind) { + case "scalar": + case "enum": + let T = field.kind == "enum" ? reflection_info_1$5.ScalarType.INT32 : field.T; + if (repeated) { + assert_1$1.assert(Array.isArray(value)); + if (repeated == reflection_info_1$5.RepeatType.PACKED) this.packed(writer, T, field.no, value); + else for (const item of value) this.scalar(writer, T, field.no, item, true); + } else if (value === void 0) assert_1$1.assert(field.opt); + else this.scalar(writer, T, field.no, value, emitDefault || field.opt); + break; + case "message": + if (repeated) { + assert_1$1.assert(Array.isArray(value)); + for (const item of value) this.message(writer, options, field.T(), field.no, item); + } else this.message(writer, options, field.T(), field.no, value); + break; + case "map": + assert_1$1.assert(typeof value == "object" && value !== null); + for (const [key, val] of Object.entries(value)) this.mapEntry(writer, options, field, key, val); + break; + } + } + let u = options.writeUnknownFields; + if (u !== false) (u === true ? binary_format_contract_1$1.UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer); + } + mapEntry(writer, options, field, key, value) { + writer.tag(field.no, binary_format_contract_1$1.WireType.LengthDelimited); + writer.fork(); + let keyValue = key; + switch (field.K) { + case reflection_info_1$5.ScalarType.INT32: + case reflection_info_1$5.ScalarType.FIXED32: + case reflection_info_1$5.ScalarType.UINT32: + case reflection_info_1$5.ScalarType.SFIXED32: + case reflection_info_1$5.ScalarType.SINT32: + keyValue = Number.parseInt(key); + break; + case reflection_info_1$5.ScalarType.BOOL: + assert_1$1.assert(key == "true" || key == "false"); + keyValue = key == "true"; + break; + } + this.scalar(writer, field.K, 1, keyValue, true); + switch (field.V.kind) { + case "scalar": + this.scalar(writer, field.V.T, 2, value, true); + break; + case "enum": + this.scalar(writer, reflection_info_1$5.ScalarType.INT32, 2, value, true); + break; + case "message": + this.message(writer, options, field.V.T(), 2, value); + break; + } + writer.join(); + } + message(writer, options, handler, fieldNo, value) { + if (value === void 0) return; + handler.internalBinaryWrite(value, writer.tag(fieldNo, binary_format_contract_1$1.WireType.LengthDelimited).fork(), options); + writer.join(); + } + /** + * Write a single scalar value. + */ + scalar(writer, type, fieldNo, value, emitDefault) { + let [wireType, method, isDefault] = this.scalarInfo(type, value); + if (!isDefault || emitDefault) { + writer.tag(fieldNo, wireType); + writer[method](value); + } + } + /** + * Write an array of scalar values in packed format. + */ + packed(writer, type, fieldNo, value) { + if (!value.length) return; + assert_1$1.assert(type !== reflection_info_1$5.ScalarType.BYTES && type !== reflection_info_1$5.ScalarType.STRING); + writer.tag(fieldNo, binary_format_contract_1$1.WireType.LengthDelimited); + writer.fork(); + let [, method] = this.scalarInfo(type); + for (let i = 0; i < value.length; i++) writer[method](value[i]); + writer.join(); + } + /** + * Get information for writing a scalar value. + * + * Returns tuple: + * [0]: appropriate WireType + * [1]: name of the appropriate method of IBinaryWriter + * [2]: whether the given value is a default value + * + * If argument `value` is omitted, [2] is always false. + */ + scalarInfo(type, value) { + let t = binary_format_contract_1$1.WireType.Varint; + let m$1; + let i = value === void 0; + let d$1 = value === 0; + switch (type) { + case reflection_info_1$5.ScalarType.INT32: + m$1 = "int32"; + break; + case reflection_info_1$5.ScalarType.STRING: + d$1 = i || !value.length; + t = binary_format_contract_1$1.WireType.LengthDelimited; + m$1 = "string"; + break; + case reflection_info_1$5.ScalarType.BOOL: + d$1 = value === false; + m$1 = "bool"; + break; + case reflection_info_1$5.ScalarType.UINT32: + m$1 = "uint32"; + break; + case reflection_info_1$5.ScalarType.DOUBLE: + t = binary_format_contract_1$1.WireType.Bit64; + m$1 = "double"; + break; + case reflection_info_1$5.ScalarType.FLOAT: + t = binary_format_contract_1$1.WireType.Bit32; + m$1 = "float"; + break; + case reflection_info_1$5.ScalarType.INT64: + d$1 = i || pb_long_1$1.PbLong.from(value).isZero(); + m$1 = "int64"; + break; + case reflection_info_1$5.ScalarType.UINT64: + d$1 = i || pb_long_1$1.PbULong.from(value).isZero(); + m$1 = "uint64"; + break; + case reflection_info_1$5.ScalarType.FIXED64: + d$1 = i || pb_long_1$1.PbULong.from(value).isZero(); + t = binary_format_contract_1$1.WireType.Bit64; + m$1 = "fixed64"; + break; + case reflection_info_1$5.ScalarType.BYTES: + d$1 = i || !value.byteLength; + t = binary_format_contract_1$1.WireType.LengthDelimited; + m$1 = "bytes"; + break; + case reflection_info_1$5.ScalarType.FIXED32: + t = binary_format_contract_1$1.WireType.Bit32; + m$1 = "fixed32"; + break; + case reflection_info_1$5.ScalarType.SFIXED32: + t = binary_format_contract_1$1.WireType.Bit32; + m$1 = "sfixed32"; + break; + case reflection_info_1$5.ScalarType.SFIXED64: + d$1 = i || pb_long_1$1.PbLong.from(value).isZero(); + t = binary_format_contract_1$1.WireType.Bit64; + m$1 = "sfixed64"; + break; + case reflection_info_1$5.ScalarType.SINT32: + m$1 = "sint32"; + break; + case reflection_info_1$5.ScalarType.SINT64: + d$1 = i || pb_long_1$1.PbLong.from(value).isZero(); + m$1 = "sint64"; + break; + } + return [ + t, + m$1, + i || d$1 + ]; + } + }; + exports.ReflectionBinaryWriter = ReflectionBinaryWriter; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-create.js +var require_reflection_create = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-create.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reflectionCreate = void 0; + const reflection_scalar_default_1$1 = require_reflection_scalar_default(); + const message_type_contract_1$3 = require_message_type_contract(); + /** + * Creates an instance of the generic message, using the field + * information. + */ + function reflectionCreate(type) { + /** + * This ternary can be removed in the next major version. + * The `Object.create()` code path utilizes a new `messagePrototype` + * property on the `IMessageType` which has this same `MESSAGE_TYPE` + * non-enumerable property on it. Doing it this way means that we only + * pay the cost of `Object.defineProperty()` once per `IMessageType` + * class of once per "instance". The falsy code path is only provided + * for backwards compatibility in cases where the runtime library is + * updated without also updating the generated code. + */ + const msg = type.messagePrototype ? Object.create(type.messagePrototype) : Object.defineProperty({}, message_type_contract_1$3.MESSAGE_TYPE, { value: type }); + for (let field of type.fields) { + let name = field.localName; + if (field.opt) continue; + if (field.oneof) msg[field.oneof] = { oneofKind: void 0 }; + else if (field.repeat) msg[name] = []; + else switch (field.kind) { + case "scalar": + msg[name] = reflection_scalar_default_1$1.reflectionScalarDefault(field.T, field.L); + break; + case "enum": + msg[name] = 0; + break; + case "map": + msg[name] = {}; + break; + } + } + return msg; + } + exports.reflectionCreate = reflectionCreate; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-merge-partial.js +var require_reflection_merge_partial = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-merge-partial.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reflectionMergePartial = void 0; + /** + * Copy partial data into the target message. + * + * If a singular scalar or enum field is present in the source, it + * replaces the field in the target. + * + * If a singular message field is present in the source, it is merged + * with the target field by calling mergePartial() of the responsible + * message type. + * + * If a repeated field is present in the source, its values replace + * all values in the target array, removing extraneous values. + * Repeated message fields are copied, not merged. + * + * If a map field is present in the source, entries are added to the + * target map, replacing entries with the same key. Entries that only + * exist in the target remain. Entries with message values are copied, + * not merged. + * + * Note that this function differs from protobuf merge semantics, + * which appends repeated fields. + */ + function reflectionMergePartial(info, target, source) { + let fieldValue, input = source, output; + for (let field of info.fields) { + let name = field.localName; + if (field.oneof) { + const group = input[field.oneof]; + if ((group === null || group === void 0 ? void 0 : group.oneofKind) == void 0) continue; + fieldValue = group[name]; + output = target[field.oneof]; + output.oneofKind = group.oneofKind; + if (fieldValue == void 0) { + delete output[name]; + continue; + } + } else { + fieldValue = input[name]; + output = target; + if (fieldValue == void 0) continue; + } + if (field.repeat) output[name].length = fieldValue.length; + switch (field.kind) { + case "scalar": + case "enum": + if (field.repeat) for (let i = 0; i < fieldValue.length; i++) output[name][i] = fieldValue[i]; + else output[name] = fieldValue; + break; + case "message": + let T = field.T(); + if (field.repeat) for (let i = 0; i < fieldValue.length; i++) output[name][i] = T.create(fieldValue[i]); + else if (output[name] === void 0) output[name] = T.create(fieldValue); + else T.mergePartial(output[name], fieldValue); + break; + case "map": + switch (field.V.kind) { + case "scalar": + case "enum": + Object.assign(output[name], fieldValue); + break; + case "message": + let T$1 = field.V.T(); + for (let k of Object.keys(fieldValue)) output[name][k] = T$1.create(fieldValue[k]); + break; + } + break; + } + } + } + exports.reflectionMergePartial = reflectionMergePartial; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-equals.js +var require_reflection_equals = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-equals.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reflectionEquals = void 0; + const reflection_info_1$4 = require_reflection_info$1(); + /** + * Determines whether two message of the same type have the same field values. + * Checks for deep equality, traversing repeated fields, oneof groups, maps + * and messages recursively. + * Will also return true if both messages are `undefined`. + */ + function reflectionEquals(info, a, b) { + if (a === b) return true; + if (!a || !b) return false; + for (let field of info.fields) { + let localName = field.localName; + let val_a = field.oneof ? a[field.oneof][localName] : a[localName]; + let val_b = field.oneof ? b[field.oneof][localName] : b[localName]; + switch (field.kind) { + case "enum": + case "scalar": + let t = field.kind == "enum" ? reflection_info_1$4.ScalarType.INT32 : field.T; + if (!(field.repeat ? repeatedPrimitiveEq(t, val_a, val_b) : primitiveEq(t, val_a, val_b))) return false; + break; + case "map": + if (!(field.V.kind == "message" ? repeatedMsgEq(field.V.T(), objectValues(val_a), objectValues(val_b)) : repeatedPrimitiveEq(field.V.kind == "enum" ? reflection_info_1$4.ScalarType.INT32 : field.V.T, objectValues(val_a), objectValues(val_b)))) return false; + break; + case "message": + let T = field.T(); + if (!(field.repeat ? repeatedMsgEq(T, val_a, val_b) : T.equals(val_a, val_b))) return false; + break; + } + } + return true; + } + exports.reflectionEquals = reflectionEquals; + const objectValues = Object.values; + function primitiveEq(type, a, b) { + if (a === b) return true; + if (type !== reflection_info_1$4.ScalarType.BYTES) return false; + let ba = a; + let bb = b; + if (ba.length !== bb.length) return false; + for (let i = 0; i < ba.length; i++) if (ba[i] != bb[i]) return false; + return true; + } + function repeatedPrimitiveEq(type, a, b) { + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) if (!primitiveEq(type, a[i], b[i])) return false; + return true; + } + function repeatedMsgEq(type, a, b) { + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) if (!type.equals(a[i], b[i])) return false; + return true; + } +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/message-type.js +var require_message_type = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/message-type.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MessageType = void 0; + const message_type_contract_1$2 = require_message_type_contract(); + const reflection_info_1$3 = require_reflection_info$1(); + const reflection_type_check_1$1 = require_reflection_type_check(); + const reflection_json_reader_1$1 = require_reflection_json_reader(); + const reflection_json_writer_1$1 = require_reflection_json_writer(); + const reflection_binary_reader_1$1 = require_reflection_binary_reader(); + const reflection_binary_writer_1$1 = require_reflection_binary_writer(); + const reflection_create_1$1 = require_reflection_create(); + const reflection_merge_partial_1$1 = require_reflection_merge_partial(); + const json_typings_1$1 = require_json_typings(); + const json_format_contract_1$1 = require_json_format_contract(); + const reflection_equals_1$1 = require_reflection_equals(); + const binary_writer_1$1 = require_binary_writer(); + const binary_reader_1$1 = require_binary_reader(); + const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})); + /** + * This standard message type provides reflection-based + * operations to work with a message. + */ + var MessageType = class { + constructor(name, fields, options) { + this.defaultCheckDepth = 16; + this.typeName = name; + this.fields = fields.map(reflection_info_1$3.normalizeFieldInfo); + this.options = options !== null && options !== void 0 ? options : {}; + this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, baseDescriptors), { [message_type_contract_1$2.MESSAGE_TYPE]: { value: this } })); + this.refTypeCheck = new reflection_type_check_1$1.ReflectionTypeCheck(this); + this.refJsonReader = new reflection_json_reader_1$1.ReflectionJsonReader(this); + this.refJsonWriter = new reflection_json_writer_1$1.ReflectionJsonWriter(this); + this.refBinReader = new reflection_binary_reader_1$1.ReflectionBinaryReader(this); + this.refBinWriter = new reflection_binary_writer_1$1.ReflectionBinaryWriter(this); + } + create(value) { + let message = reflection_create_1$1.reflectionCreate(this); + if (value !== void 0) reflection_merge_partial_1$1.reflectionMergePartial(this, message, value); + return message; + } + /** + * Clone the message. + * + * Unknown fields are discarded. + */ + clone(message) { + let copy$1 = this.create(); + reflection_merge_partial_1$1.reflectionMergePartial(this, copy$1, message); + return copy$1; + } + /** + * Determines whether two message of the same type have the same field values. + * Checks for deep equality, traversing repeated fields, oneof groups, maps + * and messages recursively. + * Will also return true if both messages are `undefined`. + */ + equals(a, b) { + return reflection_equals_1$1.reflectionEquals(this, a, b); + } + /** + * Is the given value assignable to our message type + * and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)? + */ + is(arg, depth = this.defaultCheckDepth) { + return this.refTypeCheck.is(arg, depth, false); + } + /** + * Is the given value assignable to our message type, + * regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)? + */ + isAssignable(arg, depth = this.defaultCheckDepth) { + return this.refTypeCheck.is(arg, depth, true); + } + /** + * Copy partial data into the target message. + */ + mergePartial(target, source) { + reflection_merge_partial_1$1.reflectionMergePartial(this, target, source); + } + /** + * Create a new message from binary format. + */ + fromBinary(data, options) { + let opt = binary_reader_1$1.binaryReadOptions(options); + return this.internalBinaryRead(opt.readerFactory(data), data.byteLength, opt); + } + /** + * Read a new message from a JSON value. + */ + fromJson(json$1, options) { + return this.internalJsonRead(json$1, json_format_contract_1$1.jsonReadOptions(options)); + } + /** + * Read a new message from a JSON string. + * This is equivalent to `T.fromJson(JSON.parse(json))`. + */ + fromJsonString(json$1, options) { + let value = JSON.parse(json$1); + return this.fromJson(value, options); + } + /** + * Write the message to canonical JSON value. + */ + toJson(message, options) { + return this.internalJsonWrite(message, json_format_contract_1$1.jsonWriteOptions(options)); + } + /** + * Convert the message to canonical JSON string. + * This is equivalent to `JSON.stringify(T.toJson(t))` + */ + toJsonString(message, options) { + var _a$2; + let value = this.toJson(message, options); + return JSON.stringify(value, null, (_a$2 = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a$2 !== void 0 ? _a$2 : 0); + } + /** + * Write the message to binary format. + */ + toBinary(message, options) { + let opt = binary_writer_1$1.binaryWriteOptions(options); + return this.internalBinaryWrite(message, opt.writerFactory(), opt).finish(); + } + /** + * This is an internal method. If you just want to read a message from + * JSON, use `fromJson()` or `fromJsonString()`. + * + * Reads JSON value and merges the fields into the target + * according to protobuf rules. If the target is omitted, + * a new instance is created first. + */ + internalJsonRead(json$1, options, target) { + if (json$1 !== null && typeof json$1 == "object" && !Array.isArray(json$1)) { + let message = target !== null && target !== void 0 ? target : this.create(); + this.refJsonReader.read(json$1, message, options); + return message; + } + throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1$1.typeofJsonValue(json$1)}.`); + } + /** + * This is an internal method. If you just want to write a message + * to JSON, use `toJson()` or `toJsonString(). + * + * Writes JSON value and returns it. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.write(message, options); + } + /** + * This is an internal method. If you just want to write a message + * in binary format, use `toBinary()`. + * + * Serializes the message in binary format and appends it to the given + * writer. Returns passed writer. + */ + internalBinaryWrite(message, writer, options) { + this.refBinWriter.write(message, writer, options); + return writer; + } + /** + * This is an internal method. If you just want to read a message from + * binary data, use `fromBinary()`. + * + * Reads data from binary format and merges the fields into + * the target according to protobuf rules. If the target is + * omitted, a new instance is created first. + */ + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(); + this.refBinReader.read(reader, message, options, length); + return message; + } + }; + exports.MessageType = MessageType; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-contains-message-type.js +var require_reflection_contains_message_type = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-contains-message-type.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.containsMessageType = void 0; + const message_type_contract_1$1 = require_message_type_contract(); + /** + * Check if the provided object is a proto message. + * + * Note that this is an experimental feature - it is here to stay, but + * implementation details may change without notice. + */ + function containsMessageType(msg) { + return msg[message_type_contract_1$1.MESSAGE_TYPE] != null; + } + exports.containsMessageType = containsMessageType; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/enum-object.js +var require_enum_object = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/enum-object.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.listEnumNumbers = exports.listEnumNames = exports.listEnumValues = exports.isEnumObject = void 0; + /** + * Is this a lookup object generated by Typescript, for a Typescript enum + * generated by protobuf-ts? + * + * - No `const enum` (enum must not be inlined, we need reverse mapping). + * - No string enum (we need int32 for protobuf). + * - Must have a value for 0 (otherwise, we would need to support custom default values). + */ + function isEnumObject(arg) { + if (typeof arg != "object" || arg === null) return false; + if (!arg.hasOwnProperty(0)) return false; + for (let k of Object.keys(arg)) { + let num = parseInt(k); + if (!Number.isNaN(num)) { + let nam = arg[num]; + if (nam === void 0) return false; + if (arg[nam] !== num) return false; + } else { + let num$1 = arg[k]; + if (num$1 === void 0) return false; + if (typeof num$1 !== "number") return false; + if (arg[num$1] === void 0) return false; + } + } + return true; + } + exports.isEnumObject = isEnumObject; + /** + * Lists all values of a Typescript enum, as an array of objects with a "name" + * property and a "number" property. + * + * Note that it is possible that a number appears more than once, because it is + * possible to have aliases in an enum. + * + * Throws if the enum does not adhere to the rules of enums generated by + * protobuf-ts. See `isEnumObject()`. + */ + function listEnumValues(enumObject) { + if (!isEnumObject(enumObject)) throw new Error("not a typescript enum object"); + let values = []; + for (let [name, number] of Object.entries(enumObject)) if (typeof number == "number") values.push({ + name, + number + }); + return values; + } + exports.listEnumValues = listEnumValues; + /** + * Lists the names of a Typescript enum. + * + * Throws if the enum does not adhere to the rules of enums generated by + * protobuf-ts. See `isEnumObject()`. + */ + function listEnumNames(enumObject) { + return listEnumValues(enumObject).map((val) => val.name); + } + exports.listEnumNames = listEnumNames; + /** + * Lists the numbers of a Typescript enum. + * + * Throws if the enum does not adhere to the rules of enums generated by + * protobuf-ts. See `isEnumObject()`. + */ + function listEnumNumbers(enumObject) { + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); + } + exports.listEnumNumbers = listEnumNumbers; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/index.js +var require_commonjs$1 = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime@2.10.0/node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports) { + // webpack verbose output hints that this should be useful + Object.defineProperty(exports, "__esModule", { value: true }); + var json_typings_1 = require_json_typings(); + Object.defineProperty(exports, "typeofJsonValue", { + enumerable: true, + get: function() { + return json_typings_1.typeofJsonValue; + } + }); + Object.defineProperty(exports, "isJsonObject", { + enumerable: true, + get: function() { + return json_typings_1.isJsonObject; + } + }); + var base64_1 = require_base64(); + Object.defineProperty(exports, "base64decode", { + enumerable: true, + get: function() { + return base64_1.base64decode; + } + }); + Object.defineProperty(exports, "base64encode", { + enumerable: true, + get: function() { + return base64_1.base64encode; + } + }); + var protobufjs_utf8_1 = require_protobufjs_utf8(); + Object.defineProperty(exports, "utf8read", { + enumerable: true, + get: function() { + return protobufjs_utf8_1.utf8read; + } + }); + var binary_format_contract_1 = require_binary_format_contract(); + Object.defineProperty(exports, "WireType", { + enumerable: true, + get: function() { + return binary_format_contract_1.WireType; + } + }); + Object.defineProperty(exports, "mergeBinaryOptions", { + enumerable: true, + get: function() { + return binary_format_contract_1.mergeBinaryOptions; + } + }); + Object.defineProperty(exports, "UnknownFieldHandler", { + enumerable: true, + get: function() { + return binary_format_contract_1.UnknownFieldHandler; + } + }); + var binary_reader_1 = require_binary_reader(); + Object.defineProperty(exports, "BinaryReader", { + enumerable: true, + get: function() { + return binary_reader_1.BinaryReader; + } + }); + Object.defineProperty(exports, "binaryReadOptions", { + enumerable: true, + get: function() { + return binary_reader_1.binaryReadOptions; + } + }); + var binary_writer_1 = require_binary_writer(); + Object.defineProperty(exports, "BinaryWriter", { + enumerable: true, + get: function() { + return binary_writer_1.BinaryWriter; + } + }); + Object.defineProperty(exports, "binaryWriteOptions", { + enumerable: true, + get: function() { + return binary_writer_1.binaryWriteOptions; + } + }); + var pb_long_1 = require_pb_long(); + Object.defineProperty(exports, "PbLong", { + enumerable: true, + get: function() { + return pb_long_1.PbLong; + } + }); + Object.defineProperty(exports, "PbULong", { + enumerable: true, + get: function() { + return pb_long_1.PbULong; + } + }); + var json_format_contract_1 = require_json_format_contract(); + Object.defineProperty(exports, "jsonReadOptions", { + enumerable: true, + get: function() { + return json_format_contract_1.jsonReadOptions; + } + }); + Object.defineProperty(exports, "jsonWriteOptions", { + enumerable: true, + get: function() { + return json_format_contract_1.jsonWriteOptions; + } + }); + Object.defineProperty(exports, "mergeJsonOptions", { + enumerable: true, + get: function() { + return json_format_contract_1.mergeJsonOptions; + } + }); + var message_type_contract_1 = require_message_type_contract(); + Object.defineProperty(exports, "MESSAGE_TYPE", { + enumerable: true, + get: function() { + return message_type_contract_1.MESSAGE_TYPE; + } + }); + var message_type_1 = require_message_type(); + Object.defineProperty(exports, "MessageType", { + enumerable: true, + get: function() { + return message_type_1.MessageType; + } + }); + var reflection_info_1$2 = require_reflection_info$1(); + Object.defineProperty(exports, "ScalarType", { + enumerable: true, + get: function() { + return reflection_info_1$2.ScalarType; + } + }); + Object.defineProperty(exports, "LongType", { + enumerable: true, + get: function() { + return reflection_info_1$2.LongType; + } + }); + Object.defineProperty(exports, "RepeatType", { + enumerable: true, + get: function() { + return reflection_info_1$2.RepeatType; + } + }); + Object.defineProperty(exports, "normalizeFieldInfo", { + enumerable: true, + get: function() { + return reflection_info_1$2.normalizeFieldInfo; + } + }); + Object.defineProperty(exports, "readFieldOptions", { + enumerable: true, + get: function() { + return reflection_info_1$2.readFieldOptions; + } + }); + Object.defineProperty(exports, "readFieldOption", { + enumerable: true, + get: function() { + return reflection_info_1$2.readFieldOption; + } + }); + Object.defineProperty(exports, "readMessageOption", { + enumerable: true, + get: function() { + return reflection_info_1$2.readMessageOption; + } + }); + var reflection_type_check_1 = require_reflection_type_check(); + Object.defineProperty(exports, "ReflectionTypeCheck", { + enumerable: true, + get: function() { + return reflection_type_check_1.ReflectionTypeCheck; + } + }); + var reflection_create_1 = require_reflection_create(); + Object.defineProperty(exports, "reflectionCreate", { + enumerable: true, + get: function() { + return reflection_create_1.reflectionCreate; + } + }); + var reflection_scalar_default_1 = require_reflection_scalar_default(); + Object.defineProperty(exports, "reflectionScalarDefault", { + enumerable: true, + get: function() { + return reflection_scalar_default_1.reflectionScalarDefault; + } + }); + var reflection_merge_partial_1 = require_reflection_merge_partial(); + Object.defineProperty(exports, "reflectionMergePartial", { + enumerable: true, + get: function() { + return reflection_merge_partial_1.reflectionMergePartial; + } + }); + var reflection_equals_1 = require_reflection_equals(); + Object.defineProperty(exports, "reflectionEquals", { + enumerable: true, + get: function() { + return reflection_equals_1.reflectionEquals; + } + }); + var reflection_binary_reader_1 = require_reflection_binary_reader(); + Object.defineProperty(exports, "ReflectionBinaryReader", { + enumerable: true, + get: function() { + return reflection_binary_reader_1.ReflectionBinaryReader; + } + }); + var reflection_binary_writer_1 = require_reflection_binary_writer(); + Object.defineProperty(exports, "ReflectionBinaryWriter", { + enumerable: true, + get: function() { + return reflection_binary_writer_1.ReflectionBinaryWriter; + } + }); + var reflection_json_reader_1 = require_reflection_json_reader(); + Object.defineProperty(exports, "ReflectionJsonReader", { + enumerable: true, + get: function() { + return reflection_json_reader_1.ReflectionJsonReader; + } + }); + var reflection_json_writer_1 = require_reflection_json_writer(); + Object.defineProperty(exports, "ReflectionJsonWriter", { + enumerable: true, + get: function() { + return reflection_json_writer_1.ReflectionJsonWriter; + } + }); + var reflection_contains_message_type_1 = require_reflection_contains_message_type(); + Object.defineProperty(exports, "containsMessageType", { + enumerable: true, + get: function() { + return reflection_contains_message_type_1.containsMessageType; + } + }); + var oneof_1 = require_oneof(); + Object.defineProperty(exports, "isOneofGroup", { + enumerable: true, + get: function() { + return oneof_1.isOneofGroup; + } + }); + Object.defineProperty(exports, "setOneofValue", { + enumerable: true, + get: function() { + return oneof_1.setOneofValue; + } + }); + Object.defineProperty(exports, "getOneofValue", { + enumerable: true, + get: function() { + return oneof_1.getOneofValue; + } + }); + Object.defineProperty(exports, "clearOneofValue", { + enumerable: true, + get: function() { + return oneof_1.clearOneofValue; + } + }); + Object.defineProperty(exports, "getSelectedOneofValue", { + enumerable: true, + get: function() { + return oneof_1.getSelectedOneofValue; + } + }); + var enum_object_1 = require_enum_object(); + Object.defineProperty(exports, "listEnumValues", { + enumerable: true, + get: function() { + return enum_object_1.listEnumValues; + } + }); + Object.defineProperty(exports, "listEnumNames", { + enumerable: true, + get: function() { + return enum_object_1.listEnumNames; + } + }); + Object.defineProperty(exports, "listEnumNumbers", { + enumerable: true, + get: function() { + return enum_object_1.listEnumNumbers; + } + }); + Object.defineProperty(exports, "isEnumObject", { + enumerable: true, + get: function() { + return enum_object_1.isEnumObject; + } + }); + var lower_camel_case_1 = require_lower_camel_case(); + Object.defineProperty(exports, "lowerCamelCase", { + enumerable: true, + get: function() { + return lower_camel_case_1.lowerCamelCase; + } + }); + var assert_1 = require_assert(); + Object.defineProperty(exports, "assert", { + enumerable: true, + get: function() { + return assert_1.assert; + } + }); + Object.defineProperty(exports, "assertNever", { + enumerable: true, + get: function() { + return assert_1.assertNever; + } + }); + Object.defineProperty(exports, "assertInt32", { + enumerable: true, + get: function() { + return assert_1.assertInt32; + } + }); + Object.defineProperty(exports, "assertUInt32", { + enumerable: true, + get: function() { + return assert_1.assertUInt32; + } + }); + Object.defineProperty(exports, "assertFloat32", { + enumerable: true, + get: function() { + return assert_1.assertFloat32; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js +var require_reflection_info = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0; + const runtime_1$7 = require_commonjs$1(); + /** + * Turns PartialMethodInfo into MethodInfo. + */ + function normalizeMethodInfo(method, service) { + var _a$2, _b$1, _c$1; + let m$1 = method; + m$1.service = service; + m$1.localName = (_a$2 = m$1.localName) !== null && _a$2 !== void 0 ? _a$2 : runtime_1$7.lowerCamelCase(m$1.name); + m$1.serverStreaming = !!m$1.serverStreaming; + m$1.clientStreaming = !!m$1.clientStreaming; + m$1.options = (_b$1 = m$1.options) !== null && _b$1 !== void 0 ? _b$1 : {}; + m$1.idempotency = (_c$1 = m$1.idempotency) !== null && _c$1 !== void 0 ? _c$1 : void 0; + return m$1; + } + exports.normalizeMethodInfo = normalizeMethodInfo; + /** + * Read custom method options from a generated service client. + * + * @deprecated use readMethodOption() + */ + function readMethodOptions(service, methodName, extensionName, extensionType) { + var _a$2; + const options = (_a$2 = service.methods.find((m$1, i) => m$1.localName === methodName || i === methodName)) === null || _a$2 === void 0 ? void 0 : _a$2.options; + return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; + } + exports.readMethodOptions = readMethodOptions; + function readMethodOption(service, methodName, extensionName, extensionType) { + var _a$2; + const options = (_a$2 = service.methods.find((m$1, i) => m$1.localName === methodName || i === methodName)) === null || _a$2 === void 0 ? void 0 : _a$2.options; + if (!options) return void 0; + const optionVal = options[extensionName]; + if (optionVal === void 0) return optionVal; + return extensionType ? extensionType.fromJson(optionVal) : optionVal; + } + exports.readMethodOption = readMethodOption; + function readServiceOption(service, extensionName, extensionType) { + const options = service.options; + if (!options) return void 0; + const optionVal = options[extensionName]; + if (optionVal === void 0) return optionVal; + return extensionType ? extensionType.fromJson(optionVal) : optionVal; + } + exports.readServiceOption = readServiceOption; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js +var require_service_type = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ServiceType = void 0; + const reflection_info_1$1 = require_reflection_info(); + var ServiceType = class { + constructor(typeName, methods, options) { + this.typeName = typeName; + this.methods = methods.map((i) => reflection_info_1$1.normalizeMethodInfo(i, this)); + this.options = options !== null && options !== void 0 ? options : {}; + } + }; + exports.ServiceType = ServiceType; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js +var require_rpc_error = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.RpcError = void 0; + /** + * An error that occurred while calling a RPC method. + */ + var RpcError = class extends Error { + constructor(message, code = "UNKNOWN", meta) { + super(message); + this.name = "RpcError"; + Object.setPrototypeOf(this, new.target.prototype); + this.code = code; + this.meta = meta !== null && meta !== void 0 ? meta : {}; + } + toString() { + const l = [this.name + ": " + this.message]; + if (this.code) { + l.push(""); + l.push("Code: " + this.code); + } + if (this.serviceName && this.methodName) l.push("Method: " + this.serviceName + "/" + this.methodName); + let m$1 = Object.entries(this.meta); + if (m$1.length) { + l.push(""); + l.push("Meta:"); + for (let [k, v] of m$1) l.push(` ${k}: ${v}`); + } + return l.join("\n"); + } + }; + exports.RpcError = RpcError; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js +var require_rpc_options = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.mergeRpcOptions = void 0; + const runtime_1$6 = require_commonjs$1(); + /** + * Merges custom RPC options with defaults. Returns a new instance and keeps + * the "defaults" and the "options" unmodified. + * + * Merges `RpcMetadata` "meta", overwriting values from "defaults" with + * values from "options". Does not append values to existing entries. + * + * Merges "jsonOptions", including "jsonOptions.typeRegistry", by creating + * a new array that contains types from "options.jsonOptions.typeRegistry" + * first, then types from "defaults.jsonOptions.typeRegistry". + * + * Merges "binaryOptions". + * + * Merges "interceptors" by creating a new array that contains interceptors + * from "defaults" first, then interceptors from "options". + * + * Works with objects that extend `RpcOptions`, but only if the added + * properties are of type Date, primitive like string, boolean, or Array + * of primitives. If you have other property types, you have to merge them + * yourself. + */ + function mergeRpcOptions(defaults, options) { + if (!options) return defaults; + let o = {}; + copy(defaults, o); + copy(options, o); + for (let key of Object.keys(options)) { + let val = options[key]; + switch (key) { + case "jsonOptions": + o.jsonOptions = runtime_1$6.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); + break; + case "binaryOptions": + o.binaryOptions = runtime_1$6.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions); + break; + case "meta": + o.meta = {}; + copy(defaults.meta, o.meta); + copy(options.meta, o.meta); + break; + case "interceptors": + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); + break; + } + } + return o; + } + exports.mergeRpcOptions = mergeRpcOptions; + function copy(a, into) { + if (!a) return; + let c = into; + for (let [k, v] of Object.entries(a)) if (v instanceof Date) c[k] = new Date(v.getTime()); + else if (Array.isArray(v)) c[k] = v.concat(); + else c[k] = v; + } +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js +var require_deferred = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Deferred = exports.DeferredState = void 0; + var DeferredState; + (function(DeferredState$1) { + DeferredState$1[DeferredState$1["PENDING"] = 0] = "PENDING"; + DeferredState$1[DeferredState$1["REJECTED"] = 1] = "REJECTED"; + DeferredState$1[DeferredState$1["RESOLVED"] = 2] = "RESOLVED"; + })(DeferredState = exports.DeferredState || (exports.DeferredState = {})); + /** + * A deferred promise. This is a "controller" for a promise, which lets you + * pass a promise around and reject or resolve it from the outside. + * + * Warning: This class is to be used with care. Using it can make code very + * difficult to read. It is intended for use in library code that exposes + * promises, not for regular business logic. + */ + var Deferred = class { + /** + * @param preventUnhandledRejectionWarning - prevents the warning + * "Unhandled Promise rejection" by adding a noop rejection handler. + * Working with calls returned from the runtime-rpc package in an + * async function usually means awaiting one call property after + * the other. This means that the "status" is not being awaited when + * an earlier await for the "headers" is rejected. This causes the + * "unhandled promise reject" warning. A more correct behaviour for + * calls might be to become aware whether at least one of the + * promises is handled and swallow the rejection warning for the + * others. + */ + constructor(preventUnhandledRejectionWarning = true) { + this._state = DeferredState.PENDING; + this._promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + }); + if (preventUnhandledRejectionWarning) this._promise.catch((_) => {}); + } + /** + * Get the current state of the promise. + */ + get state() { + return this._state; + } + /** + * Get the deferred promise. + */ + get promise() { + return this._promise; + } + /** + * Resolve the promise. Throws if the promise is already resolved or rejected. + */ + resolve(value) { + if (this.state !== DeferredState.PENDING) throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`); + this._resolve(value); + this._state = DeferredState.RESOLVED; + } + /** + * Reject the promise. Throws if the promise is already resolved or rejected. + */ + reject(reason) { + if (this.state !== DeferredState.PENDING) throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`); + this._reject(reason); + this._state = DeferredState.REJECTED; + } + /** + * Resolve the promise. Ignore if not pending. + */ + resolvePending(val) { + if (this._state === DeferredState.PENDING) this.resolve(val); + } + /** + * Reject the promise. Ignore if not pending. + */ + rejectPending(reason) { + if (this._state === DeferredState.PENDING) this.reject(reason); + } + }; + exports.Deferred = Deferred; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js +var require_rpc_output_stream = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.RpcOutputStreamController = void 0; + const deferred_1$1 = require_deferred(); + const runtime_1$5 = require_commonjs$1(); + /** + * A `RpcOutputStream` that you control. + */ + var RpcOutputStreamController = class { + constructor() { + this._lis = { + nxt: [], + msg: [], + err: [], + cmp: [] + }; + this._closed = false; + this._itState = { q: [] }; + } + onNext(callback) { + return this.addLis(callback, this._lis.nxt); + } + onMessage(callback) { + return this.addLis(callback, this._lis.msg); + } + onError(callback) { + return this.addLis(callback, this._lis.err); + } + onComplete(callback) { + return this.addLis(callback, this._lis.cmp); + } + addLis(callback, list) { + list.push(callback); + return () => { + let i = list.indexOf(callback); + if (i >= 0) list.splice(i, 1); + }; + } + clearLis() { + for (let l of Object.values(this._lis)) l.splice(0, l.length); + } + /** + * Is this stream already closed by a completion or error? + */ + get closed() { + return this._closed !== false; + } + /** + * Emit message, close with error, or close successfully, but only one + * at a time. + * Can be used to wrap a stream by using the other stream's `onNext`. + */ + notifyNext(message, error, complete) { + runtime_1$5.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, "only one emission at a time"); + if (message) this.notifyMessage(message); + if (error) this.notifyError(error); + if (complete) this.notifyComplete(); + } + /** + * Emits a new message. Throws if stream is closed. + * + * Triggers onNext and onMessage callbacks. + */ + notifyMessage(message) { + runtime_1$5.assert(!this.closed, "stream is closed"); + this.pushIt({ + value: message, + done: false + }); + this._lis.msg.forEach((l) => l(message)); + this._lis.nxt.forEach((l) => l(message, void 0, false)); + } + /** + * Closes the stream with an error. Throws if stream is closed. + * + * Triggers onNext and onError callbacks. + */ + notifyError(error) { + runtime_1$5.assert(!this.closed, "stream is closed"); + this._closed = error; + this.pushIt(error); + this._lis.err.forEach((l) => l(error)); + this._lis.nxt.forEach((l) => l(void 0, error, false)); + this.clearLis(); + } + /** + * Closes the stream successfully. Throws if stream is closed. + * + * Triggers onNext and onComplete callbacks. + */ + notifyComplete() { + runtime_1$5.assert(!this.closed, "stream is closed"); + this._closed = true; + this.pushIt({ + value: null, + done: true + }); + this._lis.cmp.forEach((l) => l()); + this._lis.nxt.forEach((l) => l(void 0, void 0, true)); + this.clearLis(); + } + /** + * Creates an async iterator (that can be used with `for await {...}`) + * to consume the stream. + * + * Some things to note: + * - If an error occurs, the `for await` will throw it. + * - If an error occurred before the `for await` was started, `for await` + * will re-throw it. + * - If the stream is already complete, the `for await` will be empty. + * - If your `for await` consumes slower than the stream produces, + * for example because you are relaying messages in a slow operation, + * messages are queued. + */ + [Symbol.asyncIterator]() { + if (this._closed === true) this.pushIt({ + value: null, + done: true + }); + else if (this._closed !== false) this.pushIt(this._closed); + return { next: () => { + let state$1 = this._itState; + runtime_1$5.assert(state$1, "bad state"); + runtime_1$5.assert(!state$1.p, "iterator contract broken"); + let first = state$1.q.shift(); + if (first) return "value" in first ? Promise.resolve(first) : Promise.reject(first); + state$1.p = new deferred_1$1.Deferred(); + return state$1.p.promise; + } }; + } + pushIt(result) { + let state$1 = this._itState; + if (state$1.p) { + const p = state$1.p; + runtime_1$5.assert(p.state == deferred_1$1.DeferredState.PENDING, "iterator contract broken"); + "value" in result ? p.resolve(result) : p.reject(result); + delete state$1.p; + } else state$1.q.push(result); + } + }; + exports.RpcOutputStreamController = RpcOutputStreamController; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js +var require_unary_call = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports) { + var __awaiter$7 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.UnaryCall = void 0; + /** + * A unary RPC call. Unary means there is exactly one input message and + * exactly one output message unless an error occurred. + */ + var UnaryCall = class { + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.request = request; + this.headers = headers; + this.response = response; + this.status = status; + this.trailers = trailers; + } + /** + * If you are only interested in the final outcome of this call, + * you can await it to receive a `FinishedUnaryCall`. + */ + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); + } + promiseFinished() { + return __awaiter$7(this, void 0, void 0, function* () { + let [headers, response, status, trailers] = yield Promise.all([ + this.headers, + this.response, + this.status, + this.trailers + ]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + request: this.request, + headers, + response, + status, + trailers + }; + }); + } + }; + exports.UnaryCall = UnaryCall; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js +var require_server_streaming_call = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports) { + var __awaiter$6 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ServerStreamingCall = void 0; + /** + * A server streaming RPC call. The client provides exactly one input message + * but the server may respond with 0, 1, or more messages. + */ + var ServerStreamingCall = class { + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.request = request; + this.headers = headers; + this.responses = response; + this.status = status; + this.trailers = trailers; + } + /** + * Instead of awaiting the response status and trailers, you can + * just as well await this call itself to receive the server outcome. + * You should first setup some listeners to the `request` to + * see the actual messages the server replied with. + */ + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); + } + promiseFinished() { + return __awaiter$6(this, void 0, void 0, function* () { + let [headers, status, trailers] = yield Promise.all([ + this.headers, + this.status, + this.trailers + ]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + request: this.request, + headers, + status, + trailers + }; + }); + } + }; + exports.ServerStreamingCall = ServerStreamingCall; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js +var require_client_streaming_call = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports) { + var __awaiter$5 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ClientStreamingCall = void 0; + /** + * A client streaming RPC call. This means that the clients sends 0, 1, or + * more messages to the server, and the server replies with exactly one + * message. + */ + var ClientStreamingCall = class { + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.requests = request; + this.headers = headers; + this.response = response; + this.status = status; + this.trailers = trailers; + } + /** + * Instead of awaiting the response status and trailers, you can + * just as well await this call itself to receive the server outcome. + * Note that it may still be valid to send more request messages. + */ + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); + } + promiseFinished() { + return __awaiter$5(this, void 0, void 0, function* () { + let [headers, response, status, trailers] = yield Promise.all([ + this.headers, + this.response, + this.status, + this.trailers + ]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + headers, + response, + status, + trailers + }; + }); + } + }; + exports.ClientStreamingCall = ClientStreamingCall; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js +var require_duplex_streaming_call = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports) { + var __awaiter$4 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DuplexStreamingCall = void 0; + /** + * A duplex streaming RPC call. This means that the clients sends an + * arbitrary amount of messages to the server, while at the same time, + * the server sends an arbitrary amount of messages to the client. + */ + var DuplexStreamingCall = class { + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.requests = request; + this.headers = headers; + this.responses = response; + this.status = status; + this.trailers = trailers; + } + /** + * Instead of awaiting the response status and trailers, you can + * just as well await this call itself to receive the server outcome. + * Note that it may still be valid to send more request messages. + */ + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); + } + promiseFinished() { + return __awaiter$4(this, void 0, void 0, function* () { + let [headers, status, trailers] = yield Promise.all([ + this.headers, + this.status, + this.trailers + ]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + headers, + status, + trailers + }; + }); + } + }; + exports.DuplexStreamingCall = DuplexStreamingCall; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js +var require_test_transport = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports) { + var __awaiter$3 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TestTransport = void 0; + const rpc_error_1$1 = require_rpc_error(); + const runtime_1$4 = require_commonjs$1(); + const rpc_output_stream_1$1 = require_rpc_output_stream(); + const rpc_options_1$1 = require_rpc_options(); + const unary_call_1$1 = require_unary_call(); + const server_streaming_call_1$1 = require_server_streaming_call(); + const client_streaming_call_1$1 = require_client_streaming_call(); + const duplex_streaming_call_1$1 = require_duplex_streaming_call(); + /** + * Transport for testing. + */ + var TestTransport = class TestTransport { + /** + * Initialize with mock data. Omitted fields have default value. + */ + constructor(data) { + /** + * Suppress warning / error about uncaught rejections of + * "status" and "trailers". + */ + this.suppressUncaughtRejections = true; + this.headerDelay = 10; + this.responseDelay = 50; + this.betweenResponseDelay = 10; + this.afterResponseDelay = 10; + this.data = data !== null && data !== void 0 ? data : {}; + } + /** + * Sent message(s) during the last operation. + */ + get sentMessages() { + if (this.lastInput instanceof TestInputStream) return this.lastInput.sent; + else if (typeof this.lastInput == "object") return [this.lastInput.single]; + return []; + } + /** + * Sending message(s) completed? + */ + get sendComplete() { + if (this.lastInput instanceof TestInputStream) return this.lastInput.completed; + else if (typeof this.lastInput == "object") return true; + return false; + } + promiseHeaders() { + var _a$2; + const headers = (_a$2 = this.data.headers) !== null && _a$2 !== void 0 ? _a$2 : TestTransport.defaultHeaders; + return headers instanceof rpc_error_1$1.RpcError ? Promise.reject(headers) : Promise.resolve(headers); + } + promiseSingleResponse(method) { + if (this.data.response instanceof rpc_error_1$1.RpcError) return Promise.reject(this.data.response); + let r; + if (Array.isArray(this.data.response)) { + runtime_1$4.assert(this.data.response.length > 0); + r = this.data.response[0]; + } else if (this.data.response !== void 0) r = this.data.response; + else r = method.O.create(); + runtime_1$4.assert(method.O.is(r)); + return Promise.resolve(r); + } + /** + * Pushes response messages from the mock data to the output stream. + * If an error response, status or trailers are mocked, the stream is + * closed with the respective error. + * Otherwise, stream is completed successfully. + * + * The returned promise resolves when the stream is closed. It should + * not reject. If it does, code is broken. + */ + streamResponses(method, stream$2, abort) { + return __awaiter$3(this, void 0, void 0, function* () { + const messages = []; + if (this.data.response === void 0) messages.push(method.O.create()); + else if (Array.isArray(this.data.response)) for (let msg of this.data.response) { + runtime_1$4.assert(method.O.is(msg)); + messages.push(msg); + } + else if (!(this.data.response instanceof rpc_error_1$1.RpcError)) { + runtime_1$4.assert(method.O.is(this.data.response)); + messages.push(this.data.response); + } + try { + yield delay(this.responseDelay, abort)(void 0); + } catch (error) { + stream$2.notifyError(error); + return; + } + if (this.data.response instanceof rpc_error_1$1.RpcError) { + stream$2.notifyError(this.data.response); + return; + } + for (let msg of messages) { + stream$2.notifyMessage(msg); + try { + yield delay(this.betweenResponseDelay, abort)(void 0); + } catch (error) { + stream$2.notifyError(error); + return; + } + } + if (this.data.status instanceof rpc_error_1$1.RpcError) { + stream$2.notifyError(this.data.status); + return; + } + if (this.data.trailers instanceof rpc_error_1$1.RpcError) { + stream$2.notifyError(this.data.trailers); + return; + } + stream$2.notifyComplete(); + }); + } + promiseStatus() { + var _a$2; + const status = (_a$2 = this.data.status) !== null && _a$2 !== void 0 ? _a$2 : TestTransport.defaultStatus; + return status instanceof rpc_error_1$1.RpcError ? Promise.reject(status) : Promise.resolve(status); + } + promiseTrailers() { + var _a$2; + const trailers = (_a$2 = this.data.trailers) !== null && _a$2 !== void 0 ? _a$2 : TestTransport.defaultTrailers; + return trailers instanceof rpc_error_1$1.RpcError ? Promise.reject(trailers) : Promise.resolve(trailers); + } + maybeSuppressUncaught(...promise) { + if (this.suppressUncaughtRejections) for (let p of promise) p.catch(() => {}); + } + mergeOptions(options) { + return rpc_options_1$1.mergeRpcOptions({}, options); + } + unary(method, input, options) { + var _a$2; + const requestHeaders = (_a$2 = options.meta) !== null && _a$2 !== void 0 ? _a$2 : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_) => {}).then(delay(this.responseDelay, options.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = { single: input }; + return new unary_call_1$1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise); + } + serverStreaming(method, input, options) { + var _a$2; + const requestHeaders = (_a$2 = options.meta) !== null && _a$2 !== void 0 ? _a$2 : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1$1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => {}).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = { single: input }; + return new server_streaming_call_1$1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise); + } + clientStreaming(method, options) { + var _a$2; + const requestHeaders = (_a$2 = options.meta) !== null && _a$2 !== void 0 ? _a$2 : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_) => {}).then(delay(this.responseDelay, options.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => {}).then(delay(this.afterResponseDelay, options.abort)).then((_) => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = new TestInputStream(this.data, options.abort); + return new client_streaming_call_1$1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise); + } + duplex(method, options) { + var _a$2; + const requestHeaders = (_a$2 = options.meta) !== null && _a$2 !== void 0 ? _a$2 : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1$1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => {}).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = new TestInputStream(this.data, options.abort); + return new duplex_streaming_call_1$1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise); + } + }; + exports.TestTransport = TestTransport; + TestTransport.defaultHeaders = { responseHeader: "test" }; + TestTransport.defaultStatus = { + code: "OK", + detail: "all good" + }; + TestTransport.defaultTrailers = { responseTrailer: "test" }; + function delay(ms, abort) { + return (v) => new Promise((resolve, reject) => { + if (abort === null || abort === void 0 ? void 0 : abort.aborted) reject(new rpc_error_1$1.RpcError("user cancel", "CANCELLED")); + else { + const id = setTimeout(() => resolve(v), ms); + if (abort) abort.addEventListener("abort", (ev) => { + clearTimeout(id); + reject(new rpc_error_1$1.RpcError("user cancel", "CANCELLED")); + }); + } + }); + } + var TestInputStream = class { + constructor(data, abort) { + this._completed = false; + this._sent = []; + this.data = data; + this.abort = abort; + } + get sent() { + return this._sent; + } + get completed() { + return this._completed; + } + send(message) { + if (this.data.inputMessage instanceof rpc_error_1$1.RpcError) return Promise.reject(this.data.inputMessage); + const delayMs = this.data.inputMessage === void 0 ? 10 : this.data.inputMessage; + return Promise.resolve(void 0).then(() => { + this._sent.push(message); + }).then(delay(delayMs, this.abort)); + } + complete() { + if (this.data.inputComplete instanceof rpc_error_1$1.RpcError) return Promise.reject(this.data.inputComplete); + const delayMs = this.data.inputComplete === void 0 ? 10 : this.data.inputComplete; + return Promise.resolve(void 0).then(() => { + this._completed = true; + }).then(delay(delayMs, this.abort)); + } + }; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js +var require_rpc_interceptor = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0; + const runtime_1$3 = require_commonjs$1(); + /** + * Creates a "stack" of of all interceptors specified in the given `RpcOptions`. + * Used by generated client implementations. + * @internal + */ + function stackIntercept(kind, transport, method, options, input) { + var _a$2, _b$1, _c$1, _d$1; + if (kind == "unary") { + let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt); + for (const curr of ((_a$2 = options.interceptors) !== null && _a$2 !== void 0 ? _a$2 : []).filter((i) => i.interceptUnary).reverse()) { + const next = tail; + tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt); + } + return tail(method, input, options); + } + if (kind == "serverStreaming") { + let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt); + for (const curr of ((_b$1 = options.interceptors) !== null && _b$1 !== void 0 ? _b$1 : []).filter((i) => i.interceptServerStreaming).reverse()) { + const next = tail; + tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt); + } + return tail(method, input, options); + } + if (kind == "clientStreaming") { + let tail = (mtd, opt) => transport.clientStreaming(mtd, opt); + for (const curr of ((_c$1 = options.interceptors) !== null && _c$1 !== void 0 ? _c$1 : []).filter((i) => i.interceptClientStreaming).reverse()) { + const next = tail; + tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt); + } + return tail(method, options); + } + if (kind == "duplex") { + let tail = (mtd, opt) => transport.duplex(mtd, opt); + for (const curr of ((_d$1 = options.interceptors) !== null && _d$1 !== void 0 ? _d$1 : []).filter((i) => i.interceptDuplex).reverse()) { + const next = tail; + tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt); + } + return tail(method, options); + } + runtime_1$3.assertNever(kind); + } + exports.stackIntercept = stackIntercept; + /** + * @deprecated replaced by `stackIntercept()`, still here to support older generated code + */ + function stackUnaryInterceptors(transport, method, input, options) { + return stackIntercept("unary", transport, method, options, input); + } + exports.stackUnaryInterceptors = stackUnaryInterceptors; + /** + * @deprecated replaced by `stackIntercept()`, still here to support older generated code + */ + function stackServerStreamingInterceptors(transport, method, input, options) { + return stackIntercept("serverStreaming", transport, method, options, input); + } + exports.stackServerStreamingInterceptors = stackServerStreamingInterceptors; + /** + * @deprecated replaced by `stackIntercept()`, still here to support older generated code + */ + function stackClientStreamingInterceptors(transport, method, options) { + return stackIntercept("clientStreaming", transport, method, options); + } + exports.stackClientStreamingInterceptors = stackClientStreamingInterceptors; + /** + * @deprecated replaced by `stackIntercept()`, still here to support older generated code + */ + function stackDuplexStreamingInterceptors(transport, method, options) { + return stackIntercept("duplex", transport, method, options); + } + exports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js +var require_server_call_context = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ServerCallContextController = void 0; + var ServerCallContextController = class { + constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { + code: "OK", + detail: "" + }) { + this._cancelled = false; + this._listeners = []; + this.method = method; + this.headers = headers; + this.deadline = deadline; + this.trailers = {}; + this._sendRH = sendResponseHeadersFn; + this.status = defaultStatus; + } + /** + * Set the call cancelled. + * + * Invokes all callbacks registered with onCancel() and + * sets `cancelled = true`. + */ + notifyCancelled() { + if (!this._cancelled) { + this._cancelled = true; + for (let l of this._listeners) l(); + } + } + /** + * Send response headers. + */ + sendResponseHeaders(data) { + this._sendRH(data); + } + /** + * Is the call cancelled? + * + * When the client closes the connection before the server + * is done, the call is cancelled. + * + * If you want to cancel a request on the server, throw a + * RpcError with the CANCELLED status code. + */ + get cancelled() { + return this._cancelled; + } + /** + * Add a callback for cancellation. + */ + onCancel(callback) { + const l = this._listeners; + l.push(callback); + return () => { + let i = l.indexOf(callback); + if (i >= 0) l.splice(i, 1); + }; + } + }; + exports.ServerCallContextController = ServerCallContextController; +} }); + +//#endregion +//#region node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js +var require_commonjs = __commonJS({ "node_modules/.deno/@protobuf-ts+runtime-rpc@2.10.0/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports) { + // webpack verbose output hints that this should be useful + Object.defineProperty(exports, "__esModule", { value: true }); + var service_type_1 = require_service_type(); + Object.defineProperty(exports, "ServiceType", { + enumerable: true, + get: function() { + return service_type_1.ServiceType; + } + }); + var reflection_info_1 = require_reflection_info(); + Object.defineProperty(exports, "readMethodOptions", { + enumerable: true, + get: function() { + return reflection_info_1.readMethodOptions; + } + }); + Object.defineProperty(exports, "readMethodOption", { + enumerable: true, + get: function() { + return reflection_info_1.readMethodOption; + } + }); + Object.defineProperty(exports, "readServiceOption", { + enumerable: true, + get: function() { + return reflection_info_1.readServiceOption; + } + }); + var rpc_error_1 = require_rpc_error(); + Object.defineProperty(exports, "RpcError", { + enumerable: true, + get: function() { + return rpc_error_1.RpcError; + } + }); + var rpc_options_1 = require_rpc_options(); + Object.defineProperty(exports, "mergeRpcOptions", { + enumerable: true, + get: function() { + return rpc_options_1.mergeRpcOptions; + } + }); + var rpc_output_stream_1 = require_rpc_output_stream(); + Object.defineProperty(exports, "RpcOutputStreamController", { + enumerable: true, + get: function() { + return rpc_output_stream_1.RpcOutputStreamController; + } + }); + var test_transport_1 = require_test_transport(); + Object.defineProperty(exports, "TestTransport", { + enumerable: true, + get: function() { + return test_transport_1.TestTransport; + } + }); + var deferred_1 = require_deferred(); + Object.defineProperty(exports, "Deferred", { + enumerable: true, + get: function() { + return deferred_1.Deferred; + } + }); + Object.defineProperty(exports, "DeferredState", { + enumerable: true, + get: function() { + return deferred_1.DeferredState; + } + }); + var duplex_streaming_call_1 = require_duplex_streaming_call(); + Object.defineProperty(exports, "DuplexStreamingCall", { + enumerable: true, + get: function() { + return duplex_streaming_call_1.DuplexStreamingCall; + } + }); + var client_streaming_call_1 = require_client_streaming_call(); + Object.defineProperty(exports, "ClientStreamingCall", { + enumerable: true, + get: function() { + return client_streaming_call_1.ClientStreamingCall; + } + }); + var server_streaming_call_1 = require_server_streaming_call(); + Object.defineProperty(exports, "ServerStreamingCall", { + enumerable: true, + get: function() { + return server_streaming_call_1.ServerStreamingCall; + } + }); + var unary_call_1 = require_unary_call(); + Object.defineProperty(exports, "UnaryCall", { + enumerable: true, + get: function() { + return unary_call_1.UnaryCall; + } + }); + var rpc_interceptor_1 = require_rpc_interceptor(); + Object.defineProperty(exports, "stackIntercept", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackIntercept; + } + }); + Object.defineProperty(exports, "stackDuplexStreamingInterceptors", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackDuplexStreamingInterceptors; + } + }); + Object.defineProperty(exports, "stackClientStreamingInterceptors", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackClientStreamingInterceptors; + } + }); + Object.defineProperty(exports, "stackServerStreamingInterceptors", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackServerStreamingInterceptors; + } + }); + Object.defineProperty(exports, "stackUnaryInterceptors", { + enumerable: true, + get: function() { + return rpc_interceptor_1.stackUnaryInterceptors; + } + }); + var server_call_context_1 = require_server_call_context(); + Object.defineProperty(exports, "ServerCallContextController", { + enumerable: true, + get: function() { + return server_call_context_1.ServerCallContextController; + } + }); +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js +var require_cachescope = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CacheScope = void 0; + const runtime_1$2 = require_commonjs$1(); + const runtime_2$2 = require_commonjs$1(); + const runtime_3$2 = require_commonjs$1(); + const runtime_4$2 = require_commonjs$1(); + const runtime_5$2 = require_commonjs$1(); + var CacheScope$Type = class extends runtime_5$2.MessageType { + constructor() { + super("github.actions.results.entities.v1.CacheScope", [{ + no: 1, + name: "scope", + kind: "scalar", + T: 9 + }, { + no: 2, + name: "permission", + kind: "scalar", + T: 3 + }]); + } + create(value) { + const message = { + scope: "", + permission: "0" + }; + globalThis.Object.defineProperty(message, runtime_4$2.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3$2.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.scope = reader.string(); + break; + case 2: + message.permission = reader.int64().toString(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d$1 = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2$2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.scope !== "") writer.tag(1, runtime_1$2.WireType.LengthDelimited).string(message.scope); + if (message.permission !== "0") writer.tag(2, runtime_1$2.WireType.Varint).int64(message.permission); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2$2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + /** + * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheScope + */ + exports.CacheScope = new CacheScope$Type(); +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js +var require_cachemetadata = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CacheMetadata = void 0; + const runtime_1$1 = require_commonjs$1(); + const runtime_2$1 = require_commonjs$1(); + const runtime_3$1 = require_commonjs$1(); + const runtime_4$1 = require_commonjs$1(); + const runtime_5$1 = require_commonjs$1(); + const cachescope_1 = require_cachescope(); + var CacheMetadata$Type = class extends runtime_5$1.MessageType { + constructor() { + super("github.actions.results.entities.v1.CacheMetadata", [{ + no: 1, + name: "repository_id", + kind: "scalar", + T: 3 + }, { + no: 2, + name: "scope", + kind: "message", + repeat: 1, + T: () => cachescope_1.CacheScope + }]); + } + create(value) { + const message = { + repositoryId: "0", + scope: [] + }; + globalThis.Object.defineProperty(message, runtime_4$1.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3$1.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.repositoryId = reader.int64().toString(); + break; + case 2: + message.scope.push(cachescope_1.CacheScope.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d$1 = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2$1.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.repositoryId !== "0") writer.tag(1, runtime_1$1.WireType.Varint).int64(message.repositoryId); + for (let i = 0; i < message.scope.length; i++) cachescope_1.CacheScope.internalBinaryWrite(message.scope[i], writer.tag(2, runtime_1$1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2$1.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + /** + * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheMetadata + */ + exports.CacheMetadata = new CacheMetadata$Type(); +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js +var require_cache$1 = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CacheService = exports.GetCacheEntryDownloadURLResponse = exports.GetCacheEntryDownloadURLRequest = exports.FinalizeCacheEntryUploadResponse = exports.FinalizeCacheEntryUploadRequest = exports.CreateCacheEntryResponse = exports.CreateCacheEntryRequest = void 0; + const runtime_rpc_1 = require_commonjs(); + const runtime_1 = require_commonjs$1(); + const runtime_2 = require_commonjs$1(); + const runtime_3 = require_commonjs$1(); + const runtime_4 = require_commonjs$1(); + const runtime_5 = require_commonjs$1(); + const cachemetadata_1 = require_cachemetadata(); + var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.CreateCacheEntryRequest", [ + { + no: 1, + name: "metadata", + kind: "message", + T: () => cachemetadata_1.CacheMetadata + }, + { + no: 2, + name: "key", + kind: "scalar", + T: 9 + }, + { + no: 3, + name: "version", + kind: "scalar", + T: 9 + } + ]); + } + create(value) { + const message = { + key: "", + version: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case 2: + message.key = reader.string(); + break; + case 3: + message.version = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d$1 = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.metadata) cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + if (message.version !== "") writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.version); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + /** + * @generated MessageType for protobuf message github.actions.results.api.v1.CreateCacheEntryRequest + */ + exports.CreateCacheEntryRequest = new CreateCacheEntryRequest$Type(); + var CreateCacheEntryResponse$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.CreateCacheEntryResponse", [{ + no: 1, + name: "ok", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "signed_upload_url", + kind: "scalar", + T: 9 + }]); + } + create(value) { + const message = { + ok: false, + signedUploadUrl: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.ok = reader.bool(); + break; + case 2: + message.signedUploadUrl = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d$1 = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.signedUploadUrl !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + /** + * @generated MessageType for protobuf message github.actions.results.api.v1.CreateCacheEntryResponse + */ + exports.CreateCacheEntryResponse = new CreateCacheEntryResponse$Type(); + var FinalizeCacheEntryUploadRequest$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.FinalizeCacheEntryUploadRequest", [ + { + no: 1, + name: "metadata", + kind: "message", + T: () => cachemetadata_1.CacheMetadata + }, + { + no: 2, + name: "key", + kind: "scalar", + T: 9 + }, + { + no: 3, + name: "size_bytes", + kind: "scalar", + T: 3 + }, + { + no: 4, + name: "version", + kind: "scalar", + T: 9 + } + ]); + } + create(value) { + const message = { + key: "", + sizeBytes: "0", + version: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case 2: + message.key = reader.string(); + break; + case 3: + message.sizeBytes = reader.int64().toString(); + break; + case 4: + message.version = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d$1 = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.metadata) cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + if (message.sizeBytes !== "0") writer.tag(3, runtime_1.WireType.Varint).int64(message.sizeBytes); + if (message.version !== "") writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + /** + * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadRequest + */ + exports.FinalizeCacheEntryUploadRequest = new FinalizeCacheEntryUploadRequest$Type(); + var FinalizeCacheEntryUploadResponse$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [{ + no: 1, + name: "ok", + kind: "scalar", + T: 8 + }, { + no: 2, + name: "entry_id", + kind: "scalar", + T: 3 + }]); + } + create(value) { + const message = { + ok: false, + entryId: "0" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.ok = reader.bool(); + break; + case 2: + message.entryId = reader.int64().toString(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d$1 = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.entryId !== "0") writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + /** + * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadResponse + */ + exports.FinalizeCacheEntryUploadResponse = new FinalizeCacheEntryUploadResponse$Type(); + var GetCacheEntryDownloadURLRequest$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.GetCacheEntryDownloadURLRequest", [ + { + no: 1, + name: "metadata", + kind: "message", + T: () => cachemetadata_1.CacheMetadata + }, + { + no: 2, + name: "key", + kind: "scalar", + T: 9 + }, + { + no: 3, + name: "restore_keys", + kind: "scalar", + repeat: 2, + T: 9 + }, + { + no: 4, + name: "version", + kind: "scalar", + T: 9 + } + ]); + } + create(value) { + const message = { + key: "", + restoreKeys: [], + version: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case 2: + message.key = reader.string(); + break; + case 3: + message.restoreKeys.push(reader.string()); + break; + case 4: + message.version = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d$1 = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.metadata) cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + for (let i = 0; i < message.restoreKeys.length; i++) writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); + if (message.version !== "") writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + /** + * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLRequest + */ + exports.GetCacheEntryDownloadURLRequest = new GetCacheEntryDownloadURLRequest$Type(); + var GetCacheEntryDownloadURLResponse$Type = class extends runtime_5.MessageType { + constructor() { + super("github.actions.results.api.v1.GetCacheEntryDownloadURLResponse", [ + { + no: 1, + name: "ok", + kind: "scalar", + T: 8 + }, + { + no: 2, + name: "signed_download_url", + kind: "scalar", + T: 9 + }, + { + no: 3, + name: "matched_key", + kind: "scalar", + T: 9 + } + ]); + } + create(value) { + const message = { + ok: false, + signedDownloadUrl: "", + matchedKey: "" + }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { + enumerable: false, + value: this + }); + if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + message.ok = reader.bool(); + break; + case 2: + message.signedDownloadUrl = reader.string(); + break; + case 3: + message.matchedKey = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d$1 = reader.skip(wireType); + if (u !== false) (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d$1); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.signedDownloadUrl !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedDownloadUrl); + if (message.matchedKey !== "") writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.matchedKey); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + /** + * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLResponse + */ + exports.GetCacheEntryDownloadURLResponse = new GetCacheEntryDownloadURLResponse$Type(); + /** + * @generated ServiceType for protobuf service github.actions.results.api.v1.CacheService + */ + exports.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.CacheService", [ + { + name: "CreateCacheEntry", + options: {}, + I: exports.CreateCacheEntryRequest, + O: exports.CreateCacheEntryResponse + }, + { + name: "FinalizeCacheEntryUpload", + options: {}, + I: exports.FinalizeCacheEntryUploadRequest, + O: exports.FinalizeCacheEntryUploadResponse + }, + { + name: "GetCacheEntryDownloadURL", + options: {}, + I: exports.GetCacheEntryDownloadURLRequest, + O: exports.GetCacheEntryDownloadURLResponse + } + ]); +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js +var require_cache_twirp_client = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0; + const cache_1 = require_cache$1(); + var CacheServiceClientJSON = class { + constructor(rpc) { + this.rpc = rpc; + this.CreateCacheEntry.bind(this); + this.FinalizeCacheEntryUpload.bind(this); + this.GetCacheEntryDownloadURL.bind(this); + } + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/json", data); + return promise.then((data$1) => cache_1.CreateCacheEntryResponse.fromJson(data$1, { ignoreUnknownFields: true })); + } + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/json", data); + return promise.then((data$1) => cache_1.FinalizeCacheEntryUploadResponse.fromJson(data$1, { ignoreUnknownFields: true })); + } + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/json", data); + return promise.then((data$1) => cache_1.GetCacheEntryDownloadURLResponse.fromJson(data$1, { ignoreUnknownFields: true })); + } + }; + exports.CacheServiceClientJSON = CacheServiceClientJSON; + var CacheServiceClientProtobuf = class { + constructor(rpc) { + this.rpc = rpc; + this.CreateCacheEntry.bind(this); + this.FinalizeCacheEntryUpload.bind(this); + this.GetCacheEntryDownloadURL.bind(this); + } + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/protobuf", data); + return promise.then((data$1) => cache_1.CreateCacheEntryResponse.fromBinary(data$1)); + } + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/protobuf", data); + return promise.then((data$1) => cache_1.FinalizeCacheEntryUploadResponse.fromBinary(data$1)); + } + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data); + return promise.then((data$1) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data$1)); + } + }; + exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/util.js +var require_util = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/util.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.maskSecretUrls = exports.maskSigUrl = void 0; + const core_1$1 = require_core(); + /** + * Masks the `sig` parameter in a URL and sets it as a secret. + * + * @param url - The URL containing the signature parameter to mask + * @remarks + * This function attempts to parse the provided URL and identify the 'sig' query parameter. + * If found, it registers both the raw and URL-encoded signature values as secrets using + * the Actions `setSecret` API, which prevents them from being displayed in logs. + * + * The function handles errors gracefully if URL parsing fails, logging them as debug messages. + * + * @example + * ```typescript + * // Mask a signature in an Azure SAS token URL + * maskSigUrl('https://example.blob.core.windows.net/container/file.txt?sig=abc123&se=2023-01-01'); + * ``` + */ + function maskSigUrl(url$1) { + if (!url$1) return; + try { + const parsedUrl = new URL(url$1); + const signature = parsedUrl.searchParams.get("sig"); + if (signature) { + (0, core_1$1.setSecret)(signature); + (0, core_1$1.setSecret)(encodeURIComponent(signature)); + } + } catch (error) { + (0, core_1$1.debug)(`Failed to parse URL: ${url$1} ${error instanceof Error ? error.message : String(error)}`); + } + } + exports.maskSigUrl = maskSigUrl; + /** + * Masks sensitive information in URLs containing signature parameters. + * Currently supports masking 'sig' parameters in the 'signed_upload_url' + * and 'signed_download_url' properties of the provided object. + * + * @param body - The object should contain a signature + * @remarks + * This function extracts URLs from the object properties and calls maskSigUrl + * on each one to redact sensitive signature information. The function doesn't + * modify the original object; it only marks the signatures as secrets for + * logging purposes. + * + * @example + * ```typescript + * const responseBody = { + * signed_upload_url: 'https://blob.core.windows.net/?sig=abc123', + * signed_download_url: 'https://blob.core/windows.net/?sig=def456' + * }; + * maskSecretUrls(responseBody); + * ``` + */ + function maskSecretUrls(body$1) { + if (typeof body$1 !== "object" || body$1 === null) { + (0, core_1$1.debug)("body is not an object or is null"); + return; + } + if ("signed_upload_url" in body$1 && typeof body$1.signed_upload_url === "string") maskSigUrl(body$1.signed_upload_url); + if ("signed_download_url" in body$1 && typeof body$1.signed_download_url === "string") maskSigUrl(body$1.signed_download_url); + } + exports.maskSecretUrls = maskSecretUrls; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js +var require_cacheTwirpClient = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports) { + var __awaiter$2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.internalCacheTwirpClient = void 0; + const core_1 = require_core(); + const user_agent_1 = require_user_agent(); + const errors_1 = require_errors(); + const config_1$1 = require_config(); + const cacheUtils_1 = require_cacheUtils(); + const auth_1 = require_auth(); + const http_client_1 = require_lib(); + const cache_twirp_client_1 = require_cache_twirp_client(); + const util_1 = require_util(); + /** + * This class is a wrapper around the CacheServiceClientJSON class generated by Twirp. + * + * It adds retry logic to the request method, which is not present in the generated client. + * + * This class is used to interact with cache service v2. + */ + var CacheServiceClient = class { + constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { + this.maxAttempts = 5; + this.baseRetryIntervalMilliseconds = 3e3; + this.retryMultiplier = 1.5; + const token = (0, cacheUtils_1.getRuntimeToken)(); + this.baseUrl = (0, config_1$1.getCacheServiceURL)(); + if (maxAttempts) this.maxAttempts = maxAttempts; + if (baseRetryIntervalMilliseconds) this.baseRetryIntervalMilliseconds = baseRetryIntervalMilliseconds; + if (retryMultiplier) this.retryMultiplier = retryMultiplier; + this.httpClient = new http_client_1.HttpClient(userAgent, [new auth_1.BearerCredentialHandler(token)]); + } + request(service, method, contentType$1, data) { + return __awaiter$2(this, void 0, void 0, function* () { + const url$1 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url$1}`); + const headers = { "Content-Type": contentType$1 }; + try { + const { body: body$1 } = yield this.retryableRequest(() => __awaiter$2(this, void 0, void 0, function* () { + return this.httpClient.post(url$1, JSON.stringify(data), headers); + })); + return body$1; + } catch (error) { + throw new Error(`Failed to ${method}: ${error.message}`); + } + }); + } + retryableRequest(operation) { + return __awaiter$2(this, void 0, void 0, function* () { + let attempt = 0; + let errorMessage = ""; + let rawBody = ""; + while (attempt < this.maxAttempts) { + let isRetryable = false; + try { + const response = yield operation(); + const statusCode = response.message.statusCode; + rawBody = yield response.readBody(); + (0, core_1.debug)(`[Response] - ${response.message.statusCode}`); + (0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`); + const body$1 = JSON.parse(rawBody); + (0, util_1.maskSecretUrls)(body$1); + (0, core_1.debug)(`Body: ${JSON.stringify(body$1, null, 2)}`); + if (this.isSuccessStatusCode(statusCode)) return { + response, + body: body$1 + }; + isRetryable = this.isRetryableHttpStatusCode(statusCode); + errorMessage = `Failed request: (${statusCode}) ${response.message.statusMessage}`; + if (body$1.msg) { + if (errors_1.UsageError.isUsageErrorMessage(body$1.msg)) throw new errors_1.UsageError(); + errorMessage = `${errorMessage}: ${body$1.msg}`; + } + } catch (error) { + if (error instanceof SyntaxError) (0, core_1.debug)(`Raw Body: ${rawBody}`); + if (error instanceof errors_1.UsageError) throw error; + if (errors_1.NetworkError.isNetworkErrorCode(error === null || error === void 0 ? void 0 : error.code)) throw new errors_1.NetworkError(error === null || error === void 0 ? void 0 : error.code); + isRetryable = true; + errorMessage = error.message; + } + if (!isRetryable) throw new Error(`Received non-retryable error: ${errorMessage}`); + if (attempt + 1 === this.maxAttempts) throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${errorMessage}`); + const retryTimeMilliseconds = this.getExponentialRetryTimeMilliseconds(attempt); + (0, core_1.info)(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`); + yield this.sleep(retryTimeMilliseconds); + attempt++; + } + throw new Error(`Request failed`); + }); + } + isSuccessStatusCode(statusCode) { + if (!statusCode) return false; + return statusCode >= 200 && statusCode < 300; + } + isRetryableHttpStatusCode(statusCode) { + if (!statusCode) return false; + const retryableStatusCodes = [ + http_client_1.HttpCodes.BadGateway, + http_client_1.HttpCodes.GatewayTimeout, + http_client_1.HttpCodes.InternalServerError, + http_client_1.HttpCodes.ServiceUnavailable, + http_client_1.HttpCodes.TooManyRequests + ]; + return retryableStatusCodes.includes(statusCode); + } + sleep(milliseconds) { + return __awaiter$2(this, void 0, void 0, function* () { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); + }); + } + getExponentialRetryTimeMilliseconds(attempt) { + if (attempt < 0) throw new Error("attempt should be a positive integer"); + if (attempt === 0) return this.baseRetryIntervalMilliseconds; + const minTime = this.baseRetryIntervalMilliseconds * Math.pow(this.retryMultiplier, attempt); + const maxTime = minTime * this.retryMultiplier; + return Math.trunc(Math.random() * (maxTime - minTime) + minTime); + } + }; + function internalCacheTwirpClient(options) { + const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); + return new cache_twirp_client_1.CacheServiceClientJSON(client); + } + exports.internalCacheTwirpClient = internalCacheTwirpClient; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/tar.js +var require_tar = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/tar.js"(exports) { + var __createBinding$1 = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$1 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$1(result, mod, k); + } + __setModuleDefault$1(result, mod); + return result; + }; + var __awaiter$1 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createTar = exports.extractTar = exports.listTar = void 0; + const exec_1 = require_exec(); + const io = __importStar$1(require_io()); + const fs_1 = __require("fs"); + const path$1 = __importStar$1(__require("path")); + const utils$1 = __importStar$1(require_cacheUtils()); + const constants_1$1 = require_constants$3(); + const IS_WINDOWS = process.platform === "win32"; + function getTarPath() { + return __awaiter$1(this, void 0, void 0, function* () { + switch (process.platform) { + case "win32": { + const gnuTar = yield utils$1.getGnuTarPathOnWindows(); + const systemTar = constants_1$1.SystemTarPathOnWindows; + if (gnuTar) return { + path: gnuTar, + type: constants_1$1.ArchiveToolType.GNU + }; + else if ((0, fs_1.existsSync)(systemTar)) return { + path: systemTar, + type: constants_1$1.ArchiveToolType.BSD + }; + break; + } + case "darwin": { + const gnuTar = yield io.which("gtar", false); + if (gnuTar) return { + path: gnuTar, + type: constants_1$1.ArchiveToolType.GNU + }; + else return { + path: yield io.which("tar", true), + type: constants_1$1.ArchiveToolType.BSD + }; + } + default: break; + } + return { + path: yield io.which("tar", true), + type: constants_1$1.ArchiveToolType.GNU + }; + }); + } + function getTarArgs(tarPath, compressionMethod, type, archivePath = "") { + return __awaiter$1(this, void 0, void 0, function* () { + const args = [`"${tarPath.path}"`]; + const cacheFileName = utils$1.getCacheFileName(compressionMethod); + const tarFile = "cache.tar"; + const workingDirectory = getWorkingDirectory(); + const BSD_TAR_ZSTD = tarPath.type === constants_1$1.ArchiveToolType.BSD && compressionMethod !== constants_1$1.CompressionMethod.Gzip && IS_WINDOWS; + switch (type) { + case "create": + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "--files-from", constants_1$1.ManifestFilename); + break; + case "extract": + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path$1.sep}`, "g"), "/")); + break; + case "list": + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), "-P"); + break; + } + if (tarPath.type === constants_1$1.ArchiveToolType.GNU) switch (process.platform) { + case "win32": + args.push("--force-local"); + break; + case "darwin": + args.push("--delay-directory-restore"); + break; + } + return args; + }); + } + function getCommands(compressionMethod, type, archivePath = "") { + return __awaiter$1(this, void 0, void 0, function* () { + let args; + const tarPath = yield getTarPath(); + const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); + const compressionArgs = type !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); + const BSD_TAR_ZSTD = tarPath.type === constants_1$1.ArchiveToolType.BSD && compressionMethod !== constants_1$1.CompressionMethod.Gzip && IS_WINDOWS; + if (BSD_TAR_ZSTD && type !== "create") args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; + else args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; + if (BSD_TAR_ZSTD) return args; + return [args.join(" ")]; + }); + } + function getWorkingDirectory() { + var _a$2; + return (_a$2 = process.env["GITHUB_WORKSPACE"]) !== null && _a$2 !== void 0 ? _a$2 : process.cwd(); + } + function getDecompressionProgram(tarPath, compressionMethod, archivePath) { + return __awaiter$1(this, void 0, void 0, function* () { + const BSD_TAR_ZSTD = tarPath.type === constants_1$1.ArchiveToolType.BSD && compressionMethod !== constants_1$1.CompressionMethod.Gzip && IS_WINDOWS; + switch (compressionMethod) { + case constants_1$1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ + "zstd -d --long=30 --force -o", + constants_1$1.TarFilename, + archivePath.replace(new RegExp(`\\${path$1.sep}`, "g"), "/") + ] : ["--use-compress-program", IS_WINDOWS ? "\"zstd -d --long=30\"" : "unzstd --long=30"]; + case constants_1$1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ + "zstd -d --force -o", + constants_1$1.TarFilename, + archivePath.replace(new RegExp(`\\${path$1.sep}`, "g"), "/") + ] : ["--use-compress-program", IS_WINDOWS ? "\"zstd -d\"" : "unzstd"]; + default: return ["-z"]; + } + }); + } + function getCompressionProgram(tarPath, compressionMethod) { + return __awaiter$1(this, void 0, void 0, function* () { + const cacheFileName = utils$1.getCacheFileName(compressionMethod); + const BSD_TAR_ZSTD = tarPath.type === constants_1$1.ArchiveToolType.BSD && compressionMethod !== constants_1$1.CompressionMethod.Gzip && IS_WINDOWS; + switch (compressionMethod) { + case constants_1$1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ + "zstd -T0 --long=30 --force -o", + cacheFileName.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), + constants_1$1.TarFilename + ] : ["--use-compress-program", IS_WINDOWS ? "\"zstd -T0 --long=30\"" : "zstdmt --long=30"]; + case constants_1$1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ + "zstd -T0 --force -o", + cacheFileName.replace(new RegExp(`\\${path$1.sep}`, "g"), "/"), + constants_1$1.TarFilename + ] : ["--use-compress-program", IS_WINDOWS ? "\"zstd -T0\"" : "zstdmt"]; + default: return ["-z"]; + } + }); + } + function execCommands(commands, cwd) { + return __awaiter$1(this, void 0, void 0, function* () { + for (const command of commands) try { + yield (0, exec_1.exec)(command, void 0, { + cwd, + env: Object.assign(Object.assign({}, process.env), { MSYS: "winsymlinks:nativestrict" }) + }); + } catch (error) { + throw new Error(`${command.split(" ")[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); + } + }); + } + function listTar(archivePath, compressionMethod) { + return __awaiter$1(this, void 0, void 0, function* () { + const commands = yield getCommands(compressionMethod, "list", archivePath); + yield execCommands(commands); + }); + } + exports.listTar = listTar; + function extractTar(archivePath, compressionMethod) { + return __awaiter$1(this, void 0, void 0, function* () { + const workingDirectory = getWorkingDirectory(); + yield io.mkdirP(workingDirectory); + const commands = yield getCommands(compressionMethod, "extract", archivePath); + yield execCommands(commands); + }); + } + exports.extractTar = extractTar; + function createTar(archiveFolder, sourceDirectories, compressionMethod) { + return __awaiter$1(this, void 0, void 0, function* () { + (0, fs_1.writeFileSync)(path$1.join(archiveFolder, constants_1$1.ManifestFilename), sourceDirectories.join("\n")); + const commands = yield getCommands(compressionMethod, "create"); + yield execCommands(commands, archiveFolder); + }); + } + exports.createTar = createTar; +} }); + +//#endregion +//#region node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/cache.js +var require_cache = __commonJS({ "node_modules/.deno/@actions+cache@4.0.3/node_modules/@actions/cache/lib/cache.js"(exports) { + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m$1, k); + if (!desc || ("get" in desc ? !m$1.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m$1[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m$1, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m$1[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0; + const core = __importStar(require_core()); + const path = __importStar(__require("path")); + const utils = __importStar(require_cacheUtils()); + const cacheHttpClient = __importStar(require_cacheHttpClient()); + const cacheTwirpClient = __importStar(require_cacheTwirpClient()); + const config_1 = require_config(); + const tar_1 = require_tar(); + const constants_1 = require_constants$3(); + var ValidationError = class ValidationError extends Error { + constructor(message) { + super(message); + this.name = "ValidationError"; + Object.setPrototypeOf(this, ValidationError.prototype); + } + }; + exports.ValidationError = ValidationError; + var ReserveCacheError = class ReserveCacheError extends Error { + constructor(message) { + super(message); + this.name = "ReserveCacheError"; + Object.setPrototypeOf(this, ReserveCacheError.prototype); + } + }; + exports.ReserveCacheError = ReserveCacheError; + function checkPaths(paths) { + if (!paths || paths.length === 0) throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); + } + function checkKey(key) { + if (key.length > 512) throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); + const regex = /^[^,]*$/; + if (!regex.test(key)) throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); + } + /** + * isFeatureAvailable to check the presence of Actions cache service + * + * @returns boolean return true if Actions cache service feature is available, otherwise false + */ + function isFeatureAvailable() { + return !!process.env["ACTIONS_CACHE_URL"]; + } + exports.isFeatureAvailable = isFeatureAvailable; + /** + * Restores cache from keys + * + * @param paths a list of file paths to restore from the cache + * @param primaryKey an explicit key for restoring the cache. Lookup is done with prefix matching. + * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for primaryKey + * @param downloadOptions cache download options + * @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform + * @returns string returns the key for the cache hit, otherwise returns undefined + */ + function restoreCache$1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + return __awaiter(this, void 0, void 0, function* () { + const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); + core.debug(`Cache service version: ${cacheServiceVersion}`); + checkPaths(paths); + switch (cacheServiceVersion) { + case "v2": return yield restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive); + case "v1": + default: return yield restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive); + } + }); + } + exports.restoreCache = restoreCache$1; + /** + * Restores cache using the legacy Cache Service + * + * @param paths a list of file paths to restore from the cache + * @param primaryKey an explicit key for restoring the cache. Lookup is done with prefix matching. + * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for primaryKey + * @param options cache download options + * @param enableCrossOsArchive an optional boolean enabled to restore on Windows any cache created on any platform + * @returns string returns the key for the cache hit, otherwise returns undefined + */ + function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + return __awaiter(this, void 0, void 0, function* () { + restoreKeys = restoreKeys || []; + const keys = [primaryKey, ...restoreKeys]; + core.debug("Resolved Keys:"); + core.debug(JSON.stringify(keys)); + if (keys.length > 10) throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); + for (const key of keys) checkKey(key); + const compressionMethod = yield utils.getCompressionMethod(); + let archivePath = ""; + try { + const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { + compressionMethod, + enableCrossOsArchive + }); + if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) return void 0; + if (options === null || options === void 0 ? void 0 : options.lookupOnly) { + core.info("Lookup only - skipping download"); + return cacheEntry.cacheKey; + } + archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + core.debug(`Archive Path: ${archivePath}`); + yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); + if (core.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + yield (0, tar_1.extractTar)(archivePath, compressionMethod); + core.info("Cache restored successfully"); + return cacheEntry.cacheKey; + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) throw error; + else core.warning(`Failed to restore: ${error.message}`); + } finally { + try { + yield utils.unlinkFile(archivePath); + } catch (error) { + core.debug(`Failed to delete archive: ${error}`); + } + } + return void 0; + }); + } + /** + * Restores cache using Cache Service v2 + * + * @param paths a list of file paths to restore from the cache + * @param primaryKey an explicit key for restoring the cache. Lookup is done with prefix matching + * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for primaryKey + * @param downloadOptions cache download options + * @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform + * @returns string returns the key for the cache hit, otherwise returns undefined + */ + function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + return __awaiter(this, void 0, void 0, function* () { + options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); + restoreKeys = restoreKeys || []; + const keys = [primaryKey, ...restoreKeys]; + core.debug("Resolved Keys:"); + core.debug(JSON.stringify(keys)); + if (keys.length > 10) throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); + for (const key of keys) checkKey(key); + let archivePath = ""; + try { + const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); + const compressionMethod = yield utils.getCompressionMethod(); + const request = { + key: primaryKey, + restoreKeys, + version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive) + }; + const response = yield twirpClient.GetCacheEntryDownloadURL(request); + if (!response.ok) { + core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + return void 0; + } + core.info(`Cache hit for: ${request.key}`); + if (options === null || options === void 0 ? void 0 : options.lookupOnly) { + core.info("Lookup only - skipping download"); + return response.matchedKey; + } + archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + core.debug(`Archive path: ${archivePath}`); + core.debug(`Starting download of archive to: ${archivePath}`); + yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); + yield (0, tar_1.extractTar)(archivePath, compressionMethod); + core.info("Cache restored successfully"); + return response.matchedKey; + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) throw error; + else core.warning(`Failed to restore: ${error.message}`); + } finally { + try { + if (archivePath) yield utils.unlinkFile(archivePath); + } catch (error) { + core.debug(`Failed to delete archive: ${error}`); + } + } + return void 0; + }); + } + /** + * Saves a list of files with the specified key + * + * @param paths a list of file paths to be cached + * @param key an explicit key for restoring the cache + * @param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform + * @param options cache upload options + * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails + */ + function saveCache$1(paths, key, options, enableCrossOsArchive = false) { + return __awaiter(this, void 0, void 0, function* () { + const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); + core.debug(`Cache service version: ${cacheServiceVersion}`); + checkPaths(paths); + checkKey(key); + switch (cacheServiceVersion) { + case "v2": return yield saveCacheV2(paths, key, options, enableCrossOsArchive); + case "v1": + default: return yield saveCacheV1(paths, key, options, enableCrossOsArchive); + } + }); + } + exports.saveCache = saveCache$1; + /** + * Save cache using the legacy Cache Service + * + * @param paths + * @param key + * @param options + * @param enableCrossOsArchive + * @returns + */ + function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { + var _a$2, _b$1, _c$1, _d$1, _e; + return __awaiter(this, void 0, void 0, function* () { + const compressionMethod = yield utils.getCompressionMethod(); + let cacheId = -1; + const cachePaths = yield utils.resolvePaths(paths); + core.debug("Cache Paths:"); + core.debug(`${JSON.stringify(cachePaths)}`); + if (cachePaths.length === 0) throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); + const archiveFolder = yield utils.createTempDirectory(); + const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + core.debug(`Archive Path: ${archivePath}`); + try { + yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); + if (core.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); + const fileSizeLimit = 10 * 1024 * 1024 * 1024; + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core.debug(`File Size: ${archiveFileSize}`); + if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); + core.debug("Reserving Cache"); + const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { + compressionMethod, + enableCrossOsArchive, + cacheSize: archiveFileSize + }); + if ((_a$2 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a$2 === void 0 ? void 0 : _a$2.cacheId) cacheId = (_b$1 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b$1 === void 0 ? void 0 : _b$1.cacheId; + else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) throw new Error((_d$1 = (_c$1 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c$1 === void 0 ? void 0 : _c$1.message) !== null && _d$1 !== void 0 ? _d$1 : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`); + else throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); + core.debug(`Saving Cache (ID: ${cacheId})`); + yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) throw error; + else if (typedError.name === ReserveCacheError.name) core.info(`Failed to save: ${typedError.message}`); + else core.warning(`Failed to save: ${typedError.message}`); + } finally { + try { + yield utils.unlinkFile(archivePath); + } catch (error) { + core.debug(`Failed to delete archive: ${error}`); + } + } + return cacheId; + }); + } + /** + * Save cache using Cache Service v2 + * + * @param paths a list of file paths to restore from the cache + * @param key an explicit key for restoring the cache + * @param options cache upload options + * @param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform + * @returns + */ + function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { + return __awaiter(this, void 0, void 0, function* () { + options = Object.assign(Object.assign({}, options), { + uploadChunkSize: 64 * 1024 * 1024, + uploadConcurrency: 8, + useAzureSdk: true + }); + const compressionMethod = yield utils.getCompressionMethod(); + const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); + let cacheId = -1; + const cachePaths = yield utils.resolvePaths(paths); + core.debug("Cache Paths:"); + core.debug(`${JSON.stringify(cachePaths)}`); + if (cachePaths.length === 0) throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); + const archiveFolder = yield utils.createTempDirectory(); + const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + core.debug(`Archive Path: ${archivePath}`); + try { + yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); + if (core.isDebug()) yield (0, tar_1.listTar)(archivePath, compressionMethod); + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core.debug(`File Size: ${archiveFileSize}`); + if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); + options.archiveSizeBytes = archiveFileSize; + core.debug("Reserving Cache"); + const version$1 = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); + const request = { + key, + version: version$1 + }; + let signedUploadUrl; + try { + const response = yield twirpClient.CreateCacheEntry(request); + if (!response.ok) throw new Error("Response was not ok"); + signedUploadUrl = response.signedUploadUrl; + } catch (error) { + core.debug(`Failed to reserve cache: ${error}`); + throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); + } + core.debug(`Attempting to upload cache located at: ${archivePath}`); + yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); + const finalizeRequest = { + key, + version: version$1, + sizeBytes: `${archiveFileSize}` + }; + const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); + core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + if (!finalizeResponse.ok) throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); + cacheId = parseInt(finalizeResponse.entryId); + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) throw error; + else if (typedError.name === ReserveCacheError.name) core.info(`Failed to save: ${typedError.message}`); + else core.warning(`Failed to save: ${typedError.message}`); + } finally { + try { + yield utils.unlinkFile(archivePath); + } catch (error) { + core.debug(`Failed to delete archive: ${error}`); + } + } + return cacheId; + }); + } +} }); +var import_cache = __toESM(require_cache()); + +//#endregion +//#region src/cache.ts +const state = { + DENO_DIR: "DENO_DIR", + CACHE_HIT: "CACHE_HIT", + CACHE_SAVE: "CACHE_SAVE" +}; +async function saveCache() { + if (!import_cache.isFeatureAvailable()) { + import_core.warning("Caching is not available. Caching is skipped."); + return; + } + const denoDir = import_core.getState(state.DENO_DIR); + const saveKey = import_core.getState(state.CACHE_SAVE); + if (!denoDir || !saveKey) { + import_core.info("Caching is not enabled. Caching is skipped."); + return; + } else if (import_core.getState(state.CACHE_HIT) === "true") { + import_core.info(`Cache hit occurred on the primary key "${saveKey}", not saving cache.`); + return; + } + await import_cache.saveCache([denoDir], saveKey); + import_core.info(`Cache saved with key: "${saveKey}".`); +} +async function restoreCache(cacheHash) { + try { + const denoDir = await resolveDenoDir(); + import_core.saveState(state.DENO_DIR, denoDir); + const { GITHUB_JOB, RUNNER_OS, RUNNER_ARCH } = process$1.env; + const restoreKey = `deno-cache-${RUNNER_OS}-${RUNNER_ARCH}`; + const primaryKey = `${restoreKey}-${GITHUB_JOB}-${cacheHash}`; + import_core.saveState(state.CACHE_SAVE, primaryKey); + const loadedCacheKey = await import_cache.restoreCache([denoDir], primaryKey, [restoreKey]); + const cacheHit = primaryKey === loadedCacheKey; + import_core.setOutput("cache-hit", cacheHit); + import_core.saveState(state.CACHE_HIT, cacheHit); + const message = loadedCacheKey ? `Cache key used: "${loadedCacheKey}".` : `No cache found for restore key: "${restoreKey}".`; + import_core.info(message); + } catch (err) { + import_core.warning(new Error("Failed to restore cache. Continuing without cache.", { cause: err })); + } +} +async function resolveDenoDir() { + const { DENO_DIR } = process$1.env; + if (DENO_DIR) return DENO_DIR; + const { exec: exec$1 } = await import("node:child_process"); + const output = await new Promise((res, rej) => { + exec$1("deno info --json", (err, stdout) => err ? rej(err) : res(stdout)); + }); + const info = JSON.parse(output); + if (typeof info.denoDir !== "string") throw new Error("`deno info --json` output did not contain a denoDir property. Maybe try updating this action or your Deno version if either are old."); + return info.denoDir; +} + +//#endregion +export { restoreCache, saveCache }; \ No newline at end of file diff --git a/dist/main.mjs b/dist/main.mjs index 6a0a1ab..6471450 100644 --- a/dist/main.mjs +++ b/dist/main.mjs @@ -1,4 +1,4 @@ -import { createRequire } from "module"; +import { __commonJS, __require, __toESM, import_core, require_core, require_exec, require_io, require_lib, require_semver } from "./semver-DmxAwBYV.mjs"; import process$1 from "node:process"; import * as path$1 from "node:path"; import path from "node:path"; @@ -8,17090 +8,13 @@ import { setTimeout as setTimeout$1 } from "node:timers"; import * as os from "node:os"; import * as fs from "node:fs/promises"; -//#region rolldown:runtime -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$1 = 0, n = keys.length, key; i$1 < n; i$1++) { - key = keys[i$1]; - if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { - get: ((k) => from[k]).bind(null, key), - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable - }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { - value: mod, - enumerable: true -}) : target, mod)); -var __require = /* @__PURE__ */ createRequire(import.meta.url); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js -var require_utils$2 = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.toCommandProperties = exports.toCommandValue = void 0; - /** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ - function toCommandValue(input) { - if (input === null || input === void 0) return ""; - else if (typeof input === "string" || input instanceof String) return input; - return JSON.stringify(input); - } - exports.toCommandValue = toCommandValue; - /** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ - function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) return {}; - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; - } - exports.toCommandProperties = toCommandProperties; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js -var require_command = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js"(exports) { - var __createBinding$12 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$12 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$12 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$12(result, mod, k); - } - __setModuleDefault$12(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.issue = exports.issueCommand = void 0; - const os$6 = __importStar$12(__require("os")); - const utils_1$4 = require_utils$2(); - /** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ - function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os$6.EOL); - } - exports.issueCommand = issueCommand; - function issue(name, message = "") { - issueCommand(name, {}, message); - } - exports.issue = issue; - const CMD_STRING = "::"; - var Command = class { - constructor(command, properties, message) { - if (!command) command = "missing.command"; - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += " "; - let first = true; - for (const key in this.properties) if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) first = false; - else cmdStr += ","; - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } - }; - function escapeData(s) { - return (0, utils_1$4.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); - } - function escapeProperty(s) { - return (0, utils_1$4.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); - } -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js -var require_file_command = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js"(exports) { - var __createBinding$11 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$11 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$11 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$11(result, mod, k); - } - __setModuleDefault$11(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; - const crypto$7 = __importStar$11(__require("crypto")); - const fs$5 = __importStar$11(__require("fs")); - const os$5 = __importStar$11(__require("os")); - const utils_1$3 = require_utils$2(); - function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) throw new Error(`Unable to find environment variable for file command ${command}`); - if (!fs$5.existsSync(filePath)) throw new Error(`Missing file at path: ${filePath}`); - fs$5.appendFileSync(filePath, `${(0, utils_1$3.toCommandValue)(message)}${os$5.EOL}`, { encoding: "utf8" }); - } - exports.issueFileCommand = issueFileCommand; - function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto$7.randomUUID()}`; - const convertedValue = (0, utils_1$3.toCommandValue)(value); - if (key.includes(delimiter)) throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - if (convertedValue.includes(delimiter)) throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - return `${key}<<${delimiter}${os$5.EOL}${convertedValue}${os$5.EOL}${delimiter}`; - } - exports.prepareKeyValueMessage = prepareKeyValueMessage; -} }); - -//#endregion -//#region node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js -var require_proxy = __commonJS({ "node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.checkBypass = exports.getProxyUrl = void 0; - function getProxyUrl$1(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) return void 0; - const proxyVar = (() => { - if (usingSsl) return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - else return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - })(); - if (proxyVar) try { - return new DecodedURL(proxyVar); - } catch (_a$1) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); - } - else return void 0; - } - exports.getProxyUrl = getProxyUrl$1; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) return false; - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) return true; - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) return false; - let reqPort; - if (reqUrl.port) reqPort = Number(reqUrl.port); - else if (reqUrl.protocol === "http:") reqPort = 80; - else if (reqUrl.protocol === "https:") reqPort = 443; - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) return true; - return false; - } - exports.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); - } - var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; -} }); - -//#endregion -//#region node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js -var require_tunnel$1 = __commonJS({ "node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js"(exports) { - var net$6 = __require("net"); - var tls$2 = __require("tls"); - var http$3 = __require("http"); - var https$1 = __require("https"); - var events$1 = __require("events"); - var assert$50 = __require("assert"); - var util$40 = __require("util"); - exports.httpOverHttp = httpOverHttp; - exports.httpsOverHttp = httpsOverHttp; - exports.httpOverHttps = httpOverHttps; - exports.httpsOverHttps = httpsOverHttps; - function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http$3.request; - return agent; - } - function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http$3.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; - } - function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https$1.request; - return agent; - } - function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https$1.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; - } - function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http$3.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - self.on("free", function onFree(socket, host, port, localAddress) { - var options$1 = toOptions(host, port, localAddress); - for (var i$1 = 0, len = self.requests.length; i$1 < len; ++i$1) { - var pending = self.requests[i$1]; - if (pending.host === options$1.host && pending.port === options$1.port) { - self.requests.splice(i$1, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); - } - util$40.inherits(TunnelingAgent, events$1.EventEmitter); - TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); - if (self.sockets.length >= this.maxSockets) { - self.requests.push(options); - return; - } - self.createSocket(options, function(socket) { - socket.on("free", onFree); - socket.on("close", onCloseOrRemove); - socket.on("agentRemove", onCloseOrRemove); - req.onSocket(socket); - function onFree() { - self.emit("free", socket, options); - } - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener("free", onFree); - socket.removeListener("close", onCloseOrRemove); - socket.removeListener("agentRemove", onCloseOrRemove); - } - }); - }; - TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: "CONNECT", - path: options.host + ":" + options.port, - agent: false, - headers: { host: options.host + ":" + options.port } - }); - if (options.localAddress) connectOptions.localAddress = options.localAddress; - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); - } - debug$7("making CONNECT request"); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; - connectReq.once("response", onResponse); - connectReq.once("upgrade", onUpgrade); - connectReq.once("connect", onConnect); - connectReq.once("error", onError$2); - connectReq.end(); - function onResponse(res) { - res.upgrade = true; - } - function onUpgrade(res, socket, head) { - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - if (res.statusCode !== 200) { - debug$7("tunneling socket could not be established, statusCode=%d", res.statusCode); - socket.destroy(); - var error$1 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error$1.code = "ECONNRESET"; - options.request.emit("error", error$1); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug$7("got illegal response body from proxy"); - socket.destroy(); - var error$1 = new Error("got illegal response body from proxy"); - error$1.code = "ECONNRESET"; - options.request.emit("error", error$1); - self.removeSocket(placeholder); - return; - } - debug$7("tunneling connection has established"); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - function onError$2(cause) { - connectReq.removeAllListeners(); - debug$7("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); - var error$1 = new Error("tunneling socket could not be established, cause=" + cause.message); - error$1.code = "ECONNRESET"; - options.request.emit("error", error$1); - self.removeSocket(placeholder); - } - }; - TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket); - if (pos === -1) return; - this.sockets.splice(pos, 1); - var pending = this.requests.shift(); - if (pending) this.createSocket(pending, function(socket$1) { - pending.request.onSocket(socket$1); - }); - }; - function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader("host"); - var tlsOptions = mergeOptions({}, self.options, { - socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host - }); - var secureSocket = tls$2.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); - } - function toOptions(host, port, localAddress) { - if (typeof host === "string") return { - host, - port, - localAddress - }; - return host; - } - function mergeOptions(target) { - for (var i$1 = 1, len = arguments.length; i$1 < len; ++i$1) { - var overrides = arguments[i$1]; - if (typeof overrides === "object") { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== void 0) target[k] = overrides[k]; - } - } - } - return target; - } - var debug$7; - if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug$7 = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; - else args.unshift("TUNNEL:"); - console.error.apply(console, args); - }; - else debug$7 = function() {}; - exports.debug = debug$7; -} }); - -//#endregion -//#region node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/index.js -var require_tunnel = __commonJS({ "node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/index.js"(exports, module) { - module.exports = require_tunnel$1(); -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/symbols.js -var require_symbols$5 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/symbols.js"(exports, module) { - module.exports = { - kClose: Symbol("close"), - kDestroy: Symbol("destroy"), - kDispatch: Symbol("dispatch"), - kUrl: Symbol("url"), - kWriting: Symbol("writing"), - kResuming: Symbol("resuming"), - kQueue: Symbol("queue"), - kConnect: Symbol("connect"), - kConnecting: Symbol("connecting"), - kHeadersList: Symbol("headers list"), - kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), - kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), - kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), - kKeepAliveTimeoutValue: Symbol("keep alive timeout"), - kKeepAlive: Symbol("keep alive"), - kHeadersTimeout: Symbol("headers timeout"), - kBodyTimeout: Symbol("body timeout"), - kServerName: Symbol("server name"), - kLocalAddress: Symbol("local address"), - kHost: Symbol("host"), - kNoRef: Symbol("no ref"), - kBodyUsed: Symbol("used"), - kRunning: Symbol("running"), - kBlocking: Symbol("blocking"), - kPending: Symbol("pending"), - kSize: Symbol("size"), - kBusy: Symbol("busy"), - kQueued: Symbol("queued"), - kFree: Symbol("free"), - kConnected: Symbol("connected"), - kClosed: Symbol("closed"), - kNeedDrain: Symbol("need drain"), - kReset: Symbol("reset"), - kDestroyed: Symbol.for("nodejs.stream.destroyed"), - kMaxHeadersSize: Symbol("max headers size"), - kRunningIdx: Symbol("running index"), - kPendingIdx: Symbol("pending index"), - kError: Symbol("error"), - kClients: Symbol("clients"), - kClient: Symbol("client"), - kParser: Symbol("parser"), - kOnDestroyed: Symbol("destroy callbacks"), - kPipelining: Symbol("pipelining"), - kSocket: Symbol("socket"), - kHostHeader: Symbol("host header"), - kConnector: Symbol("connector"), - kStrictContentLength: Symbol("strict content length"), - kMaxRedirections: Symbol("maxRedirections"), - kMaxRequests: Symbol("maxRequestsPerClient"), - kProxy: Symbol("proxy agent options"), - kCounter: Symbol("socket request counter"), - kInterceptors: Symbol("dispatch interceptors"), - kMaxResponseSize: Symbol("max response size"), - kHTTP2Session: Symbol("http2Session"), - kHTTP2SessionState: Symbol("http2Session state"), - kHTTP2BuildRequest: Symbol("http2 build request"), - kHTTP1BuildRequest: Symbol("http1 build request"), - kHTTP2CopyHeaders: Symbol("http2 copy headers"), - kHTTPConnVersion: Symbol("http connection version"), - kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), - kConstruct: Symbol("constructable") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/errors.js -var require_errors$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/errors.js"(exports, module) { - var UndiciError$5 = class extends Error { - constructor(message) { - super(message); - this.name = "UndiciError"; - this.code = "UND_ERR"; - } - }; - var ConnectTimeoutError$3 = class ConnectTimeoutError$3 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ConnectTimeoutError$3); - this.name = "ConnectTimeoutError"; - this.message = message || "Connect Timeout Error"; - this.code = "UND_ERR_CONNECT_TIMEOUT"; - } - }; - var HeadersTimeoutError$3 = class HeadersTimeoutError$3 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, HeadersTimeoutError$3); - this.name = "HeadersTimeoutError"; - this.message = message || "Headers Timeout Error"; - this.code = "UND_ERR_HEADERS_TIMEOUT"; - } - }; - var HeadersOverflowError$3 = class HeadersOverflowError$3 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, HeadersOverflowError$3); - this.name = "HeadersOverflowError"; - this.message = message || "Headers Overflow Error"; - this.code = "UND_ERR_HEADERS_OVERFLOW"; - } - }; - var BodyTimeoutError$3 = class BodyTimeoutError$3 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, BodyTimeoutError$3); - this.name = "BodyTimeoutError"; - this.message = message || "Body Timeout Error"; - this.code = "UND_ERR_BODY_TIMEOUT"; - } - }; - var ResponseStatusCodeError$2 = class ResponseStatusCodeError$2 extends UndiciError$5 { - constructor(message, statusCode, headers, body) { - super(message); - Error.captureStackTrace(this, ResponseStatusCodeError$2); - this.name = "ResponseStatusCodeError"; - this.message = message || "Response Status Code Error"; - this.code = "UND_ERR_RESPONSE_STATUS_CODE"; - this.body = body; - this.status = statusCode; - this.statusCode = statusCode; - this.headers = headers; - } - }; - var InvalidArgumentError$52 = class InvalidArgumentError$52 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, InvalidArgumentError$52); - this.name = "InvalidArgumentError"; - this.message = message || "Invalid Argument Error"; - this.code = "UND_ERR_INVALID_ARG"; - } - }; - var InvalidReturnValueError$5 = class InvalidReturnValueError$5 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, InvalidReturnValueError$5); - this.name = "InvalidReturnValueError"; - this.message = message || "Invalid Return Value Error"; - this.code = "UND_ERR_INVALID_RETURN_VALUE"; - } - }; - var RequestAbortedError$18 = class RequestAbortedError$18 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, RequestAbortedError$18); - this.name = "AbortError"; - this.message = message || "Request aborted"; - this.code = "UND_ERR_ABORTED"; - } - }; - var InformationalError$6 = class InformationalError$6 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, InformationalError$6); - this.name = "InformationalError"; - this.message = message || "Request information"; - this.code = "UND_ERR_INFO"; - } - }; - var RequestContentLengthMismatchError$4 = class RequestContentLengthMismatchError$4 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, RequestContentLengthMismatchError$4); - this.name = "RequestContentLengthMismatchError"; - this.message = message || "Request body length does not match content-length header"; - this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; - } - }; - var ResponseContentLengthMismatchError$3 = class ResponseContentLengthMismatchError$3 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ResponseContentLengthMismatchError$3); - this.name = "ResponseContentLengthMismatchError"; - this.message = message || "Response body length does not match content-length header"; - this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; - } - }; - var ClientDestroyedError$5 = class ClientDestroyedError$5 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ClientDestroyedError$5); - this.name = "ClientDestroyedError"; - this.message = message || "The client is destroyed"; - this.code = "UND_ERR_DESTROYED"; - } - }; - var ClientClosedError$3 = class ClientClosedError$3 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ClientClosedError$3); - this.name = "ClientClosedError"; - this.message = message || "The client is closed"; - this.code = "UND_ERR_CLOSED"; - } - }; - var SocketError$8 = class SocketError$8 extends UndiciError$5 { - constructor(message, socket) { - super(message); - Error.captureStackTrace(this, SocketError$8); - this.name = "SocketError"; - this.message = message || "Socket error"; - this.code = "UND_ERR_SOCKET"; - this.socket = socket; - } - }; - var NotSupportedError$5 = class NotSupportedError$5 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, NotSupportedError$5); - this.name = "NotSupportedError"; - this.message = message || "Not supported error"; - this.code = "UND_ERR_NOT_SUPPORTED"; - } - }; - var BalancedPoolMissingUpstreamError$3 = class extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, NotSupportedError$5); - this.name = "MissingUpstreamError"; - this.message = message || "No upstream has been added to the BalancedPool"; - this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; - } - }; - var HTTPParserError$3 = class HTTPParserError$3 extends Error { - constructor(message, code, data) { - super(message); - Error.captureStackTrace(this, HTTPParserError$3); - this.name = "HTTPParserError"; - this.code = code ? `HPE_${code}` : void 0; - this.data = data ? data.toString() : void 0; - } - }; - var ResponseExceededMaxSizeError$3 = class ResponseExceededMaxSizeError$3 extends UndiciError$5 { - constructor(message) { - super(message); - Error.captureStackTrace(this, ResponseExceededMaxSizeError$3); - this.name = "ResponseExceededMaxSizeError"; - this.message = message || "Response content exceeded max size"; - this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; - } - }; - var RequestRetryError$3 = class RequestRetryError$3 extends UndiciError$5 { - constructor(message, code, { headers, data }) { - super(message); - Error.captureStackTrace(this, RequestRetryError$3); - this.name = "RequestRetryError"; - this.message = message || "Request retry error"; - this.code = "UND_ERR_REQ_RETRY"; - this.statusCode = code; - this.data = data; - this.headers = headers; - } - }; - module.exports = { - HTTPParserError: HTTPParserError$3, - UndiciError: UndiciError$5, - HeadersTimeoutError: HeadersTimeoutError$3, - HeadersOverflowError: HeadersOverflowError$3, - BodyTimeoutError: BodyTimeoutError$3, - RequestContentLengthMismatchError: RequestContentLengthMismatchError$4, - ConnectTimeoutError: ConnectTimeoutError$3, - ResponseStatusCodeError: ResponseStatusCodeError$2, - InvalidArgumentError: InvalidArgumentError$52, - InvalidReturnValueError: InvalidReturnValueError$5, - RequestAbortedError: RequestAbortedError$18, - ClientDestroyedError: ClientDestroyedError$5, - ClientClosedError: ClientClosedError$3, - InformationalError: InformationalError$6, - SocketError: SocketError$8, - NotSupportedError: NotSupportedError$5, - ResponseContentLengthMismatchError: ResponseContentLengthMismatchError$3, - BalancedPoolMissingUpstreamError: BalancedPoolMissingUpstreamError$3, - ResponseExceededMaxSizeError: ResponseExceededMaxSizeError$3, - RequestRetryError: RequestRetryError$3 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/constants.js -var require_constants$10 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/constants.js"(exports, module) { - /** @type {Record} */ - const headerNameLowerCasedRecord$5 = {}; - const wellknownHeaderNames$2 = [ - "Accept", - "Accept-Encoding", - "Accept-Language", - "Accept-Ranges", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Age", - "Allow", - "Alt-Svc", - "Alt-Used", - "Authorization", - "Cache-Control", - "Clear-Site-Data", - "Connection", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-Length", - "Content-Location", - "Content-Range", - "Content-Security-Policy", - "Content-Security-Policy-Report-Only", - "Content-Type", - "Cookie", - "Cross-Origin-Embedder-Policy", - "Cross-Origin-Opener-Policy", - "Cross-Origin-Resource-Policy", - "Date", - "Device-Memory", - "Downlink", - "ECT", - "ETag", - "Expect", - "Expect-CT", - "Expires", - "Forwarded", - "From", - "Host", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Range", - "If-Unmodified-Since", - "Keep-Alive", - "Last-Modified", - "Link", - "Location", - "Max-Forwards", - "Origin", - "Permissions-Policy", - "Pragma", - "Proxy-Authenticate", - "Proxy-Authorization", - "RTT", - "Range", - "Referer", - "Referrer-Policy", - "Refresh", - "Retry-After", - "Sec-WebSocket-Accept", - "Sec-WebSocket-Extensions", - "Sec-WebSocket-Key", - "Sec-WebSocket-Protocol", - "Sec-WebSocket-Version", - "Server", - "Server-Timing", - "Service-Worker-Allowed", - "Service-Worker-Navigation-Preload", - "Set-Cookie", - "SourceMap", - "Strict-Transport-Security", - "Supports-Loading-Mode", - "TE", - "Timing-Allow-Origin", - "Trailer", - "Transfer-Encoding", - "Upgrade", - "Upgrade-Insecure-Requests", - "User-Agent", - "Vary", - "Via", - "WWW-Authenticate", - "X-Content-Type-Options", - "X-DNS-Prefetch-Control", - "X-Frame-Options", - "X-Permitted-Cross-Domain-Policies", - "X-Powered-By", - "X-Requested-With", - "X-XSS-Protection" - ]; - for (let i$1 = 0; i$1 < wellknownHeaderNames$2.length; ++i$1) { - const key = wellknownHeaderNames$2[i$1]; - const lowerCasedKey = key.toLowerCase(); - headerNameLowerCasedRecord$5[key] = headerNameLowerCasedRecord$5[lowerCasedKey] = lowerCasedKey; - } - Object.setPrototypeOf(headerNameLowerCasedRecord$5, null); - module.exports = { - wellknownHeaderNames: wellknownHeaderNames$2, - headerNameLowerCasedRecord: headerNameLowerCasedRecord$5 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/util.js -var require_util$12 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/util.js"(exports, module) { - const assert$49 = __require("assert"); - const { kDestroyed: kDestroyed$4, kBodyUsed: kBodyUsed$4 } = require_symbols$5(); - const { IncomingMessage: IncomingMessage$1 } = __require("http"); - const stream$4 = __require("stream"); - const net$5 = __require("net"); - const { InvalidArgumentError: InvalidArgumentError$51 } = require_errors$1(); - const { Blob: Blob$7 } = __require("buffer"); - const nodeUtil$4 = __require("util"); - const { stringify: stringify$5 } = __require("querystring"); - const { headerNameLowerCasedRecord: headerNameLowerCasedRecord$4 } = require_constants$10(); - const [nodeMajor$2, nodeMinor$2] = process.versions.node.split(".").map((v) => Number(v)); - function nop$1() {} - function isStream$2(obj) { - return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; - } - function isBlobLike$9(object) { - return Blob$7 && object instanceof Blob$7 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); - } - function buildURL$2(url, queryParams) { - if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); - const stringified = stringify$5(queryParams); - if (stringified) url += "?" + stringified; - return url; - } - function parseURL$1(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) throw new InvalidArgumentError$51("Invalid URL protocol: the URL must start with `http:` or `https:`."); - return url; - } - if (!url || typeof url !== "object") throw new InvalidArgumentError$51("Invalid URL: The URL argument must be a non-null object."); - if (!/^https?:/.test(url.origin || url.protocol)) throw new InvalidArgumentError$51("Invalid URL protocol: the URL must start with `http:` or `https:`."); - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) throw new InvalidArgumentError$51("Invalid URL: port must be a valid integer or a string representation of an integer."); - if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError$51("Invalid URL path: the path must be a string or null/undefined."); - if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError$51("Invalid URL pathname: the pathname must be a string or null/undefined."); - if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError$51("Invalid URL hostname: the hostname must be a string or null/undefined."); - if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError$51("Invalid URL origin: the origin must be a string or null/undefined."); - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path$8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; - if (origin.endsWith("/")) origin = origin.substring(0, origin.length - 1); - if (path$8 && !path$8.startsWith("/")) path$8 = `/${path$8}`; - url = new URL(origin + path$8); - } - return url; - } - function parseOrigin$3(url) { - url = parseURL$1(url); - if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError$51("invalid url"); - return url; - } - function getHostname$1(host) { - if (host[0] === "[") { - const idx$1 = host.indexOf("]"); - assert$49(idx$1 !== -1); - return host.substring(1, idx$1); - } - const idx = host.indexOf(":"); - if (idx === -1) return host; - return host.substring(0, idx); - } - function getServerName$2(host) { - if (!host) return null; - assert$49.strictEqual(typeof host, "string"); - const servername = getHostname$1(host); - if (net$5.isIP(servername)) return ""; - return servername; - } - function deepClone$1(obj) { - return JSON.parse(JSON.stringify(obj)); - } - function isAsyncIterable$1(obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); - } - function isIterable$2(obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); - } - function bodyLength$1(body) { - if (body == null) return 0; - else if (isStream$2(body)) { - const state = body._readableState; - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; - } else if (isBlobLike$9(body)) return body.size != null ? body.size : null; - else if (isBuffer$2(body)) return body.byteLength; - return null; - } - function isDestroyed$1(stream$5) { - return !stream$5 || !!(stream$5.destroyed || stream$5[kDestroyed$4]); - } - function isReadableAborted(stream$5) { - const state = stream$5 && stream$5._readableState; - return isDestroyed$1(stream$5) && state && !state.endEmitted; - } - function destroy$2(stream$5, err) { - if (stream$5 == null || !isStream$2(stream$5) || isDestroyed$1(stream$5)) return; - if (typeof stream$5.destroy === "function") { - if (Object.getPrototypeOf(stream$5).constructor === IncomingMessage$1) stream$5.socket = null; - stream$5.destroy(err); - } else if (err) process.nextTick((stream$6, err$1) => { - stream$6.emit("error", err$1); - }, stream$5, err); - if (stream$5.destroyed !== true) stream$5[kDestroyed$4] = true; - } - const KEEPALIVE_TIMEOUT_EXPR$1 = /timeout=(\d+)/; - function parseKeepAliveTimeout$1(val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR$1); - return m ? parseInt(m[1], 10) * 1e3 : null; - } - /** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ - function headerNameToString$1(value) { - return headerNameLowerCasedRecord$4[value] || value.toLowerCase(); - } - function parseHeaders$3(headers, obj = {}) { - if (!Array.isArray(headers)) return headers; - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) { - const key = headers[i$1].toString().toLowerCase(); - let val = obj[key]; - if (!val) if (Array.isArray(headers[i$1 + 1])) obj[key] = headers[i$1 + 1].map((x) => x.toString("utf8")); - else obj[key] = headers[i$1 + 1].toString("utf8"); - else { - if (!Array.isArray(val)) { - val = [val]; - obj[key] = val; - } - val.push(headers[i$1 + 1].toString("utf8")); - } - } - if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); - return obj; - } - function parseRawHeaders$1(headers) { - const ret = []; - let hasContentLength = false; - let contentDispositionIdx = -1; - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0].toString(); - const val = headers[n + 1].toString("utf8"); - if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val); - hasContentLength = true; - } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = ret.push(key, val) - 1; - else ret.push(key, val); - } - if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); - return ret; - } - function isBuffer$2(buffer$1) { - return buffer$1 instanceof Uint8Array || Buffer.isBuffer(buffer$1); - } - function validateHandler(handler, method, upgrade$2) { - if (!handler || typeof handler !== "object") throw new InvalidArgumentError$51("handler must be an object"); - if (typeof handler.onConnect !== "function") throw new InvalidArgumentError$51("invalid onConnect method"); - if (typeof handler.onError !== "function") throw new InvalidArgumentError$51("invalid onError method"); - if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError$51("invalid onBodySent method"); - if (upgrade$2 || method === "CONNECT") { - if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError$51("invalid onUpgrade method"); - } else { - if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError$51("invalid onHeaders method"); - if (typeof handler.onData !== "function") throw new InvalidArgumentError$51("invalid onData method"); - if (typeof handler.onComplete !== "function") throw new InvalidArgumentError$51("invalid onComplete method"); - } - } - function isDisturbed$6(body) { - return !!(body && (stream$4.isDisturbed ? stream$4.isDisturbed(body) || body[kBodyUsed$4] : body[kBodyUsed$4] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || isReadableAborted(body))); - } - function isErrored$4(body) { - return !!(body && (stream$4.isErrored ? stream$4.isErrored(body) : /state: 'errored'/.test(nodeUtil$4.inspect(body)))); - } - function isReadable$2(body) { - return !!(body && (stream$4.isReadable ? stream$4.isReadable(body) : /state: 'readable'/.test(nodeUtil$4.inspect(body)))); - } - function getSocketInfo$1(socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - }; - } - async function* convertIterableToBuffer(iterable) { - for await (const chunk of iterable) yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk); - } - let ReadableStream$6; - function ReadableStreamFrom$7(iterable) { - if (!ReadableStream$6) ReadableStream$6 = __require("stream/web").ReadableStream; - if (ReadableStream$6.from) return ReadableStream$6.from(convertIterableToBuffer(iterable)); - let iterator; - return new ReadableStream$6({ - async start() { - iterator = iterable[Symbol.asyncIterator](); - }, - async pull(controller) { - const { done, value } = await iterator.next(); - if (done) queueMicrotask(() => { - controller.close(); - }); - else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); - controller.enqueue(new Uint8Array(buf)); - } - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - } - }, 0); - } - function isFormDataLike$2(object) { - return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; - } - function throwIfAborted$2(signal) { - if (!signal) return; - if (typeof signal.throwIfAborted === "function") signal.throwIfAborted(); - else if (signal.aborted) { - const err = new Error("The operation was aborted"); - err.name = "AbortError"; - throw err; - } - } - function addAbortListener$5(signal, listener) { - if ("addEventListener" in signal) { - signal.addEventListener("abort", listener, { once: true }); - return () => signal.removeEventListener("abort", listener); - } - signal.addListener("abort", listener); - return () => signal.removeListener("abort", listener); - } - const hasToWellFormed = !!String.prototype.toWellFormed; - /** - * @param {string} val - */ - function toUSVString$7(val) { - if (hasToWellFormed) return `${val}`.toWellFormed(); - else if (nodeUtil$4.toUSVString) return nodeUtil$4.toUSVString(val); - return `${val}`; - } - function parseRangeHeader$3(range) { - if (range == null || range === "") return { - start: 0, - end: null, - size: null - }; - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; - return m ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } : null; - } - const kEnumerableProperty$21 = Object.create(null); - kEnumerableProperty$21.enumerable = true; - module.exports = { - kEnumerableProperty: kEnumerableProperty$21, - nop: nop$1, - isDisturbed: isDisturbed$6, - isErrored: isErrored$4, - isReadable: isReadable$2, - toUSVString: toUSVString$7, - isReadableAborted, - isBlobLike: isBlobLike$9, - parseOrigin: parseOrigin$3, - parseURL: parseURL$1, - getServerName: getServerName$2, - isStream: isStream$2, - isIterable: isIterable$2, - isAsyncIterable: isAsyncIterable$1, - isDestroyed: isDestroyed$1, - headerNameToString: headerNameToString$1, - parseRawHeaders: parseRawHeaders$1, - parseHeaders: parseHeaders$3, - parseKeepAliveTimeout: parseKeepAliveTimeout$1, - destroy: destroy$2, - bodyLength: bodyLength$1, - deepClone: deepClone$1, - ReadableStreamFrom: ReadableStreamFrom$7, - isBuffer: isBuffer$2, - validateHandler, - getSocketInfo: getSocketInfo$1, - isFormDataLike: isFormDataLike$2, - buildURL: buildURL$2, - throwIfAborted: throwIfAborted$2, - addAbortListener: addAbortListener$5, - parseRangeHeader: parseRangeHeader$3, - nodeMajor: nodeMajor$2, - nodeMinor: nodeMinor$2, - nodeHasAutoSelectFamily: nodeMajor$2 > 18 || nodeMajor$2 === 18 && nodeMinor$2 >= 13, - safeHTTPMethods: [ - "GET", - "HEAD", - "OPTIONS", - "TRACE" - ] - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/timers.js -var require_timers$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/timers.js"(exports, module) { - let fastNow$1 = Date.now(); - let fastNowTimeout$1; - const fastTimers$1 = []; - function onTimeout() { - fastNow$1 = Date.now(); - let len = fastTimers$1.length; - let idx = 0; - while (idx < len) { - const timer = fastTimers$1[idx]; - if (timer.state === 0) timer.state = fastNow$1 + timer.delay; - else if (timer.state > 0 && fastNow$1 >= timer.state) { - timer.state = -1; - timer.callback(timer.opaque); - } - if (timer.state === -1) { - timer.state = -2; - if (idx !== len - 1) fastTimers$1[idx] = fastTimers$1.pop(); - else fastTimers$1.pop(); - len -= 1; - } else idx += 1; - } - if (fastTimers$1.length > 0) refreshTimeout$1(); - } - function refreshTimeout$1() { - if (fastNowTimeout$1 && fastNowTimeout$1.refresh) fastNowTimeout$1.refresh(); - else { - clearTimeout(fastNowTimeout$1); - fastNowTimeout$1 = setTimeout(onTimeout, 1e3); - if (fastNowTimeout$1.unref) fastNowTimeout$1.unref(); - } - } - var Timeout = class { - constructor(callback, delay$2, opaque) { - this.callback = callback; - this.delay = delay$2; - this.opaque = opaque; - this.state = -2; - this.refresh(); - } - refresh() { - if (this.state === -2) { - fastTimers$1.push(this); - if (!fastNowTimeout$1 || fastTimers$1.length === 1) refreshTimeout$1(); - } - this.state = 0; - } - clear() { - this.state = -1; - } - }; - module.exports = { - setTimeout(callback, delay$2, opaque) { - return delay$2 < 1e3 ? setTimeout(callback, delay$2, opaque) : new Timeout(callback, delay$2, opaque); - }, - clearTimeout(timeout) { - if (timeout instanceof Timeout) timeout.clear(); - else clearTimeout(timeout); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js -var require_sbmh = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js"(exports, module) { - /** - * Copyright Brian White. All rights reserved. - * - * @see https://github.com/mscdex/streamsearch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation - * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool - */ - const EventEmitter$3 = __require("node:events").EventEmitter; - const inherits$5 = __require("node:util").inherits; - function SBMH(needle) { - if (typeof needle === "string") needle = Buffer.from(needle); - if (!Buffer.isBuffer(needle)) throw new TypeError("The needle has to be a String or a Buffer."); - const needleLength = needle.length; - if (needleLength === 0) throw new Error("The needle cannot be an empty String/Buffer."); - if (needleLength > 256) throw new Error("The needle cannot have a length bigger than 256."); - this.maxMatches = Infinity; - this.matches = 0; - this._occ = new Array(256).fill(needleLength); - this._lookbehind_size = 0; - this._needle = needle; - this._bufpos = 0; - this._lookbehind = Buffer.alloc(needleLength); - for (var i$1 = 0; i$1 < needleLength - 1; ++i$1) this._occ[needle[i$1]] = needleLength - 1 - i$1; - } - inherits$5(SBMH, EventEmitter$3); - SBMH.prototype.reset = function() { - this._lookbehind_size = 0; - this.matches = 0; - this._bufpos = 0; - }; - SBMH.prototype.push = function(chunk, pos) { - if (!Buffer.isBuffer(chunk)) chunk = Buffer.from(chunk, "binary"); - const chlen = chunk.length; - this._bufpos = pos || 0; - let r; - while (r !== chlen && this.matches < this.maxMatches) r = this._sbmh_feed(chunk); - return r; - }; - SBMH.prototype._sbmh_feed = function(data) { - const len = data.length; - const needle = this._needle; - const needleLength = needle.length; - const lastNeedleChar = needle[needleLength - 1]; - let pos = -this._lookbehind_size; - let ch; - if (pos < 0) { - while (pos < 0 && pos <= len - needleLength) { - ch = this._sbmh_lookup_char(data, pos + needleLength - 1); - if (ch === lastNeedleChar && this._sbmh_memcmp(data, pos, needleLength - 1)) { - this._lookbehind_size = 0; - ++this.matches; - this.emit("info", true); - return this._bufpos = pos + needleLength; - } - pos += this._occ[ch]; - } - if (pos < 0) while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) ++pos; - if (pos >= 0) { - this.emit("info", false, this._lookbehind, 0, this._lookbehind_size); - this._lookbehind_size = 0; - } else { - const bytesToCutOff = this._lookbehind_size + pos; - if (bytesToCutOff > 0) this.emit("info", false, this._lookbehind, 0, bytesToCutOff); - this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, this._lookbehind_size - bytesToCutOff); - this._lookbehind_size -= bytesToCutOff; - data.copy(this._lookbehind, this._lookbehind_size); - this._lookbehind_size += len; - this._bufpos = len; - return len; - } - } - pos += (pos >= 0) * this._bufpos; - if (data.indexOf(needle, pos) !== -1) { - pos = data.indexOf(needle, pos); - ++this.matches; - if (pos > 0) this.emit("info", true, data, this._bufpos, pos); - else this.emit("info", true); - return this._bufpos = pos + needleLength; - } else pos = len - needleLength; - while (pos < len && (data[pos] !== needle[0] || Buffer.compare(data.subarray(pos, pos + len - pos), needle.subarray(0, len - pos)) !== 0)) ++pos; - if (pos < len) { - data.copy(this._lookbehind, 0, pos, pos + (len - pos)); - this._lookbehind_size = len - pos; - } - if (pos > 0) this.emit("info", false, data, this._bufpos, pos < len ? pos : len); - this._bufpos = len; - return len; - }; - SBMH.prototype._sbmh_lookup_char = function(data, pos) { - return pos < 0 ? this._lookbehind[this._lookbehind_size + pos] : data[pos]; - }; - SBMH.prototype._sbmh_memcmp = function(data, pos, len) { - for (var i$1 = 0; i$1 < len; ++i$1) if (this._sbmh_lookup_char(data, pos + i$1) !== this._needle[i$1]) return false; - return true; - }; - module.exports = SBMH; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js -var require_PartStream = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js"(exports, module) { - const inherits$4 = __require("node:util").inherits; - const ReadableStream$5 = __require("node:stream").Readable; - function PartStream$1(opts) { - ReadableStream$5.call(this, opts); - } - inherits$4(PartStream$1, ReadableStream$5); - PartStream$1.prototype._read = function(n) {}; - module.exports = PartStream$1; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js -var require_getLimit = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js"(exports, module) { - module.exports = function getLimit$3(limits, name, defaultLimit) { - if (!limits || limits[name] === void 0 || limits[name] === null) return defaultLimit; - if (typeof limits[name] !== "number" || isNaN(limits[name])) throw new TypeError("Limit " + name + " is not a valid number"); - return limits[name]; - }; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js -var require_HeaderParser = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js"(exports, module) { - const EventEmitter$2 = __require("node:events").EventEmitter; - const inherits$3 = __require("node:util").inherits; - const getLimit$2 = require_getLimit(); - const StreamSearch$1 = require_sbmh(); - const B_DCRLF = Buffer.from("\r\n\r\n"); - const RE_CRLF = /\r\n/g; - const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/; - function HeaderParser$1(cfg) { - EventEmitter$2.call(this); - cfg = cfg || {}; - const self = this; - this.nread = 0; - this.maxed = false; - this.npairs = 0; - this.maxHeaderPairs = getLimit$2(cfg, "maxHeaderPairs", 2e3); - this.maxHeaderSize = getLimit$2(cfg, "maxHeaderSize", 80 * 1024); - this.buffer = ""; - this.header = {}; - this.finished = false; - this.ss = new StreamSearch$1(B_DCRLF); - this.ss.on("info", function(isMatch, data, start, end) { - if (data && !self.maxed) { - if (self.nread + end - start >= self.maxHeaderSize) { - end = self.maxHeaderSize - self.nread + start; - self.nread = self.maxHeaderSize; - self.maxed = true; - } else self.nread += end - start; - self.buffer += data.toString("binary", start, end); - } - if (isMatch) self._finish(); - }); - } - inherits$3(HeaderParser$1, EventEmitter$2); - HeaderParser$1.prototype.push = function(data) { - const r = this.ss.push(data); - if (this.finished) return r; - }; - HeaderParser$1.prototype.reset = function() { - this.finished = false; - this.buffer = ""; - this.header = {}; - this.ss.reset(); - }; - HeaderParser$1.prototype._finish = function() { - if (this.buffer) this._parseHeader(); - this.ss.matches = this.ss.maxMatches; - const header = this.header; - this.header = {}; - this.buffer = ""; - this.finished = true; - this.nread = this.npairs = 0; - this.maxed = false; - this.emit("header", header); - }; - HeaderParser$1.prototype._parseHeader = function() { - if (this.npairs === this.maxHeaderPairs) return; - const lines = this.buffer.split(RE_CRLF); - const len = lines.length; - let m, h; - for (var i$1 = 0; i$1 < len; ++i$1) { - if (lines[i$1].length === 0) continue; - if (lines[i$1][0] === " " || lines[i$1][0] === " ") { - if (h) { - this.header[h][this.header[h].length - 1] += lines[i$1]; - continue; - } - } - const posColon = lines[i$1].indexOf(":"); - if (posColon === -1 || posColon === 0) return; - m = RE_HDR.exec(lines[i$1]); - h = m[1].toLowerCase(); - this.header[h] = this.header[h] || []; - this.header[h].push(m[2] || ""); - if (++this.npairs === this.maxHeaderPairs) break; - } - }; - module.exports = HeaderParser$1; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js -var require_Dicer = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js"(exports, module) { - const WritableStream$2 = __require("node:stream").Writable; - const inherits$2 = __require("node:util").inherits; - const StreamSearch = require_sbmh(); - const PartStream = require_PartStream(); - const HeaderParser = require_HeaderParser(); - const DASH = 45; - const B_ONEDASH = Buffer.from("-"); - const B_CRLF = Buffer.from("\r\n"); - const EMPTY_FN = function() {}; - function Dicer$2(cfg) { - if (!(this instanceof Dicer$2)) return new Dicer$2(cfg); - WritableStream$2.call(this, cfg); - if (!cfg || !cfg.headerFirst && typeof cfg.boundary !== "string") throw new TypeError("Boundary required"); - if (typeof cfg.boundary === "string") this.setBoundary(cfg.boundary); - else this._bparser = void 0; - this._headerFirst = cfg.headerFirst; - this._dashes = 0; - this._parts = 0; - this._finished = false; - this._realFinish = false; - this._isPreamble = true; - this._justMatched = false; - this._firstWrite = true; - this._inHeader = true; - this._part = void 0; - this._cb = void 0; - this._ignoreData = false; - this._partOpts = { highWaterMark: cfg.partHwm }; - this._pause = false; - const self = this; - this._hparser = new HeaderParser(cfg); - this._hparser.on("header", function(header) { - self._inHeader = false; - self._part.emit("header", header); - }); - } - inherits$2(Dicer$2, WritableStream$2); - Dicer$2.prototype.emit = function(ev) { - if (ev === "finish" && !this._realFinish) { - if (!this._finished) { - const self = this; - process.nextTick(function() { - self.emit("error", new Error("Unexpected end of multipart data")); - if (self._part && !self._ignoreData) { - const type = self._isPreamble ? "Preamble" : "Part"; - self._part.emit("error", new Error(type + " terminated early due to unexpected end of multipart data")); - self._part.push(null); - process.nextTick(function() { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; - }); - return; - } - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; - }); - } - } else WritableStream$2.prototype.emit.apply(this, arguments); - }; - Dicer$2.prototype._write = function(data, encoding, cb) { - if (!this._hparser && !this._bparser) return cb(); - if (this._headerFirst && this._isPreamble) { - if (!this._part) { - this._part = new PartStream(this._partOpts); - if (this.listenerCount("preamble") !== 0) this.emit("preamble", this._part); - else this._ignore(); - } - const r = this._hparser.push(data); - if (!this._inHeader && r !== void 0 && r < data.length) data = data.slice(r); - else return cb(); - } - if (this._firstWrite) { - this._bparser.push(B_CRLF); - this._firstWrite = false; - } - this._bparser.push(data); - if (this._pause) this._cb = cb; - else cb(); - }; - Dicer$2.prototype.reset = function() { - this._part = void 0; - this._bparser = void 0; - this._hparser = void 0; - }; - Dicer$2.prototype.setBoundary = function(boundary) { - const self = this; - this._bparser = new StreamSearch("\r\n--" + boundary); - this._bparser.on("info", function(isMatch, data, start, end) { - self._oninfo(isMatch, data, start, end); - }); - }; - Dicer$2.prototype._ignore = function() { - if (this._part && !this._ignoreData) { - this._ignoreData = true; - this._part.on("error", EMPTY_FN); - this._part.resume(); - } - }; - Dicer$2.prototype._oninfo = function(isMatch, data, start, end) { - let buf; - const self = this; - let i$1 = 0; - let r; - let shouldWriteMore = true; - if (!this._part && this._justMatched && data) { - while (this._dashes < 2 && start + i$1 < end) if (data[start + i$1] === DASH) { - ++i$1; - ++this._dashes; - } else { - if (this._dashes) buf = B_ONEDASH; - this._dashes = 0; - break; - } - if (this._dashes === 2) { - if (start + i$1 < end && this.listenerCount("trailer") !== 0) this.emit("trailer", data.slice(start + i$1, end)); - this.reset(); - this._finished = true; - if (self._parts === 0) { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; - } - } - if (this._dashes) return; - } - if (this._justMatched) this._justMatched = false; - if (!this._part) { - this._part = new PartStream(this._partOpts); - this._part._read = function(n) { - self._unpause(); - }; - if (this._isPreamble && this.listenerCount("preamble") !== 0) this.emit("preamble", this._part); - else if (this._isPreamble !== true && this.listenerCount("part") !== 0) this.emit("part", this._part); - else this._ignore(); - if (!this._isPreamble) this._inHeader = true; - } - if (data && start < end && !this._ignoreData) { - if (this._isPreamble || !this._inHeader) { - if (buf) shouldWriteMore = this._part.push(buf); - shouldWriteMore = this._part.push(data.slice(start, end)); - if (!shouldWriteMore) this._pause = true; - } else if (!this._isPreamble && this._inHeader) { - if (buf) this._hparser.push(buf); - r = this._hparser.push(data.slice(start, end)); - if (!this._inHeader && r !== void 0 && r < end) this._oninfo(false, data, start + r, end); - } - } - if (isMatch) { - this._hparser.reset(); - if (this._isPreamble) this._isPreamble = false; - else if (start !== end) { - ++this._parts; - this._part.on("end", function() { - if (--self._parts === 0) if (self._finished) { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; - } else self._unpause(); - }); - } - this._part.push(null); - this._part = void 0; - this._ignoreData = false; - this._justMatched = true; - this._dashes = 0; - } - }; - Dicer$2.prototype._unpause = function() { - if (!this._pause) return; - this._pause = false; - if (this._cb) { - const cb = this._cb; - this._cb = void 0; - cb(); - } - }; - module.exports = Dicer$2; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js -var require_decodeText = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js"(exports, module) { - const utf8Decoder = new TextDecoder("utf-8"); - const textDecoders = new Map([["utf-8", utf8Decoder], ["utf8", utf8Decoder]]); - function getDecoder(charset) { - let lc; - while (true) switch (charset) { - case "utf-8": - case "utf8": return decoders.utf8; - case "latin1": - case "ascii": - case "us-ascii": - case "iso-8859-1": - case "iso8859-1": - case "iso88591": - case "iso_8859-1": - case "windows-1252": - case "iso_8859-1:1987": - case "cp1252": - case "x-cp1252": return decoders.latin1; - case "utf16le": - case "utf-16le": - case "ucs2": - case "ucs-2": return decoders.utf16le; - case "base64": return decoders.base64; - default: - if (lc === void 0) { - lc = true; - charset = charset.toLowerCase(); - continue; - } - return decoders.other.bind(charset); - } - } - const decoders = { - utf8: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - return data.utf8Slice(0, data.length); - }, - latin1: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") return data; - return data.latin1Slice(0, data.length); - }, - utf16le: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - return data.ucs2Slice(0, data.length); - }, - base64: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - return data.base64Slice(0, data.length); - }, - other: (data, sourceEncoding) => { - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - if (textDecoders.has(exports.toString())) try { - return textDecoders.get(exports).decode(data); - } catch {} - return typeof data === "string" ? data : data.toString(); - } - }; - function decodeText$3(text, sourceEncoding, destEncoding) { - if (text) return getDecoder(destEncoding)(text, sourceEncoding); - return text; - } - module.exports = decodeText$3; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js -var require_parseParams = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js"(exports, module) { - const decodeText$2 = require_decodeText(); - const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g; - const EncodedLookup = { - "%00": "\0", - "%01": "", - "%02": "", - "%03": "", - "%04": "", - "%05": "", - "%06": "", - "%07": "\x07", - "%08": "\b", - "%09": " ", - "%0a": "\n", - "%0A": "\n", - "%0b": "\v", - "%0B": "\v", - "%0c": "\f", - "%0C": "\f", - "%0d": "\r", - "%0D": "\r", - "%0e": "", - "%0E": "", - "%0f": "", - "%0F": "", - "%10": "", - "%11": "", - "%12": "", - "%13": "", - "%14": "", - "%15": "", - "%16": "", - "%17": "", - "%18": "", - "%19": "", - "%1a": "", - "%1A": "", - "%1b": "\x1B", - "%1B": "\x1B", - "%1c": "", - "%1C": "", - "%1d": "", - "%1D": "", - "%1e": "", - "%1E": "", - "%1f": "", - "%1F": "", - "%20": " ", - "%21": "!", - "%22": "\"", - "%23": "#", - "%24": "$", - "%25": "%", - "%26": "&", - "%27": "'", - "%28": "(", - "%29": ")", - "%2a": "*", - "%2A": "*", - "%2b": "+", - "%2B": "+", - "%2c": ",", - "%2C": ",", - "%2d": "-", - "%2D": "-", - "%2e": ".", - "%2E": ".", - "%2f": "/", - "%2F": "/", - "%30": "0", - "%31": "1", - "%32": "2", - "%33": "3", - "%34": "4", - "%35": "5", - "%36": "6", - "%37": "7", - "%38": "8", - "%39": "9", - "%3a": ":", - "%3A": ":", - "%3b": ";", - "%3B": ";", - "%3c": "<", - "%3C": "<", - "%3d": "=", - "%3D": "=", - "%3e": ">", - "%3E": ">", - "%3f": "?", - "%3F": "?", - "%40": "@", - "%41": "A", - "%42": "B", - "%43": "C", - "%44": "D", - "%45": "E", - "%46": "F", - "%47": "G", - "%48": "H", - "%49": "I", - "%4a": "J", - "%4A": "J", - "%4b": "K", - "%4B": "K", - "%4c": "L", - "%4C": "L", - "%4d": "M", - "%4D": "M", - "%4e": "N", - "%4E": "N", - "%4f": "O", - "%4F": "O", - "%50": "P", - "%51": "Q", - "%52": "R", - "%53": "S", - "%54": "T", - "%55": "U", - "%56": "V", - "%57": "W", - "%58": "X", - "%59": "Y", - "%5a": "Z", - "%5A": "Z", - "%5b": "[", - "%5B": "[", - "%5c": "\\", - "%5C": "\\", - "%5d": "]", - "%5D": "]", - "%5e": "^", - "%5E": "^", - "%5f": "_", - "%5F": "_", - "%60": "`", - "%61": "a", - "%62": "b", - "%63": "c", - "%64": "d", - "%65": "e", - "%66": "f", - "%67": "g", - "%68": "h", - "%69": "i", - "%6a": "j", - "%6A": "j", - "%6b": "k", - "%6B": "k", - "%6c": "l", - "%6C": "l", - "%6d": "m", - "%6D": "m", - "%6e": "n", - "%6E": "n", - "%6f": "o", - "%6F": "o", - "%70": "p", - "%71": "q", - "%72": "r", - "%73": "s", - "%74": "t", - "%75": "u", - "%76": "v", - "%77": "w", - "%78": "x", - "%79": "y", - "%7a": "z", - "%7A": "z", - "%7b": "{", - "%7B": "{", - "%7c": "|", - "%7C": "|", - "%7d": "}", - "%7D": "}", - "%7e": "~", - "%7E": "~", - "%7f": "", - "%7F": "", - "%80": "€", - "%81": "", - "%82": "‚", - "%83": "ƒ", - "%84": "„", - "%85": "…", - "%86": "†", - "%87": "‡", - "%88": "ˆ", - "%89": "‰", - "%8a": "Š", - "%8A": "Š", - "%8b": "‹", - "%8B": "‹", - "%8c": "Œ", - "%8C": "Œ", - "%8d": "", - "%8D": "", - "%8e": "Ž", - "%8E": "Ž", - "%8f": "", - "%8F": "", - "%90": "", - "%91": "‘", - "%92": "’", - "%93": "“", - "%94": "”", - "%95": "•", - "%96": "–", - "%97": "—", - "%98": "˜", - "%99": "™", - "%9a": "š", - "%9A": "š", - "%9b": "›", - "%9B": "›", - "%9c": "œ", - "%9C": "œ", - "%9d": "", - "%9D": "", - "%9e": "ž", - "%9E": "ž", - "%9f": "Ÿ", - "%9F": "Ÿ", - "%a0": "\xA0", - "%A0": "\xA0", - "%a1": "¡", - "%A1": "¡", - "%a2": "¢", - "%A2": "¢", - "%a3": "£", - "%A3": "£", - "%a4": "¤", - "%A4": "¤", - "%a5": "¥", - "%A5": "¥", - "%a6": "¦", - "%A6": "¦", - "%a7": "§", - "%A7": "§", - "%a8": "¨", - "%A8": "¨", - "%a9": "©", - "%A9": "©", - "%aa": "ª", - "%Aa": "ª", - "%aA": "ª", - "%AA": "ª", - "%ab": "«", - "%Ab": "«", - "%aB": "«", - "%AB": "«", - "%ac": "¬", - "%Ac": "¬", - "%aC": "¬", - "%AC": "¬", - "%ad": "­", - "%Ad": "­", - "%aD": "­", - "%AD": "­", - "%ae": "®", - "%Ae": "®", - "%aE": "®", - "%AE": "®", - "%af": "¯", - "%Af": "¯", - "%aF": "¯", - "%AF": "¯", - "%b0": "°", - "%B0": "°", - "%b1": "±", - "%B1": "±", - "%b2": "²", - "%B2": "²", - "%b3": "³", - "%B3": "³", - "%b4": "´", - "%B4": "´", - "%b5": "µ", - "%B5": "µ", - "%b6": "¶", - "%B6": "¶", - "%b7": "·", - "%B7": "·", - "%b8": "¸", - "%B8": "¸", - "%b9": "¹", - "%B9": "¹", - "%ba": "º", - "%Ba": "º", - "%bA": "º", - "%BA": "º", - "%bb": "»", - "%Bb": "»", - "%bB": "»", - "%BB": "»", - "%bc": "¼", - "%Bc": "¼", - "%bC": "¼", - "%BC": "¼", - "%bd": "½", - "%Bd": "½", - "%bD": "½", - "%BD": "½", - "%be": "¾", - "%Be": "¾", - "%bE": "¾", - "%BE": "¾", - "%bf": "¿", - "%Bf": "¿", - "%bF": "¿", - "%BF": "¿", - "%c0": "À", - "%C0": "À", - "%c1": "Á", - "%C1": "Á", - "%c2": "Â", - "%C2": "Â", - "%c3": "Ã", - "%C3": "Ã", - "%c4": "Ä", - "%C4": "Ä", - "%c5": "Å", - "%C5": "Å", - "%c6": "Æ", - "%C6": "Æ", - "%c7": "Ç", - "%C7": "Ç", - "%c8": "È", - "%C8": "È", - "%c9": "É", - "%C9": "É", - "%ca": "Ê", - "%Ca": "Ê", - "%cA": "Ê", - "%CA": "Ê", - "%cb": "Ë", - "%Cb": "Ë", - "%cB": "Ë", - "%CB": "Ë", - "%cc": "Ì", - "%Cc": "Ì", - "%cC": "Ì", - "%CC": "Ì", - "%cd": "Í", - "%Cd": "Í", - "%cD": "Í", - "%CD": "Í", - "%ce": "Î", - "%Ce": "Î", - "%cE": "Î", - "%CE": "Î", - "%cf": "Ï", - "%Cf": "Ï", - "%cF": "Ï", - "%CF": "Ï", - "%d0": "Ð", - "%D0": "Ð", - "%d1": "Ñ", - "%D1": "Ñ", - "%d2": "Ò", - "%D2": "Ò", - "%d3": "Ó", - "%D3": "Ó", - "%d4": "Ô", - "%D4": "Ô", - "%d5": "Õ", - "%D5": "Õ", - "%d6": "Ö", - "%D6": "Ö", - "%d7": "×", - "%D7": "×", - "%d8": "Ø", - "%D8": "Ø", - "%d9": "Ù", - "%D9": "Ù", - "%da": "Ú", - "%Da": "Ú", - "%dA": "Ú", - "%DA": "Ú", - "%db": "Û", - "%Db": "Û", - "%dB": "Û", - "%DB": "Û", - "%dc": "Ü", - "%Dc": "Ü", - "%dC": "Ü", - "%DC": "Ü", - "%dd": "Ý", - "%Dd": "Ý", - "%dD": "Ý", - "%DD": "Ý", - "%de": "Þ", - "%De": "Þ", - "%dE": "Þ", - "%DE": "Þ", - "%df": "ß", - "%Df": "ß", - "%dF": "ß", - "%DF": "ß", - "%e0": "à", - "%E0": "à", - "%e1": "á", - "%E1": "á", - "%e2": "â", - "%E2": "â", - "%e3": "ã", - "%E3": "ã", - "%e4": "ä", - "%E4": "ä", - "%e5": "å", - "%E5": "å", - "%e6": "æ", - "%E6": "æ", - "%e7": "ç", - "%E7": "ç", - "%e8": "è", - "%E8": "è", - "%e9": "é", - "%E9": "é", - "%ea": "ê", - "%Ea": "ê", - "%eA": "ê", - "%EA": "ê", - "%eb": "ë", - "%Eb": "ë", - "%eB": "ë", - "%EB": "ë", - "%ec": "ì", - "%Ec": "ì", - "%eC": "ì", - "%EC": "ì", - "%ed": "í", - "%Ed": "í", - "%eD": "í", - "%ED": "í", - "%ee": "î", - "%Ee": "î", - "%eE": "î", - "%EE": "î", - "%ef": "ï", - "%Ef": "ï", - "%eF": "ï", - "%EF": "ï", - "%f0": "ð", - "%F0": "ð", - "%f1": "ñ", - "%F1": "ñ", - "%f2": "ò", - "%F2": "ò", - "%f3": "ó", - "%F3": "ó", - "%f4": "ô", - "%F4": "ô", - "%f5": "õ", - "%F5": "õ", - "%f6": "ö", - "%F6": "ö", - "%f7": "÷", - "%F7": "÷", - "%f8": "ø", - "%F8": "ø", - "%f9": "ù", - "%F9": "ù", - "%fa": "ú", - "%Fa": "ú", - "%fA": "ú", - "%FA": "ú", - "%fb": "û", - "%Fb": "û", - "%fB": "û", - "%FB": "û", - "%fc": "ü", - "%Fc": "ü", - "%fC": "ü", - "%FC": "ü", - "%fd": "ý", - "%Fd": "ý", - "%fD": "ý", - "%FD": "ý", - "%fe": "þ", - "%Fe": "þ", - "%fE": "þ", - "%FE": "þ", - "%ff": "ÿ", - "%Ff": "ÿ", - "%fF": "ÿ", - "%FF": "ÿ" - }; - function encodedReplacer(match) { - return EncodedLookup[match]; - } - const STATE_KEY = 0; - const STATE_VALUE = 1; - const STATE_CHARSET = 2; - const STATE_LANG = 3; - function parseParams$2(str) { - const res = []; - let state = STATE_KEY; - let charset = ""; - let inquote = false; - let escaping = false; - let p = 0; - let tmp = ""; - const len = str.length; - for (var i$1 = 0; i$1 < len; ++i$1) { - const char = str[i$1]; - if (char === "\\" && inquote) if (escaping) escaping = false; - else { - escaping = true; - continue; - } - else if (char === "\"") if (!escaping) { - if (inquote) { - inquote = false; - state = STATE_KEY; - } else inquote = true; - continue; - } else escaping = false; - else { - if (escaping && inquote) tmp += "\\"; - escaping = false; - if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { - if (state === STATE_CHARSET) { - state = STATE_LANG; - charset = tmp.substring(1); - } else state = STATE_VALUE; - tmp = ""; - continue; - } else if (state === STATE_KEY && (char === "*" || char === "=") && res.length) { - state = char === "*" ? STATE_CHARSET : STATE_VALUE; - res[p] = [tmp, void 0]; - tmp = ""; - continue; - } else if (!inquote && char === ";") { - state = STATE_KEY; - if (charset) { - if (tmp.length) tmp = decodeText$2(tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset); - charset = ""; - } else if (tmp.length) tmp = decodeText$2(tmp, "binary", "utf8"); - if (res[p] === void 0) res[p] = tmp; - else res[p][1] = tmp; - tmp = ""; - ++p; - continue; - } else if (!inquote && (char === " " || char === " ")) continue; - } - tmp += char; - } - if (charset && tmp.length) tmp = decodeText$2(tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset); - else if (tmp) tmp = decodeText$2(tmp, "binary", "utf8"); - if (res[p] === void 0) { - if (tmp) res[p] = tmp; - } else res[p][1] = tmp; - return res; - } - module.exports = parseParams$2; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js -var require_basename = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js"(exports, module) { - module.exports = function basename$1(path$8) { - if (typeof path$8 !== "string") return ""; - for (var i$1 = path$8.length - 1; i$1 >= 0; --i$1) switch (path$8.charCodeAt(i$1)) { - case 47: - case 92: - path$8 = path$8.slice(i$1 + 1); - return path$8 === ".." || path$8 === "." ? "" : path$8; - } - return path$8 === ".." || path$8 === "." ? "" : path$8; - }; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js -var require_multipart = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js"(exports, module) { - const { Readable: Readable$9 } = __require("node:stream"); - const { inherits: inherits$1 } = __require("node:util"); - const Dicer$1 = require_Dicer(); - const parseParams$1 = require_parseParams(); - const decodeText$1 = require_decodeText(); - const basename = require_basename(); - const getLimit$1 = require_getLimit(); - const RE_BOUNDARY = /^boundary$/i; - const RE_FIELD = /^form-data$/i; - const RE_CHARSET$1 = /^charset$/i; - const RE_FILENAME = /^filename$/i; - const RE_NAME = /^name$/i; - Multipart.detect = /^multipart\/form-data/i; - function Multipart(boy, cfg) { - let i$1; - let len; - const self = this; - let boundary; - const limits = cfg.limits; - const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => contentType === "application/octet-stream" || fileName !== void 0); - const parsedConType = cfg.parsedConType || []; - const defCharset = cfg.defCharset || "utf8"; - const preservePath = cfg.preservePath; - const fileOpts = { highWaterMark: cfg.fileHwm }; - for (i$1 = 0, len = parsedConType.length; i$1 < len; ++i$1) if (Array.isArray(parsedConType[i$1]) && RE_BOUNDARY.test(parsedConType[i$1][0])) { - boundary = parsedConType[i$1][1]; - break; - } - function checkFinished() { - if (nends === 0 && finished$3 && !boy._done) { - finished$3 = false; - self.end(); - } - } - if (typeof boundary !== "string") throw new Error("Multipart: Boundary not found"); - const fieldSizeLimit = getLimit$1(limits, "fieldSize", 1 * 1024 * 1024); - const fileSizeLimit = getLimit$1(limits, "fileSize", Infinity); - const filesLimit = getLimit$1(limits, "files", Infinity); - const fieldsLimit = getLimit$1(limits, "fields", Infinity); - const partsLimit = getLimit$1(limits, "parts", Infinity); - const headerPairsLimit = getLimit$1(limits, "headerPairs", 2e3); - const headerSizeLimit = getLimit$1(limits, "headerSize", 80 * 1024); - let nfiles = 0; - let nfields = 0; - let nends = 0; - let curFile; - let curField; - let finished$3 = false; - this._needDrain = false; - this._pause = false; - this._cb = void 0; - this._nparts = 0; - this._boy = boy; - const parserCfg = { - boundary, - maxHeaderPairs: headerPairsLimit, - maxHeaderSize: headerSizeLimit, - partHwm: fileOpts.highWaterMark, - highWaterMark: cfg.highWaterMark - }; - this.parser = new Dicer$1(parserCfg); - this.parser.on("drain", function() { - self._needDrain = false; - if (self._cb && !self._pause) { - const cb = self._cb; - self._cb = void 0; - cb(); - } - }).on("part", function onPart(part) { - if (++self._nparts > partsLimit) { - self.parser.removeListener("part", onPart); - self.parser.on("part", skipPart); - boy.hitPartsLimit = true; - boy.emit("partsLimit"); - return skipPart(part); - } - if (curField) { - const field = curField; - field.emit("end"); - field.removeAllListeners("end"); - } - part.on("header", function(header) { - let contype; - let fieldname; - let parsed; - let charset; - let encoding; - let filename; - let nsize = 0; - if (header["content-type"]) { - parsed = parseParams$1(header["content-type"][0]); - if (parsed[0]) { - contype = parsed[0].toLowerCase(); - for (i$1 = 0, len = parsed.length; i$1 < len; ++i$1) if (RE_CHARSET$1.test(parsed[i$1][0])) { - charset = parsed[i$1][1].toLowerCase(); - break; - } - } - } - if (contype === void 0) contype = "text/plain"; - if (charset === void 0) charset = defCharset; - if (header["content-disposition"]) { - parsed = parseParams$1(header["content-disposition"][0]); - if (!RE_FIELD.test(parsed[0])) return skipPart(part); - for (i$1 = 0, len = parsed.length; i$1 < len; ++i$1) if (RE_NAME.test(parsed[i$1][0])) fieldname = parsed[i$1][1]; - else if (RE_FILENAME.test(parsed[i$1][0])) { - filename = parsed[i$1][1]; - if (!preservePath) filename = basename(filename); - } - } else return skipPart(part); - if (header["content-transfer-encoding"]) encoding = header["content-transfer-encoding"][0].toLowerCase(); - else encoding = "7bit"; - let onData, onEnd; - if (isPartAFile(fieldname, contype, filename)) { - if (nfiles === filesLimit) { - if (!boy.hitFilesLimit) { - boy.hitFilesLimit = true; - boy.emit("filesLimit"); - } - return skipPart(part); - } - ++nfiles; - if (boy.listenerCount("file") === 0) { - self.parser._ignore(); - return; - } - ++nends; - const file = new FileStream(fileOpts); - curFile = file; - file.on("end", function() { - --nends; - self._pause = false; - checkFinished(); - if (self._cb && !self._needDrain) { - const cb = self._cb; - self._cb = void 0; - cb(); - } - }); - file._read = function(n) { - if (!self._pause) return; - self._pause = false; - if (self._cb && !self._needDrain) { - const cb = self._cb; - self._cb = void 0; - cb(); - } - }; - boy.emit("file", fieldname, file, filename, encoding, contype); - onData = function(data) { - if ((nsize += data.length) > fileSizeLimit) { - const extralen = fileSizeLimit - nsize + data.length; - if (extralen > 0) file.push(data.slice(0, extralen)); - file.truncated = true; - file.bytesRead = fileSizeLimit; - part.removeAllListeners("data"); - file.emit("limit"); - return; - } else if (!file.push(data)) self._pause = true; - file.bytesRead = nsize; - }; - onEnd = function() { - curFile = void 0; - file.push(null); - }; - } else { - if (nfields === fieldsLimit) { - if (!boy.hitFieldsLimit) { - boy.hitFieldsLimit = true; - boy.emit("fieldsLimit"); - } - return skipPart(part); - } - ++nfields; - ++nends; - let buffer$1 = ""; - let truncated = false; - curField = part; - onData = function(data) { - if ((nsize += data.length) > fieldSizeLimit) { - const extralen = fieldSizeLimit - (nsize - data.length); - buffer$1 += data.toString("binary", 0, extralen); - truncated = true; - part.removeAllListeners("data"); - } else buffer$1 += data.toString("binary"); - }; - onEnd = function() { - curField = void 0; - if (buffer$1.length) buffer$1 = decodeText$1(buffer$1, "binary", charset); - boy.emit("field", fieldname, buffer$1, false, truncated, encoding, contype); - --nends; - checkFinished(); - }; - } - part._readableState.sync = false; - part.on("data", onData); - part.on("end", onEnd); - }).on("error", function(err) { - if (curFile) curFile.emit("error", err); - }); - }).on("error", function(err) { - boy.emit("error", err); - }).on("finish", function() { - finished$3 = true; - checkFinished(); - }); - } - Multipart.prototype.write = function(chunk, cb) { - const r = this.parser.write(chunk); - if (r && !this._pause) cb(); - else { - this._needDrain = !r; - this._cb = cb; - } - }; - Multipart.prototype.end = function() { - const self = this; - if (self.parser.writable) self.parser.end(); - else if (!self._boy._done) process.nextTick(function() { - self._boy._done = true; - self._boy.emit("finish"); - }); - }; - function skipPart(part) { - part.resume(); - } - function FileStream(opts) { - Readable$9.call(this, opts); - this.bytesRead = 0; - this.truncated = false; - } - inherits$1(FileStream, Readable$9); - FileStream.prototype._read = function(n) {}; - module.exports = Multipart; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js -var require_Decoder = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js"(exports, module) { - const RE_PLUS = /\+/g; - const HEX = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - function Decoder$1() { - this.buffer = void 0; - } - Decoder$1.prototype.write = function(str) { - str = str.replace(RE_PLUS, " "); - let res = ""; - let i$1 = 0; - let p = 0; - const len = str.length; - for (; i$1 < len; ++i$1) if (this.buffer !== void 0) if (!HEX[str.charCodeAt(i$1)]) { - res += "%" + this.buffer; - this.buffer = void 0; - --i$1; - } else { - this.buffer += str[i$1]; - ++p; - if (this.buffer.length === 2) { - res += String.fromCharCode(parseInt(this.buffer, 16)); - this.buffer = void 0; - } - } - else if (str[i$1] === "%") { - if (i$1 > p) { - res += str.substring(p, i$1); - p = i$1; - } - this.buffer = ""; - ++p; - } - if (p < len && this.buffer === void 0) res += str.substring(p); - return res; - }; - Decoder$1.prototype.reset = function() { - this.buffer = void 0; - }; - module.exports = Decoder$1; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js -var require_urlencoded = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js"(exports, module) { - const Decoder = require_Decoder(); - const decodeText = require_decodeText(); - const getLimit = require_getLimit(); - const RE_CHARSET = /^charset$/i; - UrlEncoded.detect = /^application\/x-www-form-urlencoded/i; - function UrlEncoded(boy, cfg) { - const limits = cfg.limits; - const parsedConType = cfg.parsedConType; - this.boy = boy; - this.fieldSizeLimit = getLimit(limits, "fieldSize", 1 * 1024 * 1024); - this.fieldNameSizeLimit = getLimit(limits, "fieldNameSize", 100); - this.fieldsLimit = getLimit(limits, "fields", Infinity); - let charset; - for (var i$1 = 0, len = parsedConType.length; i$1 < len; ++i$1) if (Array.isArray(parsedConType[i$1]) && RE_CHARSET.test(parsedConType[i$1][0])) { - charset = parsedConType[i$1][1].toLowerCase(); - break; - } - if (charset === void 0) charset = cfg.defCharset || "utf8"; - this.decoder = new Decoder(); - this.charset = charset; - this._fields = 0; - this._state = "key"; - this._checkingBytes = true; - this._bytesKey = 0; - this._bytesVal = 0; - this._key = ""; - this._val = ""; - this._keyTrunc = false; - this._valTrunc = false; - this._hitLimit = false; - } - UrlEncoded.prototype.write = function(data, cb) { - if (this._fields === this.fieldsLimit) { - if (!this.boy.hitFieldsLimit) { - this.boy.hitFieldsLimit = true; - this.boy.emit("fieldsLimit"); - } - return cb(); - } - let idxeq; - let idxamp; - let i$1; - let p = 0; - const len = data.length; - while (p < len) if (this._state === "key") { - idxeq = idxamp = void 0; - for (i$1 = p; i$1 < len; ++i$1) { - if (!this._checkingBytes) ++p; - if (data[i$1] === 61) { - idxeq = i$1; - break; - } else if (data[i$1] === 38) { - idxamp = i$1; - break; - } - if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { - this._hitLimit = true; - break; - } else if (this._checkingBytes) ++this._bytesKey; - } - if (idxeq !== void 0) { - if (idxeq > p) this._key += this.decoder.write(data.toString("binary", p, idxeq)); - this._state = "val"; - this._hitLimit = false; - this._checkingBytes = true; - this._val = ""; - this._bytesVal = 0; - this._valTrunc = false; - this.decoder.reset(); - p = idxeq + 1; - } else if (idxamp !== void 0) { - ++this._fields; - let key; - const keyTrunc = this._keyTrunc; - if (idxamp > p) key = this._key += this.decoder.write(data.toString("binary", p, idxamp)); - else key = this._key; - this._hitLimit = false; - this._checkingBytes = true; - this._key = ""; - this._bytesKey = 0; - this._keyTrunc = false; - this.decoder.reset(); - if (key.length) this.boy.emit("field", decodeText(key, "binary", this.charset), "", keyTrunc, false); - p = idxamp + 1; - if (this._fields === this.fieldsLimit) return cb(); - } else if (this._hitLimit) { - if (i$1 > p) this._key += this.decoder.write(data.toString("binary", p, i$1)); - p = i$1; - if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { - this._checkingBytes = false; - this._keyTrunc = true; - } - } else { - if (p < len) this._key += this.decoder.write(data.toString("binary", p)); - p = len; - } - } else { - idxamp = void 0; - for (i$1 = p; i$1 < len; ++i$1) { - if (!this._checkingBytes) ++p; - if (data[i$1] === 38) { - idxamp = i$1; - break; - } - if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { - this._hitLimit = true; - break; - } else if (this._checkingBytes) ++this._bytesVal; - } - if (idxamp !== void 0) { - ++this._fields; - if (idxamp > p) this._val += this.decoder.write(data.toString("binary", p, idxamp)); - this.boy.emit("field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); - this._state = "key"; - this._hitLimit = false; - this._checkingBytes = true; - this._key = ""; - this._bytesKey = 0; - this._keyTrunc = false; - this.decoder.reset(); - p = idxamp + 1; - if (this._fields === this.fieldsLimit) return cb(); - } else if (this._hitLimit) { - if (i$1 > p) this._val += this.decoder.write(data.toString("binary", p, i$1)); - p = i$1; - if (this._val === "" && this.fieldSizeLimit === 0 || (this._bytesVal = this._val.length) === this.fieldSizeLimit) { - this._checkingBytes = false; - this._valTrunc = true; - } - } else { - if (p < len) this._val += this.decoder.write(data.toString("binary", p)); - p = len; - } - } - cb(); - }; - UrlEncoded.prototype.end = function() { - if (this.boy._done) return; - if (this._state === "key" && this._key.length > 0) this.boy.emit("field", decodeText(this._key, "binary", this.charset), "", this._keyTrunc, false); - else if (this._state === "val") this.boy.emit("field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); - this.boy._done = true; - this.boy.emit("finish"); - }; - module.exports = UrlEncoded; -} }); - -//#endregion -//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js -var require_main = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js"(exports, module) { - const WritableStream$1 = __require("node:stream").Writable; - const { inherits } = __require("node:util"); - const Dicer = require_Dicer(); - const MultipartParser = require_multipart(); - const UrlencodedParser = require_urlencoded(); - const parseParams = require_parseParams(); - function Busboy$1(opts) { - if (!(this instanceof Busboy$1)) return new Busboy$1(opts); - if (typeof opts !== "object") throw new TypeError("Busboy expected an options-Object."); - if (typeof opts.headers !== "object") throw new TypeError("Busboy expected an options-Object with headers-attribute."); - if (typeof opts.headers["content-type"] !== "string") throw new TypeError("Missing Content-Type-header."); - const { headers,...streamOptions } = opts; - this.opts = { - autoDestroy: false, - ...streamOptions - }; - WritableStream$1.call(this, this.opts); - this._done = false; - this._parser = this.getParserByHeaders(headers); - this._finished = false; - } - inherits(Busboy$1, WritableStream$1); - Busboy$1.prototype.emit = function(ev) { - if (ev === "finish") { - if (!this._done) { - this._parser?.end(); - return; - } else if (this._finished) return; - this._finished = true; - } - WritableStream$1.prototype.emit.apply(this, arguments); - }; - Busboy$1.prototype.getParserByHeaders = function(headers) { - const parsed = parseParams(headers["content-type"]); - const cfg = { - defCharset: this.opts.defCharset, - fileHwm: this.opts.fileHwm, - headers, - highWaterMark: this.opts.highWaterMark, - isPartAFile: this.opts.isPartAFile, - limits: this.opts.limits, - parsedConType: parsed, - preservePath: this.opts.preservePath - }; - if (MultipartParser.detect.test(parsed[0])) return new MultipartParser(this, cfg); - if (UrlencodedParser.detect.test(parsed[0])) return new UrlencodedParser(this, cfg); - throw new Error("Unsupported Content-Type."); - }; - Busboy$1.prototype._write = function(chunk, encoding, cb) { - this._parser.write(chunk, cb); - }; - module.exports = Busboy$1; - module.exports.default = Busboy$1; - module.exports.Busboy = Busboy$1; - module.exports.Dicer = Dicer; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/constants.js -var require_constants$9 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/constants.js"(exports, module) { - const { MessageChannel, receiveMessageOnPort } = __require("worker_threads"); - const corsSafeListedMethods$1 = [ - "GET", - "HEAD", - "POST" - ]; - const corsSafeListedMethodsSet$3 = new Set(corsSafeListedMethods$1); - const nullBodyStatus$5 = [ - 101, - 204, - 205, - 304 - ]; - const redirectStatus$1 = [ - 301, - 302, - 303, - 307, - 308 - ]; - const redirectStatusSet$7 = new Set(redirectStatus$1); - const badPorts$1 = [ - "1", - "7", - "9", - "11", - "13", - "15", - "17", - "19", - "20", - "21", - "22", - "23", - "25", - "37", - "42", - "43", - "53", - "69", - "77", - "79", - "87", - "95", - "101", - "102", - "103", - "104", - "109", - "110", - "111", - "113", - "115", - "117", - "119", - "123", - "135", - "137", - "139", - "143", - "161", - "179", - "389", - "427", - "465", - "512", - "513", - "514", - "515", - "526", - "530", - "531", - "532", - "540", - "548", - "554", - "556", - "563", - "587", - "601", - "636", - "989", - "990", - "993", - "995", - "1719", - "1720", - "1723", - "2049", - "3659", - "4045", - "5060", - "5061", - "6000", - "6566", - "6665", - "6666", - "6667", - "6668", - "6669", - "6697", - "10080" - ]; - const badPortsSet$3 = new Set(badPorts$1); - const referrerPolicy$3 = [ - "", - "no-referrer", - "no-referrer-when-downgrade", - "same-origin", - "origin", - "strict-origin", - "origin-when-cross-origin", - "strict-origin-when-cross-origin", - "unsafe-url" - ]; - const referrerPolicySet = new Set(referrerPolicy$3); - const requestRedirect$3 = [ - "follow", - "manual", - "error" - ]; - const safeMethods$1 = [ - "GET", - "HEAD", - "OPTIONS", - "TRACE" - ]; - const safeMethodsSet$3 = new Set(safeMethods$1); - const requestMode$3 = [ - "navigate", - "same-origin", - "no-cors", - "cors" - ]; - const requestCredentials$3 = [ - "omit", - "same-origin", - "include" - ]; - const requestCache$3 = [ - "default", - "no-store", - "reload", - "no-cache", - "force-cache", - "only-if-cached" - ]; - const requestBodyHeader$3 = [ - "content-encoding", - "content-language", - "content-location", - "content-type", - "content-length" - ]; - const requestDuplex$3 = ["half"]; - const forbiddenMethods$1 = [ - "CONNECT", - "TRACE", - "TRACK" - ]; - const forbiddenMethodsSet$3 = new Set(forbiddenMethods$1); - const subresource$1 = [ - "audio", - "audioworklet", - "font", - "image", - "manifest", - "paintworklet", - "script", - "style", - "track", - "video", - "xslt", - "" - ]; - const subresourceSet$3 = new Set(subresource$1); - /** @type {globalThis['DOMException']} */ - const DOMException$6 = globalThis.DOMException ?? (() => { - try { - atob("~"); - } catch (err) { - return Object.getPrototypeOf(err).constructor; - } - })(); - let channel; - /** @type {globalThis['structuredClone']} */ - const structuredClone$1 = globalThis.structuredClone ?? function structuredClone$2(value, options = void 0) { - if (arguments.length === 0) throw new TypeError("missing argument"); - if (!channel) channel = new MessageChannel(); - channel.port1.unref(); - channel.port2.unref(); - channel.port1.postMessage(value, options?.transfer); - return receiveMessageOnPort(channel.port2).message; - }; - module.exports = { - DOMException: DOMException$6, - structuredClone: structuredClone$1, - subresource: subresource$1, - forbiddenMethods: forbiddenMethods$1, - requestBodyHeader: requestBodyHeader$3, - referrerPolicy: referrerPolicy$3, - requestRedirect: requestRedirect$3, - requestMode: requestMode$3, - requestCredentials: requestCredentials$3, - requestCache: requestCache$3, - redirectStatus: redirectStatus$1, - corsSafeListedMethods: corsSafeListedMethods$1, - nullBodyStatus: nullBodyStatus$5, - safeMethods: safeMethods$1, - badPorts: badPorts$1, - requestDuplex: requestDuplex$3, - subresourceSet: subresourceSet$3, - badPortsSet: badPortsSet$3, - redirectStatusSet: redirectStatusSet$7, - corsSafeListedMethodsSet: corsSafeListedMethodsSet$3, - safeMethodsSet: safeMethodsSet$3, - forbiddenMethodsSet: forbiddenMethodsSet$3, - referrerPolicySet - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/global.js -var require_global$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/global.js"(exports, module) { - const globalOrigin$1 = Symbol.for("undici.globalOrigin.1"); - function getGlobalOrigin$7() { - return globalThis[globalOrigin$1]; - } - function setGlobalOrigin$2(newOrigin) { - if (newOrigin === void 0) { - Object.defineProperty(globalThis, globalOrigin$1, { - value: void 0, - writable: true, - enumerable: false, - configurable: false - }); - return; - } - const parsedURL = new URL(newOrigin); - if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); - Object.defineProperty(globalThis, globalOrigin$1, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }); - } - module.exports = { - getGlobalOrigin: getGlobalOrigin$7, - setGlobalOrigin: setGlobalOrigin$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/util.js -var require_util$11 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/util.js"(exports, module) { - const { redirectStatusSet: redirectStatusSet$6, referrerPolicySet: referrerPolicyTokens$2, badPortsSet: badPortsSet$2 } = require_constants$9(); - const { getGlobalOrigin: getGlobalOrigin$6 } = require_global$3(); - const { performance: performance$2 } = __require("perf_hooks"); - const { isBlobLike: isBlobLike$8, toUSVString: toUSVString$6, ReadableStreamFrom: ReadableStreamFrom$6 } = require_util$12(); - const assert$48 = __require("assert"); - const { isUint8Array: isUint8Array$2 } = __require("util/types"); - let supportedHashes$1 = []; - /** @type {import('crypto')|undefined} */ - let crypto$6; - try { - crypto$6 = __require("crypto"); - const possibleRelevantHashes = [ - "sha256", - "sha384", - "sha512" - ]; - supportedHashes$1 = crypto$6.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); - } catch {} - function responseURL$1(response) { - const urlList = response.urlList; - const length = urlList.length; - return length === 0 ? null : urlList[length - 1].toString(); - } - function responseLocationURL$3(response, requestFragment) { - if (!redirectStatusSet$6.has(response.status)) return null; - let location = response.headersList.get("location"); - if (location !== null && isValidHeaderValue$5(location)) location = new URL(location, responseURL$1(response)); - if (location && !location.hash) location.hash = requestFragment; - return location; - } - /** @returns {URL} */ - function requestCurrentURL$3(request$2) { - return request$2.urlList[request$2.urlList.length - 1]; - } - function requestBadPort$3(request$2) { - const url = requestCurrentURL$3(request$2); - if (urlIsHttpHttpsScheme$5(url) && badPortsSet$2.has(url.port)) return "blocked"; - return "allowed"; - } - function isErrorLike$5(object) { - return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; - } - function isValidReasonPhrase$3(statusText) { - for (let i$1 = 0; i$1 < statusText.length; ++i$1) { - const c = statusText.charCodeAt(i$1); - if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; - } - return true; - } - /** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ - function isTokenCharCode$1(c) { - switch (c) { - case 34: - case 40: - case 41: - case 44: - case 47: - case 58: - case 59: - case 60: - case 61: - case 62: - case 63: - case 64: - case 91: - case 92: - case 93: - case 123: - case 125: return false; - default: return c >= 33 && c <= 126; - } - } - /** - * @param {string} characters - */ - function isValidHTTPToken$5(characters) { - if (characters.length === 0) return false; - for (let i$1 = 0; i$1 < characters.length; ++i$1) if (!isTokenCharCode$1(characters.charCodeAt(i$1))) return false; - return true; - } - /** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ - function isValidHeaderName$5(potentialValue) { - return isValidHTTPToken$5(potentialValue); - } - /** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ - function isValidHeaderValue$5(potentialValue) { - if (potentialValue.startsWith(" ") || potentialValue.startsWith(" ") || potentialValue.endsWith(" ") || potentialValue.endsWith(" ")) return false; - if (potentialValue.includes("\0") || potentialValue.includes("\r") || potentialValue.includes("\n")) return false; - return true; - } - function setRequestReferrerPolicyOnRedirect$3(request$2, actualResponse) { - const { headersList } = actualResponse; - const policyHeader = (headersList.get("referrer-policy") ?? "").split(","); - let policy = ""; - if (policyHeader.length > 0) for (let i$1 = policyHeader.length; i$1 !== 0; i$1--) { - const token = policyHeader[i$1 - 1].trim(); - if (referrerPolicyTokens$2.has(token)) { - policy = token; - break; - } - } - if (policy !== "") request$2.referrerPolicy = policy; - } - function crossOriginResourcePolicyCheck$3() { - return "allowed"; - } - function corsCheck$3() { - return "success"; - } - function TAOCheck$3() { - return "success"; - } - function appendFetchMetadata$3(httpRequest) { - let header = null; - header = httpRequest.mode; - httpRequest.headersList.set("sec-fetch-mode", header); - } - function appendRequestOriginHeader$3(request$2) { - let serializedOrigin = request$2.origin; - if (request$2.responseTainting === "cors" || request$2.mode === "websocket") { - if (serializedOrigin) request$2.headersList.append("origin", serializedOrigin); - } else if (request$2.method !== "GET" && request$2.method !== "HEAD") { - switch (request$2.referrerPolicy) { - case "no-referrer": - serializedOrigin = null; - break; - case "no-referrer-when-downgrade": - case "strict-origin": - case "strict-origin-when-cross-origin": - if (request$2.origin && urlHasHttpsScheme$3(request$2.origin) && !urlHasHttpsScheme$3(requestCurrentURL$3(request$2))) serializedOrigin = null; - break; - case "same-origin": - if (!sameOrigin$5(request$2, requestCurrentURL$3(request$2))) serializedOrigin = null; - break; - default: - } - if (serializedOrigin) request$2.headersList.append("origin", serializedOrigin); - } - } - function coarsenedSharedCurrentTime$3(crossOriginIsolatedCapability) { - return performance$2.now(); - } - function createOpaqueTimingInfo$3(timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - }; - } - function makePolicyContainer$4() { - return { referrerPolicy: "strict-origin-when-cross-origin" }; - } - function clonePolicyContainer$3(policyContainer) { - return { referrerPolicy: policyContainer.referrerPolicy }; - } - function determineRequestsReferrer$3(request$2) { - const policy = request$2.referrerPolicy; - assert$48(policy); - let referrerSource = null; - if (request$2.referrer === "client") { - const globalOrigin$2 = getGlobalOrigin$6(); - if (!globalOrigin$2 || globalOrigin$2.origin === "null") return "no-referrer"; - referrerSource = new URL(globalOrigin$2); - } else if (request$2.referrer instanceof URL) referrerSource = request$2.referrer; - let referrerURL = stripURLForReferrer$1(referrerSource); - const referrerOrigin = stripURLForReferrer$1(referrerSource, true); - if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; - const areSameOrigin = sameOrigin$5(request$2, referrerURL); - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy$1(referrerURL) && !isURLPotentiallyTrustworthy$1(request$2.url); - switch (policy) { - case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer$1(referrerSource, true); - case "unsafe-url": return referrerURL; - case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; - case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; - case "strict-origin-when-cross-origin": { - const currentURL = requestCurrentURL$3(request$2); - if (sameOrigin$5(referrerURL, currentURL)) return referrerURL; - if (isURLPotentiallyTrustworthy$1(referrerURL) && !isURLPotentiallyTrustworthy$1(currentURL)) return "no-referrer"; - return referrerOrigin; - } - case "strict-origin": - case "no-referrer-when-downgrade": - default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; - } - } - /** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ - function stripURLForReferrer$1(url, originOnly) { - assert$48(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; - url.username = ""; - url.password = ""; - url.hash = ""; - if (originOnly) { - url.pathname = ""; - url.search = ""; - } - return url; - } - function isURLPotentiallyTrustworthy$1(url) { - if (!(url instanceof URL)) return false; - if (url.href === "about:blank" || url.href === "about:srcdoc") return true; - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy$1(url.origin); - function isOriginPotentiallyTrustworthy$1(origin) { - if (origin == null || origin === "null") return false; - const originAsURL = new URL(origin); - if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; - return false; - } - } - /** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ - function bytesMatch$3(bytes, metadataList) { - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto$6 === void 0) return true; - const parsedMetadata = parseMetadata$1(metadataList); - if (parsedMetadata === "no metadata") return true; - if (parsedMetadata.length === 0) return true; - const strongest = getStrongestMetadata$1(parsedMetadata); - const metadata = filterMetadataListByAlgorithm$1(parsedMetadata, strongest); - for (const item of metadata) { - const algorithm = item.algo; - const expectedValue = item.hash; - let actualValue = crypto$6.createHash(algorithm).update(bytes).digest("base64"); - if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); - else actualValue = actualValue.slice(0, -1); - if (compareBase64Mixed$1(actualValue, expectedValue)) return true; - } - return false; - } - const parseHashWithOptions$1 = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; - /** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ - function parseMetadata$1(metadata) { - /** @type {{ algo: string, hash: string }[]} */ - const result = []; - let empty = true; - for (const token of metadata.split(" ")) { - empty = false; - const parsedToken = parseHashWithOptions$1.exec(token); - if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; - const algorithm = parsedToken.groups.algo.toLowerCase(); - if (supportedHashes$1.includes(algorithm)) result.push(parsedToken.groups); - } - if (empty === true) return "no metadata"; - return result; - } - /** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ - function getStrongestMetadata$1(metadataList) { - let algorithm = metadataList[0].algo; - if (algorithm[3] === "5") return algorithm; - for (let i$1 = 1; i$1 < metadataList.length; ++i$1) { - const metadata = metadataList[i$1]; - if (metadata.algo[3] === "5") { - algorithm = "sha512"; - break; - } else if (algorithm[3] === "3") continue; - else if (metadata.algo[3] === "3") algorithm = "sha384"; - } - return algorithm; - } - function filterMetadataListByAlgorithm$1(metadataList, algorithm) { - if (metadataList.length === 1) return metadataList; - let pos = 0; - for (let i$1 = 0; i$1 < metadataList.length; ++i$1) if (metadataList[i$1].algo === algorithm) metadataList[pos++] = metadataList[i$1]; - metadataList.length = pos; - return metadataList; - } - /** - * Compares two base64 strings, allowing for base64url - * in the second string. - * - * @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ - function compareBase64Mixed$1(actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) return false; - for (let i$1 = 0; i$1 < actualValue.length; ++i$1) if (actualValue[i$1] !== expectedValue[i$1]) { - if (actualValue[i$1] === "+" && expectedValue[i$1] === "-" || actualValue[i$1] === "/" && expectedValue[i$1] === "_") continue; - return false; - } - return true; - } - function tryUpgradeRequestToAPotentiallyTrustworthyURL$3(request$2) {} - /** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ - function sameOrigin$5(A, B) { - if (A.origin === B.origin && A.origin === "null") return true; - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; - return false; - } - function createDeferredPromise$8() { - let res; - let rej; - const promise = new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }); - return { - promise, - resolve: res, - reject: rej - }; - } - function isAborted$5(fetchParams) { - return fetchParams.controller.state === "aborted"; - } - function isCancelled$5(fetchParams) { - return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; - } - const normalizeMethodRecord$1 = { - delete: "DELETE", - DELETE: "DELETE", - get: "GET", - GET: "GET", - head: "HEAD", - HEAD: "HEAD", - options: "OPTIONS", - OPTIONS: "OPTIONS", - post: "POST", - POST: "POST", - put: "PUT", - PUT: "PUT" - }; - Object.setPrototypeOf(normalizeMethodRecord$1, null); - /** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ - function normalizeMethod$2(method) { - return normalizeMethodRecord$1[method.toLowerCase()] ?? method; - } - function serializeJavascriptValueToJSONString$3(value) { - const result = JSON.stringify(value); - if (result === void 0) throw new TypeError("Value is not JSON serializable"); - assert$48(typeof result === "string"); - return result; - } - const esIteratorPrototype$1 = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); - /** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {() => unknown[]} iterator - * @param {string} name name of the instance - * @param {'key'|'value'|'key+value'} kind - */ - function makeIterator$2(iterator, name, kind) { - const object = { - index: 0, - kind, - target: iterator - }; - const i$1 = { - next() { - if (Object.getPrototypeOf(this) !== i$1) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); - const { index, kind: kind$1, target } = object; - const values = target(); - const len = values.length; - if (index >= len) return { - value: void 0, - done: true - }; - const pair = values[index]; - object.index = index + 1; - return iteratorResult(pair, kind$1); - }, - [Symbol.toStringTag]: `${name} Iterator` - }; - Object.setPrototypeOf(i$1, esIteratorPrototype$1); - return Object.setPrototypeOf({}, i$1); - } - function iteratorResult(pair, kind) { - let result; - switch (kind) { - case "key": { - result = pair[0]; - break; - } - case "value": { - result = pair[1]; - break; - } - case "key+value": { - result = pair; - break; - } - } - return { - value: result, - done: false - }; - } - /** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ - async function fullyReadBody$5(body, processBody, processBodyError) { - const successSteps = processBody; - const errorSteps = processBodyError; - let reader; - try { - reader = body.stream.getReader(); - } catch (e) { - errorSteps(e); - return; - } - try { - const result = await readAllBytes$3(reader); - successSteps(result); - } catch (e) { - errorSteps(e); - } - } - /** @type {ReadableStream} */ - let ReadableStream$4 = globalThis.ReadableStream; - function isReadableStreamLike$1(stream$5) { - if (!ReadableStream$4) ReadableStream$4 = __require("stream/web").ReadableStream; - return stream$5 instanceof ReadableStream$4 || stream$5[Symbol.toStringTag] === "ReadableStream" && typeof stream$5.tee === "function"; - } - const MAXIMUM_ARGUMENT_LENGTH = 65535; - /** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {number[]|Uint8Array} input - */ - function isomorphicDecode$3(input) { - if (input.length < MAXIMUM_ARGUMENT_LENGTH) return String.fromCharCode(...input); - return input.reduce((previous, current) => previous + String.fromCharCode(current), ""); - } - /** - * @param {ReadableStreamController} controller - */ - function readableStreamClose$5(controller) { - try { - controller.close(); - } catch (err) { - if (!err.message.includes("Controller is already closed")) throw err; - } - } - /** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ - function isomorphicEncode$5(input) { - for (let i$1 = 0; i$1 < input.length; i$1++) assert$48(input.charCodeAt(i$1) <= 255); - return input; - } - /** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ - async function readAllBytes$3(reader) { - const bytes = []; - let byteLength = 0; - while (true) { - const { done, value: chunk } = await reader.read(); - if (done) return Buffer.concat(bytes, byteLength); - if (!isUint8Array$2(chunk)) throw new TypeError("Received non-Uint8Array chunk"); - bytes.push(chunk); - byteLength += chunk.length; - } - } - /** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ - function urlIsLocal$3(url) { - assert$48("protocol" in url); - const protocol = url.protocol; - return protocol === "about:" || protocol === "blob:" || protocol === "data:"; - } - /** - * @param {string|URL} url - */ - function urlHasHttpsScheme$3(url) { - if (typeof url === "string") return url.startsWith("https:"); - return url.protocol === "https:"; - } - /** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ - function urlIsHttpHttpsScheme$5(url) { - assert$48("protocol" in url); - const protocol = url.protocol; - return protocol === "http:" || protocol === "https:"; - } - /** - * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0. - */ - const hasOwn$1 = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); - module.exports = { - isAborted: isAborted$5, - isCancelled: isCancelled$5, - createDeferredPromise: createDeferredPromise$8, - ReadableStreamFrom: ReadableStreamFrom$6, - toUSVString: toUSVString$6, - tryUpgradeRequestToAPotentiallyTrustworthyURL: tryUpgradeRequestToAPotentiallyTrustworthyURL$3, - coarsenedSharedCurrentTime: coarsenedSharedCurrentTime$3, - determineRequestsReferrer: determineRequestsReferrer$3, - makePolicyContainer: makePolicyContainer$4, - clonePolicyContainer: clonePolicyContainer$3, - appendFetchMetadata: appendFetchMetadata$3, - appendRequestOriginHeader: appendRequestOriginHeader$3, - TAOCheck: TAOCheck$3, - corsCheck: corsCheck$3, - crossOriginResourcePolicyCheck: crossOriginResourcePolicyCheck$3, - createOpaqueTimingInfo: createOpaqueTimingInfo$3, - setRequestReferrerPolicyOnRedirect: setRequestReferrerPolicyOnRedirect$3, - isValidHTTPToken: isValidHTTPToken$5, - requestBadPort: requestBadPort$3, - requestCurrentURL: requestCurrentURL$3, - responseURL: responseURL$1, - responseLocationURL: responseLocationURL$3, - isBlobLike: isBlobLike$8, - isURLPotentiallyTrustworthy: isURLPotentiallyTrustworthy$1, - isValidReasonPhrase: isValidReasonPhrase$3, - sameOrigin: sameOrigin$5, - normalizeMethod: normalizeMethod$2, - serializeJavascriptValueToJSONString: serializeJavascriptValueToJSONString$3, - makeIterator: makeIterator$2, - isValidHeaderName: isValidHeaderName$5, - isValidHeaderValue: isValidHeaderValue$5, - hasOwn: hasOwn$1, - isErrorLike: isErrorLike$5, - fullyReadBody: fullyReadBody$5, - bytesMatch: bytesMatch$3, - isReadableStreamLike: isReadableStreamLike$1, - readableStreamClose: readableStreamClose$5, - isomorphicEncode: isomorphicEncode$5, - isomorphicDecode: isomorphicDecode$3, - urlIsLocal: urlIsLocal$3, - urlHasHttpsScheme: urlHasHttpsScheme$3, - urlIsHttpHttpsScheme: urlIsHttpHttpsScheme$5, - readAllBytes: readAllBytes$3, - normalizeMethodRecord: normalizeMethodRecord$1, - parseMetadata: parseMetadata$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js -var require_symbols$4 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js"(exports, module) { - module.exports = { - kUrl: Symbol("url"), - kHeaders: Symbol("headers"), - kSignal: Symbol("signal"), - kState: Symbol("state"), - kGuard: Symbol("guard"), - kRealm: Symbol("realm") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js -var require_webidl$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js"(exports, module) { - const { types: types$8 } = __require("util"); - const { hasOwn, toUSVString: toUSVString$5 } = require_util$11(); - /** @type {import('../../types/webidl').Webidl} */ - const webidl$31 = {}; - webidl$31.converters = {}; - webidl$31.util = {}; - webidl$31.errors = {}; - webidl$31.errors.exception = function(message) { - return new TypeError(`${message.header}: ${message.message}`); - }; - webidl$31.errors.conversionFailed = function(context) { - const plural = context.types.length === 1 ? "" : " one of"; - const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; - return webidl$31.errors.exception({ - header: context.prefix, - message - }); - }; - webidl$31.errors.invalidArgument = function(context) { - return webidl$31.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }); - }; - webidl$31.brandCheck = function(V, I, opts = void 0) { - if (opts?.strict !== false && !(V instanceof I)) throw new TypeError("Illegal invocation"); - else return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag]; - }; - webidl$31.argumentLengthCheck = function({ length }, min, ctx) { - if (length < min) throw webidl$31.errors.exception({ - message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, - ...ctx - }); - }; - webidl$31.illegalConstructor = function() { - throw webidl$31.errors.exception({ - header: "TypeError", - message: "Illegal constructor" - }); - }; - webidl$31.util.Type = function(V) { - switch (typeof V) { - case "undefined": return "Undefined"; - case "boolean": return "Boolean"; - case "string": return "String"; - case "symbol": return "Symbol"; - case "number": return "Number"; - case "bigint": return "BigInt"; - case "function": - case "object": { - if (V === null) return "Null"; - return "Object"; - } - } - }; - webidl$31.util.ConvertToInt = function(V, bitLength, signedness, opts = {}) { - let upperBound; - let lowerBound; - if (bitLength === 64) { - upperBound = Math.pow(2, 53) - 1; - if (signedness === "unsigned") lowerBound = 0; - else lowerBound = Math.pow(-2, 53) + 1; - } else if (signedness === "unsigned") { - lowerBound = 0; - upperBound = Math.pow(2, bitLength) - 1; - } else { - lowerBound = Math.pow(-2, bitLength) - 1; - upperBound = Math.pow(2, bitLength - 1) - 1; - } - let x = Number(V); - if (x === 0) x = 0; - if (opts.enforceRange === true) { - if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl$31.errors.exception({ - header: "Integer conversion", - message: `Could not convert ${V} to an integer.` - }); - x = webidl$31.util.IntegerPart(x); - if (x < lowerBound || x > upperBound) throw webidl$31.errors.exception({ - header: "Integer conversion", - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }); - return x; - } - if (!Number.isNaN(x) && opts.clamp === true) { - x = Math.min(Math.max(x, lowerBound), upperBound); - if (Math.floor(x) % 2 === 0) x = Math.floor(x); - else x = Math.ceil(x); - return x; - } - if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; - x = webidl$31.util.IntegerPart(x); - x = x % Math.pow(2, bitLength); - if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); - return x; - }; - webidl$31.util.IntegerPart = function(n) { - const r = Math.floor(Math.abs(n)); - if (n < 0) return -1 * r; - return r; - }; - webidl$31.sequenceConverter = function(converter) { - return (V) => { - if (webidl$31.util.Type(V) !== "Object") throw webidl$31.errors.exception({ - header: "Sequence", - message: `Value of type ${webidl$31.util.Type(V)} is not an Object.` - }); - /** @type {Generator} */ - const method = V?.[Symbol.iterator]?.(); - const seq = []; - if (method === void 0 || typeof method.next !== "function") throw webidl$31.errors.exception({ - header: "Sequence", - message: "Object is not an iterator." - }); - while (true) { - const { done, value } = method.next(); - if (done) break; - seq.push(converter(value)); - } - return seq; - }; - }; - webidl$31.recordConverter = function(keyConverter, valueConverter) { - return (O) => { - if (webidl$31.util.Type(O) !== "Object") throw webidl$31.errors.exception({ - header: "Record", - message: `Value of type ${webidl$31.util.Type(O)} is not an Object.` - }); - const result = {}; - if (!types$8.isProxy(O)) { - const keys$1 = Object.keys(O); - for (const key of keys$1) { - const typedKey = keyConverter(key); - const typedValue = valueConverter(O[key]); - result[typedKey] = typedValue; - } - return result; - } - const keys = Reflect.ownKeys(O); - for (const key of keys) { - const desc = Reflect.getOwnPropertyDescriptor(O, key); - if (desc?.enumerable) { - const typedKey = keyConverter(key); - const typedValue = valueConverter(O[key]); - result[typedKey] = typedValue; - } - } - return result; - }; - }; - webidl$31.interfaceConverter = function(i$1) { - return (V, opts = {}) => { - if (opts.strict !== false && !(V instanceof i$1)) throw webidl$31.errors.exception({ - header: i$1.name, - message: `Expected ${V} to be an instance of ${i$1.name}.` - }); - return V; - }; - }; - webidl$31.dictionaryConverter = function(converters) { - return (dictionary) => { - const type = webidl$31.util.Type(dictionary); - const dict = {}; - if (type === "Null" || type === "Undefined") return dict; - else if (type !== "Object") throw webidl$31.errors.exception({ - header: "Dictionary", - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }); - for (const options of converters) { - const { key, defaultValue, required, converter } = options; - if (required === true) { - if (!hasOwn(dictionary, key)) throw webidl$31.errors.exception({ - header: "Dictionary", - message: `Missing required key "${key}".` - }); - } - let value = dictionary[key]; - const hasDefault = hasOwn(options, "defaultValue"); - if (hasDefault && value !== null) value = value ?? defaultValue; - if (required || hasDefault || value !== void 0) { - value = converter(value); - if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl$31.errors.exception({ - header: "Dictionary", - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` - }); - dict[key] = value; - } - } - return dict; - }; - }; - webidl$31.nullableConverter = function(converter) { - return (V) => { - if (V === null) return V; - return converter(V); - }; - }; - webidl$31.converters.DOMString = function(V, opts = {}) { - if (V === null && opts.legacyNullToEmptyString) return ""; - if (typeof V === "symbol") throw new TypeError("Could not convert argument of type symbol to string."); - return String(V); - }; - webidl$31.converters.ByteString = function(V) { - const x = webidl$31.converters.DOMString(V); - for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); - return x; - }; - webidl$31.converters.USVString = toUSVString$5; - webidl$31.converters.boolean = function(V) { - const x = Boolean(V); - return x; - }; - webidl$31.converters.any = function(V) { - return V; - }; - webidl$31.converters["long long"] = function(V) { - const x = webidl$31.util.ConvertToInt(V, 64, "signed"); - return x; - }; - webidl$31.converters["unsigned long long"] = function(V) { - const x = webidl$31.util.ConvertToInt(V, 64, "unsigned"); - return x; - }; - webidl$31.converters["unsigned long"] = function(V) { - const x = webidl$31.util.ConvertToInt(V, 32, "unsigned"); - return x; - }; - webidl$31.converters["unsigned short"] = function(V, opts) { - const x = webidl$31.util.ConvertToInt(V, 16, "unsigned", opts); - return x; - }; - webidl$31.converters.ArrayBuffer = function(V, opts = {}) { - if (webidl$31.util.Type(V) !== "Object" || !types$8.isAnyArrayBuffer(V)) throw webidl$31.errors.conversionFailed({ - prefix: `${V}`, - argument: `${V}`, - types: ["ArrayBuffer"] - }); - if (opts.allowShared === false && types$8.isSharedArrayBuffer(V)) throw webidl$31.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - return V; - }; - webidl$31.converters.TypedArray = function(V, T, opts = {}) { - if (webidl$31.util.Type(V) !== "Object" || !types$8.isTypedArray(V) || V.constructor.name !== T.name) throw webidl$31.errors.conversionFailed({ - prefix: `${T.name}`, - argument: `${V}`, - types: [T.name] - }); - if (opts.allowShared === false && types$8.isSharedArrayBuffer(V.buffer)) throw webidl$31.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - return V; - }; - webidl$31.converters.DataView = function(V, opts = {}) { - if (webidl$31.util.Type(V) !== "Object" || !types$8.isDataView(V)) throw webidl$31.errors.exception({ - header: "DataView", - message: "Object is not a DataView." - }); - if (opts.allowShared === false && types$8.isSharedArrayBuffer(V.buffer)) throw webidl$31.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - return V; - }; - webidl$31.converters.BufferSource = function(V, opts = {}) { - if (types$8.isAnyArrayBuffer(V)) return webidl$31.converters.ArrayBuffer(V, opts); - if (types$8.isTypedArray(V)) return webidl$31.converters.TypedArray(V, V.constructor); - if (types$8.isDataView(V)) return webidl$31.converters.DataView(V, opts); - throw new TypeError(`Could not convert ${V} to a BufferSource.`); - }; - webidl$31.converters["sequence"] = webidl$31.sequenceConverter(webidl$31.converters.ByteString); - webidl$31.converters["sequence>"] = webidl$31.sequenceConverter(webidl$31.converters["sequence"]); - webidl$31.converters["record"] = webidl$31.recordConverter(webidl$31.converters.ByteString, webidl$31.converters.ByteString); - module.exports = { webidl: webidl$31 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js -var require_dataURL = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js"(exports, module) { - const assert$47 = __require("assert"); - const { atob: atob$1 } = __require("buffer"); - const { isomorphicDecode: isomorphicDecode$2 } = require_util$11(); - const encoder$2 = new TextEncoder(); - /** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ - const HTTP_TOKEN_CODEPOINTS$2 = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/; - const HTTP_WHITESPACE_REGEX$1 = /(\u000A|\u000D|\u0009|\u0020)/; - /** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ - const HTTP_QUOTED_STRING_TOKENS$1 = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/; - /** @param {URL} dataURL */ - function dataURLProcessor$3(dataURL) { - assert$47(dataURL.protocol === "data:"); - let input = URLSerializer$9(dataURL, true); - input = input.slice(5); - const position = { position: 0 }; - let mimeType = collectASequenceOfCodePointsFast$4(",", input, position); - const mimeTypeLength = mimeType.length; - mimeType = removeASCIIWhitespace$1(mimeType, true, true); - if (position.position >= input.length) return "failure"; - position.position++; - const encodedBody = input.slice(mimeTypeLength + 1); - let body = stringPercentDecode$1(encodedBody); - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - const stringBody = isomorphicDecode$2(body); - body = forgivingBase64$1(stringBody); - if (body === "failure") return "failure"; - mimeType = mimeType.slice(0, -6); - mimeType = mimeType.replace(/(\u0020)+$/, ""); - mimeType = mimeType.slice(0, -1); - } - if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; - let mimeTypeRecord = parseMIMEType$7(mimeType); - if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType$7("text/plain;charset=US-ASCII"); - return { - mimeType: mimeTypeRecord, - body - }; - } - /** - * @param {URL} url - * @param {boolean} excludeFragment - */ - function URLSerializer$9(url, excludeFragment = false) { - if (!excludeFragment) return url.href; - const href = url.href; - const hashLength = url.hash.length; - return hashLength === 0 ? href : href.substring(0, href.length - hashLength); - } - /** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ - function collectASequenceOfCodePoints$2(condition, input, position) { - let result = ""; - while (position.position < input.length && condition(input[position.position])) { - result += input[position.position]; - position.position++; - } - return result; - } - /** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ - function collectASequenceOfCodePointsFast$4(char, input, position) { - const idx = input.indexOf(char, position.position); - const start = position.position; - if (idx === -1) { - position.position = input.length; - return input.slice(start); - } - position.position = idx; - return input.slice(start, position.position); - } - /** @param {string} input */ - function stringPercentDecode$1(input) { - const bytes = encoder$2.encode(input); - return percentDecode$1(bytes); - } - /** @param {Uint8Array} input */ - function percentDecode$1(input) { - /** @type {number[]} */ - const output = []; - for (let i$1 = 0; i$1 < input.length; i$1++) { - const byte = input[i$1]; - if (byte !== 37) output.push(byte); - else if (byte === 37 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i$1 + 1], input[i$1 + 2]))) output.push(37); - else { - const nextTwoBytes = String.fromCharCode(input[i$1 + 1], input[i$1 + 2]); - const bytePoint = Number.parseInt(nextTwoBytes, 16); - output.push(bytePoint); - i$1 += 2; - } - } - return Uint8Array.from(output); - } - /** @param {string} input */ - function parseMIMEType$7(input) { - input = removeHTTPWhitespace$2(input, true, true); - const position = { position: 0 }; - const type = collectASequenceOfCodePointsFast$4("/", input, position); - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS$2.test(type)) return "failure"; - if (position.position > input.length) return "failure"; - position.position++; - let subtype = collectASequenceOfCodePointsFast$4(";", input, position); - subtype = removeHTTPWhitespace$2(subtype, false, true); - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS$2.test(subtype)) return "failure"; - const typeLowercase = type.toLowerCase(); - const subtypeLowercase = subtype.toLowerCase(); - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - parameters: new Map(), - essence: `${typeLowercase}/${subtypeLowercase}` - }; - while (position.position < input.length) { - position.position++; - collectASequenceOfCodePoints$2( - // https://fetch.spec.whatwg.org/#http-whitespace - (char) => HTTP_WHITESPACE_REGEX$1.test(char), - input, - position -); - let parameterName = collectASequenceOfCodePoints$2((char) => char !== ";" && char !== "=", input, position); - parameterName = parameterName.toLowerCase(); - if (position.position < input.length) { - if (input[position.position] === ";") continue; - position.position++; - } - if (position.position > input.length) break; - let parameterValue = null; - if (input[position.position] === "\"") { - parameterValue = collectAnHTTPQuotedString$2(input, position, true); - collectASequenceOfCodePointsFast$4(";", input, position); - } else { - parameterValue = collectASequenceOfCodePointsFast$4(";", input, position); - parameterValue = removeHTTPWhitespace$2(parameterValue, false, true); - if (parameterValue.length === 0) continue; - } - if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS$2.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS$1.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); - } - return mimeType; - } - /** @param {string} data */ - function forgivingBase64$1(data) { - data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, ""); - if (data.length % 4 === 0) data = data.replace(/=?=$/, ""); - if (data.length % 4 === 1) return "failure"; - if (/[^+/0-9A-Za-z]/.test(data)) return "failure"; - const binary = atob$1(data); - const bytes = new Uint8Array(binary.length); - for (let byte = 0; byte < binary.length; byte++) bytes[byte] = binary.charCodeAt(byte); - return bytes; - } - /** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ - function collectAnHTTPQuotedString$2(input, position, extractValue) { - const positionStart = position.position; - let value = ""; - assert$47(input[position.position] === "\""); - position.position++; - while (true) { - value += collectASequenceOfCodePoints$2((char) => char !== "\"" && char !== "\\", input, position); - if (position.position >= input.length) break; - const quoteOrBackslash = input[position.position]; - position.position++; - if (quoteOrBackslash === "\\") { - if (position.position >= input.length) { - value += "\\"; - break; - } - value += input[position.position]; - position.position++; - } else { - assert$47(quoteOrBackslash === "\""); - break; - } - } - if (extractValue) return value; - return input.slice(positionStart, position.position); - } - /** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ - function serializeAMimeType$8(mimeType) { - assert$47(mimeType !== "failure"); - const { parameters, essence } = mimeType; - let serialization = essence; - for (let [name, value] of parameters.entries()) { - serialization += ";"; - serialization += name; - serialization += "="; - if (!HTTP_TOKEN_CODEPOINTS$2.test(value)) { - value = value.replace(/(\\|")/g, "\\$1"); - value = "\"" + value; - value += "\""; - } - serialization += value; - } - return serialization; - } - /** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} char - */ - function isHTTPWhiteSpace$1(char) { - return char === "\r" || char === "\n" || char === " " || char === " "; - } - /** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - */ - function removeHTTPWhitespace$2(str, leading = true, trailing = true) { - let lead = 0; - let trail = str.length - 1; - if (leading) for (; lead < str.length && isHTTPWhiteSpace$1(str[lead]); lead++); - if (trailing) for (; trail > 0 && isHTTPWhiteSpace$1(str[trail]); trail--); - return str.slice(lead, trail + 1); - } - /** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {string} char - */ - function isASCIIWhitespace$1(char) { - return char === "\r" || char === "\n" || char === " " || char === "\f" || char === " "; - } - /** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - */ - function removeASCIIWhitespace$1(str, leading = true, trailing = true) { - let lead = 0; - let trail = str.length - 1; - if (leading) for (; lead < str.length && isASCIIWhitespace$1(str[lead]); lead++); - if (trailing) for (; trail > 0 && isASCIIWhitespace$1(str[trail]); trail--); - return str.slice(lead, trail + 1); - } - module.exports = { - dataURLProcessor: dataURLProcessor$3, - URLSerializer: URLSerializer$9, - collectASequenceOfCodePoints: collectASequenceOfCodePoints$2, - collectASequenceOfCodePointsFast: collectASequenceOfCodePointsFast$4, - stringPercentDecode: stringPercentDecode$1, - parseMIMEType: parseMIMEType$7, - collectAnHTTPQuotedString: collectAnHTTPQuotedString$2, - serializeAMimeType: serializeAMimeType$8 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/file.js -var require_file = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/file.js"(exports, module) { - const { Blob: Blob$6, File: NativeFile$3 } = __require("buffer"); - const { types: types$7 } = __require("util"); - const { kState: kState$9 } = require_symbols$4(); - const { isBlobLike: isBlobLike$7 } = require_util$11(); - const { webidl: webidl$30 } = require_webidl$1(); - const { parseMIMEType: parseMIMEType$6, serializeAMimeType: serializeAMimeType$7 } = require_dataURL(); - const { kEnumerableProperty: kEnumerableProperty$20 } = require_util$12(); - const encoder$1 = new TextEncoder(); - var File$4 = class File$4 extends Blob$6 { - constructor(fileBits, fileName, options = {}) { - webidl$30.argumentLengthCheck(arguments, 2, { header: "File constructor" }); - fileBits = webidl$30.converters["sequence"](fileBits); - fileName = webidl$30.converters.USVString(fileName); - options = webidl$30.converters.FilePropertyBag(options); - const n = fileName; - let t$6 = options.type; - let d; - substep: { - if (t$6) { - t$6 = parseMIMEType$6(t$6); - if (t$6 === "failure") { - t$6 = ""; - break substep; - } - t$6 = serializeAMimeType$7(t$6).toLowerCase(); - } - d = options.lastModified; - } - super(processBlobParts(fileBits, options), { type: t$6 }); - this[kState$9] = { - name: n, - lastModified: d, - type: t$6 - }; - } - get name() { - webidl$30.brandCheck(this, File$4); - return this[kState$9].name; - } - get lastModified() { - webidl$30.brandCheck(this, File$4); - return this[kState$9].lastModified; - } - get type() { - webidl$30.brandCheck(this, File$4); - return this[kState$9].type; - } - }; - var FileLike$1 = class FileLike$1 { - constructor(blobLike, fileName, options = {}) { - const n = fileName; - const t$6 = options.type; - const d = options.lastModified ?? Date.now(); - this[kState$9] = { - blobLike, - name: n, - type: t$6, - lastModified: d - }; - } - stream(...args) { - webidl$30.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.stream(...args); - } - arrayBuffer(...args) { - webidl$30.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.arrayBuffer(...args); - } - slice(...args) { - webidl$30.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.slice(...args); - } - text(...args) { - webidl$30.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.text(...args); - } - get size() { - webidl$30.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.size; - } - get type() { - webidl$30.brandCheck(this, FileLike$1); - return this[kState$9].blobLike.type; - } - get name() { - webidl$30.brandCheck(this, FileLike$1); - return this[kState$9].name; - } - get lastModified() { - webidl$30.brandCheck(this, FileLike$1); - return this[kState$9].lastModified; - } - get [Symbol.toStringTag]() { - return "File"; - } - }; - Object.defineProperties(File$4.prototype, { - [Symbol.toStringTag]: { - value: "File", - configurable: true - }, - name: kEnumerableProperty$20, - lastModified: kEnumerableProperty$20 - }); - webidl$30.converters.Blob = webidl$30.interfaceConverter(Blob$6); - webidl$30.converters.BlobPart = function(V, opts) { - if (webidl$30.util.Type(V) === "Object") { - if (isBlobLike$7(V)) return webidl$30.converters.Blob(V, { strict: false }); - if (ArrayBuffer.isView(V) || types$7.isAnyArrayBuffer(V)) return webidl$30.converters.BufferSource(V, opts); - } - return webidl$30.converters.USVString(V, opts); - }; - webidl$30.converters["sequence"] = webidl$30.sequenceConverter(webidl$30.converters.BlobPart); - webidl$30.converters.FilePropertyBag = webidl$30.dictionaryConverter([ - { - key: "lastModified", - converter: webidl$30.converters["long long"], - get defaultValue() { - return Date.now(); - } - }, - { - key: "type", - converter: webidl$30.converters.DOMString, - defaultValue: "" - }, - { - key: "endings", - converter: (value) => { - value = webidl$30.converters.DOMString(value); - value = value.toLowerCase(); - if (value !== "native") value = "transparent"; - return value; - }, - defaultValue: "transparent" - } - ]); - /** - * @see https://www.w3.org/TR/FileAPI/#process-blob-parts - * @param {(NodeJS.TypedArray|Blob|string)[]} parts - * @param {{ type: string, endings: string }} options - */ - function processBlobParts(parts, options) { - /** @type {NodeJS.TypedArray[]} */ - const bytes = []; - for (const element of parts) if (typeof element === "string") { - let s = element; - if (options.endings === "native") s = convertLineEndingsNative(s); - bytes.push(encoder$1.encode(s)); - } else if (types$7.isAnyArrayBuffer(element) || types$7.isTypedArray(element)) if (!element.buffer) bytes.push(new Uint8Array(element)); - else bytes.push(new Uint8Array(element.buffer, element.byteOffset, element.byteLength)); - else if (isBlobLike$7(element)) bytes.push(element); - return bytes; - } - /** - * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native - * @param {string} s - */ - function convertLineEndingsNative(s) { - let nativeLineEnding = "\n"; - if (process.platform === "win32") nativeLineEnding = "\r\n"; - return s.replace(/\r?\n/g, nativeLineEnding); - } - function isFileLike$1(object) { - return NativeFile$3 && object instanceof NativeFile$3 || object instanceof File$4 || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; - } - module.exports = { - File: File$4, - FileLike: FileLike$1, - isFileLike: isFileLike$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js -var require_formdata$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js"(exports, module) { - const { isBlobLike: isBlobLike$6, toUSVString: toUSVString$4, makeIterator: makeIterator$1 } = require_util$11(); - const { kState: kState$8 } = require_symbols$4(); - const { File: UndiciFile$1, FileLike, isFileLike } = require_file(); - const { webidl: webidl$29 } = require_webidl$1(); - const { Blob: Blob$5, File: NativeFile$2 } = __require("buffer"); - /** @type {globalThis['File']} */ - const File$3 = NativeFile$2 ?? UndiciFile$1; - var FormData$4 = class FormData$4 { - constructor(form) { - if (form !== void 0) throw webidl$29.errors.conversionFailed({ - prefix: "FormData constructor", - argument: "Argument 1", - types: ["undefined"] - }); - this[kState$8] = []; - } - append(name, value, filename = void 0) { - webidl$29.brandCheck(this, FormData$4); - webidl$29.argumentLengthCheck(arguments, 2, { header: "FormData.append" }); - if (arguments.length === 3 && !isBlobLike$6(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); - name = webidl$29.converters.USVString(name); - value = isBlobLike$6(value) ? webidl$29.converters.Blob(value, { strict: false }) : webidl$29.converters.USVString(value); - filename = arguments.length === 3 ? webidl$29.converters.USVString(filename) : void 0; - const entry = makeEntry$2(name, value, filename); - this[kState$8].push(entry); - } - delete(name) { - webidl$29.brandCheck(this, FormData$4); - webidl$29.argumentLengthCheck(arguments, 1, { header: "FormData.delete" }); - name = webidl$29.converters.USVString(name); - this[kState$8] = this[kState$8].filter((entry) => entry.name !== name); - } - get(name) { - webidl$29.brandCheck(this, FormData$4); - webidl$29.argumentLengthCheck(arguments, 1, { header: "FormData.get" }); - name = webidl$29.converters.USVString(name); - const idx = this[kState$8].findIndex((entry) => entry.name === name); - if (idx === -1) return null; - return this[kState$8][idx].value; - } - getAll(name) { - webidl$29.brandCheck(this, FormData$4); - webidl$29.argumentLengthCheck(arguments, 1, { header: "FormData.getAll" }); - name = webidl$29.converters.USVString(name); - return this[kState$8].filter((entry) => entry.name === name).map((entry) => entry.value); - } - has(name) { - webidl$29.brandCheck(this, FormData$4); - webidl$29.argumentLengthCheck(arguments, 1, { header: "FormData.has" }); - name = webidl$29.converters.USVString(name); - return this[kState$8].findIndex((entry) => entry.name === name) !== -1; - } - set(name, value, filename = void 0) { - webidl$29.brandCheck(this, FormData$4); - webidl$29.argumentLengthCheck(arguments, 2, { header: "FormData.set" }); - if (arguments.length === 3 && !isBlobLike$6(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); - name = webidl$29.converters.USVString(name); - value = isBlobLike$6(value) ? webidl$29.converters.Blob(value, { strict: false }) : webidl$29.converters.USVString(value); - filename = arguments.length === 3 ? toUSVString$4(filename) : void 0; - const entry = makeEntry$2(name, value, filename); - const idx = this[kState$8].findIndex((entry$1) => entry$1.name === name); - if (idx !== -1) this[kState$8] = [ - ...this[kState$8].slice(0, idx), - entry, - ...this[kState$8].slice(idx + 1).filter((entry$1) => entry$1.name !== name) - ]; - else this[kState$8].push(entry); - } - entries() { - webidl$29.brandCheck(this, FormData$4); - return makeIterator$1(() => this[kState$8].map((pair) => [pair.name, pair.value]), "FormData", "key+value"); - } - keys() { - webidl$29.brandCheck(this, FormData$4); - return makeIterator$1(() => this[kState$8].map((pair) => [pair.name, pair.value]), "FormData", "key"); - } - values() { - webidl$29.brandCheck(this, FormData$4); - return makeIterator$1(() => this[kState$8].map((pair) => [pair.name, pair.value]), "FormData", "value"); - } - /** - * @param {(value: string, key: string, self: FormData) => void} callbackFn - * @param {unknown} thisArg - */ - forEach(callbackFn, thisArg = globalThis) { - webidl$29.brandCheck(this, FormData$4); - webidl$29.argumentLengthCheck(arguments, 1, { header: "FormData.forEach" }); - if (typeof callbackFn !== "function") throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'."); - for (const [key, value] of this) callbackFn.apply(thisArg, [ - value, - key, - this - ]); - } - }; - FormData$4.prototype[Symbol.iterator] = FormData$4.prototype.entries; - Object.defineProperties(FormData$4.prototype, { [Symbol.toStringTag]: { - value: "FormData", - configurable: true - } }); - /** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ - function makeEntry$2(name, value, filename) { - name = Buffer.from(name).toString("utf8"); - if (typeof value === "string") value = Buffer.from(value).toString("utf8"); - else { - if (!isFileLike(value)) value = value instanceof Blob$5 ? new File$3([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); - if (filename !== void 0) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - }; - value = NativeFile$2 && value instanceof NativeFile$2 || value instanceof UndiciFile$1 ? new File$3([value], filename, options) : new FileLike(value, filename, options); - } - } - return { - name, - value - }; - } - module.exports = { FormData: FormData$4 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/body.js -var require_body$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/body.js"(exports, module) { - const Busboy = require_main(); - const util$39 = require_util$12(); - const { ReadableStreamFrom: ReadableStreamFrom$5, isBlobLike: isBlobLike$5, isReadableStreamLike, readableStreamClose: readableStreamClose$4, createDeferredPromise: createDeferredPromise$7, fullyReadBody: fullyReadBody$4 } = require_util$11(); - const { FormData: FormData$3 } = require_formdata$1(); - const { kState: kState$7 } = require_symbols$4(); - const { webidl: webidl$28 } = require_webidl$1(); - const { DOMException: DOMException$5, structuredClone } = require_constants$9(); - const { Blob: Blob$4, File: NativeFile$1 } = __require("buffer"); - const { kBodyUsed: kBodyUsed$3 } = require_symbols$5(); - const assert$46 = __require("assert"); - const { isErrored: isErrored$3 } = require_util$12(); - const { isUint8Array: isUint8Array$1, isArrayBuffer: isArrayBuffer$1 } = __require("util/types"); - const { File: UndiciFile } = require_file(); - const { parseMIMEType: parseMIMEType$5, serializeAMimeType: serializeAMimeType$6 } = require_dataURL(); - let random$1; - try { - const crypto$8 = __require("node:crypto"); - random$1 = (max) => crypto$8.randomInt(0, max); - } catch { - random$1 = (max) => Math.floor(Math.random(max)); - } - let ReadableStream$3 = globalThis.ReadableStream; - /** @type {globalThis['File']} */ - const File$2 = NativeFile$1 ?? UndiciFile; - const textEncoder$3 = new TextEncoder(); - const textDecoder$1 = new TextDecoder(); - function extractBody$9(object, keepalive = false) { - if (!ReadableStream$3) ReadableStream$3 = __require("stream/web").ReadableStream; - let stream$5 = null; - if (object instanceof ReadableStream$3) stream$5 = object; - else if (isBlobLike$5(object)) stream$5 = object.stream(); - else stream$5 = new ReadableStream$3({ - async pull(controller) { - controller.enqueue(typeof source === "string" ? textEncoder$3.encode(source) : source); - queueMicrotask(() => readableStreamClose$4(controller)); - }, - start() {}, - type: void 0 - }); - assert$46(isReadableStreamLike(stream$5)); - let action = null; - let source = null; - let length = null; - let type = null; - if (typeof object === "string") { - source = object; - type = "text/plain;charset=UTF-8"; - } else if (object instanceof URLSearchParams) { - source = object.toString(); - type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer$1(object)) source = new Uint8Array(object.slice()); - else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); - else if (util$39.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${random$1(1e11)}`.padStart(11, "0")}`; - const prefix = `--${boundary}\r\nContent-Disposition: form-data`; - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); - const blobParts = []; - const rn = new Uint8Array([13, 10]); - length = 0; - let hasUnknownSizeValue = false; - for (const [name, value] of object) if (typeof value === "string") { - const chunk$1 = textEncoder$3.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); - blobParts.push(chunk$1); - length += chunk$1.byteLength; - } else { - const chunk$1 = textEncoder$3.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r -Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); - blobParts.push(chunk$1, value, rn); - if (typeof value.size === "number") length += chunk$1.byteLength + value.size + rn.byteLength; - else hasUnknownSizeValue = true; - } - const chunk = textEncoder$3.encode(`--${boundary}--`); - blobParts.push(chunk); - length += chunk.byteLength; - if (hasUnknownSizeValue) length = null; - source = object; - action = async function* () { - for (const part of blobParts) if (part.stream) yield* part.stream(); - else yield part; - }; - type = "multipart/form-data; boundary=" + boundary; - } else if (isBlobLike$5(object)) { - source = object; - length = object.size; - if (object.type) type = object.type; - } else if (typeof object[Symbol.asyncIterator] === "function") { - if (keepalive) throw new TypeError("keepalive"); - if (util$39.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); - stream$5 = object instanceof ReadableStream$3 ? object : ReadableStreamFrom$5(object); - } - if (typeof source === "string" || util$39.isBuffer(source)) length = Buffer.byteLength(source); - if (action != null) { - let iterator; - stream$5 = new ReadableStream$3({ - async start() { - iterator = action(object)[Symbol.asyncIterator](); - }, - async pull(controller) { - const { value, done } = await iterator.next(); - if (done) queueMicrotask(() => { - controller.close(); - }); - else if (!isErrored$3(stream$5)) controller.enqueue(new Uint8Array(value)); - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - }, - type: void 0 - }); - } - const body = { - stream: stream$5, - source, - length - }; - return [body, type]; - } - function safelyExtractBody$3(object, keepalive = false) { - if (!ReadableStream$3) - // istanbul ignore next - ReadableStream$3 = __require("stream/web").ReadableStream; - if (object instanceof ReadableStream$3) { - // istanbul ignore next - assert$46(!util$39.isDisturbed(object), "The body has already been consumed."); - // istanbul ignore next - assert$46(!object.locked, "The stream is locked."); - } - return extractBody$9(object, keepalive); - } - function cloneBody$5(body) { - const [out1, out2] = body.stream.tee(); - const out2Clone = structuredClone(out2, { transfer: [out2] }); - const [, finalClone] = out2Clone.tee(); - body.stream = out1; - return { - stream: finalClone, - length: body.length, - source: body.source - }; - } - async function* consumeBody$1(body) { - if (body) if (isUint8Array$1(body)) yield body; - else { - const stream$5 = body.stream; - if (util$39.isDisturbed(stream$5)) throw new TypeError("The body has already been consumed."); - if (stream$5.locked) throw new TypeError("The stream is locked."); - stream$5[kBodyUsed$3] = true; - yield* stream$5; - } - } - function throwIfAborted$1(state) { - if (state.aborted) throw new DOMException$5("The operation was aborted.", "AbortError"); - } - function bodyMixinMethods$1(instance) { - const methods = { - blob() { - return specConsumeBody(this, (bytes) => { - let mimeType = bodyMimeType$1(this); - if (mimeType === "failure") mimeType = ""; - else if (mimeType) mimeType = serializeAMimeType$6(mimeType); - return new Blob$4([bytes], { type: mimeType }); - }, instance); - }, - arrayBuffer() { - return specConsumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer; - }, instance); - }, - text() { - return specConsumeBody(this, utf8DecodeBytes$4, instance); - }, - json() { - return specConsumeBody(this, parseJSONFromBytes$1, instance); - }, - async formData() { - webidl$28.brandCheck(this, instance); - throwIfAborted$1(this[kState$7]); - const contentType = this.headers.get("Content-Type"); - if (/multipart\/form-data/.test(contentType)) { - const headers = {}; - for (const [key, value] of this.headers) headers[key.toLowerCase()] = value; - const responseFormData = new FormData$3(); - let busboy; - try { - busboy = new Busboy({ - headers, - preservePath: true - }); - } catch (err) { - throw new DOMException$5(`${err}`, "AbortError"); - } - busboy.on("field", (name, value) => { - responseFormData.append(name, value); - }); - busboy.on("file", (name, value, filename, encoding, mimeType) => { - const chunks = []; - if (encoding === "base64" || encoding.toLowerCase() === "base64") { - let base64chunk = ""; - value.on("data", (chunk) => { - base64chunk += chunk.toString().replace(/[\r\n]/gm, ""); - const end = base64chunk.length - base64chunk.length % 4; - chunks.push(Buffer.from(base64chunk.slice(0, end), "base64")); - base64chunk = base64chunk.slice(end); - }); - value.on("end", () => { - chunks.push(Buffer.from(base64chunk, "base64")); - responseFormData.append(name, new File$2(chunks, filename, { type: mimeType })); - }); - } else { - value.on("data", (chunk) => { - chunks.push(chunk); - }); - value.on("end", () => { - responseFormData.append(name, new File$2(chunks, filename, { type: mimeType })); - }); - } - }); - const busboyResolve = new Promise((resolve, reject) => { - busboy.on("finish", resolve); - busboy.on("error", (err) => reject(new TypeError(err))); - }); - if (this.body !== null) for await (const chunk of consumeBody$1(this[kState$7].body)) busboy.write(chunk); - busboy.end(); - await busboyResolve; - return responseFormData; - } else if (/application\/x-www-form-urlencoded/.test(contentType)) { - let entries; - try { - let text = ""; - const streamingDecoder = new TextDecoder("utf-8", { ignoreBOM: true }); - for await (const chunk of consumeBody$1(this[kState$7].body)) { - if (!isUint8Array$1(chunk)) throw new TypeError("Expected Uint8Array chunk"); - text += streamingDecoder.decode(chunk, { stream: true }); - } - text += streamingDecoder.decode(); - entries = new URLSearchParams(text); - } catch (err) { - // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. - throw Object.assign(new TypeError(), { cause: err }); - } - const formData = new FormData$3(); - for (const [name, value] of entries) formData.append(name, value); - return formData; - } else { - await Promise.resolve(); - throwIfAborted$1(this[kState$7]); - throw webidl$28.errors.exception({ - header: `${instance.name}.formData`, - message: "Could not parse content as FormData." - }); - } - } - }; - return methods; - } - function mixinBody$5(prototype) { - Object.assign(prototype.prototype, bodyMixinMethods$1(prototype)); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ - async function specConsumeBody(object, convertBytesToJSValue, instance) { - webidl$28.brandCheck(object, instance); - throwIfAborted$1(object[kState$7]); - if (bodyUnusable$3(object[kState$7].body)) throw new TypeError("Body is unusable"); - const promise = createDeferredPromise$7(); - const errorSteps = (error$1) => promise.reject(error$1); - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)); - } catch (e) { - errorSteps(e); - } - }; - if (object[kState$7].body == null) { - successSteps(new Uint8Array()); - return promise.promise; - } - await fullyReadBody$4(object[kState$7].body, successSteps, errorSteps); - return promise.promise; - } - function bodyUnusable$3(body) { - return body != null && (body.stream.locked || util$39.isDisturbed(body.stream)); - } - /** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ - function utf8DecodeBytes$4(buffer$1) { - if (buffer$1.length === 0) return ""; - if (buffer$1[0] === 239 && buffer$1[1] === 187 && buffer$1[2] === 191) buffer$1 = buffer$1.subarray(3); - const output = textDecoder$1.decode(buffer$1); - return output; - } - /** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ - function parseJSONFromBytes$1(bytes) { - return JSON.parse(utf8DecodeBytes$4(bytes)); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} object - */ - function bodyMimeType$1(object) { - const { headersList } = object[kState$7]; - const contentType = headersList.get("content-type"); - if (contentType === null) return "failure"; - return parseMIMEType$5(contentType); - } - module.exports = { - extractBody: extractBody$9, - safelyExtractBody: safelyExtractBody$3, - cloneBody: cloneBody$5, - mixinBody: mixinBody$5 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/request.js -var require_request$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/request.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$50, NotSupportedError: NotSupportedError$4 } = require_errors$1(); - const assert$45 = __require("assert"); - const { kHTTP2BuildRequest: kHTTP2BuildRequest$1, kHTTP2CopyHeaders: kHTTP2CopyHeaders$1, kHTTP1BuildRequest: kHTTP1BuildRequest$1 } = require_symbols$5(); - const util$38 = require_util$12(); - /** - * Verifies that the given val is a valid HTTP token - * per the rules defined in RFC 7230 - * See https://tools.ietf.org/html/rfc7230#section-3.2.6 - */ - const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; - /** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ - const headerCharRegex$1 = /[^\t\x20-\x7e\x80-\xff]/; - const invalidPathRegex$1 = /[^\u0021-\u00ff]/; - const kHandler$1 = Symbol("handler"); - const channels$12 = {}; - let extractBody$8; - try { - const diagnosticsChannel$3 = __require("diagnostics_channel"); - channels$12.create = diagnosticsChannel$3.channel("undici:request:create"); - channels$12.bodySent = diagnosticsChannel$3.channel("undici:request:bodySent"); - channels$12.headers = diagnosticsChannel$3.channel("undici:request:headers"); - channels$12.trailers = diagnosticsChannel$3.channel("undici:request:trailers"); - channels$12.error = diagnosticsChannel$3.channel("undici:request:error"); - } catch { - channels$12.create = { hasSubscribers: false }; - channels$12.bodySent = { hasSubscribers: false }; - channels$12.headers = { hasSubscribers: false }; - channels$12.trailers = { hasSubscribers: false }; - channels$12.error = { hasSubscribers: false }; - } - var Request$9 = class Request$9 { - constructor(origin, { path: path$8, method, body, headers, query, idempotent, blocking, upgrade: upgrade$2, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue }, handler) { - if (typeof path$8 !== "string") throw new InvalidArgumentError$50("path must be a string"); - else if (path$8[0] !== "/" && !(path$8.startsWith("http://") || path$8.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$50("path must be an absolute URL or start with a slash"); - else if (invalidPathRegex$1.exec(path$8) !== null) throw new InvalidArgumentError$50("invalid request path"); - if (typeof method !== "string") throw new InvalidArgumentError$50("method must be a string"); - else if (tokenRegExp.exec(method) === null) throw new InvalidArgumentError$50("invalid request method"); - if (upgrade$2 && typeof upgrade$2 !== "string") throw new InvalidArgumentError$50("upgrade must be a string"); - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$50("invalid headersTimeout"); - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$50("invalid bodyTimeout"); - if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError$50("invalid reset"); - if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError$50("invalid expectContinue"); - this.headersTimeout = headersTimeout; - this.bodyTimeout = bodyTimeout; - this.throwOnError = throwOnError === true; - this.method = method; - this.abort = null; - if (body == null) this.body = null; - else if (util$38.isStream(body)) { - this.body = body; - const rState = this.body._readableState; - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy() { - util$38.destroy(this); - }; - this.body.on("end", this.endHandler); - } - this.errorHandler = (err) => { - if (this.abort) this.abort(err); - else this.error = err; - }; - this.body.on("error", this.errorHandler); - } else if (util$38.isBuffer(body)) this.body = body.byteLength ? body : null; - else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; - else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; - else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; - else if (util$38.isFormDataLike(body) || util$38.isIterable(body) || util$38.isBlobLike(body)) this.body = body; - else throw new InvalidArgumentError$50("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); - this.completed = false; - this.aborted = false; - this.upgrade = upgrade$2 || null; - this.path = query ? util$38.buildURL(path$8, query) : path$8; - this.origin = origin; - this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; - this.blocking = blocking == null ? false : blocking; - this.reset = reset == null ? null : reset; - this.host = null; - this.contentLength = null; - this.contentType = null; - this.headers = ""; - this.expectContinue = expectContinue != null ? expectContinue : false; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) throw new InvalidArgumentError$50("headers array must be even"); - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) processHeader$1(this, headers[i$1], headers[i$1 + 1]); - } else if (headers && typeof headers === "object") { - const keys = Object.keys(headers); - for (let i$1 = 0; i$1 < keys.length; i$1++) { - const key = keys[i$1]; - processHeader$1(this, key, headers[key]); - } - } else if (headers != null) throw new InvalidArgumentError$50("headers must be an object or an array"); - if (util$38.isFormDataLike(this.body)) { - if (util$38.nodeMajor < 16 || util$38.nodeMajor === 16 && util$38.nodeMinor < 8) throw new InvalidArgumentError$50("Form-Data bodies are only supported in node v16.8 and newer."); - if (!extractBody$8) extractBody$8 = require_body$1().extractBody; - const [bodyStream, contentType] = extractBody$8(body); - if (this.contentType == null) { - this.contentType = contentType; - this.headers += `content-type: ${contentType}\r\n`; - } - this.body = bodyStream.stream; - this.contentLength = bodyStream.length; - } else if (util$38.isBlobLike(body) && this.contentType == null && body.type) { - this.contentType = body.type; - this.headers += `content-type: ${body.type}\r\n`; - } - util$38.validateHandler(handler, method, upgrade$2); - this.servername = util$38.getServerName(this.host); - this[kHandler$1] = handler; - if (channels$12.create.hasSubscribers) channels$12.create.publish({ request: this }); - } - onBodySent(chunk) { - if (this[kHandler$1].onBodySent) try { - return this[kHandler$1].onBodySent(chunk); - } catch (err) { - this.abort(err); - } - } - onRequestSent() { - if (channels$12.bodySent.hasSubscribers) channels$12.bodySent.publish({ request: this }); - if (this[kHandler$1].onRequestSent) try { - return this[kHandler$1].onRequestSent(); - } catch (err) { - this.abort(err); - } - } - onConnect(abort$2) { - assert$45(!this.aborted); - assert$45(!this.completed); - if (this.error) abort$2(this.error); - else { - this.abort = abort$2; - return this[kHandler$1].onConnect(abort$2); - } - } - onHeaders(statusCode, headers, resume$2, statusText) { - assert$45(!this.aborted); - assert$45(!this.completed); - if (channels$12.headers.hasSubscribers) channels$12.headers.publish({ - request: this, - response: { - statusCode, - headers, - statusText - } - }); - try { - return this[kHandler$1].onHeaders(statusCode, headers, resume$2, statusText); - } catch (err) { - this.abort(err); - } - } - onData(chunk) { - assert$45(!this.aborted); - assert$45(!this.completed); - try { - return this[kHandler$1].onData(chunk); - } catch (err) { - this.abort(err); - return false; - } - } - onUpgrade(statusCode, headers, socket) { - assert$45(!this.aborted); - assert$45(!this.completed); - return this[kHandler$1].onUpgrade(statusCode, headers, socket); - } - onComplete(trailers) { - this.onFinally(); - assert$45(!this.aborted); - this.completed = true; - if (channels$12.trailers.hasSubscribers) channels$12.trailers.publish({ - request: this, - trailers - }); - try { - return this[kHandler$1].onComplete(trailers); - } catch (err) { - this.onError(err); - } - } - onError(error$1) { - this.onFinally(); - if (channels$12.error.hasSubscribers) channels$12.error.publish({ - request: this, - error: error$1 - }); - if (this.aborted) return; - this.aborted = true; - return this[kHandler$1].onError(error$1); - } - onFinally() { - if (this.errorHandler) { - this.body.off("error", this.errorHandler); - this.errorHandler = null; - } - if (this.endHandler) { - this.body.off("end", this.endHandler); - this.endHandler = null; - } - } - addHeader(key, value) { - processHeader$1(this, key, value); - return this; - } - static [kHTTP1BuildRequest$1](origin, opts, handler) { - return new Request$9(origin, opts, handler); - } - static [kHTTP2BuildRequest$1](origin, opts, handler) { - const headers = opts.headers; - opts = { - ...opts, - headers: null - }; - const request$2 = new Request$9(origin, opts, handler); - request$2.headers = {}; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) throw new InvalidArgumentError$50("headers array must be even"); - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) processHeader$1(request$2, headers[i$1], headers[i$1 + 1], true); - } else if (headers && typeof headers === "object") { - const keys = Object.keys(headers); - for (let i$1 = 0; i$1 < keys.length; i$1++) { - const key = keys[i$1]; - processHeader$1(request$2, key, headers[key], true); - } - } else if (headers != null) throw new InvalidArgumentError$50("headers must be an object or an array"); - return request$2; - } - static [kHTTP2CopyHeaders$1](raw) { - const rawHeaders = raw.split("\r\n"); - const headers = {}; - for (const header of rawHeaders) { - const [key, value] = header.split(": "); - if (value == null || value.length === 0) continue; - if (headers[key]) headers[key] += `,${value}`; - else headers[key] = value; - } - return headers; - } - }; - function processHeaderValue(key, val, skipAppend) { - if (val && typeof val === "object") throw new InvalidArgumentError$50(`invalid ${key} header`); - val = val != null ? `${val}` : ""; - if (headerCharRegex$1.exec(val) !== null) throw new InvalidArgumentError$50(`invalid ${key} header`); - return skipAppend ? val : `${key}: ${val}\r\n`; - } - function processHeader$1(request$2, key, val, skipAppend = false) { - if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError$50(`invalid ${key} header`); - else if (val === void 0) return; - if (request$2.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex$1.exec(val) !== null) throw new InvalidArgumentError$50(`invalid ${key} header`); - request$2.host = val; - } else if (request$2.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request$2.contentLength = parseInt(val, 10); - if (!Number.isFinite(request$2.contentLength)) throw new InvalidArgumentError$50("invalid content-length header"); - } else if (request$2.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request$2.contentType = val; - if (skipAppend) request$2.headers[key] = processHeaderValue(key, val, skipAppend); - else request$2.headers += processHeaderValue(key, val); - } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") throw new InvalidArgumentError$50("invalid transfer-encoding header"); - else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val === "string" ? val.toLowerCase() : null; - if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError$50("invalid connection header"); - else if (value === "close") request$2.reset = true; - } else if (key.length === 10 && key.toLowerCase() === "keep-alive") throw new InvalidArgumentError$50("invalid keep-alive header"); - else if (key.length === 7 && key.toLowerCase() === "upgrade") throw new InvalidArgumentError$50("invalid upgrade header"); - else if (key.length === 6 && key.toLowerCase() === "expect") throw new NotSupportedError$4("expect header not supported"); - else if (tokenRegExp.exec(key) === null) throw new InvalidArgumentError$50("invalid header key"); - else if (Array.isArray(val)) for (let i$1 = 0; i$1 < val.length; i$1++) if (skipAppend) if (request$2.headers[key]) request$2.headers[key] += `,${processHeaderValue(key, val[i$1], skipAppend)}`; - else request$2.headers[key] = processHeaderValue(key, val[i$1], skipAppend); - else request$2.headers += processHeaderValue(key, val[i$1]); - else if (skipAppend) request$2.headers[key] = processHeaderValue(key, val, skipAppend); - else request$2.headers += processHeaderValue(key, val); - } - module.exports = Request$9; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher.js -var require_dispatcher$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher.js"(exports, module) { - const EventEmitter$1 = __require("events"); - var Dispatcher$8 = class extends EventEmitter$1 { - dispatch() { - throw new Error("not implemented"); - } - close() { - throw new Error("not implemented"); - } - destroy() { - throw new Error("not implemented"); - } - }; - module.exports = Dispatcher$8; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js -var require_dispatcher_base$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js"(exports, module) { - const Dispatcher$7 = require_dispatcher$1(); - const { ClientDestroyedError: ClientDestroyedError$4, ClientClosedError: ClientClosedError$2, InvalidArgumentError: InvalidArgumentError$49 } = require_errors$1(); - const { kDestroy: kDestroy$11, kClose: kClose$15, kDispatch: kDispatch$8, kInterceptors: kInterceptors$5 } = require_symbols$5(); - const kDestroyed$3 = Symbol("destroyed"); - const kClosed$4 = Symbol("closed"); - const kOnDestroyed$1 = Symbol("onDestroyed"); - const kOnClosed$1 = Symbol("onClosed"); - const kInterceptedDispatch = Symbol("Intercepted Dispatch"); - var DispatcherBase$11 = class extends Dispatcher$7 { - constructor() { - super(); - this[kDestroyed$3] = false; - this[kOnDestroyed$1] = null; - this[kClosed$4] = false; - this[kOnClosed$1] = []; - } - get destroyed() { - return this[kDestroyed$3]; - } - get closed() { - return this[kClosed$4]; - } - get interceptors() { - return this[kInterceptors$5]; - } - set interceptors(newInterceptors) { - if (newInterceptors) for (let i$1 = newInterceptors.length - 1; i$1 >= 0; i$1--) { - const interceptor = this[kInterceptors$5][i$1]; - if (typeof interceptor !== "function") throw new InvalidArgumentError$49("interceptor must be an function"); - } - this[kInterceptors$5] = newInterceptors; - } - close(callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - if (typeof callback !== "function") throw new InvalidArgumentError$49("invalid callback"); - if (this[kDestroyed$3]) { - queueMicrotask(() => callback(new ClientDestroyedError$4(), null)); - return; - } - if (this[kClosed$4]) { - if (this[kOnClosed$1]) this[kOnClosed$1].push(callback); - else queueMicrotask(() => callback(null, null)); - return; - } - this[kClosed$4] = true; - this[kOnClosed$1].push(callback); - const onClosed = () => { - const callbacks = this[kOnClosed$1]; - this[kOnClosed$1] = null; - for (let i$1 = 0; i$1 < callbacks.length; i$1++) callbacks[i$1](null, null); - }; - this[kClose$15]().then(() => this.destroy()).then(() => { - queueMicrotask(onClosed); - }); - } - destroy(err, callback) { - if (typeof err === "function") { - callback = err; - err = null; - } - if (callback === void 0) return new Promise((resolve, reject) => { - this.destroy(err, (err$1, data) => { - return err$1 ? reject(err$1) : resolve(data); - }); - }); - if (typeof callback !== "function") throw new InvalidArgumentError$49("invalid callback"); - if (this[kDestroyed$3]) { - if (this[kOnDestroyed$1]) this[kOnDestroyed$1].push(callback); - else queueMicrotask(() => callback(null, null)); - return; - } - if (!err) err = new ClientDestroyedError$4(); - this[kDestroyed$3] = true; - this[kOnDestroyed$1] = this[kOnDestroyed$1] || []; - this[kOnDestroyed$1].push(callback); - const onDestroyed = () => { - const callbacks = this[kOnDestroyed$1]; - this[kOnDestroyed$1] = null; - for (let i$1 = 0; i$1 < callbacks.length; i$1++) callbacks[i$1](null, null); - }; - this[kDestroy$11](err).then(() => { - queueMicrotask(onDestroyed); - }); - } - [kInterceptedDispatch](opts, handler) { - if (!this[kInterceptors$5] || this[kInterceptors$5].length === 0) { - this[kInterceptedDispatch] = this[kDispatch$8]; - return this[kDispatch$8](opts, handler); - } - let dispatch = this[kDispatch$8].bind(this); - for (let i$1 = this[kInterceptors$5].length - 1; i$1 >= 0; i$1--) dispatch = this[kInterceptors$5][i$1](dispatch); - this[kInterceptedDispatch] = dispatch; - return dispatch(opts, handler); - } - dispatch(opts, handler) { - if (!handler || typeof handler !== "object") throw new InvalidArgumentError$49("handler must be an object"); - try { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$49("opts must be an object."); - if (this[kDestroyed$3] || this[kOnDestroyed$1]) throw new ClientDestroyedError$4(); - if (this[kClosed$4]) throw new ClientClosedError$2(); - return this[kInterceptedDispatch](opts, handler); - } catch (err) { - if (typeof handler.onError !== "function") throw new InvalidArgumentError$49("invalid onError method"); - handler.onError(err); - return false; - } - } - }; - module.exports = DispatcherBase$11; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/connect.js -var require_connect$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/connect.js"(exports, module) { - const net$4 = __require("net"); - const assert$44 = __require("assert"); - const util$37 = require_util$12(); - const { InvalidArgumentError: InvalidArgumentError$48, ConnectTimeoutError: ConnectTimeoutError$2 } = require_errors$1(); - let tls$1; - let SessionCache$1; - if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) SessionCache$1 = class WeakSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = new Map(); - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) return; - const ref = this._sessionCache.get(key); - if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); - }); - } - get(sessionKey) { - const ref = this._sessionCache.get(sessionKey); - return ref ? ref.deref() : null; - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) return; - this._sessionCache.set(sessionKey, new WeakRef(session)); - this._sessionRegistry.register(session, sessionKey); - } - }; - else SessionCache$1 = class SimpleSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = new Map(); - } - get(sessionKey) { - return this._sessionCache.get(sessionKey); - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) return; - if (this._sessionCache.size >= this._maxCachedSessions) { - const { value: oldestKey } = this._sessionCache.keys().next(); - this._sessionCache.delete(oldestKey); - } - this._sessionCache.set(sessionKey, session); - } - }; - function buildConnector$9({ allowH2, maxCachedSessions, socketPath, timeout,...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError$48("maxCachedSessions must be a positive integer or zero"); - const options = { - path: socketPath, - ...opts - }; - const sessionCache = new SessionCache$1(maxCachedSessions == null ? 100 : maxCachedSessions); - timeout = timeout == null ? 1e4 : timeout; - allowH2 = allowH2 != null ? allowH2 : false; - return function connect$5({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket; - if (protocol === "https:") { - if (!tls$1) tls$1 = __require("tls"); - servername = servername || options.servername || util$37.getServerName(host) || null; - const sessionKey = servername || hostname; - const session = sessionCache.get(sessionKey) || null; - assert$44(sessionKey); - socket = tls$1.connect({ - highWaterMark: 16384, - ...options, - servername, - session, - localAddress, - ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], - socket: httpSocket, - port: port || 443, - host: hostname - }); - socket.on("session", function(session$1) { - sessionCache.set(sessionKey, session$1); - }); - } else { - assert$44(!httpSocket, "httpSocket can only be sent on TLS update"); - socket = net$4.connect({ - highWaterMark: 64 * 1024, - ...options, - localAddress, - port: port || 80, - host: hostname - }); - } - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; - socket.setKeepAlive(true, keepAliveInitialDelay); - } - const cancelTimeout = setupTimeout(() => onConnectTimeout$1(socket), timeout); - socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(null, this); - } - }).on("error", function(err) { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(err); - } - }); - return socket; - }; - } - function setupTimeout(onConnectTimeout$2, timeout) { - if (!timeout) return () => {}; - let s1 = null; - let s2 = null; - const timeoutId = setTimeout(() => { - s1 = setImmediate(() => { - if (process.platform === "win32") s2 = setImmediate(() => onConnectTimeout$2()); - else onConnectTimeout$2(); - }); - }, timeout); - return () => { - clearTimeout(timeoutId); - clearImmediate(s1); - clearImmediate(s2); - }; - } - function onConnectTimeout$1(socket) { - util$37.destroy(socket, new ConnectTimeoutError$2()); - } - module.exports = buildConnector$9; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js -var require_utils$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.enumToMap = void 0; - function enumToMap$1(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === "number") res[key] = value; - }); - return res; - } - exports.enumToMap = enumToMap$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js -var require_constants$8 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js"(exports) { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; - const utils_1$2 = require_utils$1(); - var ERROR; - (function(ERROR$1) { - ERROR$1[ERROR$1["OK"] = 0] = "OK"; - ERROR$1[ERROR$1["INTERNAL"] = 1] = "INTERNAL"; - ERROR$1[ERROR$1["STRICT"] = 2] = "STRICT"; - ERROR$1[ERROR$1["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR$1[ERROR$1["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR$1[ERROR$1["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR$1[ERROR$1["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR$1[ERROR$1["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR$1[ERROR$1["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR$1[ERROR$1["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR$1[ERROR$1["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR$1[ERROR$1["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR$1[ERROR$1["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR$1[ERROR$1["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR$1[ERROR$1["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR$1[ERROR$1["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR$1[ERROR$1["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR$1[ERROR$1["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR$1[ERROR$1["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR$1[ERROR$1["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR$1[ERROR$1["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR$1[ERROR$1["PAUSED"] = 21] = "PAUSED"; - ERROR$1[ERROR$1["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR$1[ERROR$1["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR$1[ERROR$1["USER"] = 24] = "USER"; - })(ERROR = exports.ERROR || (exports.ERROR = {})); - var TYPE; - (function(TYPE$1) { - TYPE$1[TYPE$1["BOTH"] = 0] = "BOTH"; - TYPE$1[TYPE$1["REQUEST"] = 1] = "REQUEST"; - TYPE$1[TYPE$1["RESPONSE"] = 2] = "RESPONSE"; - })(TYPE = exports.TYPE || (exports.TYPE = {})); - var FLAGS; - (function(FLAGS$1) { - FLAGS$1[FLAGS$1["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS$1[FLAGS$1["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS$1[FLAGS$1["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS$1[FLAGS$1["CHUNKED"] = 8] = "CHUNKED"; - FLAGS$1[FLAGS$1["UPGRADE"] = 16] = "UPGRADE"; - FLAGS$1[FLAGS$1["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS$1[FLAGS$1["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS$1[FLAGS$1["TRAILING"] = 128] = "TRAILING"; - FLAGS$1[FLAGS$1["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; - })(FLAGS = exports.FLAGS || (exports.FLAGS = {})); - var LENIENT_FLAGS; - (function(LENIENT_FLAGS$1) { - LENIENT_FLAGS$1[LENIENT_FLAGS$1["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS$1[LENIENT_FLAGS$1["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS$1[LENIENT_FLAGS$1["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; - })(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); - var METHODS; - (function(METHODS$1) { - METHODS$1[METHODS$1["DELETE"] = 0] = "DELETE"; - METHODS$1[METHODS$1["GET"] = 1] = "GET"; - METHODS$1[METHODS$1["HEAD"] = 2] = "HEAD"; - METHODS$1[METHODS$1["POST"] = 3] = "POST"; - METHODS$1[METHODS$1["PUT"] = 4] = "PUT"; - METHODS$1[METHODS$1["CONNECT"] = 5] = "CONNECT"; - METHODS$1[METHODS$1["OPTIONS"] = 6] = "OPTIONS"; - METHODS$1[METHODS$1["TRACE"] = 7] = "TRACE"; - METHODS$1[METHODS$1["COPY"] = 8] = "COPY"; - METHODS$1[METHODS$1["LOCK"] = 9] = "LOCK"; - METHODS$1[METHODS$1["MKCOL"] = 10] = "MKCOL"; - METHODS$1[METHODS$1["MOVE"] = 11] = "MOVE"; - METHODS$1[METHODS$1["PROPFIND"] = 12] = "PROPFIND"; - METHODS$1[METHODS$1["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS$1[METHODS$1["SEARCH"] = 14] = "SEARCH"; - METHODS$1[METHODS$1["UNLOCK"] = 15] = "UNLOCK"; - METHODS$1[METHODS$1["BIND"] = 16] = "BIND"; - METHODS$1[METHODS$1["REBIND"] = 17] = "REBIND"; - METHODS$1[METHODS$1["UNBIND"] = 18] = "UNBIND"; - METHODS$1[METHODS$1["ACL"] = 19] = "ACL"; - METHODS$1[METHODS$1["REPORT"] = 20] = "REPORT"; - METHODS$1[METHODS$1["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS$1[METHODS$1["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS$1[METHODS$1["MERGE"] = 23] = "MERGE"; - METHODS$1[METHODS$1["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS$1[METHODS$1["NOTIFY"] = 25] = "NOTIFY"; - METHODS$1[METHODS$1["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS$1[METHODS$1["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - METHODS$1[METHODS$1["PATCH"] = 28] = "PATCH"; - METHODS$1[METHODS$1["PURGE"] = 29] = "PURGE"; - METHODS$1[METHODS$1["MKCALENDAR"] = 30] = "MKCALENDAR"; - METHODS$1[METHODS$1["LINK"] = 31] = "LINK"; - METHODS$1[METHODS$1["UNLINK"] = 32] = "UNLINK"; - METHODS$1[METHODS$1["SOURCE"] = 33] = "SOURCE"; - METHODS$1[METHODS$1["PRI"] = 34] = "PRI"; - METHODS$1[METHODS$1["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS$1[METHODS$1["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS$1[METHODS$1["SETUP"] = 37] = "SETUP"; - METHODS$1[METHODS$1["PLAY"] = 38] = "PLAY"; - METHODS$1[METHODS$1["PAUSE"] = 39] = "PAUSE"; - METHODS$1[METHODS$1["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS$1[METHODS$1["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS$1[METHODS$1["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS$1[METHODS$1["REDIRECT"] = 43] = "REDIRECT"; - METHODS$1[METHODS$1["RECORD"] = 44] = "RECORD"; - METHODS$1[METHODS$1["FLUSH"] = 45] = "FLUSH"; - })(METHODS = exports.METHODS || (exports.METHODS = {})); - exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS["M-SEARCH"], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - METHODS.SOURCE - ]; - exports.METHODS_ICE = [METHODS.SOURCE]; - exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - METHODS.GET, - METHODS.POST - ]; - exports.METHOD_MAP = utils_1$2.enumToMap(METHODS); - exports.H_METHOD_MAP = {}; - Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - }); - var FINISH; - (function(FINISH$1) { - FINISH$1[FINISH$1["SAFE"] = 0] = "SAFE"; - FINISH$1[FINISH$1["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH$1[FINISH$1["UNSAFE"] = 2] = "UNSAFE"; - })(FINISH = exports.FINISH || (exports.FINISH = {})); - exports.ALPHA = []; - for (let i$1 = "A".charCodeAt(0); i$1 <= "Z".charCodeAt(0); i$1++) { - exports.ALPHA.push(String.fromCharCode(i$1)); - exports.ALPHA.push(String.fromCharCode(i$1 + 32)); - } - exports.NUM_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9 - }; - exports.HEX_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - A: 10, - B: 11, - C: 12, - D: 13, - E: 14, - F: 15, - a: 10, - b: 11, - c: 12, - d: 13, - e: 14, - f: 15 - }; - exports.NUM = [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9" - ]; - exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); - exports.MARK = [ - "-", - "_", - ".", - "!", - "~", - "*", - "'", - "(", - ")" - ]; - exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ - "%", - ";", - ":", - "&", - "=", - "+", - "$", - "," - ]); - exports.STRICT_URL_CHAR = [ - "!", - "\"", - "$", - "%", - "&", - "'", - "(", - ")", - "*", - "+", - ",", - "-", - ".", - "/", - ":", - ";", - "<", - "=", - ">", - "@", - "[", - "\\", - "]", - "^", - "_", - "`", - "{", - "|", - "}", - "~" - ].concat(exports.ALPHANUM); - exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); - for (let i$1 = 128; i$1 <= 255; i$1++) exports.URL_CHAR.push(i$1); - exports.HEX = exports.NUM.concat([ - "a", - "b", - "c", - "d", - "e", - "f", - "A", - "B", - "C", - "D", - "E", - "F" - ]); - exports.STRICT_TOKEN = [ - "!", - "#", - "$", - "%", - "&", - "'", - "*", - "+", - "-", - ".", - "^", - "_", - "`", - "|", - "~" - ].concat(exports.ALPHANUM); - exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); - exports.HEADER_CHARS = [" "]; - for (let i$1 = 32; i$1 <= 255; i$1++) if (i$1 !== 127) exports.HEADER_CHARS.push(i$1); - exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); - exports.MAJOR = exports.NUM_MAP; - exports.MINOR = exports.MAJOR; - var HEADER_STATE; - (function(HEADER_STATE$1) { - HEADER_STATE$1[HEADER_STATE$1["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE$1[HEADER_STATE$1["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE$1[HEADER_STATE$1["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE$1[HEADER_STATE$1["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE$1[HEADER_STATE$1["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE$1[HEADER_STATE$1["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE$1[HEADER_STATE$1["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE$1[HEADER_STATE$1["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE$1[HEADER_STATE$1["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; - })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); - exports.SPECIAL_HEADERS = { - "connection": HEADER_STATE.CONNECTION, - "content-length": HEADER_STATE.CONTENT_LENGTH, - "proxy-connection": HEADER_STATE.CONNECTION, - "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, - "upgrade": HEADER_STATE.UPGRADE - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js -var require_RedirectHandler = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js"(exports, module) { - const util$36 = require_util$12(); - const { kBodyUsed: kBodyUsed$2 } = require_symbols$5(); - const assert$43 = __require("assert"); - const { InvalidArgumentError: InvalidArgumentError$47 } = require_errors$1(); - const EE$4 = __require("events"); - const redirectableStatusCodes$1 = [ - 300, - 301, - 302, - 303, - 307, - 308 - ]; - const kBody$4 = Symbol("body"); - var BodyAsyncIterable$2 = class { - constructor(body) { - this[kBody$4] = body; - this[kBodyUsed$2] = false; - } - async *[Symbol.asyncIterator]() { - assert$43(!this[kBodyUsed$2], "disturbed"); - this[kBodyUsed$2] = true; - yield* this[kBody$4]; - } - }; - var RedirectHandler$5 = class { - constructor(dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError$47("maxRedirections must be a positive number"); - util$36.validateHandler(handler, opts.method, opts.upgrade); - this.dispatch = dispatch; - this.location = null; - this.abort = null; - this.opts = { - ...opts, - maxRedirections: 0 - }; - this.maxRedirections = maxRedirections; - this.handler = handler; - this.history = []; - if (util$36.isStream(this.opts.body)) { - if (util$36.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { - assert$43(false); - }); - if (typeof this.opts.body.readableDidRead !== "boolean") { - this.opts.body[kBodyUsed$2] = false; - EE$4.prototype.on.call(this.opts.body, "data", function() { - this[kBodyUsed$2] = true; - }); - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable$2(this.opts.body); - else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util$36.isIterable(this.opts.body)) this.opts.body = new BodyAsyncIterable$2(this.opts.body); - } - onConnect(abort$2) { - this.abort = abort$2; - this.handler.onConnect(abort$2, { history: this.history }); - } - onUpgrade(statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket); - } - onError(error$1) { - this.handler.onError(error$1); - } - onHeaders(statusCode, headers, resume$2, statusText) { - this.location = this.history.length >= this.maxRedirections || util$36.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); - if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); - if (!this.location) return this.handler.onHeaders(statusCode, headers, resume$2, statusText); - const { origin, pathname, search } = util$36.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path$8 = search ? `${pathname}${search}` : pathname; - this.opts.headers = cleanRequestHeaders$1(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path$8; - this.opts.origin = origin; - this.opts.maxRedirections = 0; - this.opts.query = null; - if (statusCode === 303 && this.opts.method !== "HEAD") { - this.opts.method = "GET"; - this.opts.body = null; - } - } - onData(chunk) { - if (this.location) {} else return this.handler.onData(chunk); - } - onComplete(trailers) { - if (this.location) { - this.location = null; - this.abort = null; - this.dispatch(this.opts, this); - } else this.handler.onComplete(trailers); - } - onBodySent(chunk) { - if (this.handler.onBodySent) this.handler.onBodySent(chunk); - } - }; - function parseLocation(statusCode, headers) { - if (redirectableStatusCodes$1.indexOf(statusCode) === -1) return null; - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (headers[i$1].toString().toLowerCase() === "location") return headers[i$1 + 1]; - } - function shouldRemoveHeader$1(header, removeContent, unknownOrigin) { - if (header.length === 4) return util$36.headerNameToString(header) === "host"; - if (removeContent && util$36.headerNameToString(header).startsWith("content-")) return true; - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util$36.headerNameToString(header); - return name === "authorization" || name === "cookie" || name === "proxy-authorization"; - } - return false; - } - function cleanRequestHeaders$1(headers, removeContent, unknownOrigin) { - const ret = []; - if (Array.isArray(headers)) { - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (!shouldRemoveHeader$1(headers[i$1], removeContent, unknownOrigin)) ret.push(headers[i$1], headers[i$1 + 1]); - } else if (headers && typeof headers === "object") { - for (const key of Object.keys(headers)) if (!shouldRemoveHeader$1(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); - } else assert$43(headers == null, "headers must be an object or an array"); - return ret; - } - module.exports = RedirectHandler$5; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js -var require_redirectInterceptor = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js"(exports, module) { - const RedirectHandler$4 = require_RedirectHandler(); - function createRedirectInterceptor$4({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept(opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts; - if (!maxRedirections) return dispatch(opts, handler); - const redirectHandler = new RedirectHandler$4(dispatch, maxRedirections, opts, handler); - opts = { - ...opts, - maxRedirections: 0 - }; - return dispatch(opts, redirectHandler); - }; - }; - } - module.exports = createRedirectInterceptor$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js -var require_llhttp_wasm$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) { - module.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAA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AAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAA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B/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhq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wMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js -var require_llhttp_simd_wasm$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) { - module.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfY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AAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacB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ngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQE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wMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/client.js -var require_client$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/client.js"(exports, module) { - const assert$42 = __require("assert"); - const net$3 = __require("net"); - const http$2 = __require("http"); - const { pipeline: pipeline$6 } = __require("stream"); - const util$35 = require_util$12(); - const timers$2 = require_timers$1(); - const Request$8 = require_request$3(); - const DispatcherBase$10 = require_dispatcher_base$1(); - const { RequestContentLengthMismatchError: RequestContentLengthMismatchError$3, ResponseContentLengthMismatchError: ResponseContentLengthMismatchError$2, InvalidArgumentError: InvalidArgumentError$46, RequestAbortedError: RequestAbortedError$17, HeadersTimeoutError: HeadersTimeoutError$2, HeadersOverflowError: HeadersOverflowError$2, SocketError: SocketError$7, InformationalError: InformationalError$5, BodyTimeoutError: BodyTimeoutError$2, HTTPParserError: HTTPParserError$2, ResponseExceededMaxSizeError: ResponseExceededMaxSizeError$2, ClientDestroyedError: ClientDestroyedError$3 } = require_errors$1(); - const buildConnector$8 = require_connect$1(); - const { kUrl: kUrl$10, kReset: kReset$2, kServerName: kServerName$1, kClient: kClient$5, kBusy: kBusy$3, kParser: kParser$1, kConnect: kConnect$1, kBlocking: kBlocking$1, kResuming: kResuming$1, kRunning: kRunning$9, kPending: kPending$7, kSize: kSize$11, kWriting: kWriting$1, kQueue: kQueue$5, kConnected: kConnected$11, kConnecting: kConnecting$1, kNeedDrain: kNeedDrain$7, kNoRef: kNoRef$1, kKeepAliveDefaultTimeout: kKeepAliveDefaultTimeout$2, kHostHeader: kHostHeader$2, kPendingIdx: kPendingIdx$3, kRunningIdx: kRunningIdx$3, kError: kError$5, kPipelining: kPipelining$2, kSocket: kSocket$2, kKeepAliveTimeoutValue: kKeepAliveTimeoutValue$2, kMaxHeadersSize: kMaxHeadersSize$2, kKeepAliveMaxTimeout: kKeepAliveMaxTimeout$2, kKeepAliveTimeoutThreshold: kKeepAliveTimeoutThreshold$2, kHeadersTimeout: kHeadersTimeout$2, kBodyTimeout: kBodyTimeout$3, kStrictContentLength: kStrictContentLength$3, kConnector: kConnector$1, kMaxRedirections: kMaxRedirections$1, kMaxRequests: kMaxRequests$2, kCounter: kCounter$2, kClose: kClose$14, kDestroy: kDestroy$10, kDispatch: kDispatch$7, kInterceptors: kInterceptors$4, kLocalAddress: kLocalAddress$1, kMaxResponseSize: kMaxResponseSize$2, kHTTPConnVersion, kHost, kHTTP2Session: kHTTP2Session$1, kHTTP2SessionState, kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require_symbols$5(); - /** @type {import('http2')} */ - let http2$1; - try { - http2$1 = __require("http2"); - } catch { - http2$1 = { constants: {} }; - } - const { constants: { HTTP2_HEADER_AUTHORITY: HTTP2_HEADER_AUTHORITY$1, HTTP2_HEADER_METHOD: HTTP2_HEADER_METHOD$1, HTTP2_HEADER_PATH: HTTP2_HEADER_PATH$1, HTTP2_HEADER_SCHEME: HTTP2_HEADER_SCHEME$1, HTTP2_HEADER_CONTENT_LENGTH: HTTP2_HEADER_CONTENT_LENGTH$1, HTTP2_HEADER_EXPECT: HTTP2_HEADER_EXPECT$1, HTTP2_HEADER_STATUS: HTTP2_HEADER_STATUS$1 } } = http2$1; - let h2ExperimentalWarned = false; - const FastBuffer$1 = Buffer[Symbol.species]; - const kClosedResolve$3 = Symbol("kClosedResolve"); - const channels$11 = {}; - try { - const diagnosticsChannel$3 = __require("diagnostics_channel"); - channels$11.sendHeaders = diagnosticsChannel$3.channel("undici:client:sendHeaders"); - channels$11.beforeConnect = diagnosticsChannel$3.channel("undici:client:beforeConnect"); - channels$11.connectError = diagnosticsChannel$3.channel("undici:client:connectError"); - channels$11.connected = diagnosticsChannel$3.channel("undici:client:connected"); - } catch { - channels$11.sendHeaders = { hasSubscribers: false }; - channels$11.beforeConnect = { hasSubscribers: false }; - channels$11.connectError = { hasSubscribers: false }; - channels$11.connected = { hasSubscribers: false }; - } - /** - * @type {import('../types/client').default} - */ - var Client$10 = class extends DispatcherBase$10 { - /** - * - * @param {string|URL} url - * @param {import('../types/client').Client.Options} options - */ - constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls: tls$3, strictContentLength, maxCachedSessions, maxRedirections, connect: connect$5, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, maxConcurrentStreams } = {}) { - super(); - if (keepAlive !== void 0) throw new InvalidArgumentError$46("unsupported keepAlive, use pipelining=0 instead"); - if (socketTimeout !== void 0) throw new InvalidArgumentError$46("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); - if (requestTimeout !== void 0) throw new InvalidArgumentError$46("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); - if (idleTimeout !== void 0) throw new InvalidArgumentError$46("unsupported idleTimeout, use keepAliveTimeout instead"); - if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError$46("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new InvalidArgumentError$46("invalid maxHeaderSize"); - if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError$46("invalid socketPath"); - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError$46("invalid connectTimeout"); - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError$46("invalid keepAliveTimeout"); - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError$46("invalid keepAliveMaxTimeout"); - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError$46("invalid keepAliveTimeoutThreshold"); - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$46("headersTimeout must be a positive integer or zero"); - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$46("bodyTimeout must be a positive integer or zero"); - if (connect$5 != null && typeof connect$5 !== "function" && typeof connect$5 !== "object") throw new InvalidArgumentError$46("connect must be a function or an object"); - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError$46("maxRedirections must be a positive number"); - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError$46("maxRequestsPerClient must be a positive number"); - if (localAddress != null && (typeof localAddress !== "string" || net$3.isIP(localAddress) === 0)) throw new InvalidArgumentError$46("localAddress must be valid string IP address"); - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError$46("maxResponseSize must be a positive number"); - if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError$46("autoSelectFamilyAttemptTimeout must be a positive number"); - if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError$46("allowH2 must be a valid boolean value"); - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError$46("maxConcurrentStreams must be a possitive integer, greater than 0"); - if (typeof connect$5 !== "function") connect$5 = buildConnector$8({ - ...tls$3, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...util$35.nodeHasAutoSelectFamily && autoSelectFamily ? { - autoSelectFamily, - autoSelectFamilyAttemptTimeout - } : void 0, - ...connect$5 - }); - this[kInterceptors$4] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor$3({ maxRedirections })]; - this[kUrl$10] = util$35.parseOrigin(url); - this[kConnector$1] = connect$5; - this[kSocket$2] = null; - this[kPipelining$2] = pipelining != null ? pipelining : 1; - this[kMaxHeadersSize$2] = maxHeaderSize || http$2.maxHeaderSize; - this[kKeepAliveDefaultTimeout$2] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; - this[kKeepAliveMaxTimeout$2] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; - this[kKeepAliveTimeoutThreshold$2] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold; - this[kKeepAliveTimeoutValue$2] = this[kKeepAliveDefaultTimeout$2]; - this[kServerName$1] = null; - this[kLocalAddress$1] = localAddress != null ? localAddress : null; - this[kResuming$1] = 0; - this[kNeedDrain$7] = 0; - this[kHostHeader$2] = `host: ${this[kUrl$10].hostname}${this[kUrl$10].port ? `:${this[kUrl$10].port}` : ""}\r\n`; - this[kBodyTimeout$3] = bodyTimeout != null ? bodyTimeout : 3e5; - this[kHeadersTimeout$2] = headersTimeout != null ? headersTimeout : 3e5; - this[kStrictContentLength$3] = strictContentLength == null ? true : strictContentLength; - this[kMaxRedirections$1] = maxRedirections; - this[kMaxRequests$2] = maxRequestsPerClient; - this[kClosedResolve$3] = null; - this[kMaxResponseSize$2] = maxResponseSize > -1 ? maxResponseSize : -1; - this[kHTTPConnVersion] = "h1"; - this[kHTTP2Session$1] = null; - this[kHTTP2SessionState] = !allowH2 ? null : { - openStreams: 0, - maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 - }; - this[kHost] = `${this[kUrl$10].hostname}${this[kUrl$10].port ? `:${this[kUrl$10].port}` : ""}`; - this[kQueue$5] = []; - this[kRunningIdx$3] = 0; - this[kPendingIdx$3] = 0; - } - get pipelining() { - return this[kPipelining$2]; - } - set pipelining(value) { - this[kPipelining$2] = value; - resume$1(this, true); - } - get [kPending$7]() { - return this[kQueue$5].length - this[kPendingIdx$3]; - } - get [kRunning$9]() { - return this[kPendingIdx$3] - this[kRunningIdx$3]; - } - get [kSize$11]() { - return this[kQueue$5].length - this[kRunningIdx$3]; - } - get [kConnected$11]() { - return !!this[kSocket$2] && !this[kConnecting$1] && !this[kSocket$2].destroyed; - } - get [kBusy$3]() { - const socket = this[kSocket$2]; - return socket && (socket[kReset$2] || socket[kWriting$1] || socket[kBlocking$1]) || this[kSize$11] >= (this[kPipelining$2] || 1) || this[kPending$7] > 0; - } - /* istanbul ignore: only used for test */ - [kConnect$1](cb) { - connect$4(this); - this.once("connect", cb); - } - [kDispatch$7](opts, handler) { - const origin = opts.origin || this[kUrl$10].origin; - const request$2 = this[kHTTPConnVersion] === "h2" ? Request$8[kHTTP2BuildRequest](origin, opts, handler) : Request$8[kHTTP1BuildRequest](origin, opts, handler); - this[kQueue$5].push(request$2); - if (this[kResuming$1]) {} else if (util$35.bodyLength(request$2.body) == null && util$35.isIterable(request$2.body)) { - this[kResuming$1] = 1; - process.nextTick(resume$1, this); - } else resume$1(this, true); - if (this[kResuming$1] && this[kNeedDrain$7] !== 2 && this[kBusy$3]) this[kNeedDrain$7] = 2; - return this[kNeedDrain$7] < 2; - } - async [kClose$14]() { - return new Promise((resolve) => { - if (!this[kSize$11]) resolve(null); - else this[kClosedResolve$3] = resolve; - }); - } - async [kDestroy$10](err) { - return new Promise((resolve) => { - const requests = this[kQueue$5].splice(this[kPendingIdx$3]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$2 = requests[i$1]; - errorRequest$1(this, request$2, err); - } - const callback = () => { - if (this[kClosedResolve$3]) { - this[kClosedResolve$3](); - this[kClosedResolve$3] = null; - } - resolve(); - }; - if (this[kHTTP2Session$1] != null) { - util$35.destroy(this[kHTTP2Session$1], err); - this[kHTTP2Session$1] = null; - this[kHTTP2SessionState] = null; - } - if (!this[kSocket$2]) queueMicrotask(callback); - else util$35.destroy(this[kSocket$2].on("close", callback), err); - resume$1(this); - }); - } - }; - function onHttp2SessionError$1(err) { - assert$42(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - this[kSocket$2][kError$5] = err; - onError$1(this[kClient$5], err); - } - function onHttp2FrameError$1(type, code, id) { - const err = new InformationalError$5(`HTTP/2: "frameError" received - type ${type}, code ${code}`); - if (id === 0) { - this[kSocket$2][kError$5] = err; - onError$1(this[kClient$5], err); - } - } - function onHttp2SessionEnd$1() { - util$35.destroy(this, new SocketError$7("other side closed")); - util$35.destroy(this[kSocket$2], new SocketError$7("other side closed")); - } - function onHTTP2GoAway(code) { - const client = this[kClient$5]; - const err = new InformationalError$5(`HTTP/2: "GOAWAY" frame received with code ${code}`); - client[kSocket$2] = null; - client[kHTTP2Session$1] = null; - if (client.destroyed) { - assert$42(this[kPending$7] === 0); - const requests = client[kQueue$5].splice(client[kRunningIdx$3]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$2 = requests[i$1]; - errorRequest$1(this, request$2, err); - } - } else if (client[kRunning$9] > 0) { - const request$2 = client[kQueue$5][client[kRunningIdx$3]]; - client[kQueue$5][client[kRunningIdx$3]++] = null; - errorRequest$1(client, request$2, err); - } - client[kPendingIdx$3] = client[kRunningIdx$3]; - assert$42(client[kRunning$9] === 0); - client.emit("disconnect", client[kUrl$10], [client], err); - resume$1(client); - } - const constants$2 = require_constants$8(); - const createRedirectInterceptor$3 = require_redirectInterceptor(); - const EMPTY_BUF$1 = Buffer.alloc(0); - async function lazyllhttp$1() { - const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm$1() : void 0; - let mod; - try { - mod = await WebAssembly.compile(Buffer.from(require_llhttp_simd_wasm$1(), "base64")); - } catch (e) { - /* istanbul ignore next */ - mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require_llhttp_wasm$1(), "base64")); - } - return await WebAssembly.instantiate(mod, { env: { - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0; - }, - wasm_on_status: (p, at, len) => { - assert$42.strictEqual(currentParser$1.ptr, p); - const start = at - currentBufferPtr$1 + currentBufferRef$1.byteOffset; - return currentParser$1.onStatus(new FastBuffer$1(currentBufferRef$1.buffer, start, len)) || 0; - }, - wasm_on_message_begin: (p) => { - assert$42.strictEqual(currentParser$1.ptr, p); - return currentParser$1.onMessageBegin() || 0; - }, - wasm_on_header_field: (p, at, len) => { - assert$42.strictEqual(currentParser$1.ptr, p); - const start = at - currentBufferPtr$1 + currentBufferRef$1.byteOffset; - return currentParser$1.onHeaderField(new FastBuffer$1(currentBufferRef$1.buffer, start, len)) || 0; - }, - wasm_on_header_value: (p, at, len) => { - assert$42.strictEqual(currentParser$1.ptr, p); - const start = at - currentBufferPtr$1 + currentBufferRef$1.byteOffset; - return currentParser$1.onHeaderValue(new FastBuffer$1(currentBufferRef$1.buffer, start, len)) || 0; - }, - wasm_on_headers_complete: (p, statusCode, upgrade$2, shouldKeepAlive) => { - assert$42.strictEqual(currentParser$1.ptr, p); - return currentParser$1.onHeadersComplete(statusCode, Boolean(upgrade$2), Boolean(shouldKeepAlive)) || 0; - }, - wasm_on_body: (p, at, len) => { - assert$42.strictEqual(currentParser$1.ptr, p); - const start = at - currentBufferPtr$1 + currentBufferRef$1.byteOffset; - return currentParser$1.onBody(new FastBuffer$1(currentBufferRef$1.buffer, start, len)) || 0; - }, - wasm_on_message_complete: (p) => { - assert$42.strictEqual(currentParser$1.ptr, p); - return currentParser$1.onMessageComplete() || 0; - } - } }); - } - let llhttpInstance$1 = null; - let llhttpPromise$1 = lazyllhttp$1(); - llhttpPromise$1.catch(); - let currentParser$1 = null; - let currentBufferRef$1 = null; - let currentBufferSize$1 = 0; - let currentBufferPtr$1 = null; - const TIMEOUT_HEADERS$1 = 1; - const TIMEOUT_BODY$1 = 2; - const TIMEOUT_IDLE = 3; - var Parser$1 = class { - constructor(client, socket, { exports: exports$1 }) { - assert$42(Number.isFinite(client[kMaxHeadersSize$2]) && client[kMaxHeadersSize$2] > 0); - this.llhttp = exports$1; - this.ptr = this.llhttp.llhttp_alloc(constants$2.TYPE.RESPONSE); - this.client = client; - this.socket = socket; - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.statusCode = null; - this.statusText = ""; - this.upgrade = false; - this.headers = []; - this.headersSize = 0; - this.headersMaxSize = client[kMaxHeadersSize$2]; - this.shouldKeepAlive = false; - this.paused = false; - this.resume = this.resume.bind(this); - this.bytesRead = 0; - this.keepAlive = ""; - this.contentLength = ""; - this.connection = ""; - this.maxResponseSize = client[kMaxResponseSize$2]; - } - setTimeout(value, type) { - this.timeoutType = type; - if (value !== this.timeoutValue) { - timers$2.clearTimeout(this.timeout); - if (value) { - this.timeout = timers$2.setTimeout(onParserTimeout$1, value, this); - // istanbul ignore else: only for jest - if (this.timeout.unref) this.timeout.unref(); - } else this.timeout = null; - this.timeoutValue = value; - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - } - resume() { - if (this.socket.destroyed || !this.paused) return; - assert$42(this.ptr != null); - assert$42(currentParser$1 == null); - this.llhttp.llhttp_resume(this.ptr); - assert$42(this.timeoutType === TIMEOUT_BODY$1); - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - this.paused = false; - this.execute(this.socket.read() || EMPTY_BUF$1); - this.readMore(); - } - readMore() { - while (!this.paused && this.ptr) { - const chunk = this.socket.read(); - if (chunk === null) break; - this.execute(chunk); - } - } - execute(data) { - assert$42(this.ptr != null); - assert$42(currentParser$1 == null); - assert$42(!this.paused); - const { socket, llhttp } = this; - if (data.length > currentBufferSize$1) { - if (currentBufferPtr$1) llhttp.free(currentBufferPtr$1); - currentBufferSize$1 = Math.ceil(data.length / 4096) * 4096; - currentBufferPtr$1 = llhttp.malloc(currentBufferSize$1); - } - new Uint8Array(llhttp.memory.buffer, currentBufferPtr$1, currentBufferSize$1).set(data); - try { - let ret; - try { - currentBufferRef$1 = data; - currentParser$1 = this; - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr$1, data.length); - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err; - } finally { - currentParser$1 = null; - currentBufferRef$1 = null; - } - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr$1; - if (ret === constants$2.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); - else if (ret === constants$2.ERROR.PAUSED) { - this.paused = true; - socket.unshift(data.slice(offset)); - } else if (ret !== constants$2.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr); - let message = ""; - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); - message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; - } - throw new HTTPParserError$2(message, constants$2.ERROR[ret], data.slice(offset)); - } - } catch (err) { - util$35.destroy(socket, err); - } - } - destroy() { - assert$42(this.ptr != null); - assert$42(currentParser$1 == null); - this.llhttp.llhttp_free(this.ptr); - this.ptr = null; - timers$2.clearTimeout(this.timeout); - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.paused = false; - } - onStatus(buf) { - this.statusText = buf.toString(); - } - onMessageBegin() { - const { socket, client } = this; - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) return -1; - const request$2 = client[kQueue$5][client[kRunningIdx$3]]; - if (!request$2) return -1; - } - onHeaderField(buf) { - const len = this.headers.length; - if ((len & 1) === 0) this.headers.push(buf); - else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - this.trackHeader(buf.length); - } - onHeaderValue(buf) { - let len = this.headers.length; - if ((len & 1) === 1) { - this.headers.push(buf); - len += 1; - } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - const key = this.headers[len - 2]; - if (key.length === 10 && key.toString().toLowerCase() === "keep-alive") this.keepAlive += buf.toString(); - else if (key.length === 10 && key.toString().toLowerCase() === "connection") this.connection += buf.toString(); - else if (key.length === 14 && key.toString().toLowerCase() === "content-length") this.contentLength += buf.toString(); - this.trackHeader(buf.length); - } - trackHeader(len) { - this.headersSize += len; - if (this.headersSize >= this.headersMaxSize) util$35.destroy(this.socket, new HeadersOverflowError$2()); - } - onUpgrade(head) { - const { upgrade: upgrade$2, client, socket, headers, statusCode } = this; - assert$42(upgrade$2); - const request$2 = client[kQueue$5][client[kRunningIdx$3]]; - assert$42(request$2); - assert$42(!socket.destroyed); - assert$42(socket === client[kSocket$2]); - assert$42(!this.paused); - assert$42(request$2.upgrade || request$2.method === "CONNECT"); - this.statusCode = null; - this.statusText = ""; - this.shouldKeepAlive = null; - assert$42(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - socket.unshift(head); - socket[kParser$1].destroy(); - socket[kParser$1] = null; - socket[kClient$5] = null; - socket[kError$5] = null; - socket.removeListener("error", onSocketError$1).removeListener("readable", onSocketReadable).removeListener("end", onSocketEnd).removeListener("close", onSocketClose$3); - client[kSocket$2] = null; - client[kQueue$5][client[kRunningIdx$3]++] = null; - client.emit("disconnect", client[kUrl$10], [client], new InformationalError$5("upgrade")); - try { - request$2.onUpgrade(statusCode, headers, socket); - } catch (err) { - util$35.destroy(socket, err); - } - resume$1(client); - } - onHeadersComplete(statusCode, upgrade$2, shouldKeepAlive) { - const { client, socket, headers, statusText } = this; - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) return -1; - const request$2 = client[kQueue$5][client[kRunningIdx$3]]; - /* istanbul ignore next: difficult to make a test case for */ - if (!request$2) return -1; - assert$42(!this.upgrade); - assert$42(this.statusCode < 200); - if (statusCode === 100) { - util$35.destroy(socket, new SocketError$7("bad response", util$35.getSocketInfo(socket))); - return -1; - } - if (upgrade$2 && !request$2.upgrade) { - util$35.destroy(socket, new SocketError$7("bad upgrade", util$35.getSocketInfo(socket))); - return -1; - } - assert$42.strictEqual(this.timeoutType, TIMEOUT_HEADERS$1); - this.statusCode = statusCode; - this.shouldKeepAlive = shouldKeepAlive || request$2.method === "HEAD" && !socket[kReset$2] && this.connection.toLowerCase() === "keep-alive"; - if (this.statusCode >= 200) { - const bodyTimeout = request$2.bodyTimeout != null ? request$2.bodyTimeout : client[kBodyTimeout$3]; - this.setTimeout(bodyTimeout, TIMEOUT_BODY$1); - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - if (request$2.method === "CONNECT") { - assert$42(client[kRunning$9] === 1); - this.upgrade = true; - return 2; - } - if (upgrade$2) { - assert$42(client[kRunning$9] === 1); - this.upgrade = true; - return 2; - } - assert$42(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (this.shouldKeepAlive && client[kPipelining$2]) { - const keepAliveTimeout = this.keepAlive ? util$35.parseKeepAliveTimeout(this.keepAlive) : null; - if (keepAliveTimeout != null) { - const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold$2], client[kKeepAliveMaxTimeout$2]); - if (timeout <= 0) socket[kReset$2] = true; - else client[kKeepAliveTimeoutValue$2] = timeout; - } else client[kKeepAliveTimeoutValue$2] = client[kKeepAliveDefaultTimeout$2]; - } else socket[kReset$2] = true; - const pause = request$2.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request$2.aborted) return -1; - if (request$2.method === "HEAD") return 1; - if (statusCode < 200) return 1; - if (socket[kBlocking$1]) { - socket[kBlocking$1] = false; - resume$1(client); - } - return pause ? constants$2.ERROR.PAUSED : 0; - } - onBody(buf) { - const { client, socket, statusCode, maxResponseSize } = this; - if (socket.destroyed) return -1; - const request$2 = client[kQueue$5][client[kRunningIdx$3]]; - assert$42(request$2); - assert$42.strictEqual(this.timeoutType, TIMEOUT_BODY$1); - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) this.timeout.refresh(); - } - assert$42(statusCode >= 200); - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util$35.destroy(socket, new ResponseExceededMaxSizeError$2()); - return -1; - } - this.bytesRead += buf.length; - if (request$2.onData(buf) === false) return constants$2.ERROR.PAUSED; - } - onMessageComplete() { - const { client, socket, statusCode, upgrade: upgrade$2, headers, contentLength, bytesRead, shouldKeepAlive } = this; - if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; - if (upgrade$2) return; - const request$2 = client[kQueue$5][client[kRunningIdx$3]]; - assert$42(request$2); - assert$42(statusCode >= 100); - this.statusCode = null; - this.statusText = ""; - this.bytesRead = 0; - this.contentLength = ""; - this.keepAlive = ""; - this.connection = ""; - assert$42(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (statusCode < 200) return; - /* istanbul ignore next: should be handled by llhttp? */ - if (request$2.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util$35.destroy(socket, new ResponseContentLengthMismatchError$2()); - return -1; - } - request$2.onComplete(headers); - client[kQueue$5][client[kRunningIdx$3]++] = null; - if (socket[kWriting$1]) { - assert$42.strictEqual(client[kRunning$9], 0); - util$35.destroy(socket, new InformationalError$5("reset")); - return constants$2.ERROR.PAUSED; - } else if (!shouldKeepAlive) { - util$35.destroy(socket, new InformationalError$5("reset")); - return constants$2.ERROR.PAUSED; - } else if (socket[kReset$2] && client[kRunning$9] === 0) { - util$35.destroy(socket, new InformationalError$5("reset")); - return constants$2.ERROR.PAUSED; - } else if (client[kPipelining$2] === 1) setImmediate(resume$1, client); - else resume$1(client); - } - }; - function onParserTimeout$1(parser) { - const { socket, timeoutType, client } = parser; - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS$1) { - if (!socket[kWriting$1] || socket.writableNeedDrain || client[kRunning$9] > 1) { - assert$42(!parser.paused, "cannot be paused while waiting for headers"); - util$35.destroy(socket, new HeadersTimeoutError$2()); - } - } else if (timeoutType === TIMEOUT_BODY$1) { - if (!parser.paused) util$35.destroy(socket, new BodyTimeoutError$2()); - } else if (timeoutType === TIMEOUT_IDLE) { - assert$42(client[kRunning$9] === 0 && client[kKeepAliveTimeoutValue$2]); - util$35.destroy(socket, new InformationalError$5("socket idle timeout")); - } - } - function onSocketReadable() { - const { [kParser$1]: parser } = this; - if (parser) parser.readMore(); - } - function onSocketError$1(err) { - const { [kClient$5]: client, [kParser$1]: parser } = this; - assert$42(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - if (client[kHTTPConnVersion] !== "h2") { - if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; - } - } - this[kError$5] = err; - onError$1(this[kClient$5], err); - } - function onError$1(client, err) { - if (client[kRunning$9] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert$42(client[kPendingIdx$3] === client[kRunningIdx$3]); - const requests = client[kQueue$5].splice(client[kRunningIdx$3]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$2 = requests[i$1]; - errorRequest$1(client, request$2, err); - } - assert$42(client[kSize$11] === 0); - } - } - function onSocketEnd() { - const { [kParser$1]: parser, [kClient$5]: client } = this; - if (client[kHTTPConnVersion] !== "h2") { - if (parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; - } - } - util$35.destroy(this, new SocketError$7("other side closed", util$35.getSocketInfo(this))); - } - function onSocketClose$3() { - const { [kClient$5]: client, [kParser$1]: parser } = this; - if (client[kHTTPConnVersion] === "h1" && parser) { - if (!this[kError$5] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); - this[kParser$1].destroy(); - this[kParser$1] = null; - } - const err = this[kError$5] || new SocketError$7("closed", util$35.getSocketInfo(this)); - client[kSocket$2] = null; - if (client.destroyed) { - assert$42(client[kPending$7] === 0); - const requests = client[kQueue$5].splice(client[kRunningIdx$3]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$2 = requests[i$1]; - errorRequest$1(client, request$2, err); - } - } else if (client[kRunning$9] > 0 && err.code !== "UND_ERR_INFO") { - const request$2 = client[kQueue$5][client[kRunningIdx$3]]; - client[kQueue$5][client[kRunningIdx$3]++] = null; - errorRequest$1(client, request$2, err); - } - client[kPendingIdx$3] = client[kRunningIdx$3]; - assert$42(client[kRunning$9] === 0); - client.emit("disconnect", client[kUrl$10], [client], err); - resume$1(client); - } - async function connect$4(client) { - assert$42(!client[kConnecting$1]); - assert$42(!client[kSocket$2]); - let { host, hostname, protocol, port } = client[kUrl$10]; - if (hostname[0] === "[") { - const idx = hostname.indexOf("]"); - assert$42(idx !== -1); - const ip = hostname.substring(1, idx); - assert$42(net$3.isIP(ip)); - hostname = ip; - } - client[kConnecting$1] = true; - if (channels$11.beforeConnect.hasSubscribers) channels$11.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName$1], - localAddress: client[kLocalAddress$1] - }, - connector: client[kConnector$1] - }); - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector$1]({ - host, - hostname, - protocol, - port, - servername: client[kServerName$1], - localAddress: client[kLocalAddress$1] - }, (err, socket$1) => { - if (err) reject(err); - else resolve(socket$1); - }); - }); - if (client.destroyed) { - util$35.destroy(socket.on("error", () => {}), new ClientDestroyedError$3()); - return; - } - client[kConnecting$1] = false; - assert$42(socket); - const isH2 = socket.alpnProtocol === "h2"; - if (isH2) { - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true; - process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); - } - const session = http2$1.connect(client[kUrl$10], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams - }); - client[kHTTPConnVersion] = "h2"; - session[kClient$5] = client; - session[kSocket$2] = socket; - session.on("error", onHttp2SessionError$1); - session.on("frameError", onHttp2FrameError$1); - session.on("end", onHttp2SessionEnd$1); - session.on("goaway", onHTTP2GoAway); - session.on("close", onSocketClose$3); - session.unref(); - client[kHTTP2Session$1] = session; - socket[kHTTP2Session$1] = session; - } else { - if (!llhttpInstance$1) { - llhttpInstance$1 = await llhttpPromise$1; - llhttpPromise$1 = null; - } - socket[kNoRef$1] = false; - socket[kWriting$1] = false; - socket[kReset$2] = false; - socket[kBlocking$1] = false; - socket[kParser$1] = new Parser$1(client, socket, llhttpInstance$1); - } - socket[kCounter$2] = 0; - socket[kMaxRequests$2] = client[kMaxRequests$2]; - socket[kClient$5] = client; - socket[kError$5] = null; - socket.on("error", onSocketError$1).on("readable", onSocketReadable).on("end", onSocketEnd).on("close", onSocketClose$3); - client[kSocket$2] = socket; - if (channels$11.connected.hasSubscribers) channels$11.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName$1], - localAddress: client[kLocalAddress$1] - }, - connector: client[kConnector$1], - socket - }); - client.emit("connect", client[kUrl$10], [client]); - } catch (err) { - if (client.destroyed) return; - client[kConnecting$1] = false; - if (channels$11.connectError.hasSubscribers) channels$11.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName$1], - localAddress: client[kLocalAddress$1] - }, - connector: client[kConnector$1], - error: err - }); - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert$42(client[kRunning$9] === 0); - while (client[kPending$7] > 0 && client[kQueue$5][client[kPendingIdx$3]].servername === client[kServerName$1]) { - const request$2 = client[kQueue$5][client[kPendingIdx$3]++]; - errorRequest$1(client, request$2, err); - } - } else onError$1(client, err); - client.emit("connectionError", client[kUrl$10], [client], err); - } - resume$1(client); - } - function emitDrain$1(client) { - client[kNeedDrain$7] = 0; - client.emit("drain", client[kUrl$10], [client]); - } - function resume$1(client, sync) { - if (client[kResuming$1] === 2) return; - client[kResuming$1] = 2; - _resume$1(client, sync); - client[kResuming$1] = 0; - if (client[kRunningIdx$3] > 256) { - client[kQueue$5].splice(0, client[kRunningIdx$3]); - client[kPendingIdx$3] -= client[kRunningIdx$3]; - client[kRunningIdx$3] = 0; - } - } - function _resume$1(client, sync) { - while (true) { - if (client.destroyed) { - assert$42(client[kPending$7] === 0); - return; - } - if (client[kClosedResolve$3] && !client[kSize$11]) { - client[kClosedResolve$3](); - client[kClosedResolve$3] = null; - return; - } - const socket = client[kSocket$2]; - if (socket && !socket.destroyed && socket.alpnProtocol !== "h2") { - if (client[kSize$11] === 0) { - if (!socket[kNoRef$1] && socket.unref) { - socket.unref(); - socket[kNoRef$1] = true; - } - } else if (socket[kNoRef$1] && socket.ref) { - socket.ref(); - socket[kNoRef$1] = false; - } - if (client[kSize$11] === 0) { - if (socket[kParser$1].timeoutType !== TIMEOUT_IDLE) socket[kParser$1].setTimeout(client[kKeepAliveTimeoutValue$2], TIMEOUT_IDLE); - } else if (client[kRunning$9] > 0 && socket[kParser$1].statusCode < 200) { - if (socket[kParser$1].timeoutType !== TIMEOUT_HEADERS$1) { - const request$3 = client[kQueue$5][client[kRunningIdx$3]]; - const headersTimeout = request$3.headersTimeout != null ? request$3.headersTimeout : client[kHeadersTimeout$2]; - socket[kParser$1].setTimeout(headersTimeout, TIMEOUT_HEADERS$1); - } - } - } - if (client[kBusy$3]) client[kNeedDrain$7] = 2; - else if (client[kNeedDrain$7] === 2) { - if (sync) { - client[kNeedDrain$7] = 1; - process.nextTick(emitDrain$1, client); - } else emitDrain$1(client); - continue; - } - if (client[kPending$7] === 0) return; - if (client[kRunning$9] >= (client[kPipelining$2] || 1)) return; - const request$2 = client[kQueue$5][client[kPendingIdx$3]]; - if (client[kUrl$10].protocol === "https:" && client[kServerName$1] !== request$2.servername) { - if (client[kRunning$9] > 0) return; - client[kServerName$1] = request$2.servername; - if (socket && socket.servername !== request$2.servername) { - util$35.destroy(socket, new InformationalError$5("servername changed")); - return; - } - } - if (client[kConnecting$1]) return; - if (!socket && !client[kHTTP2Session$1]) { - connect$4(client); - return; - } - if (socket.destroyed || socket[kWriting$1] || socket[kReset$2] || socket[kBlocking$1]) return; - if (client[kRunning$9] > 0 && !request$2.idempotent) return; - if (client[kRunning$9] > 0 && (request$2.upgrade || request$2.method === "CONNECT")) return; - if (client[kRunning$9] > 0 && util$35.bodyLength(request$2.body) !== 0 && (util$35.isStream(request$2.body) || util$35.isAsyncIterable(request$2.body))) return; - if (!request$2.aborted && write(client, request$2)) client[kPendingIdx$3]++; - else client[kQueue$5].splice(client[kPendingIdx$3], 1); - } - } - function shouldSendContentLength$2(method) { - return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; - } - function write(client, request$2) { - if (client[kHTTPConnVersion] === "h2") { - writeH2$1(client, client[kHTTP2Session$1], request$2); - return; - } - const { body, method, path: path$8, host, upgrade: upgrade$2, headers, blocking, reset } = request$2; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") body.read(0); - const bodyLength$2 = util$35.bodyLength(body); - let contentLength = bodyLength$2; - if (contentLength === null) contentLength = request$2.contentLength; - if (contentLength === 0 && !expectsPayload) contentLength = null; - if (shouldSendContentLength$2(method) && contentLength > 0 && request$2.contentLength !== null && request$2.contentLength !== contentLength) { - if (client[kStrictContentLength$3]) { - errorRequest$1(client, request$2, new RequestContentLengthMismatchError$3()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError$3()); - } - const socket = client[kSocket$2]; - try { - request$2.onConnect((err) => { - if (request$2.aborted || request$2.completed) return; - errorRequest$1(client, request$2, err || new RequestAbortedError$17()); - util$35.destroy(socket, new InformationalError$5("aborted")); - }); - } catch (err) { - errorRequest$1(client, request$2, err); - } - if (request$2.aborted) return false; - if (method === "HEAD") socket[kReset$2] = true; - if (upgrade$2 || method === "CONNECT") socket[kReset$2] = true; - if (reset != null) socket[kReset$2] = reset; - if (client[kMaxRequests$2] && socket[kCounter$2]++ >= client[kMaxRequests$2]) socket[kReset$2] = true; - if (blocking) socket[kBlocking$1] = true; - let header = `${method} ${path$8} HTTP/1.1\r\n`; - if (typeof host === "string") header += `host: ${host}\r\n`; - else header += client[kHostHeader$2]; - if (upgrade$2) header += `connection: upgrade\r\nupgrade: ${upgrade$2}\r\n`; - else if (client[kPipelining$2] && !socket[kReset$2]) header += "connection: keep-alive\r\n"; - else header += "connection: close\r\n"; - if (headers) header += headers; - if (channels$11.sendHeaders.hasSubscribers) channels$11.sendHeaders.publish({ - request: request$2, - headers: header, - socket - }); - /* istanbul ignore else: assertion */ - if (!body || bodyLength$2 === 0) { - if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - else { - assert$42(contentLength === null, "no body must not have content length"); - socket.write(`${header}\r\n`, "latin1"); - } - request$2.onRequestSent(); - } else if (util$35.isBuffer(body)) { - assert$42(contentLength === body.byteLength, "buffer body must have content length"); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - socket.write(body); - socket.uncork(); - request$2.onBodySent(body); - request$2.onRequestSent(); - if (!expectsPayload) socket[kReset$2] = true; - } else if (util$35.isBlobLike(body)) if (typeof body.stream === "function") writeIterable$2({ - body: body.stream(), - client, - request: request$2, - socket, - contentLength, - header, - expectsPayload - }); - else writeBlob$2({ - body, - client, - request: request$2, - socket, - contentLength, - header, - expectsPayload - }); - else if (util$35.isStream(body)) writeStream$2({ - body, - client, - request: request$2, - socket, - contentLength, - header, - expectsPayload - }); - else if (util$35.isIterable(body)) writeIterable$2({ - body, - client, - request: request$2, - socket, - contentLength, - header, - expectsPayload - }); - else assert$42(false); - return true; - } - function writeH2$1(client, session, request$2) { - const { body, method, path: path$8, host, upgrade: upgrade$2, expectContinue, signal, headers: reqHeaders } = request$2; - let headers; - if (typeof reqHeaders === "string") headers = Request$8[kHTTP2CopyHeaders](reqHeaders.trim()); - else headers = reqHeaders; - if (upgrade$2) { - errorRequest$1(client, request$2, new Error("Upgrade not supported for H2")); - return false; - } - try { - request$2.onConnect((err) => { - if (request$2.aborted || request$2.completed) return; - errorRequest$1(client, request$2, err || new RequestAbortedError$17()); - }); - } catch (err) { - errorRequest$1(client, request$2, err); - } - if (request$2.aborted) return false; - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream$5; - const h2State = client[kHTTP2SessionState]; - headers[HTTP2_HEADER_AUTHORITY$1] = host || client[kHost]; - headers[HTTP2_HEADER_METHOD$1] = method; - if (method === "CONNECT") { - session.ref(); - stream$5 = session.request(headers, { - endStream: false, - signal - }); - if (stream$5.id && !stream$5.pending) { - request$2.onUpgrade(null, null, stream$5); - ++h2State.openStreams; - } else stream$5.once("ready", () => { - request$2.onUpgrade(null, null, stream$5); - ++h2State.openStreams; - }); - stream$5.once("close", () => { - h2State.openStreams -= 1; - if (h2State.openStreams === 0) session.unref(); - }); - return true; - } - headers[HTTP2_HEADER_PATH$1] = path$8; - headers[HTTP2_HEADER_SCHEME$1] = "https"; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") body.read(0); - let contentLength = util$35.bodyLength(body); - if (contentLength == null) contentLength = request$2.contentLength; - if (contentLength === 0 || !expectsPayload) contentLength = null; - if (shouldSendContentLength$2(method) && contentLength > 0 && request$2.contentLength != null && request$2.contentLength !== contentLength) { - if (client[kStrictContentLength$3]) { - errorRequest$1(client, request$2, new RequestContentLengthMismatchError$3()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError$3()); - } - if (contentLength != null) { - assert$42(body, "no body must not have content length"); - headers[HTTP2_HEADER_CONTENT_LENGTH$1] = `${contentLength}`; - } - session.ref(); - const shouldEndStream = method === "GET" || method === "HEAD"; - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT$1] = "100-continue"; - stream$5 = session.request(headers, { - endStream: shouldEndStream, - signal - }); - stream$5.once("continue", writeBodyH2); - } else { - stream$5 = session.request(headers, { - endStream: shouldEndStream, - signal - }); - writeBodyH2(); - } - ++h2State.openStreams; - stream$5.once("response", (headers$1) => { - const { [HTTP2_HEADER_STATUS$1]: statusCode,...realHeaders } = headers$1; - if (request$2.onHeaders(Number(statusCode), realHeaders, stream$5.resume.bind(stream$5), "") === false) stream$5.pause(); - }); - stream$5.once("end", () => { - request$2.onComplete([]); - }); - stream$5.on("data", (chunk) => { - if (request$2.onData(chunk) === false) stream$5.pause(); - }); - stream$5.once("close", () => { - h2State.openStreams -= 1; - if (h2State.openStreams === 0) session.unref(); - }); - stream$5.once("error", function(err) { - if (client[kHTTP2Session$1] && !client[kHTTP2Session$1].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1; - util$35.destroy(stream$5, err); - } - }); - stream$5.once("frameError", (type, code) => { - const err = new InformationalError$5(`HTTP/2: "frameError" received - type ${type}, code ${code}`); - errorRequest$1(client, request$2, err); - if (client[kHTTP2Session$1] && !client[kHTTP2Session$1].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1; - util$35.destroy(stream$5, err); - } - }); - return true; - function writeBodyH2() { - /* istanbul ignore else: assertion */ - if (!body) request$2.onRequestSent(); - else if (util$35.isBuffer(body)) { - assert$42(contentLength === body.byteLength, "buffer body must have content length"); - stream$5.cork(); - stream$5.write(body); - stream$5.uncork(); - stream$5.end(); - request$2.onBodySent(body); - request$2.onRequestSent(); - } else if (util$35.isBlobLike(body)) if (typeof body.stream === "function") writeIterable$2({ - client, - request: request$2, - contentLength, - h2stream: stream$5, - expectsPayload, - body: body.stream(), - socket: client[kSocket$2], - header: "" - }); - else writeBlob$2({ - body, - client, - request: request$2, - contentLength, - expectsPayload, - h2stream: stream$5, - header: "", - socket: client[kSocket$2] - }); - else if (util$35.isStream(body)) writeStream$2({ - body, - client, - request: request$2, - contentLength, - expectsPayload, - socket: client[kSocket$2], - h2stream: stream$5, - header: "" - }); - else if (util$35.isIterable(body)) writeIterable$2({ - body, - client, - request: request$2, - contentLength, - expectsPayload, - header: "", - h2stream: stream$5, - socket: client[kSocket$2] - }); - else assert$42(false); - } - } - function writeStream$2({ h2stream, body, client, request: request$2, socket, contentLength, header, expectsPayload }) { - assert$42(contentLength !== 0 || client[kRunning$9] === 0, "stream body cannot be pipelined"); - if (client[kHTTPConnVersion] === "h2") { - const pipe = pipeline$6(body, h2stream, (err) => { - if (err) { - util$35.destroy(body, err); - util$35.destroy(h2stream, err); - } else request$2.onRequestSent(); - }); - pipe.on("data", onPipeData); - pipe.once("end", () => { - pipe.removeListener("data", onPipeData); - util$35.destroy(pipe); - }); - function onPipeData(chunk) { - request$2.onBodySent(chunk); - } - return; - } - let finished$3 = false; - const writer = new AsyncWriter$1({ - socket, - request: request$2, - contentLength, - client, - expectsPayload, - header - }); - const onData = function(chunk) { - if (finished$3) return; - try { - if (!writer.write(chunk) && this.pause) this.pause(); - } catch (err) { - util$35.destroy(this, err); - } - }; - const onDrain = function() { - if (finished$3) return; - if (body.resume) body.resume(); - }; - const onAbort = function() { - if (finished$3) return; - const err = new RequestAbortedError$17(); - queueMicrotask(() => onFinished(err)); - }; - const onFinished = function(err) { - if (finished$3) return; - finished$3 = true; - assert$42(socket.destroyed || socket[kWriting$1] && client[kRunning$9] <= 1); - socket.off("drain", onDrain).off("error", onFinished); - body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); - if (!err) try { - writer.end(); - } catch (er) { - err = er; - } - writer.destroy(err); - if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util$35.destroy(body, err); - else util$35.destroy(body); - }; - body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onAbort); - if (body.resume) body.resume(); - socket.on("drain", onDrain).on("error", onFinished); - } - async function writeBlob$2({ h2stream, body, client, request: request$2, socket, contentLength, header, expectsPayload }) { - assert$42(contentLength === body.size, "blob body must have content length"); - const isH2 = client[kHTTPConnVersion] === "h2"; - try { - if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError$3(); - const buffer$1 = Buffer.from(await body.arrayBuffer()); - if (isH2) { - h2stream.cork(); - h2stream.write(buffer$1); - h2stream.uncork(); - } else { - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - socket.write(buffer$1); - socket.uncork(); - } - request$2.onBodySent(buffer$1); - request$2.onRequestSent(); - if (!expectsPayload) socket[kReset$2] = true; - resume$1(client); - } catch (err) { - util$35.destroy(isH2 ? h2stream : socket, err); - } - } - async function writeIterable$2({ h2stream, body, client, request: request$2, socket, contentLength, header, expectsPayload }) { - assert$42(contentLength !== 0 || client[kRunning$9] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } - } - const waitForDrain = () => new Promise((resolve, reject) => { - assert$42(callback === null); - if (socket[kError$5]) reject(socket[kError$5]); - else callback = resolve; - }); - if (client[kHTTPConnVersion] === "h2") { - h2stream.on("close", onDrain).on("drain", onDrain); - try { - for await (const chunk of body) { - if (socket[kError$5]) throw socket[kError$5]; - const res = h2stream.write(chunk); - request$2.onBodySent(chunk); - if (!res) await waitForDrain(); - } - } catch (err) { - h2stream.destroy(err); - } finally { - request$2.onRequestSent(); - h2stream.end(); - h2stream.off("close", onDrain).off("drain", onDrain); - } - return; - } - socket.on("close", onDrain).on("drain", onDrain); - const writer = new AsyncWriter$1({ - socket, - request: request$2, - contentLength, - client, - expectsPayload, - header - }); - try { - for await (const chunk of body) { - if (socket[kError$5]) throw socket[kError$5]; - if (!writer.write(chunk)) await waitForDrain(); - } - writer.end(); - } catch (err) { - writer.destroy(err); - } finally { - socket.off("close", onDrain).off("drain", onDrain); - } - } - var AsyncWriter$1 = class { - constructor({ socket, request: request$2, contentLength, client, expectsPayload, header }) { - this.socket = socket; - this.request = request$2; - this.contentLength = contentLength; - this.client = client; - this.bytesWritten = 0; - this.expectsPayload = expectsPayload; - this.header = header; - socket[kWriting$1] = true; - } - write(chunk) { - const { socket, request: request$2, contentLength, client, bytesWritten, expectsPayload, header } = this; - if (socket[kError$5]) throw socket[kError$5]; - if (socket.destroyed) return false; - const len = Buffer.byteLength(chunk); - if (!len) return true; - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength$3]) throw new RequestContentLengthMismatchError$3(); - process.emitWarning(new RequestContentLengthMismatchError$3()); - } - socket.cork(); - if (bytesWritten === 0) { - if (!expectsPayload) socket[kReset$2] = true; - if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); - else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - } - if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); - this.bytesWritten += len; - const ret = socket.write(chunk); - socket.uncork(); - request$2.onBodySent(chunk); - if (!ret) { - if (socket[kParser$1].timeout && socket[kParser$1].timeoutType === TIMEOUT_HEADERS$1) { - // istanbul ignore else: only for jest - if (socket[kParser$1].timeout.refresh) socket[kParser$1].timeout.refresh(); - } - } - return ret; - } - end() { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request$2 } = this; - request$2.onRequestSent(); - socket[kWriting$1] = false; - if (socket[kError$5]) throw socket[kError$5]; - if (socket.destroyed) return; - if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - else socket.write(`${header}\r\n`, "latin1"); - else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); - if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength$3]) throw new RequestContentLengthMismatchError$3(); - else process.emitWarning(new RequestContentLengthMismatchError$3()); - if (socket[kParser$1].timeout && socket[kParser$1].timeoutType === TIMEOUT_HEADERS$1) { - // istanbul ignore else: only for jest - if (socket[kParser$1].timeout.refresh) socket[kParser$1].timeout.refresh(); - } - resume$1(client); - } - destroy(err) { - const { socket, client } = this; - socket[kWriting$1] = false; - if (err) { - assert$42(client[kRunning$9] <= 1, "pipeline should only contain this request"); - util$35.destroy(socket, err); - } - } - }; - function errorRequest$1(client, request$2, err) { - try { - request$2.onError(err); - assert$42(request$2.aborted); - } catch (err$1) { - client.emit("error", err$1); - } - } - module.exports = Client$10; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js -var require_fixed_queue$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js"(exports, module) { - const kSize$10 = 2048; - const kMask$1 = kSize$10 - 1; - var FixedCircularBuffer$1 = class { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize$10); - this.next = null; - } - isEmpty() { - return this.top === this.bottom; - } - isFull() { - return (this.top + 1 & kMask$1) === this.bottom; - } - push(data) { - this.list[this.top] = data; - this.top = this.top + 1 & kMask$1; - } - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === void 0) return null; - this.list[this.bottom] = void 0; - this.bottom = this.bottom + 1 & kMask$1; - return nextItem; - } - }; - module.exports = class FixedQueue$3 { - constructor() { - this.head = this.tail = new FixedCircularBuffer$1(); - } - isEmpty() { - return this.head.isEmpty(); - } - push(data) { - if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer$1(); - this.head.push(data); - } - shift() { - const tail$1 = this.tail; - const next = tail$1.shift(); - if (tail$1.isEmpty() && tail$1.next !== null) this.tail = tail$1.next; - return next; - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-stats.js -var require_pool_stats = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-stats.js"(exports, module) { - const { kFree: kFree$3, kConnected: kConnected$10, kPending: kPending$6, kQueued: kQueued$3, kRunning: kRunning$8, kSize: kSize$9 } = require_symbols$5(); - const kPool = Symbol("pool"); - var PoolStats$3 = class { - constructor(pool) { - this[kPool] = pool; - } - get connected() { - return this[kPool][kConnected$10]; - } - get free() { - return this[kPool][kFree$3]; - } - get pending() { - return this[kPool][kPending$6]; - } - get queued() { - return this[kPool][kQueued$3]; - } - get running() { - return this[kPool][kRunning$8]; - } - get size() { - return this[kPool][kSize$9]; - } - }; - module.exports = PoolStats$3; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-base.js -var require_pool_base$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-base.js"(exports, module) { - const DispatcherBase$9 = require_dispatcher_base$1(); - const FixedQueue$2 = require_fixed_queue$1(); - const { kConnected: kConnected$9, kSize: kSize$8, kRunning: kRunning$7, kPending: kPending$5, kQueued: kQueued$2, kBusy: kBusy$2, kFree: kFree$2, kUrl: kUrl$9, kClose: kClose$13, kDestroy: kDestroy$9, kDispatch: kDispatch$6 } = require_symbols$5(); - const PoolStats$2 = require_pool_stats(); - const kClients$9 = Symbol("clients"); - const kNeedDrain$6 = Symbol("needDrain"); - const kQueue$4 = Symbol("queue"); - const kClosedResolve$2 = Symbol("closed resolve"); - const kOnDrain$3 = Symbol("onDrain"); - const kOnConnect$3 = Symbol("onConnect"); - const kOnDisconnect$3 = Symbol("onDisconnect"); - const kOnConnectionError$3 = Symbol("onConnectionError"); - const kGetDispatcher$5 = Symbol("get dispatcher"); - const kAddClient$5 = Symbol("add client"); - const kRemoveClient$3 = Symbol("remove client"); - const kStats = Symbol("stats"); - var PoolBase$5 = class extends DispatcherBase$9 { - constructor() { - super(); - this[kQueue$4] = new FixedQueue$2(); - this[kClients$9] = []; - this[kQueued$2] = 0; - const pool = this; - this[kOnDrain$3] = function onDrain(origin, targets) { - const queue = pool[kQueue$4]; - let needDrain = false; - while (!needDrain) { - const item = queue.shift(); - if (!item) break; - pool[kQueued$2]--; - needDrain = !this.dispatch(item.opts, item.handler); - } - this[kNeedDrain$6] = needDrain; - if (!this[kNeedDrain$6] && pool[kNeedDrain$6]) { - pool[kNeedDrain$6] = false; - pool.emit("drain", origin, [pool, ...targets]); - } - if (pool[kClosedResolve$2] && queue.isEmpty()) Promise.all(pool[kClients$9].map((c) => c.close())).then(pool[kClosedResolve$2]); - }; - this[kOnConnect$3] = (origin, targets) => { - pool.emit("connect", origin, [pool, ...targets]); - }; - this[kOnDisconnect$3] = (origin, targets, err) => { - pool.emit("disconnect", origin, [pool, ...targets], err); - }; - this[kOnConnectionError$3] = (origin, targets, err) => { - pool.emit("connectionError", origin, [pool, ...targets], err); - }; - this[kStats] = new PoolStats$2(this); - } - get [kBusy$2]() { - return this[kNeedDrain$6]; - } - get [kConnected$9]() { - return this[kClients$9].filter((client) => client[kConnected$9]).length; - } - get [kFree$2]() { - return this[kClients$9].filter((client) => client[kConnected$9] && !client[kNeedDrain$6]).length; - } - get [kPending$5]() { - let ret = this[kQueued$2]; - for (const { [kPending$5]: pending } of this[kClients$9]) ret += pending; - return ret; - } - get [kRunning$7]() { - let ret = 0; - for (const { [kRunning$7]: running } of this[kClients$9]) ret += running; - return ret; - } - get [kSize$8]() { - let ret = this[kQueued$2]; - for (const { [kSize$8]: size } of this[kClients$9]) ret += size; - return ret; - } - get stats() { - return this[kStats]; - } - async [kClose$13]() { - if (this[kQueue$4].isEmpty()) return Promise.all(this[kClients$9].map((c) => c.close())); - else return new Promise((resolve) => { - this[kClosedResolve$2] = resolve; - }); - } - async [kDestroy$9](err) { - while (true) { - const item = this[kQueue$4].shift(); - if (!item) break; - item.handler.onError(err); - } - return Promise.all(this[kClients$9].map((c) => c.destroy(err))); - } - [kDispatch$6](opts, handler) { - const dispatcher = this[kGetDispatcher$5](); - if (!dispatcher) { - this[kNeedDrain$6] = true; - this[kQueue$4].push({ - opts, - handler - }); - this[kQueued$2]++; - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain$6] = true; - this[kNeedDrain$6] = !this[kGetDispatcher$5](); - } - return !this[kNeedDrain$6]; - } - [kAddClient$5](client) { - client.on("drain", this[kOnDrain$3]).on("connect", this[kOnConnect$3]).on("disconnect", this[kOnDisconnect$3]).on("connectionError", this[kOnConnectionError$3]); - this[kClients$9].push(client); - if (this[kNeedDrain$6]) process.nextTick(() => { - if (this[kNeedDrain$6]) this[kOnDrain$3](client[kUrl$9], [this, client]); - }); - return this; - } - [kRemoveClient$3](client) { - client.close(() => { - const idx = this[kClients$9].indexOf(client); - if (idx !== -1) this[kClients$9].splice(idx, 1); - }); - this[kNeedDrain$6] = this[kClients$9].some((dispatcher) => !dispatcher[kNeedDrain$6] && dispatcher.closed !== true && dispatcher.destroyed !== true); - } - }; - module.exports = { - PoolBase: PoolBase$5, - kClients: kClients$9, - kNeedDrain: kNeedDrain$6, - kAddClient: kAddClient$5, - kRemoveClient: kRemoveClient$3, - kGetDispatcher: kGetDispatcher$5 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool.js -var require_pool$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool.js"(exports, module) { - const { PoolBase: PoolBase$4, kClients: kClients$8, kNeedDrain: kNeedDrain$5, kAddClient: kAddClient$4, kGetDispatcher: kGetDispatcher$4 } = require_pool_base$1(); - const Client$9 = require_client$1(); - const { InvalidArgumentError: InvalidArgumentError$45 } = require_errors$1(); - const util$34 = require_util$12(); - const { kUrl: kUrl$8, kInterceptors: kInterceptors$3 } = require_symbols$5(); - const buildConnector$7 = require_connect$1(); - const kOptions$7 = Symbol("options"); - const kConnections$1 = Symbol("connections"); - const kFactory$7 = Symbol("factory"); - function defaultFactory$7(origin, opts) { - return new Client$9(origin, opts); - } - var Pool$11 = class extends PoolBase$4 { - constructor(origin, { connections, factory = defaultFactory$7, connect: connect$5, connectTimeout, tls: tls$3, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2,...options } = {}) { - super(); - if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError$45("invalid connections"); - if (typeof factory !== "function") throw new InvalidArgumentError$45("factory must be a function."); - if (connect$5 != null && typeof connect$5 !== "function" && typeof connect$5 !== "object") throw new InvalidArgumentError$45("connect must be a function or an object"); - if (typeof connect$5 !== "function") connect$5 = buildConnector$7({ - ...tls$3, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...util$34.nodeHasAutoSelectFamily && autoSelectFamily ? { - autoSelectFamily, - autoSelectFamilyAttemptTimeout - } : void 0, - ...connect$5 - }); - this[kInterceptors$3] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; - this[kConnections$1] = connections || null; - this[kUrl$8] = util$34.parseOrigin(origin); - this[kOptions$7] = { - ...util$34.deepClone(options), - connect: connect$5, - allowH2 - }; - this[kOptions$7].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kFactory$7] = factory; - this.on("connectionError", (origin$1, targets, error$1) => { - for (const target of targets) { - const idx = this[kClients$8].indexOf(target); - if (idx !== -1) this[kClients$8].splice(idx, 1); - } - }); - } - [kGetDispatcher$4]() { - let dispatcher = this[kClients$8].find((dispatcher$1) => !dispatcher$1[kNeedDrain$5]); - if (dispatcher) return dispatcher; - if (!this[kConnections$1] || this[kClients$8].length < this[kConnections$1]) { - dispatcher = this[kFactory$7](this[kUrl$8], this[kOptions$7]); - this[kAddClient$4](dispatcher); - } - return dispatcher; - } - }; - module.exports = Pool$11; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/balanced-pool.js -var require_balanced_pool$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/balanced-pool.js"(exports, module) { - const { BalancedPoolMissingUpstreamError: BalancedPoolMissingUpstreamError$2, InvalidArgumentError: InvalidArgumentError$44 } = require_errors$1(); - const { PoolBase: PoolBase$3, kClients: kClients$7, kNeedDrain: kNeedDrain$4, kAddClient: kAddClient$3, kRemoveClient: kRemoveClient$2, kGetDispatcher: kGetDispatcher$3 } = require_pool_base$1(); - const Pool$10 = require_pool$1(); - const { kUrl: kUrl$7, kInterceptors: kInterceptors$2 } = require_symbols$5(); - const { parseOrigin: parseOrigin$2 } = require_util$12(); - const kFactory$6 = Symbol("factory"); - const kOptions$6 = Symbol("options"); - const kGreatestCommonDivisor$1 = Symbol("kGreatestCommonDivisor"); - const kCurrentWeight$1 = Symbol("kCurrentWeight"); - const kIndex$1 = Symbol("kIndex"); - const kWeight$1 = Symbol("kWeight"); - const kMaxWeightPerServer$1 = Symbol("kMaxWeightPerServer"); - const kErrorPenalty$1 = Symbol("kErrorPenalty"); - function getGreatestCommonDivisor$1(a, b) { - if (b === 0) return a; - return getGreatestCommonDivisor$1(b, a % b); - } - function defaultFactory$6(origin, opts) { - return new Pool$10(origin, opts); - } - var BalancedPool$3 = class extends PoolBase$3 { - constructor(upstreams = [], { factory = defaultFactory$6,...opts } = {}) { - super(); - this[kOptions$6] = opts; - this[kIndex$1] = -1; - this[kCurrentWeight$1] = 0; - this[kMaxWeightPerServer$1] = this[kOptions$6].maxWeightPerServer || 100; - this[kErrorPenalty$1] = this[kOptions$6].errorPenalty || 15; - if (!Array.isArray(upstreams)) upstreams = [upstreams]; - if (typeof factory !== "function") throw new InvalidArgumentError$44("factory must be a function."); - this[kInterceptors$2] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; - this[kFactory$6] = factory; - for (const upstream of upstreams) this.addUpstream(upstream); - this._updateBalancedPoolStats(); - } - addUpstream(upstream) { - const upstreamOrigin = parseOrigin$2(upstream).origin; - if (this[kClients$7].find((pool$1) => pool$1[kUrl$7].origin === upstreamOrigin && pool$1.closed !== true && pool$1.destroyed !== true)) return this; - const pool = this[kFactory$6](upstreamOrigin, Object.assign({}, this[kOptions$6])); - this[kAddClient$3](pool); - pool.on("connect", () => { - pool[kWeight$1] = Math.min(this[kMaxWeightPerServer$1], pool[kWeight$1] + this[kErrorPenalty$1]); - }); - pool.on("connectionError", () => { - pool[kWeight$1] = Math.max(1, pool[kWeight$1] - this[kErrorPenalty$1]); - this._updateBalancedPoolStats(); - }); - pool.on("disconnect", (...args) => { - const err = args[2]; - if (err && err.code === "UND_ERR_SOCKET") { - pool[kWeight$1] = Math.max(1, pool[kWeight$1] - this[kErrorPenalty$1]); - this._updateBalancedPoolStats(); - } - }); - for (const client of this[kClients$7]) client[kWeight$1] = this[kMaxWeightPerServer$1]; - this._updateBalancedPoolStats(); - return this; - } - _updateBalancedPoolStats() { - this[kGreatestCommonDivisor$1] = this[kClients$7].map((p) => p[kWeight$1]).reduce(getGreatestCommonDivisor$1, 0); - } - removeUpstream(upstream) { - const upstreamOrigin = parseOrigin$2(upstream).origin; - const pool = this[kClients$7].find((pool$1) => pool$1[kUrl$7].origin === upstreamOrigin && pool$1.closed !== true && pool$1.destroyed !== true); - if (pool) this[kRemoveClient$2](pool); - return this; - } - get upstreams() { - return this[kClients$7].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl$7].origin); - } - [kGetDispatcher$3]() { - if (this[kClients$7].length === 0) throw new BalancedPoolMissingUpstreamError$2(); - const dispatcher = this[kClients$7].find((dispatcher$1) => !dispatcher$1[kNeedDrain$4] && dispatcher$1.closed !== true && dispatcher$1.destroyed !== true); - if (!dispatcher) return; - const allClientsBusy = this[kClients$7].map((pool) => pool[kNeedDrain$4]).reduce((a, b) => a && b, true); - if (allClientsBusy) return; - let counter = 0; - let maxWeightIndex = this[kClients$7].findIndex((pool) => !pool[kNeedDrain$4]); - while (counter++ < this[kClients$7].length) { - this[kIndex$1] = (this[kIndex$1] + 1) % this[kClients$7].length; - const pool = this[kClients$7][this[kIndex$1]]; - if (pool[kWeight$1] > this[kClients$7][maxWeightIndex][kWeight$1] && !pool[kNeedDrain$4]) maxWeightIndex = this[kIndex$1]; - if (this[kIndex$1] === 0) { - this[kCurrentWeight$1] = this[kCurrentWeight$1] - this[kGreatestCommonDivisor$1]; - if (this[kCurrentWeight$1] <= 0) this[kCurrentWeight$1] = this[kMaxWeightPerServer$1]; - } - if (pool[kWeight$1] >= this[kCurrentWeight$1] && !pool[kNeedDrain$4]) return pool; - } - this[kCurrentWeight$1] = this[kClients$7][maxWeightIndex][kWeight$1]; - this[kIndex$1] = maxWeightIndex; - return this[kClients$7][maxWeightIndex]; - } - }; - module.exports = BalancedPool$3; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js -var require_dispatcher_weakref$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js"(exports, module) { - /* istanbul ignore file: only for Node 12 */ - const { kConnected: kConnected$8, kSize: kSize$7 } = require_symbols$5(); - var CompatWeakRef$1 = class { - constructor(value) { - this.value = value; - } - deref() { - return this.value[kConnected$8] === 0 && this.value[kSize$7] === 0 ? void 0 : this.value; - } - }; - var CompatFinalizer$1 = class { - constructor(finalizer) { - this.finalizer = finalizer; - } - register(dispatcher, key) { - if (dispatcher.on) dispatcher.on("disconnect", () => { - if (dispatcher[kConnected$8] === 0 && dispatcher[kSize$7] === 0) this.finalizer(key); - }); - } - }; - module.exports = function() { - if (process.env.NODE_V8_COVERAGE) return { - WeakRef: CompatWeakRef$1, - FinalizationRegistry: CompatFinalizer$1 - }; - return { - WeakRef: global.WeakRef || CompatWeakRef$1, - FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer$1 - }; - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/agent.js -var require_agent$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/agent.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$43 } = require_errors$1(); - const { kClients: kClients$6, kRunning: kRunning$6, kClose: kClose$12, kDestroy: kDestroy$8, kDispatch: kDispatch$5, kInterceptors: kInterceptors$1 } = require_symbols$5(); - const DispatcherBase$8 = require_dispatcher_base$1(); - const Pool$9 = require_pool$1(); - const Client$8 = require_client$1(); - const util$33 = require_util$12(); - const createRedirectInterceptor$2 = require_redirectInterceptor(); - const { WeakRef: WeakRef$1, FinalizationRegistry: FinalizationRegistry$3 } = require_dispatcher_weakref$1()(); - const kOnConnect$2 = Symbol("onConnect"); - const kOnDisconnect$2 = Symbol("onDisconnect"); - const kOnConnectionError$2 = Symbol("onConnectionError"); - const kMaxRedirections = Symbol("maxRedirections"); - const kOnDrain$2 = Symbol("onDrain"); - const kFactory$5 = Symbol("factory"); - const kFinalizer = Symbol("finalizer"); - const kOptions$5 = Symbol("options"); - function defaultFactory$5(origin, opts) { - return opts && opts.connections === 1 ? new Client$8(origin, opts) : new Pool$9(origin, opts); - } - var Agent$10 = class extends DispatcherBase$8 { - constructor({ factory = defaultFactory$5, maxRedirections = 0, connect: connect$5,...options } = {}) { - super(); - if (typeof factory !== "function") throw new InvalidArgumentError$43("factory must be a function."); - if (connect$5 != null && typeof connect$5 !== "function" && typeof connect$5 !== "object") throw new InvalidArgumentError$43("connect must be a function or an object"); - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new InvalidArgumentError$43("maxRedirections must be a positive number"); - if (connect$5 && typeof connect$5 !== "function") connect$5 = { ...connect$5 }; - this[kInterceptors$1] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor$2({ maxRedirections })]; - this[kOptions$5] = { - ...util$33.deepClone(options), - connect: connect$5 - }; - this[kOptions$5].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kMaxRedirections] = maxRedirections; - this[kFactory$5] = factory; - this[kClients$6] = new Map(); - this[kFinalizer] = new FinalizationRegistry$3( - /* istanbul ignore next: gc is undeterministic */ - (key) => { - const ref = this[kClients$6].get(key); - if (ref !== void 0 && ref.deref() === void 0) this[kClients$6].delete(key); - } -); - const agent = this; - this[kOnDrain$2] = (origin, targets) => { - agent.emit("drain", origin, [agent, ...targets]); - }; - this[kOnConnect$2] = (origin, targets) => { - agent.emit("connect", origin, [agent, ...targets]); - }; - this[kOnDisconnect$2] = (origin, targets, err) => { - agent.emit("disconnect", origin, [agent, ...targets], err); - }; - this[kOnConnectionError$2] = (origin, targets, err) => { - agent.emit("connectionError", origin, [agent, ...targets], err); - }; - } - get [kRunning$6]() { - let ret = 0; - for (const ref of this[kClients$6].values()) { - const client = ref.deref(); - /* istanbul ignore next: gc is undeterministic */ - if (client) ret += client[kRunning$6]; - } - return ret; - } - [kDispatch$5](opts, handler) { - let key; - if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); - else throw new InvalidArgumentError$43("opts.origin must be a non-empty string or URL."); - const ref = this[kClients$6].get(key); - let dispatcher = ref ? ref.deref() : null; - if (!dispatcher) { - dispatcher = this[kFactory$5](opts.origin, this[kOptions$5]).on("drain", this[kOnDrain$2]).on("connect", this[kOnConnect$2]).on("disconnect", this[kOnDisconnect$2]).on("connectionError", this[kOnConnectionError$2]); - this[kClients$6].set(key, new WeakRef$1(dispatcher)); - this[kFinalizer].register(dispatcher, key); - } - return dispatcher.dispatch(opts, handler); - } - async [kClose$12]() { - const closePromises = []; - for (const ref of this[kClients$6].values()) { - const client = ref.deref(); - /* istanbul ignore else: gc is undeterministic */ - if (client) closePromises.push(client.close()); - } - await Promise.all(closePromises); - } - async [kDestroy$8](err) { - const destroyPromises = []; - for (const ref of this[kClients$6].values()) { - const client = ref.deref(); - /* istanbul ignore else: gc is undeterministic */ - if (client) destroyPromises.push(client.destroy(err)); - } - await Promise.all(destroyPromises); - } - }; - module.exports = Agent$10; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/readable.js -var require_readable$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/readable.js"(exports, module) { - const assert$41 = __require("assert"); - const { Readable: Readable$8 } = __require("stream"); - const { RequestAbortedError: RequestAbortedError$16, NotSupportedError: NotSupportedError$3, InvalidArgumentError: InvalidArgumentError$42 } = require_errors$1(); - const util$32 = require_util$12(); - const { ReadableStreamFrom: ReadableStreamFrom$4, toUSVString: toUSVString$3 } = require_util$12(); - let Blob$3; - const kConsume$1 = Symbol("kConsume"); - const kReading$1 = Symbol("kReading"); - const kBody$3 = Symbol("kBody"); - const kAbort$1 = Symbol("abort"); - const kContentType$1 = Symbol("kContentType"); - const noop$10 = () => {}; - module.exports = class BodyReadable$1 extends Readable$8 { - constructor({ resume: resume$2, abort: abort$2, contentType = "", highWaterMark = 64 * 1024 }) { - super({ - autoDestroy: true, - read: resume$2, - highWaterMark - }); - this._readableState.dataEmitted = false; - this[kAbort$1] = abort$2; - this[kConsume$1] = null; - this[kBody$3] = null; - this[kContentType$1] = contentType; - this[kReading$1] = false; - } - destroy(err) { - if (this.destroyed) return this; - if (!err && !this._readableState.endEmitted) err = new RequestAbortedError$16(); - if (err) this[kAbort$1](); - return super.destroy(err); - } - emit(ev, ...args) { - if (ev === "data") this._readableState.dataEmitted = true; - else if (ev === "error") this._readableState.errorEmitted = true; - return super.emit(ev, ...args); - } - on(ev, ...args) { - if (ev === "data" || ev === "readable") this[kReading$1] = true; - return super.on(ev, ...args); - } - addListener(ev, ...args) { - return this.on(ev, ...args); - } - off(ev, ...args) { - const ret = super.off(ev, ...args); - if (ev === "data" || ev === "readable") this[kReading$1] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; - return ret; - } - removeListener(ev, ...args) { - return this.off(ev, ...args); - } - push(chunk) { - if (this[kConsume$1] && chunk !== null && this.readableLength === 0) { - consumePush$1(this[kConsume$1], chunk); - return this[kReading$1] ? super.push(chunk) : true; - } - return super.push(chunk); - } - async text() { - return consume$1(this, "text"); - } - async json() { - return consume$1(this, "json"); - } - async blob() { - return consume$1(this, "blob"); - } - async arrayBuffer() { - return consume$1(this, "arrayBuffer"); - } - async formData() { - throw new NotSupportedError$3(); - } - get bodyUsed() { - return util$32.isDisturbed(this); - } - get body() { - if (!this[kBody$3]) { - this[kBody$3] = ReadableStreamFrom$4(this); - if (this[kConsume$1]) { - this[kBody$3].getReader(); - assert$41(this[kBody$3].locked); - } - } - return this[kBody$3]; - } - dump(opts) { - let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144; - const signal = opts && opts.signal; - if (signal) try { - if (typeof signal !== "object" || !("aborted" in signal)) throw new InvalidArgumentError$42("signal must be an AbortSignal"); - util$32.throwIfAborted(signal); - } catch (err) { - return Promise.reject(err); - } - if (this.closed) return Promise.resolve(null); - return new Promise((resolve, reject) => { - const signalListenerCleanup = signal ? util$32.addAbortListener(signal, () => { - this.destroy(); - }) : noop$10; - this.on("close", function() { - signalListenerCleanup(); - if (signal && signal.aborted) reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" })); - else resolve(null); - }).on("error", noop$10).on("data", function(chunk) { - limit -= chunk.length; - if (limit <= 0) this.destroy(); - }).resume(); - }); - } - }; - function isLocked$1(self) { - return self[kBody$3] && self[kBody$3].locked === true || self[kConsume$1]; - } - function isUnusable$1(self) { - return util$32.isDisturbed(self) || isLocked$1(self); - } - async function consume$1(stream$5, type) { - if (isUnusable$1(stream$5)) throw new TypeError("unusable"); - assert$41(!stream$5[kConsume$1]); - return new Promise((resolve, reject) => { - stream$5[kConsume$1] = { - type, - stream: stream$5, - resolve, - reject, - length: 0, - body: [] - }; - stream$5.on("error", function(err) { - consumeFinish$1(this[kConsume$1], err); - }).on("close", function() { - if (this[kConsume$1].body !== null) consumeFinish$1(this[kConsume$1], new RequestAbortedError$16()); - }); - process.nextTick(consumeStart$1, stream$5[kConsume$1]); - }); - } - function consumeStart$1(consume$2) { - if (consume$2.body === null) return; - const { _readableState: state } = consume$2.stream; - for (const chunk of state.buffer) consumePush$1(consume$2, chunk); - if (state.endEmitted) consumeEnd$1(this[kConsume$1]); - else consume$2.stream.on("end", function() { - consumeEnd$1(this[kConsume$1]); - }); - consume$2.stream.resume(); - while (consume$2.stream.read() != null); - } - function consumeEnd$1(consume$2) { - const { type, body, resolve, stream: stream$5, length } = consume$2; - try { - if (type === "text") resolve(toUSVString$3(Buffer.concat(body))); - else if (type === "json") resolve(JSON.parse(Buffer.concat(body))); - else if (type === "arrayBuffer") { - const dst = new Uint8Array(length); - let pos = 0; - for (const buf of body) { - dst.set(buf, pos); - pos += buf.byteLength; - } - resolve(dst.buffer); - } else if (type === "blob") { - if (!Blob$3) Blob$3 = __require("buffer").Blob; - resolve(new Blob$3(body, { type: stream$5[kContentType$1] })); - } - consumeFinish$1(consume$2); - } catch (err) { - stream$5.destroy(err); - } - } - function consumePush$1(consume$2, chunk) { - consume$2.length += chunk.length; - consume$2.body.push(chunk); - } - function consumeFinish$1(consume$2, err) { - if (consume$2.body === null) return; - if (err) consume$2.reject(err); - else consume$2.resolve(); - consume$2.type = null; - consume$2.stream = null; - consume$2.resolve = null; - consume$2.reject = null; - consume$2.length = 0; - consume$2.body = null; - } -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/util.js -var require_util$10 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/util.js"(exports, module) { - const assert$40 = __require("assert"); - const { ResponseStatusCodeError: ResponseStatusCodeError$1 } = require_errors$1(); - const { toUSVString: toUSVString$2 } = require_util$12(); - async function getResolveErrorBodyCallback$2({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert$40(body); - let chunks = []; - let limit = 0; - for await (const chunk of body) { - chunks.push(chunk); - limit += chunk.length; - if (limit > 128 * 1024) { - chunks = null; - break; - } - } - if (statusCode === 204 || !contentType || !chunks) { - process.nextTick(callback, new ResponseStatusCodeError$1(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); - return; - } - try { - if (contentType.startsWith("application/json")) { - const payload = JSON.parse(toUSVString$2(Buffer.concat(chunks))); - process.nextTick(callback, new ResponseStatusCodeError$1(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); - return; - } - if (contentType.startsWith("text/")) { - const payload = toUSVString$2(Buffer.concat(chunks)); - process.nextTick(callback, new ResponseStatusCodeError$1(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); - return; - } - } catch (err) {} - process.nextTick(callback, new ResponseStatusCodeError$1(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); - } - module.exports = { getResolveErrorBodyCallback: getResolveErrorBodyCallback$2 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js -var require_abort_signal$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js"(exports, module) { - const { addAbortListener: addAbortListener$4 } = require_util$12(); - const { RequestAbortedError: RequestAbortedError$15 } = require_errors$1(); - const kListener$1 = Symbol("kListener"); - const kSignal$2 = Symbol("kSignal"); - function abort$1(self) { - if (self.abort) self.abort(); - else self.onError(new RequestAbortedError$15()); - } - function addSignal$10(self, signal) { - self[kSignal$2] = null; - self[kListener$1] = null; - if (!signal) return; - if (signal.aborted) { - abort$1(self); - return; - } - self[kSignal$2] = signal; - self[kListener$1] = () => { - abort$1(self); - }; - addAbortListener$4(self[kSignal$2], self[kListener$1]); - } - function removeSignal$10(self) { - if (!self[kSignal$2]) return; - if ("removeEventListener" in self[kSignal$2]) self[kSignal$2].removeEventListener("abort", self[kListener$1]); - else self[kSignal$2].removeListener("abort", self[kListener$1]); - self[kSignal$2] = null; - self[kListener$1] = null; - } - module.exports = { - addSignal: addSignal$10, - removeSignal: removeSignal$10 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-request.js -var require_api_request$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-request.js"(exports, module) { - const Readable$7 = require_readable$1(); - const { InvalidArgumentError: InvalidArgumentError$41, RequestAbortedError: RequestAbortedError$14 } = require_errors$1(); - const util$31 = require_util$12(); - const { getResolveErrorBodyCallback: getResolveErrorBodyCallback$1 } = require_util$10(); - const { AsyncResource: AsyncResource$9 } = __require("async_hooks"); - const { addSignal: addSignal$9, removeSignal: removeSignal$9 } = require_abort_signal$1(); - var RequestHandler$1 = class extends AsyncResource$9 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$41("invalid opts"); - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; - try { - if (typeof callback !== "function") throw new InvalidArgumentError$41("invalid callback"); - if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError$41("invalid highWaterMark"); - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$41("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new InvalidArgumentError$41("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$41("invalid onInfo callback"); - super("UNDICI_REQUEST"); - } catch (err) { - if (util$31.isStream(body)) util$31.destroy(body.on("error", util$31.nop), err); - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.res = null; - this.abort = null; - this.body = body; - this.trailers = {}; - this.context = null; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError; - this.highWaterMark = highWaterMark; - if (util$31.isStream(body)) body.on("error", (err) => { - this.onError(err); - }); - addSignal$9(this, signal); - } - onConnect(abort$2, context) { - if (!this.callback) throw new RequestAbortedError$14(); - this.abort = abort$2; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume$2, statusMessage) { - const { callback, opaque, abort: abort$2, context, responseHeaders, highWaterMark } = this; - const headers = responseHeaders === "raw" ? util$31.parseRawHeaders(rawHeaders) : util$31.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) this.onInfo({ - statusCode, - headers - }); - return; - } - const parsedHeaders = responseHeaders === "raw" ? util$31.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - const body = new Readable$7({ - resume: resume$2, - abort: abort$2, - contentType, - highWaterMark - }); - this.callback = null; - this.res = body; - if (callback !== null) if (this.throwOnError && statusCode >= 400) this.runInAsyncScope(getResolveErrorBodyCallback$1, null, { - callback, - body, - contentType, - statusCode, - statusMessage, - headers - }); - else this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body, - context - }); - } - onData(chunk) { - const { res } = this; - return res.push(chunk); - } - onComplete(trailers) { - const { res } = this; - removeSignal$9(this); - util$31.parseHeaders(trailers, this.trailers); - res.push(null); - } - onError(err) { - const { res, callback, body, opaque } = this; - removeSignal$9(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (res) { - this.res = null; - queueMicrotask(() => { - util$31.destroy(res, err); - }); - } - if (body) { - this.body = null; - util$31.destroy(body, err); - } - } - }; - function request$1(opts, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - request$1.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - this.dispatch(opts, new RequestHandler$1(opts, callback)); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = request$1; - module.exports.RequestHandler = RequestHandler$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-stream.js -var require_api_stream$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-stream.js"(exports, module) { - const { finished: finished$2, PassThrough: PassThrough$2 } = __require("stream"); - const { InvalidArgumentError: InvalidArgumentError$40, InvalidReturnValueError: InvalidReturnValueError$4, RequestAbortedError: RequestAbortedError$13 } = require_errors$1(); - const util$30 = require_util$12(); - const { getResolveErrorBodyCallback } = require_util$10(); - const { AsyncResource: AsyncResource$8 } = __require("async_hooks"); - const { addSignal: addSignal$8, removeSignal: removeSignal$8 } = require_abort_signal$1(); - var StreamHandler$1 = class extends AsyncResource$8 { - constructor(opts, factory, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$40("invalid opts"); - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; - try { - if (typeof callback !== "function") throw new InvalidArgumentError$40("invalid callback"); - if (typeof factory !== "function") throw new InvalidArgumentError$40("invalid factory"); - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$40("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new InvalidArgumentError$40("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$40("invalid onInfo callback"); - super("UNDICI_STREAM"); - } catch (err) { - if (util$30.isStream(body)) util$30.destroy(body.on("error", util$30.nop), err); - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.factory = factory; - this.callback = callback; - this.res = null; - this.abort = null; - this.context = null; - this.trailers = null; - this.body = body; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError || false; - if (util$30.isStream(body)) body.on("error", (err) => { - this.onError(err); - }); - addSignal$8(this, signal); - } - onConnect(abort$2, context) { - if (!this.callback) throw new RequestAbortedError$13(); - this.abort = abort$2; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume$2, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this; - const headers = responseHeaders === "raw" ? util$30.parseRawHeaders(rawHeaders) : util$30.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) this.onInfo({ - statusCode, - headers - }); - return; - } - this.factory = null; - let res; - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === "raw" ? util$30.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - res = new PassThrough$2(); - this.callback = null; - this.runInAsyncScope(getResolveErrorBodyCallback, null, { - callback, - body: res, - contentType, - statusCode, - statusMessage, - headers - }); - } else { - if (factory === null) return; - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }); - if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError$4("expected Writable"); - finished$2(res, { readable: false }, (err) => { - const { callback: callback$1, res: res$1, opaque: opaque$1, trailers, abort: abort$2 } = this; - this.res = null; - if (err || !res$1.readable) util$30.destroy(res$1, err); - this.callback = null; - this.runInAsyncScope(callback$1, null, err || null, { - opaque: opaque$1, - trailers - }); - if (err) abort$2(); - }); - } - res.on("drain", resume$2); - this.res = res; - const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState && res._writableState.needDrain; - return needDrain !== true; - } - onData(chunk) { - const { res } = this; - return res ? res.write(chunk) : true; - } - onComplete(trailers) { - const { res } = this; - removeSignal$8(this); - if (!res) return; - this.trailers = util$30.parseHeaders(trailers); - res.end(); - } - onError(err) { - const { res, callback, opaque, body } = this; - removeSignal$8(this); - this.factory = null; - if (res) { - this.res = null; - util$30.destroy(res, err); - } else if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (body) { - this.body = null; - util$30.destroy(body, err); - } - } - }; - function stream$3(opts, factory, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - stream$3.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - this.dispatch(opts, new StreamHandler$1(opts, factory, callback)); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = stream$3; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js -var require_api_pipeline$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js"(exports, module) { - const { Readable: Readable$6, Duplex: Duplex$1, PassThrough: PassThrough$1 } = __require("stream"); - const { InvalidArgumentError: InvalidArgumentError$39, InvalidReturnValueError: InvalidReturnValueError$3, RequestAbortedError: RequestAbortedError$12 } = require_errors$1(); - const util$29 = require_util$12(); - const { AsyncResource: AsyncResource$7 } = __require("async_hooks"); - const { addSignal: addSignal$7, removeSignal: removeSignal$7 } = require_abort_signal$1(); - const assert$39 = __require("assert"); - const kResume$5 = Symbol("resume"); - var PipelineRequest$1 = class extends Readable$6 { - constructor() { - super({ autoDestroy: true }); - this[kResume$5] = null; - } - _read() { - const { [kResume$5]: resume$2 } = this; - if (resume$2) { - this[kResume$5] = null; - resume$2(); - } - } - _destroy(err, callback) { - this._read(); - callback(err); - } - }; - var PipelineResponse$1 = class extends Readable$6 { - constructor(resume$2) { - super({ autoDestroy: true }); - this[kResume$5] = resume$2; - } - _read() { - this[kResume$5](); - } - _destroy(err, callback) { - if (!err && !this._readableState.endEmitted) err = new RequestAbortedError$12(); - callback(err); - } - }; - var PipelineHandler$1 = class extends AsyncResource$7 { - constructor(opts, handler) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$39("invalid opts"); - if (typeof handler !== "function") throw new InvalidArgumentError$39("invalid handler"); - const { signal, method, opaque, onInfo, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$39("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new InvalidArgumentError$39("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$39("invalid onInfo callback"); - super("UNDICI_PIPELINE"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.handler = handler; - this.abort = null; - this.context = null; - this.onInfo = onInfo || null; - this.req = new PipelineRequest$1().on("error", util$29.nop); - this.ret = new Duplex$1({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this; - if (body && body.resume) body.resume(); - }, - write: (chunk, encoding, callback) => { - const { req } = this; - if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); - else req[kResume$5] = callback; - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort: abort$2 } = this; - if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError$12(); - if (abort$2 && err) abort$2(); - util$29.destroy(body, err); - util$29.destroy(req, err); - util$29.destroy(res, err); - removeSignal$7(this); - callback(err); - } - }).on("prefinish", () => { - const { req } = this; - req.push(null); - }); - this.res = null; - addSignal$7(this, signal); - } - onConnect(abort$2, context) { - const { ret, res } = this; - assert$39(!res, "pipeline cannot be retried"); - if (ret.destroyed) throw new RequestAbortedError$12(); - this.abort = abort$2; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume$2) { - const { opaque, handler, context } = this; - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === "raw" ? util$29.parseRawHeaders(rawHeaders) : util$29.parseHeaders(rawHeaders); - this.onInfo({ - statusCode, - headers - }); - } - return; - } - this.res = new PipelineResponse$1(resume$2); - let body; - try { - this.handler = null; - const headers = this.responseHeaders === "raw" ? util$29.parseRawHeaders(rawHeaders) : util$29.parseHeaders(rawHeaders); - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }); - } catch (err) { - this.res.on("error", util$29.nop); - throw err; - } - if (!body || typeof body.on !== "function") throw new InvalidReturnValueError$3("expected Readable"); - body.on("data", (chunk) => { - const { ret, body: body$1 } = this; - if (!ret.push(chunk) && body$1.pause) body$1.pause(); - }).on("error", (err) => { - const { ret } = this; - util$29.destroy(ret, err); - }).on("end", () => { - const { ret } = this; - ret.push(null); - }).on("close", () => { - const { ret } = this; - if (!ret._readableState.ended) util$29.destroy(ret, new RequestAbortedError$12()); - }); - this.body = body; - } - onData(chunk) { - const { res } = this; - return res.push(chunk); - } - onComplete(trailers) { - const { res } = this; - res.push(null); - } - onError(err) { - const { ret } = this; - this.handler = null; - util$29.destroy(ret, err); - } - }; - function pipeline$5(opts, handler) { - try { - const pipelineHandler = new PipelineHandler$1(opts, handler); - this.dispatch({ - ...opts, - body: pipelineHandler.req - }, pipelineHandler); - return pipelineHandler.ret; - } catch (err) { - return new PassThrough$1().destroy(err); - } - } - module.exports = pipeline$5; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js -var require_api_upgrade$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js"(exports, module) { - const { InvalidArgumentError: InvalidArgumentError$38, RequestAbortedError: RequestAbortedError$11, SocketError: SocketError$6 } = require_errors$1(); - const { AsyncResource: AsyncResource$6 } = __require("async_hooks"); - const util$28 = require_util$12(); - const { addSignal: addSignal$6, removeSignal: removeSignal$6 } = require_abort_signal$1(); - const assert$38 = __require("assert"); - var UpgradeHandler$1 = class extends AsyncResource$6 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$38("invalid opts"); - if (typeof callback !== "function") throw new InvalidArgumentError$38("invalid callback"); - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$38("signal must be an EventEmitter or EventTarget"); - super("UNDICI_UPGRADE"); - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.abort = null; - this.context = null; - addSignal$6(this, signal); - } - onConnect(abort$2, context) { - if (!this.callback) throw new RequestAbortedError$11(); - this.abort = abort$2; - this.context = null; - } - onHeaders() { - throw new SocketError$6("bad upgrade", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this; - assert$38.strictEqual(statusCode, 101); - removeSignal$6(this); - this.callback = null; - const headers = this.responseHeaders === "raw" ? util$28.parseRawHeaders(rawHeaders) : util$28.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal$6(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - function upgrade$1(opts, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - upgrade$1.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - const upgradeHandler = new UpgradeHandler$1(opts, callback); - this.dispatch({ - ...opts, - method: opts.method || "GET", - upgrade: opts.protocol || "Websocket" - }, upgradeHandler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = upgrade$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-connect.js -var require_api_connect$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-connect.js"(exports, module) { - const { AsyncResource: AsyncResource$5 } = __require("async_hooks"); - const { InvalidArgumentError: InvalidArgumentError$37, RequestAbortedError: RequestAbortedError$10, SocketError: SocketError$5 } = require_errors$1(); - const util$27 = require_util$12(); - const { addSignal: addSignal$5, removeSignal: removeSignal$5 } = require_abort_signal$1(); - var ConnectHandler$1 = class extends AsyncResource$5 { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") throw new InvalidArgumentError$37("invalid opts"); - if (typeof callback !== "function") throw new InvalidArgumentError$37("invalid callback"); - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$37("signal must be an EventEmitter or EventTarget"); - super("UNDICI_CONNECT"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.callback = callback; - this.abort = null; - addSignal$5(this, signal); - } - onConnect(abort$2, context) { - if (!this.callback) throw new RequestAbortedError$10(); - this.abort = abort$2; - this.context = context; - } - onHeaders() { - throw new SocketError$5("bad connect", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this; - removeSignal$5(this); - this.callback = null; - let headers = rawHeaders; - if (headers != null) headers = this.responseHeaders === "raw" ? util$27.parseRawHeaders(rawHeaders) : util$27.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal$5(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - function connect$3(opts, callback) { - if (callback === void 0) return new Promise((resolve, reject) => { - connect$3.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - try { - const connectHandler = new ConnectHandler$1(opts, callback); - this.dispatch({ - ...opts, - method: "CONNECT" - }, connectHandler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module.exports = connect$3; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/index.js -var require_api$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/index.js"(exports, module) { - module.exports.request = require_api_request$1(); - module.exports.stream = require_api_stream$1(); - module.exports.pipeline = require_api_pipeline$1(); - module.exports.upgrade = require_api_upgrade$1(); - module.exports.connect = require_api_connect$1(); -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js -var require_mock_errors$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js"(exports, module) { - const { UndiciError: UndiciError$4 } = require_errors$1(); - var MockNotMatchedError$3 = class MockNotMatchedError$3 extends UndiciError$4 { - constructor(message) { - super(message); - Error.captureStackTrace(this, MockNotMatchedError$3); - this.name = "MockNotMatchedError"; - this.message = message || "The request does not match any registered mock dispatches"; - this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; - } - }; - module.exports = { MockNotMatchedError: MockNotMatchedError$3 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js -var require_mock_symbols$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) { - module.exports = { - kAgent: Symbol("agent"), - kOptions: Symbol("options"), - kFactory: Symbol("factory"), - kDispatches: Symbol("dispatches"), - kDispatchKey: Symbol("dispatch key"), - kDefaultHeaders: Symbol("default headers"), - kDefaultTrailers: Symbol("default trailers"), - kContentLength: Symbol("content length"), - kMockAgent: Symbol("mock agent"), - kMockAgentSet: Symbol("mock agent set"), - kMockAgentGet: Symbol("mock agent get"), - kMockDispatch: Symbol("mock dispatch"), - kClose: Symbol("close"), - kOriginalClose: Symbol("original agent close"), - kOrigin: Symbol("origin"), - kIsMockActive: Symbol("is mock active"), - kNetConnect: Symbol("net connect"), - kGetNetConnect: Symbol("get net connect"), - kConnected: Symbol("connected") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js -var require_mock_utils$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js"(exports, module) { - const { MockNotMatchedError: MockNotMatchedError$2 } = require_mock_errors$1(); - const { kDispatches: kDispatches$9, kMockAgent: kMockAgent$5, kOriginalDispatch: kOriginalDispatch$5, kOrigin: kOrigin$5, kGetNetConnect: kGetNetConnect$3 } = require_mock_symbols$1(); - const { buildURL: buildURL$1, nop } = require_util$12(); - const { STATUS_CODES: STATUS_CODES$3 } = __require("http"); - const { types: { isPromise: isPromise$1 } } = __require("util"); - function matchValue$3(match, value) { - if (typeof match === "string") return match === value; - if (match instanceof RegExp) return match.test(value); - if (typeof match === "function") return match(value) === true; - return false; - } - function lowerCaseEntries$1(headers) { - return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue]; - })); - } - /** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ - function getHeaderByName$1(headers, key) { - if (Array.isArray(headers)) { - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (headers[i$1].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i$1 + 1]; - return void 0; - } else if (typeof headers.get === "function") return headers.get(key); - else return lowerCaseEntries$1(headers)[key.toLocaleLowerCase()]; - } - /** @param {string[]} headers */ - function buildHeadersFromArray$1(headers) { - const clone = headers.slice(); - const entries = []; - for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); - return Object.fromEntries(entries); - } - function matchHeaders$1(mockDispatch$2, headers) { - if (typeof mockDispatch$2.headers === "function") { - if (Array.isArray(headers)) headers = buildHeadersFromArray$1(headers); - return mockDispatch$2.headers(headers ? lowerCaseEntries$1(headers) : {}); - } - if (typeof mockDispatch$2.headers === "undefined") return true; - if (typeof headers !== "object" || typeof mockDispatch$2.headers !== "object") return false; - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch$2.headers)) { - const headerValue = getHeaderByName$1(headers, matchHeaderName); - if (!matchValue$3(matchHeaderValue, headerValue)) return false; - } - return true; - } - function safeUrl$1(path$8) { - if (typeof path$8 !== "string") return path$8; - const pathSegments = path$8.split("?"); - if (pathSegments.length !== 2) return path$8; - const qp = new URLSearchParams(pathSegments.pop()); - qp.sort(); - return [...pathSegments, qp.toString()].join("?"); - } - function matchKey$1(mockDispatch$2, { path: path$8, method, body, headers }) { - const pathMatch = matchValue$3(mockDispatch$2.path, path$8); - const methodMatch = matchValue$3(mockDispatch$2.method, method); - const bodyMatch = typeof mockDispatch$2.body !== "undefined" ? matchValue$3(mockDispatch$2.body, body) : true; - const headersMatch = matchHeaders$1(mockDispatch$2, headers); - return pathMatch && methodMatch && bodyMatch && headersMatch; - } - function getResponseData$3(data) { - if (Buffer.isBuffer(data)) return data; - else if (typeof data === "object") return JSON.stringify(data); - else return data.toString(); - } - function getMockDispatch$1(mockDispatches, key) { - const basePath = key.query ? buildURL$1(key.path, key.query) : key.path; - const resolvedPath = typeof basePath === "string" ? safeUrl$1(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$8 }) => matchValue$3(safeUrl$1(path$8), resolvedPath)); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError$2(`Mock dispatch not matched for path '${resolvedPath}'`); - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$3(method, key.method)); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError$2(`Mock dispatch not matched for method '${key.method}'`); - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue$3(body, key.body) : true); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError$2(`Mock dispatch not matched for body '${key.body}'`); - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch$2) => matchHeaders$1(mockDispatch$2, key.headers)); - if (matchedMockDispatches.length === 0) throw new MockNotMatchedError$2(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}'`); - return matchedMockDispatches[0]; - } - function addMockDispatch$3(mockDispatches, key, data) { - const baseData = { - timesInvoked: 0, - times: 1, - persist: false, - consumed: false - }; - const replyData = typeof data === "function" ? { callback: data } : { ...data }; - const newMockDispatch = { - ...baseData, - ...key, - pending: true, - data: { - error: null, - ...replyData - } - }; - mockDispatches.push(newMockDispatch); - return newMockDispatch; - } - function deleteMockDispatch$1(mockDispatches, key) { - const index = mockDispatches.findIndex((dispatch) => { - if (!dispatch.consumed) return false; - return matchKey$1(dispatch, key); - }); - if (index !== -1) mockDispatches.splice(index, 1); - } - function buildKey$3(opts) { - const { path: path$8, method, body, headers, query } = opts; - return { - path: path$8, - method, - body, - headers, - query - }; - } - function generateKeyValues$1(data) { - return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ - ...keyValuePairs, - Buffer.from(`${key}`), - Array.isArray(value) ? value.map((x) => Buffer.from(`${x}`)) : Buffer.from(`${value}`) - ], []); - } - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ - function getStatusText$1(statusCode) { - return STATUS_CODES$3[statusCode] || "unknown"; - } - async function getResponse$1(body) { - const buffers = []; - for await (const data of body) buffers.push(data); - return Buffer.concat(buffers).toString("utf8"); - } - /** - * Mock dispatch function used to simulate undici dispatches - */ - function mockDispatch$1(opts, handler) { - const key = buildKey$3(opts); - const mockDispatch$2 = getMockDispatch$1(this[kDispatches$9], key); - mockDispatch$2.timesInvoked++; - if (mockDispatch$2.data.callback) mockDispatch$2.data = { - ...mockDispatch$2.data, - ...mockDispatch$2.data.callback(opts) - }; - const { data: { statusCode, data, headers, trailers, error: error$1 }, delay: delay$2, persist } = mockDispatch$2; - const { timesInvoked, times } = mockDispatch$2; - mockDispatch$2.consumed = !persist && timesInvoked >= times; - mockDispatch$2.pending = timesInvoked < times; - if (error$1 !== null) { - deleteMockDispatch$1(this[kDispatches$9], key); - handler.onError(error$1); - return true; - } - if (typeof delay$2 === "number" && delay$2 > 0) setTimeout(() => { - handleReply(this[kDispatches$9]); - }, delay$2); - else handleReply(this[kDispatches$9]); - function handleReply(mockDispatches, _data = data) { - const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray$1(opts.headers) : opts.headers; - const body = typeof _data === "function" ? _data({ - ...opts, - headers: optsHeaders - }) : _data; - if (isPromise$1(body)) { - body.then((newData) => handleReply(mockDispatches, newData)); - return; - } - const responseData = getResponseData$3(body); - const responseHeaders = generateKeyValues$1(headers); - const responseTrailers = generateKeyValues$1(trailers); - handler.abort = nop; - handler.onHeaders(statusCode, responseHeaders, resume$2, getStatusText$1(statusCode)); - handler.onData(Buffer.from(responseData)); - handler.onComplete(responseTrailers); - deleteMockDispatch$1(mockDispatches, key); - } - function resume$2() {} - return true; - } - function buildMockDispatch$5() { - const agent = this[kMockAgent$5]; - const origin = this[kOrigin$5]; - const originalDispatch = this[kOriginalDispatch$5]; - return function dispatch(opts, handler) { - if (agent.isMockActive) try { - mockDispatch$1.call(this, opts, handler); - } catch (error$1) { - if (error$1 instanceof MockNotMatchedError$2) { - const netConnect = agent[kGetNetConnect$3](); - if (netConnect === false) throw new MockNotMatchedError$2(`${error$1.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); - if (checkNetConnect$1(netConnect, origin)) originalDispatch.call(this, opts, handler); - else throw new MockNotMatchedError$2(`${error$1.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); - } else throw error$1; - } - else originalDispatch.call(this, opts, handler); - }; - } - function checkNetConnect$1(netConnect, origin) { - const url = new URL(origin); - if (netConnect === true) return true; - else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue$3(matcher, url.host))) return true; - return false; - } - function buildMockOptions$1(opts) { - if (opts) { - const { agent,...mockOptions } = opts; - return mockOptions; - } - } - module.exports = { - getResponseData: getResponseData$3, - getMockDispatch: getMockDispatch$1, - addMockDispatch: addMockDispatch$3, - deleteMockDispatch: deleteMockDispatch$1, - buildKey: buildKey$3, - generateKeyValues: generateKeyValues$1, - matchValue: matchValue$3, - getResponse: getResponse$1, - getStatusText: getStatusText$1, - mockDispatch: mockDispatch$1, - buildMockDispatch: buildMockDispatch$5, - checkNetConnect: checkNetConnect$1, - buildMockOptions: buildMockOptions$1, - getHeaderByName: getHeaderByName$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js -var require_mock_interceptor$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) { - const { getResponseData: getResponseData$2, buildKey: buildKey$2, addMockDispatch: addMockDispatch$2 } = require_mock_utils$1(); - const { kDispatches: kDispatches$8, kDispatchKey: kDispatchKey$1, kDefaultHeaders: kDefaultHeaders$1, kDefaultTrailers: kDefaultTrailers$1, kContentLength: kContentLength$2, kMockDispatch: kMockDispatch$1 } = require_mock_symbols$1(); - const { InvalidArgumentError: InvalidArgumentError$36 } = require_errors$1(); - const { buildURL } = require_util$12(); - /** - * Defines the scope API for an interceptor reply - */ - var MockScope$1 = class { - constructor(mockDispatch$2) { - this[kMockDispatch$1] = mockDispatch$2; - } - /** - * Delay a reply by a set amount in ms. - */ - delay(waitInMs) { - if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError$36("waitInMs must be a valid integer > 0"); - this[kMockDispatch$1].delay = waitInMs; - return this; - } - /** - * For a defined reply, never mark as consumed. - */ - persist() { - this[kMockDispatch$1].persist = true; - return this; - } - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times(repeatTimes) { - if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError$36("repeatTimes must be a valid integer > 0"); - this[kMockDispatch$1].times = repeatTimes; - return this; - } - }; - /** - * Defines an interceptor for a Mock - */ - var MockInterceptor$5 = class { - constructor(opts, mockDispatches) { - if (typeof opts !== "object") throw new InvalidArgumentError$36("opts must be an object"); - if (typeof opts.path === "undefined") throw new InvalidArgumentError$36("opts.path must be defined"); - if (typeof opts.method === "undefined") opts.method = "GET"; - if (typeof opts.path === "string") if (opts.query) opts.path = buildURL(opts.path, opts.query); - else { - const parsedURL = new URL(opts.path, "data://"); - opts.path = parsedURL.pathname + parsedURL.search; - } - if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); - this[kDispatchKey$1] = buildKey$2(opts); - this[kDispatches$8] = mockDispatches; - this[kDefaultHeaders$1] = {}; - this[kDefaultTrailers$1] = {}; - this[kContentLength$2] = false; - } - createMockScopeDispatchData(statusCode, data, responseOptions = {}) { - const responseData = getResponseData$2(data); - const contentLength = this[kContentLength$2] ? { "content-length": responseData.length } : {}; - const headers = { - ...this[kDefaultHeaders$1], - ...contentLength, - ...responseOptions.headers - }; - const trailers = { - ...this[kDefaultTrailers$1], - ...responseOptions.trailers - }; - return { - statusCode, - data, - headers, - trailers - }; - } - validateReplyParameters(statusCode, data, responseOptions) { - if (typeof statusCode === "undefined") throw new InvalidArgumentError$36("statusCode must be defined"); - if (typeof data === "undefined") throw new InvalidArgumentError$36("data must be defined"); - if (typeof responseOptions !== "object") throw new InvalidArgumentError$36("responseOptions must be an object"); - } - /** - * Mock an undici request with a defined reply. - */ - reply(replyData) { - if (typeof replyData === "function") { - const wrappedDefaultsCallback = (opts) => { - const resolvedData = replyData(opts); - if (typeof resolvedData !== "object") throw new InvalidArgumentError$36("reply options callback must return an object"); - const { statusCode: statusCode$1, data: data$1 = "", responseOptions: responseOptions$1 = {} } = resolvedData; - this.validateReplyParameters(statusCode$1, data$1, responseOptions$1); - return { ...this.createMockScopeDispatchData(statusCode$1, data$1, responseOptions$1) }; - }; - const newMockDispatch$1 = addMockDispatch$2(this[kDispatches$8], this[kDispatchKey$1], wrappedDefaultsCallback); - return new MockScope$1(newMockDispatch$1); - } - const [statusCode, data = "", responseOptions = {}] = [...arguments]; - this.validateReplyParameters(statusCode, data, responseOptions); - const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions); - const newMockDispatch = addMockDispatch$2(this[kDispatches$8], this[kDispatchKey$1], dispatchData); - return new MockScope$1(newMockDispatch); - } - /** - * Mock an undici request with a defined error. - */ - replyWithError(error$1) { - if (typeof error$1 === "undefined") throw new InvalidArgumentError$36("error must be defined"); - const newMockDispatch = addMockDispatch$2(this[kDispatches$8], this[kDispatchKey$1], { error: error$1 }); - return new MockScope$1(newMockDispatch); - } - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders(headers) { - if (typeof headers === "undefined") throw new InvalidArgumentError$36("headers must be defined"); - this[kDefaultHeaders$1] = headers; - return this; - } - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers(trailers) { - if (typeof trailers === "undefined") throw new InvalidArgumentError$36("trailers must be defined"); - this[kDefaultTrailers$1] = trailers; - return this; - } - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength() { - this[kContentLength$2] = true; - return this; - } - }; - module.exports.MockInterceptor = MockInterceptor$5; - module.exports.MockScope = MockScope$1; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js -var require_mock_client$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js"(exports, module) { - const { promisify: promisify$3 } = __require("util"); - const Client$7 = require_client$1(); - const { buildMockDispatch: buildMockDispatch$4 } = require_mock_utils$1(); - const { kDispatches: kDispatches$7, kMockAgent: kMockAgent$4, kClose: kClose$11, kOriginalClose: kOriginalClose$3, kOrigin: kOrigin$4, kOriginalDispatch: kOriginalDispatch$4, kConnected: kConnected$7 } = require_mock_symbols$1(); - const { MockInterceptor: MockInterceptor$4 } = require_mock_interceptor$1(); - const Symbols$3 = require_symbols$5(); - const { InvalidArgumentError: InvalidArgumentError$35 } = require_errors$1(); - /** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ - var MockClient$5 = class extends Client$7 { - constructor(origin, opts) { - super(origin, opts); - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$35("Argument opts.agent must implement Agent"); - this[kMockAgent$4] = opts.agent; - this[kOrigin$4] = origin; - this[kDispatches$7] = []; - this[kConnected$7] = 1; - this[kOriginalDispatch$4] = this.dispatch; - this[kOriginalClose$3] = this.close.bind(this); - this.dispatch = buildMockDispatch$4.call(this); - this.close = this[kClose$11]; - } - get [Symbols$3.kConnected]() { - return this[kConnected$7]; - } - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept(opts) { - return new MockInterceptor$4(opts, this[kDispatches$7]); - } - async [kClose$11]() { - await promisify$3(this[kOriginalClose$3])(); - this[kConnected$7] = 0; - this[kMockAgent$4][Symbols$3.kClients].delete(this[kOrigin$4]); - } - }; - module.exports = MockClient$5; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js -var require_mock_pool$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js"(exports, module) { - const { promisify: promisify$2 } = __require("util"); - const Pool$8 = require_pool$1(); - const { buildMockDispatch: buildMockDispatch$3 } = require_mock_utils$1(); - const { kDispatches: kDispatches$6, kMockAgent: kMockAgent$3, kClose: kClose$10, kOriginalClose: kOriginalClose$2, kOrigin: kOrigin$3, kOriginalDispatch: kOriginalDispatch$3, kConnected: kConnected$6 } = require_mock_symbols$1(); - const { MockInterceptor: MockInterceptor$3 } = require_mock_interceptor$1(); - const Symbols$2 = require_symbols$5(); - const { InvalidArgumentError: InvalidArgumentError$34 } = require_errors$1(); - /** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ - var MockPool$5 = class extends Pool$8 { - constructor(origin, opts) { - super(origin, opts); - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$34("Argument opts.agent must implement Agent"); - this[kMockAgent$3] = opts.agent; - this[kOrigin$3] = origin; - this[kDispatches$6] = []; - this[kConnected$6] = 1; - this[kOriginalDispatch$3] = this.dispatch; - this[kOriginalClose$2] = this.close.bind(this); - this.dispatch = buildMockDispatch$3.call(this); - this.close = this[kClose$10]; - } - get [Symbols$2.kConnected]() { - return this[kConnected$6]; - } - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept(opts) { - return new MockInterceptor$3(opts, this[kDispatches$6]); - } - async [kClose$10]() { - await promisify$2(this[kOriginalClose$2])(); - this[kConnected$6] = 0; - this[kMockAgent$3][Symbols$2.kClients].delete(this[kOrigin$3]); - } - }; - module.exports = MockPool$5; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js -var require_pluralizer = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js"(exports, module) { - const singulars = { - pronoun: "it", - is: "is", - was: "was", - this: "this" - }; - const plurals = { - pronoun: "they", - is: "are", - was: "were", - this: "these" - }; - module.exports = class Pluralizer$1 { - constructor(singular, plural) { - this.singular = singular; - this.plural = plural; - } - pluralize(count) { - const one = count === 1; - const keys = one ? singulars : plurals; - const noun = one ? this.singular : this.plural; - return { - ...keys, - count, - noun - }; - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js -var require_pending_interceptors_formatter$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) { - const { Transform: Transform$3 } = __require("stream"); - const { Console: Console$1 } = __require("console"); - /** - * Gets the output of `console.table(…)` as a string. - */ - module.exports = class PendingInterceptorsFormatter$2 { - constructor({ disableColors } = {}) { - this.transform = new Transform$3({ transform(chunk, _enc, cb) { - cb(null, chunk); - } }); - this.logger = new Console$1({ - stdout: this.transform, - inspectOptions: { colors: !disableColors && !process.env.CI } - }); - } - format(pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path$8, - "Status code": statusCode, - Persistent: persist ? "✅" : "❌", - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })); - this.logger.table(withPrettyHeaders); - return this.transform.read().toString(); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js -var require_mock_agent$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js"(exports, module) { - const { kClients: kClients$5 } = require_symbols$5(); - const Agent$9 = require_agent$1(); - const { kAgent: kAgent$3, kMockAgentSet: kMockAgentSet$1, kMockAgentGet: kMockAgentGet$1, kDispatches: kDispatches$5, kIsMockActive: kIsMockActive$1, kNetConnect: kNetConnect$1, kGetNetConnect: kGetNetConnect$2, kOptions: kOptions$4, kFactory: kFactory$4 } = require_mock_symbols$1(); - const MockClient$4 = require_mock_client$1(); - const MockPool$4 = require_mock_pool$1(); - const { matchValue: matchValue$2, buildMockOptions } = require_mock_utils$1(); - const { InvalidArgumentError: InvalidArgumentError$33, UndiciError: UndiciError$3 } = require_errors$1(); - const Dispatcher$6 = require_dispatcher$1(); - const Pluralizer = require_pluralizer(); - const PendingInterceptorsFormatter$1 = require_pending_interceptors_formatter$1(); - var FakeWeakRef = class { - constructor(value) { - this.value = value; - } - deref() { - return this.value; - } - }; - var MockAgent$3 = class extends Dispatcher$6 { - constructor(opts) { - super(opts); - this[kNetConnect$1] = true; - this[kIsMockActive$1] = true; - if (opts && opts.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$33("Argument opts.agent must implement Agent"); - const agent = opts && opts.agent ? opts.agent : new Agent$9(opts); - this[kAgent$3] = agent; - this[kClients$5] = agent[kClients$5]; - this[kOptions$4] = buildMockOptions(opts); - } - get(origin) { - let dispatcher = this[kMockAgentGet$1](origin); - if (!dispatcher) { - dispatcher = this[kFactory$4](origin); - this[kMockAgentSet$1](origin, dispatcher); - } - return dispatcher; - } - dispatch(opts, handler) { - this.get(opts.origin); - return this[kAgent$3].dispatch(opts, handler); - } - async close() { - await this[kAgent$3].close(); - this[kClients$5].clear(); - } - deactivate() { - this[kIsMockActive$1] = false; - } - activate() { - this[kIsMockActive$1] = true; - } - enableNetConnect(matcher) { - if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect$1])) this[kNetConnect$1].push(matcher); - else this[kNetConnect$1] = [matcher]; - else if (typeof matcher === "undefined") this[kNetConnect$1] = true; - else throw new InvalidArgumentError$33("Unsupported matcher. Must be one of String|Function|RegExp."); - } - disableNetConnect() { - this[kNetConnect$1] = false; - } - get isMockActive() { - return this[kIsMockActive$1]; - } - [kMockAgentSet$1](origin, dispatcher) { - this[kClients$5].set(origin, new FakeWeakRef(dispatcher)); - } - [kFactory$4](origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions$4]); - return this[kOptions$4] && this[kOptions$4].connections === 1 ? new MockClient$4(origin, mockOptions) : new MockPool$4(origin, mockOptions); - } - [kMockAgentGet$1](origin) { - const ref = this[kClients$5].get(origin); - if (ref) return ref.deref(); - if (typeof origin !== "string") { - const dispatcher = this[kFactory$4]("http://localhost:9999"); - this[kMockAgentSet$1](origin, dispatcher); - return dispatcher; - } - for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients$5])) { - const nonExplicitDispatcher = nonExplicitRef.deref(); - if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue$2(keyMatcher, origin)) { - const dispatcher = this[kFactory$4](origin); - this[kMockAgentSet$1](origin, dispatcher); - dispatcher[kDispatches$5] = nonExplicitDispatcher[kDispatches$5]; - return dispatcher; - } - } - } - [kGetNetConnect$2]() { - return this[kNetConnect$1]; - } - pendingInterceptors() { - const mockAgentClients = this[kClients$5]; - return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope.deref()[kDispatches$5].map((dispatch) => ({ - ...dispatch, - origin - }))).filter(({ pending }) => pending); - } - assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter$1() } = {}) { - const pending = this.pendingInterceptors(); - if (pending.length === 0) return; - const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); - throw new UndiciError$3(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()); - } - }; - module.exports = MockAgent$3; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/proxy-agent.js -var require_proxy_agent$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/proxy-agent.js"(exports, module) { - const { kProxy: kProxy$1, kClose: kClose$9, kDestroy: kDestroy$7, kInterceptors } = require_symbols$5(); - const { URL: URL$2 } = __require("url"); - const Agent$8 = require_agent$1(); - const Pool$7 = require_pool$1(); - const DispatcherBase$7 = require_dispatcher_base$1(); - const { InvalidArgumentError: InvalidArgumentError$32, RequestAbortedError: RequestAbortedError$9 } = require_errors$1(); - const buildConnector$6 = require_connect$1(); - const kAgent$2 = Symbol("proxy agent"); - const kClient$4 = Symbol("proxy client"); - const kProxyHeaders$1 = Symbol("proxy headers"); - const kRequestTls$1 = Symbol("request tls settings"); - const kProxyTls$1 = Symbol("proxy tls settings"); - const kConnectEndpoint$1 = Symbol("connect endpoint function"); - function defaultProtocolPort$1(protocol) { - return protocol === "https:" ? 443 : 80; - } - function buildProxyOptions(opts) { - if (typeof opts === "string") opts = { uri: opts }; - if (!opts || !opts.uri) throw new InvalidArgumentError$32("Proxy opts.uri is mandatory"); - return { - uri: opts.uri, - protocol: opts.protocol || "https" - }; - } - function defaultFactory$4(origin, opts) { - return new Pool$7(origin, opts); - } - var ProxyAgent$4 = class extends DispatcherBase$7 { - constructor(opts) { - super(opts); - this[kProxy$1] = buildProxyOptions(opts); - this[kAgent$2] = new Agent$8(opts); - this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; - if (typeof opts === "string") opts = { uri: opts }; - if (!opts || !opts.uri) throw new InvalidArgumentError$32("Proxy opts.uri is mandatory"); - const { clientFactory = defaultFactory$4 } = opts; - if (typeof clientFactory !== "function") throw new InvalidArgumentError$32("Proxy opts.clientFactory must be a function."); - this[kRequestTls$1] = opts.requestTls; - this[kProxyTls$1] = opts.proxyTls; - this[kProxyHeaders$1] = opts.headers || {}; - const resolvedUrl = new URL$2(opts.uri); - const { origin, port, host, username, password } = resolvedUrl; - if (opts.auth && opts.token) throw new InvalidArgumentError$32("opts.auth cannot be used in combination with opts.token"); - else if (opts.auth) this[kProxyHeaders$1]["proxy-authorization"] = `Basic ${opts.auth}`; - else if (opts.token) this[kProxyHeaders$1]["proxy-authorization"] = opts.token; - else if (username && password) this[kProxyHeaders$1]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; - const connect$5 = buildConnector$6({ ...opts.proxyTls }); - this[kConnectEndpoint$1] = buildConnector$6({ ...opts.requestTls }); - this[kClient$4] = clientFactory(resolvedUrl, { connect: connect$5 }); - this[kAgent$2] = new Agent$8({ - ...opts, - connect: async (opts$1, callback) => { - let requestedHost = opts$1.host; - if (!opts$1.port) requestedHost += `:${defaultProtocolPort$1(opts$1.protocol)}`; - try { - const { socket, statusCode } = await this[kClient$4].connect({ - origin, - port, - path: requestedHost, - signal: opts$1.signal, - headers: { - ...this[kProxyHeaders$1], - host - } - }); - if (statusCode !== 200) { - socket.on("error", () => {}).destroy(); - callback(new RequestAbortedError$9(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); - } - if (opts$1.protocol !== "https:") { - callback(null, socket); - return; - } - let servername; - if (this[kRequestTls$1]) servername = this[kRequestTls$1].servername; - else servername = opts$1.servername; - this[kConnectEndpoint$1]({ - ...opts$1, - servername, - httpSocket: socket - }, callback); - } catch (err) { - callback(err); - } - } - }); - } - dispatch(opts, handler) { - const { host } = new URL$2(opts.origin); - const headers = buildHeaders$1(opts.headers); - throwIfProxyAuthIsSent$1(headers); - return this[kAgent$2].dispatch({ - ...opts, - headers: { - ...headers, - host - } - }, handler); - } - async [kClose$9]() { - await this[kAgent$2].close(); - await this[kClient$4].close(); - } - async [kDestroy$7]() { - await this[kAgent$2].destroy(); - await this[kClient$4].destroy(); - } - }; - /** - * @param {string[] | Record} headers - * @returns {Record} - */ - function buildHeaders$1(headers) { - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {}; - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) headersPair[headers[i$1]] = headers[i$1 + 1]; - return headersPair; - } - return headers; - } - /** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ - function throwIfProxyAuthIsSent$1(headers) { - const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); - if (existProxyAuth) throw new InvalidArgumentError$32("Proxy-Authorization should be sent in ProxyAgent constructor"); - } - module.exports = ProxyAgent$4; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js -var require_RetryHandler = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js"(exports, module) { - const assert$37 = __require("assert"); - const { kRetryHandlerDefaultRetry: kRetryHandlerDefaultRetry$1 } = require_symbols$5(); - const { RequestRetryError: RequestRetryError$2 } = require_errors$1(); - const { isDisturbed: isDisturbed$5, parseHeaders: parseHeaders$2, parseRangeHeader: parseRangeHeader$2 } = require_util$12(); - function calculateRetryAfterHeader$1(retryAfter) { - const current = Date.now(); - const diff$3 = new Date(retryAfter).getTime() - current; - return diff$3; - } - var RetryHandler$5 = class RetryHandler$5 { - constructor(opts, handlers) { - const { retryOptions,...dispatchOpts } = opts; - const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; - this.dispatch = handlers.dispatch; - this.handler = handlers.handler; - this.opts = dispatchOpts; - this.abort = null; - this.aborted = false; - this.retryOpts = { - retry: retryFn ?? RetryHandler$5[kRetryHandlerDefaultRetry$1], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1e3, - timeout: minTimeout ?? 500, - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - methods: methods ?? [ - "GET", - "HEAD", - "OPTIONS", - "PUT", - "DELETE", - "TRACE" - ], - statusCodes: statusCodes ?? [ - 500, - 502, - 503, - 504, - 429 - ], - errorCodes: errorCodes ?? [ - "ECONNRESET", - "ECONNREFUSED", - "ENOTFOUND", - "ENETDOWN", - "ENETUNREACH", - "EHOSTDOWN", - "EHOSTUNREACH", - "EPIPE" - ] - }; - this.retryCount = 0; - this.start = 0; - this.end = null; - this.etag = null; - this.resume = null; - this.handler.onConnect((reason) => { - this.aborted = true; - if (this.abort) this.abort(reason); - else this.reason = reason; - }); - } - onRequestSent() { - if (this.handler.onRequestSent) this.handler.onRequestSent(); - } - onUpgrade(statusCode, headers, socket) { - if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); - } - onConnect(abort$2) { - if (this.aborted) abort$2(this.reason); - else this.abort = abort$2; - } - onBodySent(chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk); - } - static [kRetryHandlerDefaultRetry$1](err, { state, opts }, cb) { - const { statusCode, code, headers } = err; - const { method, retryOptions } = opts; - const { maxRetries, timeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; - let { counter, currentTimeout } = state; - currentTimeout = currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout; - if (code && code !== "UND_ERR_REQ_RETRY" && code !== "UND_ERR_SOCKET" && !errorCodes.includes(code)) { - cb(err); - return; - } - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err); - return; - } - if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { - cb(err); - return; - } - if (counter > maxRetries) { - cb(err); - return; - } - let retryAfterHeader = headers != null && headers["retry-after"]; - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader); - retryAfterHeader = isNaN(retryAfterHeader) ? calculateRetryAfterHeader$1(retryAfterHeader) : retryAfterHeader * 1e3; - } - const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout); - state.currentTimeout = retryTimeout; - setTimeout(() => cb(null), retryTimeout); - } - onHeaders(statusCode, rawHeaders, resume$2, statusMessage) { - const headers = parseHeaders$2(rawHeaders); - this.retryCount += 1; - if (statusCode >= 300) { - this.abort(new RequestRetryError$2("Request failed", statusCode, { - headers, - count: this.retryCount - })); - return false; - } - if (this.resume != null) { - this.resume = null; - if (statusCode !== 206) return true; - const contentRange = parseRangeHeader$2(headers["content-range"]); - if (!contentRange) { - this.abort(new RequestRetryError$2("Content-Range mismatch", statusCode, { - headers, - count: this.retryCount - })); - return false; - } - if (this.etag != null && this.etag !== headers.etag) { - this.abort(new RequestRetryError$2("ETag mismatch", statusCode, { - headers, - count: this.retryCount - })); - return false; - } - const { start, size, end = size } = contentRange; - assert$37(this.start === start, "content-range mismatch"); - assert$37(this.end == null || this.end === end, "content-range mismatch"); - this.resume = resume$2; - return true; - } - if (this.end == null) { - if (statusCode === 206) { - const range = parseRangeHeader$2(headers["content-range"]); - if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume$2, statusMessage); - const { start, size, end = size } = range; - assert$37(start != null && Number.isFinite(start) && this.start !== start, "content-range mismatch"); - assert$37(Number.isFinite(start)); - assert$37(end != null && Number.isFinite(end) && this.end !== end, "invalid content-length"); - this.start = start; - this.end = end; - } - if (this.end == null) { - const contentLength = headers["content-length"]; - this.end = contentLength != null ? Number(contentLength) : null; - } - assert$37(Number.isFinite(this.start)); - assert$37(this.end == null || Number.isFinite(this.end), "invalid content-length"); - this.resume = resume$2; - this.etag = headers.etag != null ? headers.etag : null; - return this.handler.onHeaders(statusCode, rawHeaders, resume$2, statusMessage); - } - const err = new RequestRetryError$2("Request failed", statusCode, { - headers, - count: this.retryCount - }); - this.abort(err); - return false; - } - onData(chunk) { - this.start += chunk.length; - return this.handler.onData(chunk); - } - onComplete(rawTrailers) { - this.retryCount = 0; - return this.handler.onComplete(rawTrailers); - } - onError(err) { - if (this.aborted || isDisturbed$5(this.opts.body)) return this.handler.onError(err); - this.retryOpts.retry(err, { - state: { - counter: this.retryCount++, - currentTimeout: this.retryAfter - }, - opts: { - retryOptions: this.retryOpts, - ...this.opts - } - }, onRetry.bind(this)); - function onRetry(err$1) { - if (err$1 != null || this.aborted || isDisturbed$5(this.opts.body)) return this.handler.onError(err$1); - if (this.start !== 0) this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - range: `bytes=${this.start}-${this.end ?? ""}` - } - }; - try { - this.dispatch(this.opts, this); - } catch (err$2) { - this.handler.onError(err$2); - } - } - } - }; - module.exports = RetryHandler$5; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/global.js -var require_global$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/global.js"(exports, module) { - const globalDispatcher$1 = Symbol.for("undici.globalDispatcher.1"); - const { InvalidArgumentError: InvalidArgumentError$31 } = require_errors$1(); - const Agent$7 = require_agent$1(); - if (getGlobalDispatcher$9() === void 0) setGlobalDispatcher$3(new Agent$7()); - function setGlobalDispatcher$3(agent) { - if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError$31("Argument agent must implement Agent"); - Object.defineProperty(globalThis, globalDispatcher$1, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }); - } - function getGlobalDispatcher$9() { - return globalThis[globalDispatcher$1]; - } - module.exports = { - setGlobalDispatcher: setGlobalDispatcher$3, - getGlobalDispatcher: getGlobalDispatcher$9 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js -var require_DecoratorHandler = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js"(exports, module) { - module.exports = class DecoratorHandler$5 { - constructor(handler) { - this.handler = handler; - } - onConnect(...args) { - return this.handler.onConnect(...args); - } - onError(...args) { - return this.handler.onError(...args); - } - onUpgrade(...args) { - return this.handler.onUpgrade(...args); - } - onHeaders(...args) { - return this.handler.onHeaders(...args); - } - onData(...args) { - return this.handler.onData(...args); - } - onComplete(...args) { - return this.handler.onComplete(...args); - } - onBodySent(...args) { - return this.handler.onBodySent(...args); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/headers.js -var require_headers$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/headers.js"(exports, module) { - const { kHeadersList: kHeadersList$5, kConstruct: kConstruct$12 } = require_symbols$5(); - const { kGuard: kGuard$4 } = require_symbols$4(); - const { kEnumerableProperty: kEnumerableProperty$19 } = require_util$12(); - const { makeIterator, isValidHeaderName: isValidHeaderName$4, isValidHeaderValue: isValidHeaderValue$4 } = require_util$11(); - const util$26 = __require("util"); - const { webidl: webidl$27 } = require_webidl$1(); - const assert$36 = __require("assert"); - const kHeadersMap = Symbol("headers map"); - const kHeadersSortedMap = Symbol("headers map sorted"); - /** - * @param {number} code - */ - function isHTTPWhiteSpaceCharCode$1(code) { - return code === 10 || code === 13 || code === 9 || code === 32; - } - /** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ - function headerValueNormalize$1(potentialValue) { - let i$1 = 0; - let j = potentialValue.length; - while (j > i$1 && isHTTPWhiteSpaceCharCode$1(potentialValue.charCodeAt(j - 1))) --j; - while (j > i$1 && isHTTPWhiteSpaceCharCode$1(potentialValue.charCodeAt(i$1))) ++i$1; - return i$1 === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i$1, j); - } - function fill$3(headers, object) { - if (Array.isArray(object)) for (let i$1 = 0; i$1 < object.length; ++i$1) { - const header = object[i$1]; - if (header.length !== 2) throw webidl$27.errors.exception({ - header: "Headers constructor", - message: `expected name/value pair to be length 2, found ${header.length}.` - }); - appendHeader$1(headers, header[0], header[1]); - } - else if (typeof object === "object" && object !== null) { - const keys = Object.keys(object); - for (let i$1 = 0; i$1 < keys.length; ++i$1) appendHeader$1(headers, keys[i$1], object[keys[i$1]]); - } else throw webidl$27.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: ["sequence>", "record"] - }); - } - /** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ - function appendHeader$1(headers, name, value) { - value = headerValueNormalize$1(value); - if (!isValidHeaderName$4(name)) throw webidl$27.errors.invalidArgument({ - prefix: "Headers.append", - value: name, - type: "header name" - }); - else if (!isValidHeaderValue$4(value)) throw webidl$27.errors.invalidArgument({ - prefix: "Headers.append", - value, - type: "header value" - }); - if (headers[kGuard$4] === "immutable") throw new TypeError("immutable"); - else if (headers[kGuard$4] === "request-no-cors") {} - return headers[kHeadersList$5].append(name, value); - } - var HeadersList$6 = class HeadersList$6 { - /** @type {[string, string][]|null} */ - cookies = null; - constructor(init) { - if (init instanceof HeadersList$6) { - this[kHeadersMap] = new Map(init[kHeadersMap]); - this[kHeadersSortedMap] = init[kHeadersSortedMap]; - this.cookies = init.cookies === null ? null : [...init.cookies]; - } else { - this[kHeadersMap] = new Map(init); - this[kHeadersSortedMap] = null; - } - } - contains(name) { - name = name.toLowerCase(); - return this[kHeadersMap].has(name); - } - clear() { - this[kHeadersMap].clear(); - this[kHeadersSortedMap] = null; - this.cookies = null; - } - append(name, value) { - this[kHeadersSortedMap] = null; - const lowercaseName = name.toLowerCase(); - const exists$1 = this[kHeadersMap].get(lowercaseName); - if (exists$1) { - const delimiter = lowercaseName === "cookie" ? "; " : ", "; - this[kHeadersMap].set(lowercaseName, { - name: exists$1.name, - value: `${exists$1.value}${delimiter}${value}` - }); - } else this[kHeadersMap].set(lowercaseName, { - name, - value - }); - if (lowercaseName === "set-cookie") { - this.cookies ??= []; - this.cookies.push(value); - } - } - set(name, value) { - this[kHeadersSortedMap] = null; - const lowercaseName = name.toLowerCase(); - if (lowercaseName === "set-cookie") this.cookies = [value]; - this[kHeadersMap].set(lowercaseName, { - name, - value - }); - } - delete(name) { - this[kHeadersSortedMap] = null; - name = name.toLowerCase(); - if (name === "set-cookie") this.cookies = null; - this[kHeadersMap].delete(name); - } - get(name) { - const value = this[kHeadersMap].get(name.toLowerCase()); - return value === void 0 ? null : value.value; - } - *[Symbol.iterator]() { - for (const [name, { value }] of this[kHeadersMap]) yield [name, value]; - } - get entries() { - const headers = {}; - if (this[kHeadersMap].size) for (const { name, value } of this[kHeadersMap].values()) headers[name] = value; - return headers; - } - }; - var Headers$11 = class Headers$11 { - constructor(init = void 0) { - if (init === kConstruct$12) return; - this[kHeadersList$5] = new HeadersList$6(); - this[kGuard$4] = "none"; - if (init !== void 0) { - init = webidl$27.converters.HeadersInit(init); - fill$3(this, init); - } - } - append(name, value) { - webidl$27.brandCheck(this, Headers$11); - webidl$27.argumentLengthCheck(arguments, 2, { header: "Headers.append" }); - name = webidl$27.converters.ByteString(name); - value = webidl$27.converters.ByteString(value); - return appendHeader$1(this, name, value); - } - delete(name) { - webidl$27.brandCheck(this, Headers$11); - webidl$27.argumentLengthCheck(arguments, 1, { header: "Headers.delete" }); - name = webidl$27.converters.ByteString(name); - if (!isValidHeaderName$4(name)) throw webidl$27.errors.invalidArgument({ - prefix: "Headers.delete", - value: name, - type: "header name" - }); - if (this[kGuard$4] === "immutable") throw new TypeError("immutable"); - else if (this[kGuard$4] === "request-no-cors") {} - if (!this[kHeadersList$5].contains(name)) return; - this[kHeadersList$5].delete(name); - } - get(name) { - webidl$27.brandCheck(this, Headers$11); - webidl$27.argumentLengthCheck(arguments, 1, { header: "Headers.get" }); - name = webidl$27.converters.ByteString(name); - if (!isValidHeaderName$4(name)) throw webidl$27.errors.invalidArgument({ - prefix: "Headers.get", - value: name, - type: "header name" - }); - return this[kHeadersList$5].get(name); - } - has(name) { - webidl$27.brandCheck(this, Headers$11); - webidl$27.argumentLengthCheck(arguments, 1, { header: "Headers.has" }); - name = webidl$27.converters.ByteString(name); - if (!isValidHeaderName$4(name)) throw webidl$27.errors.invalidArgument({ - prefix: "Headers.has", - value: name, - type: "header name" - }); - return this[kHeadersList$5].contains(name); - } - set(name, value) { - webidl$27.brandCheck(this, Headers$11); - webidl$27.argumentLengthCheck(arguments, 2, { header: "Headers.set" }); - name = webidl$27.converters.ByteString(name); - value = webidl$27.converters.ByteString(value); - value = headerValueNormalize$1(value); - if (!isValidHeaderName$4(name)) throw webidl$27.errors.invalidArgument({ - prefix: "Headers.set", - value: name, - type: "header name" - }); - else if (!isValidHeaderValue$4(value)) throw webidl$27.errors.invalidArgument({ - prefix: "Headers.set", - value, - type: "header value" - }); - if (this[kGuard$4] === "immutable") throw new TypeError("immutable"); - else if (this[kGuard$4] === "request-no-cors") {} - this[kHeadersList$5].set(name, value); - } - getSetCookie() { - webidl$27.brandCheck(this, Headers$11); - const list = this[kHeadersList$5].cookies; - if (list) return [...list]; - return []; - } - get [kHeadersSortedMap]() { - if (this[kHeadersList$5][kHeadersSortedMap]) return this[kHeadersList$5][kHeadersSortedMap]; - const headers = []; - const names = [...this[kHeadersList$5]].sort((a, b) => a[0] < b[0] ? -1 : 1); - const cookies = this[kHeadersList$5].cookies; - for (let i$1 = 0; i$1 < names.length; ++i$1) { - const [name, value] = names[i$1]; - if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); - else { - assert$36(value !== null); - headers.push([name, value]); - } - } - this[kHeadersList$5][kHeadersSortedMap] = headers; - return headers; - } - keys() { - webidl$27.brandCheck(this, Headers$11); - if (this[kGuard$4] === "immutable") { - const value = this[kHeadersSortedMap]; - return makeIterator(() => value, "Headers", "key"); - } - return makeIterator(() => [...this[kHeadersSortedMap].values()], "Headers", "key"); - } - values() { - webidl$27.brandCheck(this, Headers$11); - if (this[kGuard$4] === "immutable") { - const value = this[kHeadersSortedMap]; - return makeIterator(() => value, "Headers", "value"); - } - return makeIterator(() => [...this[kHeadersSortedMap].values()], "Headers", "value"); - } - entries() { - webidl$27.brandCheck(this, Headers$11); - if (this[kGuard$4] === "immutable") { - const value = this[kHeadersSortedMap]; - return makeIterator(() => value, "Headers", "key+value"); - } - return makeIterator(() => [...this[kHeadersSortedMap].values()], "Headers", "key+value"); - } - /** - * @param {(value: string, key: string, self: Headers) => void} callbackFn - * @param {unknown} thisArg - */ - forEach(callbackFn, thisArg = globalThis) { - webidl$27.brandCheck(this, Headers$11); - webidl$27.argumentLengthCheck(arguments, 1, { header: "Headers.forEach" }); - if (typeof callbackFn !== "function") throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'."); - for (const [key, value] of this) callbackFn.apply(thisArg, [ - value, - key, - this - ]); - } - [Symbol.for("nodejs.util.inspect.custom")]() { - webidl$27.brandCheck(this, Headers$11); - return this[kHeadersList$5]; - } - }; - Headers$11.prototype[Symbol.iterator] = Headers$11.prototype.entries; - Object.defineProperties(Headers$11.prototype, { - append: kEnumerableProperty$19, - delete: kEnumerableProperty$19, - get: kEnumerableProperty$19, - has: kEnumerableProperty$19, - set: kEnumerableProperty$19, - getSetCookie: kEnumerableProperty$19, - keys: kEnumerableProperty$19, - values: kEnumerableProperty$19, - entries: kEnumerableProperty$19, - forEach: kEnumerableProperty$19, - [Symbol.iterator]: { enumerable: false }, - [Symbol.toStringTag]: { - value: "Headers", - configurable: true - }, - [util$26.inspect.custom]: { enumerable: false } - }); - webidl$27.converters.HeadersInit = function(V) { - if (webidl$27.util.Type(V) === "Object") { - if (V[Symbol.iterator]) return webidl$27.converters["sequence>"](V); - return webidl$27.converters["record"](V); - } - throw webidl$27.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: ["sequence>", "record"] - }); - }; - module.exports = { - fill: fill$3, - Headers: Headers$11, - HeadersList: HeadersList$6 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/response.js -var require_response$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/response.js"(exports, module) { - const { Headers: Headers$10, HeadersList: HeadersList$5, fill: fill$2 } = require_headers$1(); - const { extractBody: extractBody$7, cloneBody: cloneBody$4, mixinBody: mixinBody$4 } = require_body$1(); - const util$25 = require_util$12(); - const { kEnumerableProperty: kEnumerableProperty$18 } = util$25; - const { isValidReasonPhrase: isValidReasonPhrase$2, isCancelled: isCancelled$4, isAborted: isAborted$4, isBlobLike: isBlobLike$4, serializeJavascriptValueToJSONString: serializeJavascriptValueToJSONString$2, isErrorLike: isErrorLike$4, isomorphicEncode: isomorphicEncode$4 } = require_util$11(); - const { redirectStatusSet: redirectStatusSet$5, nullBodyStatus: nullBodyStatus$4, DOMException: DOMException$4 } = require_constants$9(); - const { kState: kState$6, kHeaders: kHeaders$3, kGuard: kGuard$3, kRealm: kRealm$3 } = require_symbols$4(); - const { webidl: webidl$26 } = require_webidl$1(); - const { FormData: FormData$2 } = require_formdata$1(); - const { getGlobalOrigin: getGlobalOrigin$5 } = require_global$3(); - const { URLSerializer: URLSerializer$8 } = require_dataURL(); - const { kHeadersList: kHeadersList$4, kConstruct: kConstruct$11 } = require_symbols$5(); - const assert$35 = __require("assert"); - const { types: types$6 } = __require("util"); - const ReadableStream$2 = globalThis.ReadableStream || __require("stream/web").ReadableStream; - const textEncoder$2 = new TextEncoder("utf-8"); - var Response$3 = class Response$3 { - static error() { - const relevantRealm$1 = { settingsObject: {} }; - const responseObject = new Response$3(); - responseObject[kState$6] = makeNetworkError$3(); - responseObject[kRealm$3] = relevantRealm$1; - responseObject[kHeaders$3][kHeadersList$4] = responseObject[kState$6].headersList; - responseObject[kHeaders$3][kGuard$3] = "immutable"; - responseObject[kHeaders$3][kRealm$3] = relevantRealm$1; - return responseObject; - } - static json(data, init = {}) { - webidl$26.argumentLengthCheck(arguments, 1, { header: "Response.json" }); - if (init !== null) init = webidl$26.converters.ResponseInit(init); - const bytes = textEncoder$2.encode(serializeJavascriptValueToJSONString$2(data)); - const body = extractBody$7(bytes); - const relevantRealm$1 = { settingsObject: {} }; - const responseObject = new Response$3(); - responseObject[kRealm$3] = relevantRealm$1; - responseObject[kHeaders$3][kGuard$3] = "response"; - responseObject[kHeaders$3][kRealm$3] = relevantRealm$1; - initializeResponse$1(responseObject, init, { - body: body[0], - type: "application/json" - }); - return responseObject; - } - static redirect(url, status = 302) { - const relevantRealm$1 = { settingsObject: {} }; - webidl$26.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl$26.converters.USVString(url); - status = webidl$26.converters["unsigned short"](status); - let parsedURL; - try { - parsedURL = new URL(url, getGlobalOrigin$5()); - } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { cause: err }); - } - if (!redirectStatusSet$5.has(status)) throw new RangeError("Invalid status code " + status); - const responseObject = new Response$3(); - responseObject[kRealm$3] = relevantRealm$1; - responseObject[kHeaders$3][kGuard$3] = "immutable"; - responseObject[kHeaders$3][kRealm$3] = relevantRealm$1; - responseObject[kState$6].status = status; - const value = isomorphicEncode$4(URLSerializer$8(parsedURL)); - responseObject[kState$6].headersList.append("location", value); - return responseObject; - } - constructor(body = null, init = {}) { - if (body !== null) body = webidl$26.converters.BodyInit(body); - init = webidl$26.converters.ResponseInit(init); - this[kRealm$3] = { settingsObject: {} }; - this[kState$6] = makeResponse$3({}); - this[kHeaders$3] = new Headers$10(kConstruct$11); - this[kHeaders$3][kGuard$3] = "response"; - this[kHeaders$3][kHeadersList$4] = this[kState$6].headersList; - this[kHeaders$3][kRealm$3] = this[kRealm$3]; - let bodyWithType = null; - if (body != null) { - const [extractedBody, type] = extractBody$7(body); - bodyWithType = { - body: extractedBody, - type - }; - } - initializeResponse$1(this, init, bodyWithType); - } - get type() { - webidl$26.brandCheck(this, Response$3); - return this[kState$6].type; - } - get url() { - webidl$26.brandCheck(this, Response$3); - const urlList = this[kState$6].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) return ""; - return URLSerializer$8(url, true); - } - get redirected() { - webidl$26.brandCheck(this, Response$3); - return this[kState$6].urlList.length > 1; - } - get status() { - webidl$26.brandCheck(this, Response$3); - return this[kState$6].status; - } - get ok() { - webidl$26.brandCheck(this, Response$3); - return this[kState$6].status >= 200 && this[kState$6].status <= 299; - } - get statusText() { - webidl$26.brandCheck(this, Response$3); - return this[kState$6].statusText; - } - get headers() { - webidl$26.brandCheck(this, Response$3); - return this[kHeaders$3]; - } - get body() { - webidl$26.brandCheck(this, Response$3); - return this[kState$6].body ? this[kState$6].body.stream : null; - } - get bodyUsed() { - webidl$26.brandCheck(this, Response$3); - return !!this[kState$6].body && util$25.isDisturbed(this[kState$6].body.stream); - } - clone() { - webidl$26.brandCheck(this, Response$3); - if (this.bodyUsed || this.body && this.body.locked) throw webidl$26.errors.exception({ - header: "Response.clone", - message: "Body has already been consumed." - }); - const clonedResponse = cloneResponse$3(this[kState$6]); - const clonedResponseObject = new Response$3(); - clonedResponseObject[kState$6] = clonedResponse; - clonedResponseObject[kRealm$3] = this[kRealm$3]; - clonedResponseObject[kHeaders$3][kHeadersList$4] = clonedResponse.headersList; - clonedResponseObject[kHeaders$3][kGuard$3] = this[kHeaders$3][kGuard$3]; - clonedResponseObject[kHeaders$3][kRealm$3] = this[kHeaders$3][kRealm$3]; - return clonedResponseObject; - } - }; - mixinBody$4(Response$3); - Object.defineProperties(Response$3.prototype, { - type: kEnumerableProperty$18, - url: kEnumerableProperty$18, - status: kEnumerableProperty$18, - ok: kEnumerableProperty$18, - redirected: kEnumerableProperty$18, - statusText: kEnumerableProperty$18, - headers: kEnumerableProperty$18, - clone: kEnumerableProperty$18, - body: kEnumerableProperty$18, - bodyUsed: kEnumerableProperty$18, - [Symbol.toStringTag]: { - value: "Response", - configurable: true - } - }); - Object.defineProperties(Response$3, { - json: kEnumerableProperty$18, - redirect: kEnumerableProperty$18, - error: kEnumerableProperty$18 - }); - function cloneResponse$3(response) { - if (response.internalResponse) return filterResponse$3(cloneResponse$3(response.internalResponse), response.type); - const newResponse = makeResponse$3({ - ...response, - body: null - }); - if (response.body != null) newResponse.body = cloneBody$4(response.body); - return newResponse; - } - function makeResponse$3(init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: "default", - status: 200, - timingInfo: null, - cacheState: "", - statusText: "", - ...init, - headersList: init.headersList ? new HeadersList$5(init.headersList) : new HeadersList$5(), - urlList: init.urlList ? [...init.urlList] : [] - }; - } - function makeNetworkError$3(reason) { - const isError = isErrorLike$4(reason); - return makeResponse$3({ - type: "error", - status: 0, - error: isError ? reason : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === "AbortError" - }); - } - function makeFilteredResponse$1(response, state) { - state = { - internalResponse: response, - ...state - }; - return new Proxy(response, { - get(target, p) { - return p in state ? state[p] : target[p]; - }, - set(target, p, value) { - assert$35(!(p in state)); - target[p] = value; - return true; - } - }); - } - function filterResponse$3(response, type) { - if (type === "basic") return makeFilteredResponse$1(response, { - type: "basic", - headersList: response.headersList - }); - else if (type === "cors") return makeFilteredResponse$1(response, { - type: "cors", - headersList: response.headersList - }); - else if (type === "opaque") return makeFilteredResponse$1(response, { - type: "opaque", - urlList: Object.freeze([]), - status: 0, - statusText: "", - body: null - }); - else if (type === "opaqueredirect") return makeFilteredResponse$1(response, { - type: "opaqueredirect", - status: 0, - statusText: "", - headersList: [], - body: null - }); - else assert$35(false); - } - function makeAppropriateNetworkError$3(fetchParams, err = null) { - assert$35(isCancelled$4(fetchParams)); - return isAborted$4(fetchParams) ? makeNetworkError$3(Object.assign(new DOMException$4("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError$3(Object.assign(new DOMException$4("Request was cancelled."), { cause: err })); - } - function initializeResponse$1(response, init, body) { - if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); - if ("statusText" in init && init.statusText != null) { - if (!isValidReasonPhrase$2(String(init.statusText))) throw new TypeError("Invalid statusText"); - } - if ("status" in init && init.status != null) response[kState$6].status = init.status; - if ("statusText" in init && init.statusText != null) response[kState$6].statusText = init.statusText; - if ("headers" in init && init.headers != null) fill$2(response[kHeaders$3], init.headers); - if (body) { - if (nullBodyStatus$4.includes(response.status)) throw webidl$26.errors.exception({ - header: "Response constructor", - message: "Invalid response status code " + response.status - }); - response[kState$6].body = body.body; - if (body.type != null && !response[kState$6].headersList.contains("Content-Type")) response[kState$6].headersList.append("content-type", body.type); - } - } - webidl$26.converters.ReadableStream = webidl$26.interfaceConverter(ReadableStream$2); - webidl$26.converters.FormData = webidl$26.interfaceConverter(FormData$2); - webidl$26.converters.URLSearchParams = webidl$26.interfaceConverter(URLSearchParams); - webidl$26.converters.XMLHttpRequestBodyInit = function(V) { - if (typeof V === "string") return webidl$26.converters.USVString(V); - if (isBlobLike$4(V)) return webidl$26.converters.Blob(V, { strict: false }); - if (types$6.isArrayBuffer(V) || types$6.isTypedArray(V) || types$6.isDataView(V)) return webidl$26.converters.BufferSource(V); - if (util$25.isFormDataLike(V)) return webidl$26.converters.FormData(V, { strict: false }); - if (V instanceof URLSearchParams) return webidl$26.converters.URLSearchParams(V); - return webidl$26.converters.DOMString(V); - }; - webidl$26.converters.BodyInit = function(V) { - if (V instanceof ReadableStream$2) return webidl$26.converters.ReadableStream(V); - if (V?.[Symbol.asyncIterator]) return V; - return webidl$26.converters.XMLHttpRequestBodyInit(V); - }; - webidl$26.converters.ResponseInit = webidl$26.dictionaryConverter([ - { - key: "status", - converter: webidl$26.converters["unsigned short"], - defaultValue: 200 - }, - { - key: "statusText", - converter: webidl$26.converters.ByteString, - defaultValue: "" - }, - { - key: "headers", - converter: webidl$26.converters.HeadersInit - } - ]); - module.exports = { - makeNetworkError: makeNetworkError$3, - makeResponse: makeResponse$3, - makeAppropriateNetworkError: makeAppropriateNetworkError$3, - filterResponse: filterResponse$3, - Response: Response$3, - cloneResponse: cloneResponse$3 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/request.js -var require_request$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/request.js"(exports, module) { - const { extractBody: extractBody$6, mixinBody: mixinBody$3, cloneBody: cloneBody$3 } = require_body$1(); - const { Headers: Headers$9, fill: fillHeaders$1, HeadersList: HeadersList$4 } = require_headers$1(); - const { FinalizationRegistry: FinalizationRegistry$2 } = require_dispatcher_weakref$1()(); - const util$24 = require_util$12(); - const { isValidHTTPToken: isValidHTTPToken$4, sameOrigin: sameOrigin$4, normalizeMethod: normalizeMethod$1, makePolicyContainer: makePolicyContainer$3, normalizeMethodRecord } = require_util$11(); - const { forbiddenMethodsSet: forbiddenMethodsSet$2, corsSafeListedMethodsSet: corsSafeListedMethodsSet$2, referrerPolicy: referrerPolicy$2, requestRedirect: requestRedirect$2, requestMode: requestMode$2, requestCredentials: requestCredentials$2, requestCache: requestCache$2, requestDuplex: requestDuplex$2 } = require_constants$9(); - const { kEnumerableProperty: kEnumerableProperty$17 } = util$24; - const { kHeaders: kHeaders$2, kSignal: kSignal$1, kState: kState$5, kGuard: kGuard$2, kRealm: kRealm$2 } = require_symbols$4(); - const { webidl: webidl$25 } = require_webidl$1(); - const { getGlobalOrigin: getGlobalOrigin$4 } = require_global$3(); - const { URLSerializer: URLSerializer$7 } = require_dataURL(); - const { kHeadersList: kHeadersList$3, kConstruct: kConstruct$10 } = require_symbols$5(); - const assert$34 = __require("assert"); - const { getMaxListeners: getMaxListeners$1, setMaxListeners: setMaxListeners$1, getEventListeners, defaultMaxListeners: defaultMaxListeners$1 } = __require("events"); - let TransformStream$2 = globalThis.TransformStream; - const kAbortController$1 = Symbol("abortController"); - const requestFinalizer$1 = new FinalizationRegistry$2(({ signal, abort: abort$2 }) => { - signal.removeEventListener("abort", abort$2); - }); - var Request$7 = class Request$7 { - constructor(input, init = {}) { - if (input === kConstruct$10) return; - webidl$25.argumentLengthCheck(arguments, 1, { header: "Request constructor" }); - input = webidl$25.converters.RequestInfo(input); - init = webidl$25.converters.RequestInit(init); - this[kRealm$2] = { settingsObject: { - baseUrl: getGlobalOrigin$4(), - get origin() { - return this.baseUrl?.origin; - }, - policyContainer: makePolicyContainer$3() - } }; - let request$2 = null; - let fallbackMode = null; - const baseUrl = this[kRealm$2].settingsObject.baseUrl; - let signal = null; - if (typeof input === "string") { - let parsedURL; - try { - parsedURL = new URL(input, baseUrl); - } catch (err) { - throw new TypeError("Failed to parse URL from " + input, { cause: err }); - } - if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); - request$2 = makeRequest$5({ urlList: [parsedURL] }); - fallbackMode = "cors"; - } else { - assert$34(input instanceof Request$7); - request$2 = input[kState$5]; - signal = input[kSignal$1]; - } - const origin = this[kRealm$2].settingsObject.origin; - let window = "client"; - if (request$2.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin$4(request$2.window, origin)) window = request$2.window; - if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); - if ("window" in init) window = "no-window"; - request$2 = makeRequest$5({ - method: request$2.method, - headersList: request$2.headersList, - unsafeRequest: request$2.unsafeRequest, - client: this[kRealm$2].settingsObject, - window, - priority: request$2.priority, - origin: request$2.origin, - referrer: request$2.referrer, - referrerPolicy: request$2.referrerPolicy, - mode: request$2.mode, - credentials: request$2.credentials, - cache: request$2.cache, - redirect: request$2.redirect, - integrity: request$2.integrity, - keepalive: request$2.keepalive, - reloadNavigation: request$2.reloadNavigation, - historyNavigation: request$2.historyNavigation, - urlList: [...request$2.urlList] - }); - const initHasKey = Object.keys(init).length !== 0; - if (initHasKey) { - if (request$2.mode === "navigate") request$2.mode = "same-origin"; - request$2.reloadNavigation = false; - request$2.historyNavigation = false; - request$2.origin = "client"; - request$2.referrer = "client"; - request$2.referrerPolicy = ""; - request$2.url = request$2.urlList[request$2.urlList.length - 1]; - request$2.urlList = [request$2.url]; - } - if (init.referrer !== void 0) { - const referrer = init.referrer; - if (referrer === "") request$2.referrer = "no-referrer"; - else { - let parsedReferrer; - try { - parsedReferrer = new URL(referrer, baseUrl); - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); - } - if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin$4(parsedReferrer, this[kRealm$2].settingsObject.baseUrl)) request$2.referrer = "client"; - else request$2.referrer = parsedReferrer; - } - } - if (init.referrerPolicy !== void 0) request$2.referrerPolicy = init.referrerPolicy; - let mode; - if (init.mode !== void 0) mode = init.mode; - else mode = fallbackMode; - if (mode === "navigate") throw webidl$25.errors.exception({ - header: "Request constructor", - message: "invalid request mode navigate." - }); - if (mode != null) request$2.mode = mode; - if (init.credentials !== void 0) request$2.credentials = init.credentials; - if (init.cache !== void 0) request$2.cache = init.cache; - if (request$2.cache === "only-if-cached" && request$2.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); - if (init.redirect !== void 0) request$2.redirect = init.redirect; - if (init.integrity != null) request$2.integrity = String(init.integrity); - if (init.keepalive !== void 0) request$2.keepalive = Boolean(init.keepalive); - if (init.method !== void 0) { - let method = init.method; - if (!isValidHTTPToken$4(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); - if (forbiddenMethodsSet$2.has(method.toUpperCase())) throw new TypeError(`'${method}' HTTP method is unsupported.`); - method = normalizeMethodRecord[method] ?? normalizeMethod$1(method); - request$2.method = method; - } - if (init.signal !== void 0) signal = init.signal; - this[kState$5] = request$2; - const ac = new AbortController(); - this[kSignal$1] = ac.signal; - this[kSignal$1][kRealm$2] = this[kRealm$2]; - if (signal != null) { - if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); - if (signal.aborted) ac.abort(signal.reason); - else { - this[kAbortController$1] = ac; - const acRef = new WeakRef(ac); - const abort$2 = function() { - const ac$1 = acRef.deref(); - if (ac$1 !== void 0) ac$1.abort(this.reason); - }; - try { - if (typeof getMaxListeners$1 === "function" && getMaxListeners$1(signal) === defaultMaxListeners$1) setMaxListeners$1(100, signal); - else if (getEventListeners(signal, "abort").length >= defaultMaxListeners$1) setMaxListeners$1(100, signal); - } catch {} - util$24.addAbortListener(signal, abort$2); - requestFinalizer$1.register(ac, { - signal, - abort: abort$2 - }); - } - } - this[kHeaders$2] = new Headers$9(kConstruct$10); - this[kHeaders$2][kHeadersList$3] = request$2.headersList; - this[kHeaders$2][kGuard$2] = "request"; - this[kHeaders$2][kRealm$2] = this[kRealm$2]; - if (mode === "no-cors") { - if (!corsSafeListedMethodsSet$2.has(request$2.method)) throw new TypeError(`'${request$2.method} is unsupported in no-cors mode.`); - this[kHeaders$2][kGuard$2] = "request-no-cors"; - } - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = this[kHeaders$2][kHeadersList$3]; - const headers = init.headers !== void 0 ? init.headers : new HeadersList$4(headersList); - headersList.clear(); - if (headers instanceof HeadersList$4) { - for (const [key, val] of headers) headersList.append(key, val); - headersList.cookies = headers.cookies; - } else fillHeaders$1(this[kHeaders$2], headers); - } - const inputBody = input instanceof Request$7 ? input[kState$5].body : null; - if ((init.body != null || inputBody != null) && (request$2.method === "GET" || request$2.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); - let initBody = null; - if (init.body != null) { - const [extractedBody, contentType] = extractBody$6(init.body, request$2.keepalive); - initBody = extractedBody; - if (contentType && !this[kHeaders$2][kHeadersList$3].contains("content-type")) this[kHeaders$2].append("content-type", contentType); - } - const inputOrInitBody = initBody ?? inputBody; - if (inputOrInitBody != null && inputOrInitBody.source == null) { - if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); - if (request$2.mode !== "same-origin" && request$2.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); - request$2.useCORSPreflightFlag = true; - } - let finalBody = inputOrInitBody; - if (initBody == null && inputBody != null) { - if (util$24.isDisturbed(inputBody.stream) || inputBody.stream.locked) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); - if (!TransformStream$2) TransformStream$2 = __require("stream/web").TransformStream; - const identityTransform = new TransformStream$2(); - inputBody.stream.pipeThrough(identityTransform); - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - }; - } - this[kState$5].body = finalBody; - } - get method() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].method; - } - get url() { - webidl$25.brandCheck(this, Request$7); - return URLSerializer$7(this[kState$5].url); - } - get headers() { - webidl$25.brandCheck(this, Request$7); - return this[kHeaders$2]; - } - get destination() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].destination; - } - get referrer() { - webidl$25.brandCheck(this, Request$7); - if (this[kState$5].referrer === "no-referrer") return ""; - if (this[kState$5].referrer === "client") return "about:client"; - return this[kState$5].referrer.toString(); - } - get referrerPolicy() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].referrerPolicy; - } - get mode() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].mode; - } - get credentials() { - return this[kState$5].credentials; - } - get cache() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].cache; - } - get redirect() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].redirect; - } - get integrity() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].integrity; - } - get keepalive() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].keepalive; - } - get isReloadNavigation() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].reloadNavigation; - } - get isHistoryNavigation() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].historyNavigation; - } - get signal() { - webidl$25.brandCheck(this, Request$7); - return this[kSignal$1]; - } - get body() { - webidl$25.brandCheck(this, Request$7); - return this[kState$5].body ? this[kState$5].body.stream : null; - } - get bodyUsed() { - webidl$25.brandCheck(this, Request$7); - return !!this[kState$5].body && util$24.isDisturbed(this[kState$5].body.stream); - } - get duplex() { - webidl$25.brandCheck(this, Request$7); - return "half"; - } - clone() { - webidl$25.brandCheck(this, Request$7); - if (this.bodyUsed || this.body?.locked) throw new TypeError("unusable"); - const clonedRequest = cloneRequest$2(this[kState$5]); - const clonedRequestObject = new Request$7(kConstruct$10); - clonedRequestObject[kState$5] = clonedRequest; - clonedRequestObject[kRealm$2] = this[kRealm$2]; - clonedRequestObject[kHeaders$2] = new Headers$9(kConstruct$10); - clonedRequestObject[kHeaders$2][kHeadersList$3] = clonedRequest.headersList; - clonedRequestObject[kHeaders$2][kGuard$2] = this[kHeaders$2][kGuard$2]; - clonedRequestObject[kHeaders$2][kRealm$2] = this[kHeaders$2][kRealm$2]; - const ac = new AbortController(); - if (this.signal.aborted) ac.abort(this.signal.reason); - else util$24.addAbortListener(this.signal, () => { - ac.abort(this.signal.reason); - }); - clonedRequestObject[kSignal$1] = ac.signal; - return clonedRequestObject; - } - }; - mixinBody$3(Request$7); - function makeRequest$5(init) { - const request$2 = { - method: "GET", - localURLsOnly: false, - unsafeRequest: false, - body: null, - client: null, - reservedClient: null, - replacesClientId: "", - window: "client", - keepalive: false, - serviceWorkers: "all", - initiator: "", - destination: "", - priority: null, - origin: "client", - policyContainer: "client", - referrer: "client", - referrerPolicy: "", - mode: "no-cors", - useCORSPreflightFlag: false, - credentials: "same-origin", - useCredentials: false, - cache: "default", - redirect: "follow", - integrity: "", - cryptoGraphicsNonceMetadata: "", - parserMetadata: "", - reloadNavigation: false, - historyNavigation: false, - userActivation: false, - taintedOrigin: false, - redirectCount: 0, - responseTainting: "basic", - preventNoCacheCacheControlHeaderModification: false, - done: false, - timingAllowFailed: false, - ...init, - headersList: init.headersList ? new HeadersList$4(init.headersList) : new HeadersList$4() - }; - request$2.url = request$2.urlList[0]; - return request$2; - } - function cloneRequest$2(request$2) { - const newRequest = makeRequest$5({ - ...request$2, - body: null - }); - if (request$2.body != null) newRequest.body = cloneBody$3(request$2.body); - return newRequest; - } - Object.defineProperties(Request$7.prototype, { - method: kEnumerableProperty$17, - url: kEnumerableProperty$17, - headers: kEnumerableProperty$17, - redirect: kEnumerableProperty$17, - clone: kEnumerableProperty$17, - signal: kEnumerableProperty$17, - duplex: kEnumerableProperty$17, - destination: kEnumerableProperty$17, - body: kEnumerableProperty$17, - bodyUsed: kEnumerableProperty$17, - isHistoryNavigation: kEnumerableProperty$17, - isReloadNavigation: kEnumerableProperty$17, - keepalive: kEnumerableProperty$17, - integrity: kEnumerableProperty$17, - cache: kEnumerableProperty$17, - credentials: kEnumerableProperty$17, - attribute: kEnumerableProperty$17, - referrerPolicy: kEnumerableProperty$17, - referrer: kEnumerableProperty$17, - mode: kEnumerableProperty$17, - [Symbol.toStringTag]: { - value: "Request", - configurable: true - } - }); - webidl$25.converters.Request = webidl$25.interfaceConverter(Request$7); - webidl$25.converters.RequestInfo = function(V) { - if (typeof V === "string") return webidl$25.converters.USVString(V); - if (V instanceof Request$7) return webidl$25.converters.Request(V); - return webidl$25.converters.USVString(V); - }; - webidl$25.converters.AbortSignal = webidl$25.interfaceConverter(AbortSignal); - webidl$25.converters.RequestInit = webidl$25.dictionaryConverter([ - { - key: "method", - converter: webidl$25.converters.ByteString - }, - { - key: "headers", - converter: webidl$25.converters.HeadersInit - }, - { - key: "body", - converter: webidl$25.nullableConverter(webidl$25.converters.BodyInit) - }, - { - key: "referrer", - converter: webidl$25.converters.USVString - }, - { - key: "referrerPolicy", - converter: webidl$25.converters.DOMString, - allowedValues: referrerPolicy$2 - }, - { - key: "mode", - converter: webidl$25.converters.DOMString, - allowedValues: requestMode$2 - }, - { - key: "credentials", - converter: webidl$25.converters.DOMString, - allowedValues: requestCredentials$2 - }, - { - key: "cache", - converter: webidl$25.converters.DOMString, - allowedValues: requestCache$2 - }, - { - key: "redirect", - converter: webidl$25.converters.DOMString, - allowedValues: requestRedirect$2 - }, - { - key: "integrity", - converter: webidl$25.converters.DOMString - }, - { - key: "keepalive", - converter: webidl$25.converters.boolean - }, - { - key: "signal", - converter: webidl$25.nullableConverter((signal) => webidl$25.converters.AbortSignal(signal, { strict: false })) - }, - { - key: "window", - converter: webidl$25.converters.any - }, - { - key: "duplex", - converter: webidl$25.converters.DOMString, - allowedValues: requestDuplex$2 - } - ]); - module.exports = { - Request: Request$7, - makeRequest: makeRequest$5 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/index.js -var require_fetch$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/index.js"(exports, module) { - const { Response: Response$2, makeNetworkError: makeNetworkError$2, makeAppropriateNetworkError: makeAppropriateNetworkError$2, filterResponse: filterResponse$2, makeResponse: makeResponse$2 } = require_response$1(); - const { Headers: Headers$8 } = require_headers$1(); - const { Request: Request$6, makeRequest: makeRequest$4 } = require_request$2(); - const zlib$2 = __require("zlib"); - const { bytesMatch: bytesMatch$2, makePolicyContainer: makePolicyContainer$2, clonePolicyContainer: clonePolicyContainer$2, requestBadPort: requestBadPort$2, TAOCheck: TAOCheck$2, appendRequestOriginHeader: appendRequestOriginHeader$2, responseLocationURL: responseLocationURL$2, requestCurrentURL: requestCurrentURL$2, setRequestReferrerPolicyOnRedirect: setRequestReferrerPolicyOnRedirect$2, tryUpgradeRequestToAPotentiallyTrustworthyURL: tryUpgradeRequestToAPotentiallyTrustworthyURL$2, createOpaqueTimingInfo: createOpaqueTimingInfo$2, appendFetchMetadata: appendFetchMetadata$2, corsCheck: corsCheck$2, crossOriginResourcePolicyCheck: crossOriginResourcePolicyCheck$2, determineRequestsReferrer: determineRequestsReferrer$2, coarsenedSharedCurrentTime: coarsenedSharedCurrentTime$2, createDeferredPromise: createDeferredPromise$6, isBlobLike: isBlobLike$3, sameOrigin: sameOrigin$3, isCancelled: isCancelled$3, isAborted: isAborted$3, isErrorLike: isErrorLike$3, fullyReadBody: fullyReadBody$3, readableStreamClose: readableStreamClose$3, isomorphicEncode: isomorphicEncode$3, urlIsLocal: urlIsLocal$2, urlIsHttpHttpsScheme: urlIsHttpHttpsScheme$4, urlHasHttpsScheme: urlHasHttpsScheme$2 } = require_util$11(); - const { kState: kState$4, kHeaders: kHeaders$1, kGuard: kGuard$1, kRealm: kRealm$1 } = require_symbols$4(); - const assert$33 = __require("assert"); - const { safelyExtractBody: safelyExtractBody$2 } = require_body$1(); - const { redirectStatusSet: redirectStatusSet$4, nullBodyStatus: nullBodyStatus$3, safeMethodsSet: safeMethodsSet$2, requestBodyHeader: requestBodyHeader$2, subresourceSet: subresourceSet$2, DOMException: DOMException$3 } = require_constants$9(); - const { kHeadersList: kHeadersList$2 } = require_symbols$5(); - const EE$3 = __require("events"); - const { Readable: Readable$5, pipeline: pipeline$4 } = __require("stream"); - const { addAbortListener: addAbortListener$3, isErrored: isErrored$2, isReadable: isReadable$1, nodeMajor: nodeMajor$1, nodeMinor: nodeMinor$1 } = require_util$12(); - const { dataURLProcessor: dataURLProcessor$2, serializeAMimeType: serializeAMimeType$5 } = require_dataURL(); - const { TransformStream: TransformStream$1 } = __require("stream/web"); - const { getGlobalDispatcher: getGlobalDispatcher$8 } = require_global$2(); - const { webidl: webidl$24 } = require_webidl$1(); - const { STATUS_CODES: STATUS_CODES$2 } = __require("http"); - const GET_OR_HEAD$1 = ["GET", "HEAD"]; - /** @type {import('buffer').resolveObjectURL} */ - let resolveObjectURL$1; - let ReadableStream$1 = globalThis.ReadableStream; - var Fetch$1 = class extends EE$3 { - constructor(dispatcher) { - super(); - this.dispatcher = dispatcher; - this.connection = null; - this.dump = false; - this.state = "ongoing"; - this.setMaxListeners(21); - } - terminate(reason) { - if (this.state !== "ongoing") return; - this.state = "terminated"; - this.connection?.destroy(reason); - this.emit("terminated", reason); - } - abort(error$1) { - if (this.state !== "ongoing") return; - this.state = "aborted"; - if (!error$1) error$1 = new DOMException$3("The operation was aborted.", "AbortError"); - this.serializedAbortReason = error$1; - this.connection?.destroy(error$1); - this.emit("terminated", error$1); - } - }; - function fetch$1(input, init = {}) { - webidl$24.argumentLengthCheck(arguments, 1, { header: "globalThis.fetch" }); - const p = createDeferredPromise$6(); - let requestObject; - try { - requestObject = new Request$6(input, init); - } catch (e) { - p.reject(e); - return p.promise; - } - const request$2 = requestObject[kState$4]; - if (requestObject.signal.aborted) { - abortFetch$1(p, request$2, null, requestObject.signal.reason); - return p.promise; - } - const globalObject = request$2.client.globalObject; - if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request$2.serviceWorkers = "none"; - let responseObject = null; - const relevantRealm$1 = null; - let locallyAborted = false; - let controller = null; - addAbortListener$3(requestObject.signal, () => { - locallyAborted = true; - assert$33(controller != null); - controller.abort(requestObject.signal.reason); - abortFetch$1(p, request$2, responseObject, requestObject.signal.reason); - }); - const handleFetchDone$1 = (response) => finalizeAndReportTiming$1(response, "fetch"); - const processResponse = (response) => { - if (locallyAborted) return Promise.resolve(); - if (response.aborted) { - abortFetch$1(p, request$2, responseObject, controller.serializedAbortReason); - return Promise.resolve(); - } - if (response.type === "error") { - p.reject(Object.assign(new TypeError("fetch failed"), { cause: response.error })); - return Promise.resolve(); - } - responseObject = new Response$2(); - responseObject[kState$4] = response; - responseObject[kRealm$1] = relevantRealm$1; - responseObject[kHeaders$1][kHeadersList$2] = response.headersList; - responseObject[kHeaders$1][kGuard$1] = "immutable"; - responseObject[kHeaders$1][kRealm$1] = relevantRealm$1; - p.resolve(responseObject); - }; - controller = fetching$6({ - request: request$2, - processResponseEndOfBody: handleFetchDone$1, - processResponse, - dispatcher: init.dispatcher ?? getGlobalDispatcher$8() - }); - return p.promise; - } - function finalizeAndReportTiming$1(response, initiatorType = "other") { - if (response.type === "error" && response.aborted) return; - if (!response.urlList?.length) return; - const originalURL = response.urlList[0]; - let timingInfo = response.timingInfo; - let cacheState = response.cacheState; - if (!urlIsHttpHttpsScheme$4(originalURL)) return; - if (timingInfo === null) return; - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo$2({ startTime: timingInfo.startTime }); - cacheState = ""; - } - timingInfo.endTime = coarsenedSharedCurrentTime$2(); - response.timingInfo = timingInfo; - markResourceTiming$1(timingInfo, originalURL, initiatorType, globalThis, cacheState); - } - function markResourceTiming$1(timingInfo, originalURL, initiatorType, globalThis$1, cacheState) { - if (nodeMajor$1 > 18 || nodeMajor$1 === 18 && nodeMinor$1 >= 2) performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis$1, cacheState); - } - function abortFetch$1(p, request$2, responseObject, error$1) { - if (!error$1) error$1 = new DOMException$3("The operation was aborted.", "AbortError"); - p.reject(error$1); - if (request$2.body != null && isReadable$1(request$2.body?.stream)) request$2.body.stream.cancel(error$1).catch((err) => { - if (err.code === "ERR_INVALID_STATE") return; - throw err; - }); - if (responseObject == null) return; - const response = responseObject[kState$4]; - if (response.body != null && isReadable$1(response.body?.stream)) response.body.stream.cancel(error$1).catch((err) => { - if (err.code === "ERR_INVALID_STATE") return; - throw err; - }); - } - function fetching$6({ request: request$2, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher }) { - let taskDestination = null; - let crossOriginIsolatedCapability = false; - if (request$2.client != null) { - taskDestination = request$2.client.globalObject; - crossOriginIsolatedCapability = request$2.client.crossOriginIsolatedCapability; - } - const currenTime = coarsenedSharedCurrentTime$2(crossOriginIsolatedCapability); - const timingInfo = createOpaqueTimingInfo$2({ startTime: currenTime }); - const fetchParams = { - controller: new Fetch$1(dispatcher), - request: request$2, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - }; - assert$33(!request$2.body || request$2.body.stream); - if (request$2.window === "client") request$2.window = request$2.client?.globalObject?.constructor?.name === "Window" ? request$2.client : "no-window"; - if (request$2.origin === "client") request$2.origin = request$2.client?.origin; - if (request$2.policyContainer === "client") if (request$2.client != null) request$2.policyContainer = clonePolicyContainer$2(request$2.client.policyContainer); - else request$2.policyContainer = makePolicyContainer$2(); - if (!request$2.headersList.contains("accept")) { - const value = "*/*"; - request$2.headersList.append("accept", value); - } - if (!request$2.headersList.contains("accept-language")) request$2.headersList.append("accept-language", "*"); - if (request$2.priority === null) {} - if (subresourceSet$2.has(request$2.destination)) {} - mainFetch$1(fetchParams).catch((err) => { - fetchParams.controller.terminate(err); - }); - return fetchParams.controller; - } - async function mainFetch$1(fetchParams, recursive = false) { - const request$2 = fetchParams.request; - let response = null; - if (request$2.localURLsOnly && !urlIsLocal$2(requestCurrentURL$2(request$2))) response = makeNetworkError$2("local URLs only"); - tryUpgradeRequestToAPotentiallyTrustworthyURL$2(request$2); - if (requestBadPort$2(request$2) === "blocked") response = makeNetworkError$2("bad port"); - if (request$2.referrerPolicy === "") request$2.referrerPolicy = request$2.policyContainer.referrerPolicy; - if (request$2.referrer !== "no-referrer") request$2.referrer = determineRequestsReferrer$2(request$2); - if (response === null) response = await (async () => { - const currentURL = requestCurrentURL$2(request$2); - if (sameOrigin$3(currentURL, request$2.url) && request$2.responseTainting === "basic" || currentURL.protocol === "data:" || request$2.mode === "navigate" || request$2.mode === "websocket") { - request$2.responseTainting = "basic"; - return await schemeFetch$1(fetchParams); - } - if (request$2.mode === "same-origin") return makeNetworkError$2("request mode cannot be \"same-origin\""); - if (request$2.mode === "no-cors") { - if (request$2.redirect !== "follow") return makeNetworkError$2("redirect mode cannot be \"follow\" for \"no-cors\" request"); - request$2.responseTainting = "opaque"; - return await schemeFetch$1(fetchParams); - } - if (!urlIsHttpHttpsScheme$4(requestCurrentURL$2(request$2))) return makeNetworkError$2("URL scheme must be a HTTP(S) scheme"); - request$2.responseTainting = "cors"; - return await httpFetch$1(fetchParams); - })(); - if (recursive) return response; - if (response.status !== 0 && !response.internalResponse) { - if (request$2.responseTainting === "cors") {} - if (request$2.responseTainting === "basic") response = filterResponse$2(response, "basic"); - else if (request$2.responseTainting === "cors") response = filterResponse$2(response, "cors"); - else if (request$2.responseTainting === "opaque") response = filterResponse$2(response, "opaque"); - else assert$33(false); - } - let internalResponse = response.status === 0 ? response : response.internalResponse; - if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request$2.urlList); - if (!request$2.timingAllowFailed) response.timingAllowPassed = true; - if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request$2.headers.contains("range")) response = internalResponse = makeNetworkError$2(); - if (response.status !== 0 && (request$2.method === "HEAD" || request$2.method === "CONNECT" || nullBodyStatus$3.includes(internalResponse.status))) { - internalResponse.body = null; - fetchParams.controller.dump = true; - } - if (request$2.integrity) { - const processBodyError = (reason) => fetchFinale$1(fetchParams, makeNetworkError$2(reason)); - if (request$2.responseTainting === "opaque" || response.body == null) { - processBodyError(response.error); - return; - } - const processBody = (bytes) => { - if (!bytesMatch$2(bytes, request$2.integrity)) { - processBodyError("integrity mismatch"); - return; - } - response.body = safelyExtractBody$2(bytes)[0]; - fetchFinale$1(fetchParams, response); - }; - await fullyReadBody$3(response.body, processBody, processBodyError); - } else fetchFinale$1(fetchParams, response); - } - function schemeFetch$1(fetchParams) { - if (isCancelled$3(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError$2(fetchParams)); - const { request: request$2 } = fetchParams; - const { protocol: scheme } = requestCurrentURL$2(request$2); - switch (scheme) { - case "about:": return Promise.resolve(makeNetworkError$2("about scheme is not supported")); - case "blob:": { - if (!resolveObjectURL$1) resolveObjectURL$1 = __require("buffer").resolveObjectURL; - const blobURLEntry = requestCurrentURL$2(request$2); - if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError$2("NetworkError when attempting to fetch resource.")); - const blobURLEntryObject = resolveObjectURL$1(blobURLEntry.toString()); - if (request$2.method !== "GET" || !isBlobLike$3(blobURLEntryObject)) return Promise.resolve(makeNetworkError$2("invalid method")); - const bodyWithType = safelyExtractBody$2(blobURLEntryObject); - const body = bodyWithType[0]; - const length = isomorphicEncode$3(`${body.length}`); - const type = bodyWithType[1] ?? ""; - const response = makeResponse$2({ - statusText: "OK", - headersList: [["content-length", { - name: "Content-Length", - value: length - }], ["content-type", { - name: "Content-Type", - value: type - }]] - }); - response.body = body; - return Promise.resolve(response); - } - case "data:": { - const currentURL = requestCurrentURL$2(request$2); - const dataURLStruct = dataURLProcessor$2(currentURL); - if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError$2("failed to fetch the data URL")); - const mimeType = serializeAMimeType$5(dataURLStruct.mimeType); - return Promise.resolve(makeResponse$2({ - statusText: "OK", - headersList: [["content-type", { - name: "Content-Type", - value: mimeType - }]], - body: safelyExtractBody$2(dataURLStruct.body)[0] - })); - } - case "file:": return Promise.resolve(makeNetworkError$2("not implemented... yet...")); - case "http:": - case "https:": return httpFetch$1(fetchParams).catch((err) => makeNetworkError$2(err)); - default: return Promise.resolve(makeNetworkError$2("unknown scheme")); - } - } - function finalizeResponse$1(fetchParams, response) { - fetchParams.request.done = true; - if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); - } - function fetchFinale$1(fetchParams, response) { - if (response.type === "error") { - response.urlList = [fetchParams.request.urlList[0]]; - response.timingInfo = createOpaqueTimingInfo$2({ startTime: fetchParams.timingInfo.startTime }); - } - const processResponseEndOfBody = () => { - fetchParams.request.done = true; - if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); - }; - if (fetchParams.processResponse != null) queueMicrotask(() => fetchParams.processResponse(response)); - if (response.body == null) processResponseEndOfBody(); - else { - const identityTransformAlgorithm = (chunk, controller) => { - controller.enqueue(chunk); - }; - const transformStream = new TransformStream$1({ - start() {}, - transform: identityTransformAlgorithm, - flush: processResponseEndOfBody - }, { size() { - return 1; - } }, { size() { - return 1; - } }); - response.body = { stream: response.body.stream.pipeThrough(transformStream) }; - } - if (fetchParams.processResponseConsumeBody != null) { - const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes); - const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure); - if (response.body == null) queueMicrotask(() => processBody(null)); - else return fullyReadBody$3(response.body, processBody, processBodyError); - return Promise.resolve(); - } - } - async function httpFetch$1(fetchParams) { - const request$2 = fetchParams.request; - let response = null; - let actualResponse = null; - const timingInfo = fetchParams.timingInfo; - if (request$2.serviceWorkers === "all") {} - if (response === null) { - if (request$2.redirect === "follow") request$2.serviceWorkers = "none"; - actualResponse = response = await httpNetworkOrCacheFetch$1(fetchParams); - if (request$2.responseTainting === "cors" && corsCheck$2(request$2, response) === "failure") return makeNetworkError$2("cors failure"); - if (TAOCheck$2(request$2, response) === "failure") request$2.timingAllowFailed = true; - } - if ((request$2.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck$2(request$2.origin, request$2.client, request$2.destination, actualResponse) === "blocked") return makeNetworkError$2("blocked"); - if (redirectStatusSet$4.has(actualResponse.status)) { - if (request$2.redirect !== "manual") fetchParams.controller.connection.destroy(); - if (request$2.redirect === "error") response = makeNetworkError$2("unexpected redirect"); - else if (request$2.redirect === "manual") response = actualResponse; - else if (request$2.redirect === "follow") response = await httpRedirectFetch$1(fetchParams, response); - else assert$33(false); - } - response.timingInfo = timingInfo; - return response; - } - function httpRedirectFetch$1(fetchParams, response) { - const request$2 = fetchParams.request; - const actualResponse = response.internalResponse ? response.internalResponse : response; - let locationURL; - try { - locationURL = responseLocationURL$2(actualResponse, requestCurrentURL$2(request$2).hash); - if (locationURL == null) return response; - } catch (err) { - return Promise.resolve(makeNetworkError$2(err)); - } - if (!urlIsHttpHttpsScheme$4(locationURL)) return Promise.resolve(makeNetworkError$2("URL scheme must be a HTTP(S) scheme")); - if (request$2.redirectCount === 20) return Promise.resolve(makeNetworkError$2("redirect count exceeded")); - request$2.redirectCount += 1; - if (request$2.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin$3(request$2, locationURL)) return Promise.resolve(makeNetworkError$2("cross origin not allowed for request mode \"cors\"")); - if (request$2.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError$2("URL cannot contain credentials for request mode \"cors\"")); - if (actualResponse.status !== 303 && request$2.body != null && request$2.body.source == null) return Promise.resolve(makeNetworkError$2()); - if ([301, 302].includes(actualResponse.status) && request$2.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD$1.includes(request$2.method)) { - request$2.method = "GET"; - request$2.body = null; - for (const headerName of requestBodyHeader$2) request$2.headersList.delete(headerName); - } - if (!sameOrigin$3(requestCurrentURL$2(request$2), locationURL)) { - request$2.headersList.delete("authorization"); - request$2.headersList.delete("proxy-authorization", true); - request$2.headersList.delete("cookie"); - request$2.headersList.delete("host"); - } - if (request$2.body != null) { - assert$33(request$2.body.source != null); - request$2.body = safelyExtractBody$2(request$2.body.source)[0]; - } - const timingInfo = fetchParams.timingInfo; - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime$2(fetchParams.crossOriginIsolatedCapability); - if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; - request$2.urlList.push(locationURL); - setRequestReferrerPolicyOnRedirect$2(request$2, actualResponse); - return mainFetch$1(fetchParams, true); - } - async function httpNetworkOrCacheFetch$1(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { - const request$2 = fetchParams.request; - let httpFetchParams = null; - let httpRequest = null; - let response = null; - const httpCache = null; - const revalidatingFlag = false; - if (request$2.window === "no-window" && request$2.redirect === "error") { - httpFetchParams = fetchParams; - httpRequest = request$2; - } else { - httpRequest = makeRequest$4(request$2); - httpFetchParams = { ...fetchParams }; - httpFetchParams.request = httpRequest; - } - const includeCredentials = request$2.credentials === "include" || request$2.credentials === "same-origin" && request$2.responseTainting === "basic"; - const contentLength = httpRequest.body ? httpRequest.body.length : null; - let contentLengthHeaderValue = null; - if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; - if (contentLength != null) contentLengthHeaderValue = isomorphicEncode$3(`${contentLength}`); - if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue); - if (contentLength != null && httpRequest.keepalive) {} - if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", isomorphicEncode$3(httpRequest.referrer.href)); - appendRequestOriginHeader$2(httpRequest); - appendFetchMetadata$2(httpRequest); - if (!httpRequest.headersList.contains("user-agent")) httpRequest.headersList.append("user-agent", typeof esbuildDetection === "undefined" ? "undici" : "node"); - if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since") || httpRequest.headersList.contains("if-none-match") || httpRequest.headersList.contains("if-unmodified-since") || httpRequest.headersList.contains("if-match") || httpRequest.headersList.contains("if-range"))) httpRequest.cache = "no-store"; - if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control")) httpRequest.headersList.append("cache-control", "max-age=0"); - if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { - if (!httpRequest.headersList.contains("pragma")) httpRequest.headersList.append("pragma", "no-cache"); - if (!httpRequest.headersList.contains("cache-control")) httpRequest.headersList.append("cache-control", "no-cache"); - } - if (httpRequest.headersList.contains("range")) httpRequest.headersList.append("accept-encoding", "identity"); - if (!httpRequest.headersList.contains("accept-encoding")) if (urlHasHttpsScheme$2(requestCurrentURL$2(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate"); - else httpRequest.headersList.append("accept-encoding", "gzip, deflate"); - httpRequest.headersList.delete("host"); - if (includeCredentials) {} - if (httpCache == null) httpRequest.cache = "no-store"; - if (httpRequest.mode !== "no-store" && httpRequest.mode !== "reload") {} - if (response == null) { - if (httpRequest.mode === "only-if-cached") return makeNetworkError$2("only if cached"); - const forwardResponse = await httpNetworkFetch$1(httpFetchParams, includeCredentials, isNewConnectionFetch); - if (!safeMethodsSet$2.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} - if (revalidatingFlag && forwardResponse.status === 304) {} - if (response == null) response = forwardResponse; - } - response.urlList = [...httpRequest.urlList]; - if (httpRequest.headersList.contains("range")) response.rangeRequested = true; - response.requestIncludesCredentials = includeCredentials; - if (response.status === 407) { - if (request$2.window === "no-window") return makeNetworkError$2(); - if (isCancelled$3(fetchParams)) return makeAppropriateNetworkError$2(fetchParams); - return makeNetworkError$2("proxy authentication required"); - } - if (response.status === 421 && !isNewConnectionFetch && (request$2.body == null || request$2.body.source != null)) { - if (isCancelled$3(fetchParams)) return makeAppropriateNetworkError$2(fetchParams); - fetchParams.controller.connection.destroy(); - response = await httpNetworkOrCacheFetch$1(fetchParams, isAuthenticationFetch, true); - } - if (isAuthenticationFetch) {} - return response; - } - async function httpNetworkFetch$1(fetchParams, includeCredentials = false, forceNewConnection = false) { - assert$33(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy(err) { - if (!this.destroyed) { - this.destroyed = true; - this.abort?.(err ?? new DOMException$3("The operation was aborted.", "AbortError")); - } - } - }; - const request$2 = fetchParams.request; - let response = null; - const timingInfo = fetchParams.timingInfo; - const httpCache = null; - if (httpCache == null) request$2.cache = "no-store"; - const newConnection = forceNewConnection ? "yes" : "no"; - if (request$2.mode === "websocket") {} - let requestBody = null; - if (request$2.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); - else if (request$2.body != null) { - const processBodyChunk = async function* (bytes) { - if (isCancelled$3(fetchParams)) return; - yield bytes; - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); - }; - const processEndOfBody = () => { - if (isCancelled$3(fetchParams)) return; - if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); - }; - const processBodyError = (e) => { - if (isCancelled$3(fetchParams)) return; - if (e.name === "AbortError") fetchParams.controller.abort(); - else fetchParams.controller.terminate(e); - }; - requestBody = async function* () { - try { - for await (const bytes of request$2.body.stream) yield* processBodyChunk(bytes); - processEndOfBody(); - } catch (err) { - processBodyError(err); - } - }(); - } - try { - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); - if (socket) response = makeResponse$2({ - status, - statusText, - headersList, - socket - }); - else { - const iterator = body[Symbol.asyncIterator](); - fetchParams.controller.next = () => iterator.next(); - response = makeResponse$2({ - status, - statusText, - headersList - }); - } - } catch (err) { - if (err.name === "AbortError") { - fetchParams.controller.connection.destroy(); - return makeAppropriateNetworkError$2(fetchParams, err); - } - return makeNetworkError$2(err); - } - const pullAlgorithm = () => { - fetchParams.controller.resume(); - }; - const cancelAlgorithm = (reason) => { - fetchParams.controller.abort(reason); - }; - if (!ReadableStream$1) ReadableStream$1 = __require("stream/web").ReadableStream; - const stream$5 = new ReadableStream$1({ - async start(controller) { - fetchParams.controller.controller = controller; - }, - async pull(controller) { - await pullAlgorithm(controller); - }, - async cancel(reason) { - await cancelAlgorithm(reason); - } - }, { - highWaterMark: 0, - size() { - return 1; - } - }); - response.body = { stream: stream$5 }; - fetchParams.controller.on("terminated", onAborted); - fetchParams.controller.resume = async () => { - while (true) { - let bytes; - let isFailure; - try { - const { done, value } = await fetchParams.controller.next(); - if (isAborted$3(fetchParams)) break; - bytes = done ? void 0 : value; - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; - else { - bytes = err; - isFailure = true; - } - } - if (bytes === void 0) { - readableStreamClose$3(fetchParams.controller.controller); - finalizeResponse$1(fetchParams, response); - return; - } - timingInfo.decodedBodySize += bytes?.byteLength ?? 0; - if (isFailure) { - fetchParams.controller.terminate(bytes); - return; - } - fetchParams.controller.controller.enqueue(new Uint8Array(bytes)); - if (isErrored$2(stream$5)) { - fetchParams.controller.terminate(); - return; - } - if (!fetchParams.controller.controller.desiredSize) return; - } - }; - function onAborted(reason) { - if (isAborted$3(fetchParams)) { - response.aborted = true; - if (isReadable$1(stream$5)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); - } else if (isReadable$1(stream$5)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike$3(reason) ? reason : void 0 })); - fetchParams.controller.connection.destroy(); - } - return response; - async function dispatch({ body }) { - const url = requestCurrentURL$2(request$2); - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher; - return new Promise((resolve, reject) => agent.dispatch({ - path: url.pathname + url.search, - origin: url.origin, - method: request$2.method, - body: fetchParams.controller.dispatcher.isMockActive ? request$2.body && (request$2.body.source || request$2.body.stream) : body, - headers: request$2.headersList.entries, - maxRedirections: 0, - upgrade: request$2.mode === "websocket" ? "websocket" : void 0 - }, { - body: null, - abort: null, - onConnect(abort$2) { - const { connection } = fetchParams.controller; - if (connection.destroyed) abort$2(new DOMException$3("The operation was aborted.", "AbortError")); - else { - fetchParams.controller.on("terminated", abort$2); - this.abort = connection.abort = abort$2; - } - }, - onHeaders(status, headersList, resume$2, statusText) { - if (status < 200) return; - let codings = []; - let location = ""; - const headers = new Headers$8(); - if (Array.isArray(headersList)) for (let n = 0; n < headersList.length; n += 2) { - const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); - if (key.toLowerCase() === "content-encoding") codings = val.toLowerCase().split(",").map((x) => x.trim()); - else if (key.toLowerCase() === "location") location = val; - headers[kHeadersList$2].append(key, val); - } - else { - const keys = Object.keys(headersList); - for (const key of keys) { - const val = headersList[key]; - if (key.toLowerCase() === "content-encoding") codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); - else if (key.toLowerCase() === "location") location = val; - headers[kHeadersList$2].append(key, val); - } - } - this.body = new Readable$5({ read: resume$2 }); - const decoders$1 = []; - const willFollow = request$2.redirect === "follow" && location && redirectStatusSet$4.has(status); - if (request$2.method !== "HEAD" && request$2.method !== "CONNECT" && !nullBodyStatus$3.includes(status) && !willFollow) for (const coding of codings) if (coding === "x-gzip" || coding === "gzip") decoders$1.push(zlib$2.createGunzip({ - flush: zlib$2.constants.Z_SYNC_FLUSH, - finishFlush: zlib$2.constants.Z_SYNC_FLUSH - })); - else if (coding === "deflate") decoders$1.push(zlib$2.createInflate()); - else if (coding === "br") decoders$1.push(zlib$2.createBrotliDecompress()); - else { - decoders$1.length = 0; - break; - } - resolve({ - status, - statusText, - headersList: headers[kHeadersList$2], - body: decoders$1.length ? pipeline$4(this.body, ...decoders$1, () => {}) : this.body.on("error", () => {}) - }); - return true; - }, - onData(chunk) { - if (fetchParams.controller.dump) return; - const bytes = chunk; - timingInfo.encodedBodySize += bytes.byteLength; - return this.body.push(bytes); - }, - onComplete() { - if (this.abort) fetchParams.controller.off("terminated", this.abort); - fetchParams.controller.ended = true; - this.body.push(null); - }, - onError(error$1) { - if (this.abort) fetchParams.controller.off("terminated", this.abort); - this.body?.destroy(error$1); - fetchParams.controller.terminate(error$1); - reject(error$1); - }, - onUpgrade(status, headersList, socket) { - if (status !== 101) return; - const headers = new Headers$8(); - for (let n = 0; n < headersList.length; n += 2) { - const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); - headers[kHeadersList$2].append(key, val); - } - resolve({ - status, - statusText: STATUS_CODES$2[status], - headersList: headers[kHeadersList$2], - socket - }); - return true; - } - })); - } - } - module.exports = { - fetch: fetch$1, - Fetch: Fetch$1, - fetching: fetching$6, - finalizeAndReportTiming: finalizeAndReportTiming$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js -var require_symbols$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js"(exports, module) { - module.exports = { - kState: Symbol("FileReader state"), - kResult: Symbol("FileReader result"), - kError: Symbol("FileReader error"), - kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), - kEvents: Symbol("FileReader events"), - kAborted: Symbol("FileReader aborted") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js -var require_progressevent = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js"(exports, module) { - const { webidl: webidl$23 } = require_webidl$1(); - const kState$3 = Symbol("ProgressEvent state"); - /** - * @see https://xhr.spec.whatwg.org/#progressevent - */ - var ProgressEvent$1 = class ProgressEvent$1 extends Event { - constructor(type, eventInitDict = {}) { - type = webidl$23.converters.DOMString(type); - eventInitDict = webidl$23.converters.ProgressEventInit(eventInitDict ?? {}); - super(type, eventInitDict); - this[kState$3] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - }; - } - get lengthComputable() { - webidl$23.brandCheck(this, ProgressEvent$1); - return this[kState$3].lengthComputable; - } - get loaded() { - webidl$23.brandCheck(this, ProgressEvent$1); - return this[kState$3].loaded; - } - get total() { - webidl$23.brandCheck(this, ProgressEvent$1); - return this[kState$3].total; - } - }; - webidl$23.converters.ProgressEventInit = webidl$23.dictionaryConverter([ - { - key: "lengthComputable", - converter: webidl$23.converters.boolean, - defaultValue: false - }, - { - key: "loaded", - converter: webidl$23.converters["unsigned long long"], - defaultValue: 0 - }, - { - key: "total", - converter: webidl$23.converters["unsigned long long"], - defaultValue: 0 - }, - { - key: "bubbles", - converter: webidl$23.converters.boolean, - defaultValue: false - }, - { - key: "cancelable", - converter: webidl$23.converters.boolean, - defaultValue: false - }, - { - key: "composed", - converter: webidl$23.converters.boolean, - defaultValue: false - } - ]); - module.exports = { ProgressEvent: ProgressEvent$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js -var require_encoding = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js"(exports, module) { - /** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ - function getEncoding$1(label) { - if (!label) return "failure"; - switch (label.trim().toLowerCase()) { - case "unicode-1-1-utf-8": - case "unicode11utf8": - case "unicode20utf8": - case "utf-8": - case "utf8": - case "x-unicode20utf8": return "UTF-8"; - case "866": - case "cp866": - case "csibm866": - case "ibm866": return "IBM866"; - case "csisolatin2": - case "iso-8859-2": - case "iso-ir-101": - case "iso8859-2": - case "iso88592": - case "iso_8859-2": - case "iso_8859-2:1987": - case "l2": - case "latin2": return "ISO-8859-2"; - case "csisolatin3": - case "iso-8859-3": - case "iso-ir-109": - case "iso8859-3": - case "iso88593": - case "iso_8859-3": - case "iso_8859-3:1988": - case "l3": - case "latin3": return "ISO-8859-3"; - case "csisolatin4": - case "iso-8859-4": - case "iso-ir-110": - case "iso8859-4": - case "iso88594": - case "iso_8859-4": - case "iso_8859-4:1988": - case "l4": - case "latin4": return "ISO-8859-4"; - case "csisolatincyrillic": - case "cyrillic": - case "iso-8859-5": - case "iso-ir-144": - case "iso8859-5": - case "iso88595": - case "iso_8859-5": - case "iso_8859-5:1988": return "ISO-8859-5"; - case "arabic": - case "asmo-708": - case "csiso88596e": - case "csiso88596i": - case "csisolatinarabic": - case "ecma-114": - case "iso-8859-6": - case "iso-8859-6-e": - case "iso-8859-6-i": - case "iso-ir-127": - case "iso8859-6": - case "iso88596": - case "iso_8859-6": - case "iso_8859-6:1987": return "ISO-8859-6"; - case "csisolatingreek": - case "ecma-118": - case "elot_928": - case "greek": - case "greek8": - case "iso-8859-7": - case "iso-ir-126": - case "iso8859-7": - case "iso88597": - case "iso_8859-7": - case "iso_8859-7:1987": - case "sun_eu_greek": return "ISO-8859-7"; - case "csiso88598e": - case "csisolatinhebrew": - case "hebrew": - case "iso-8859-8": - case "iso-8859-8-e": - case "iso-ir-138": - case "iso8859-8": - case "iso88598": - case "iso_8859-8": - case "iso_8859-8:1988": - case "visual": return "ISO-8859-8"; - case "csiso88598i": - case "iso-8859-8-i": - case "logical": return "ISO-8859-8-I"; - case "csisolatin6": - case "iso-8859-10": - case "iso-ir-157": - case "iso8859-10": - case "iso885910": - case "l6": - case "latin6": return "ISO-8859-10"; - case "iso-8859-13": - case "iso8859-13": - case "iso885913": return "ISO-8859-13"; - case "iso-8859-14": - case "iso8859-14": - case "iso885914": return "ISO-8859-14"; - case "csisolatin9": - case "iso-8859-15": - case "iso8859-15": - case "iso885915": - case "iso_8859-15": - case "l9": return "ISO-8859-15"; - case "iso-8859-16": return "ISO-8859-16"; - case "cskoi8r": - case "koi": - case "koi8": - case "koi8-r": - case "koi8_r": return "KOI8-R"; - case "koi8-ru": - case "koi8-u": return "KOI8-U"; - case "csmacintosh": - case "mac": - case "macintosh": - case "x-mac-roman": return "macintosh"; - case "iso-8859-11": - case "iso8859-11": - case "iso885911": - case "tis-620": - case "windows-874": return "windows-874"; - case "cp1250": - case "windows-1250": - case "x-cp1250": return "windows-1250"; - case "cp1251": - case "windows-1251": - case "x-cp1251": return "windows-1251"; - case "ansi_x3.4-1968": - case "ascii": - case "cp1252": - case "cp819": - case "csisolatin1": - case "ibm819": - case "iso-8859-1": - case "iso-ir-100": - case "iso8859-1": - case "iso88591": - case "iso_8859-1": - case "iso_8859-1:1987": - case "l1": - case "latin1": - case "us-ascii": - case "windows-1252": - case "x-cp1252": return "windows-1252"; - case "cp1253": - case "windows-1253": - case "x-cp1253": return "windows-1253"; - case "cp1254": - case "csisolatin5": - case "iso-8859-9": - case "iso-ir-148": - case "iso8859-9": - case "iso88599": - case "iso_8859-9": - case "iso_8859-9:1989": - case "l5": - case "latin5": - case "windows-1254": - case "x-cp1254": return "windows-1254"; - case "cp1255": - case "windows-1255": - case "x-cp1255": return "windows-1255"; - case "cp1256": - case "windows-1256": - case "x-cp1256": return "windows-1256"; - case "cp1257": - case "windows-1257": - case "x-cp1257": return "windows-1257"; - case "cp1258": - case "windows-1258": - case "x-cp1258": return "windows-1258"; - case "x-mac-cyrillic": - case "x-mac-ukrainian": return "x-mac-cyrillic"; - case "chinese": - case "csgb2312": - case "csiso58gb231280": - case "gb2312": - case "gb_2312": - case "gb_2312-80": - case "gbk": - case "iso-ir-58": - case "x-gbk": return "GBK"; - case "gb18030": return "gb18030"; - case "big5": - case "big5-hkscs": - case "cn-big5": - case "csbig5": - case "x-x-big5": return "Big5"; - case "cseucpkdfmtjapanese": - case "euc-jp": - case "x-euc-jp": return "EUC-JP"; - case "csiso2022jp": - case "iso-2022-jp": return "ISO-2022-JP"; - case "csshiftjis": - case "ms932": - case "ms_kanji": - case "shift-jis": - case "shift_jis": - case "sjis": - case "windows-31j": - case "x-sjis": return "Shift_JIS"; - case "cseuckr": - case "csksc56011987": - case "euc-kr": - case "iso-ir-149": - case "korean": - case "ks_c_5601-1987": - case "ks_c_5601-1989": - case "ksc5601": - case "ksc_5601": - case "windows-949": return "EUC-KR"; - case "csiso2022kr": - case "hz-gb-2312": - case "iso-2022-cn": - case "iso-2022-cn-ext": - case "iso-2022-kr": - case "replacement": return "replacement"; - case "unicodefffe": - case "utf-16be": return "UTF-16BE"; - case "csunicode": - case "iso-10646-ucs-2": - case "ucs-2": - case "unicode": - case "unicodefeff": - case "utf-16": - case "utf-16le": return "UTF-16LE"; - case "x-user-defined": return "x-user-defined"; - default: return "failure"; - } - } - module.exports = { getEncoding: getEncoding$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/util.js -var require_util$9 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/util.js"(exports, module) { - const { kState: kState$2, kError: kError$4, kResult: kResult$1, kAborted: kAborted$1, kLastProgressEventFired } = require_symbols$3(); - const { ProgressEvent } = require_progressevent(); - const { getEncoding } = require_encoding(); - const { DOMException: DOMException$2 } = require_constants$9(); - const { serializeAMimeType: serializeAMimeType$4, parseMIMEType: parseMIMEType$4 } = require_dataURL(); - const { types: types$5 } = __require("util"); - const { StringDecoder } = __require("string_decoder"); - const { btoa } = __require("buffer"); - /** @type {PropertyDescriptor} */ - const staticPropertyDescriptors$5 = { - enumerable: true, - writable: false, - configurable: false - }; - /** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ - function readOperation$1(fr, blob, type, encodingName) { - if (fr[kState$2] === "loading") throw new DOMException$2("Invalid state", "InvalidStateError"); - fr[kState$2] = "loading"; - fr[kResult$1] = null; - fr[kError$4] = null; - /** @type {import('stream/web').ReadableStream} */ - const stream$5 = blob.stream(); - const reader = stream$5.getReader(); - /** @type {Uint8Array[]} */ - const bytes = []; - let chunkPromise = reader.read(); - let isFirstChunk = true; - (async () => { - while (!fr[kAborted$1]) try { - const { done, value } = await chunkPromise; - if (isFirstChunk && !fr[kAborted$1]) queueMicrotask(() => { - fireAProgressEvent$1("loadstart", fr); - }); - isFirstChunk = false; - if (!done && types$5.isUint8Array(value)) { - bytes.push(value); - if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted$1]) { - fr[kLastProgressEventFired] = Date.now(); - queueMicrotask(() => { - fireAProgressEvent$1("progress", fr); - }); - } - chunkPromise = reader.read(); - } else if (done) { - queueMicrotask(() => { - fr[kState$2] = "done"; - try { - const result = packageData(bytes, type, blob.type, encodingName); - if (fr[kAborted$1]) return; - fr[kResult$1] = result; - fireAProgressEvent$1("load", fr); - } catch (error$1) { - fr[kError$4] = error$1; - fireAProgressEvent$1("error", fr); - } - if (fr[kState$2] !== "loading") fireAProgressEvent$1("loadend", fr); - }); - break; - } - } catch (error$1) { - if (fr[kAborted$1]) return; - queueMicrotask(() => { - fr[kState$2] = "done"; - fr[kError$4] = error$1; - fireAProgressEvent$1("error", fr); - if (fr[kState$2] !== "loading") fireAProgressEvent$1("loadend", fr); - }); - break; - } - })(); - } - /** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ - function fireAProgressEvent$1(e, reader) { - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }); - reader.dispatchEvent(event); - } - /** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ - function packageData(bytes, type, mimeType, encodingName) { - switch (type) { - case "DataURL": { - let dataURL = "data:"; - const parsed = parseMIMEType$4(mimeType || "application/octet-stream"); - if (parsed !== "failure") dataURL += serializeAMimeType$4(parsed); - dataURL += ";base64,"; - const decoder = new StringDecoder("latin1"); - for (const chunk of bytes) dataURL += btoa(decoder.write(chunk)); - dataURL += btoa(decoder.end()); - return dataURL; - } - case "Text": { - let encoding = "failure"; - if (encodingName) encoding = getEncoding(encodingName); - if (encoding === "failure" && mimeType) { - const type$1 = parseMIMEType$4(mimeType); - if (type$1 !== "failure") encoding = getEncoding(type$1.parameters.get("charset")); - } - if (encoding === "failure") encoding = "UTF-8"; - return decode(bytes, encoding); - } - case "ArrayBuffer": { - const sequence = combineByteSequences(bytes); - return sequence.buffer; - } - case "BinaryString": { - let binaryString = ""; - const decoder = new StringDecoder("latin1"); - for (const chunk of bytes) binaryString += decoder.write(chunk); - binaryString += decoder.end(); - return binaryString; - } - } - } - /** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ - function decode(ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue); - const BOMEncoding = BOMSniffing(bytes); - let slice = 0; - if (BOMEncoding !== null) { - encoding = BOMEncoding; - slice = BOMEncoding === "UTF-8" ? 3 : 2; - } - const sliced = bytes.slice(slice); - return new TextDecoder(encoding).decode(sliced); - } - /** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ - function BOMSniffing(ioQueue) { - const [a, b, c] = ioQueue; - if (a === 239 && b === 187 && c === 191) return "UTF-8"; - else if (a === 254 && b === 255) return "UTF-16BE"; - else if (a === 255 && b === 254) return "UTF-16LE"; - return null; - } - /** - * @param {Uint8Array[]} sequences - */ - function combineByteSequences(sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength; - }, 0); - let offset = 0; - return sequences.reduce((a, b) => { - a.set(b, offset); - offset += b.byteLength; - return a; - }, new Uint8Array(size)); - } - module.exports = { - staticPropertyDescriptors: staticPropertyDescriptors$5, - readOperation: readOperation$1, - fireAProgressEvent: fireAProgressEvent$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js -var require_filereader = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js"(exports, module) { - const { staticPropertyDescriptors: staticPropertyDescriptors$4, readOperation, fireAProgressEvent } = require_util$9(); - const { kState: kState$1, kError: kError$3, kResult, kEvents, kAborted } = require_symbols$3(); - const { webidl: webidl$22 } = require_webidl$1(); - const { kEnumerableProperty: kEnumerableProperty$16 } = require_util$12(); - var FileReader = class FileReader extends EventTarget { - constructor() { - super(); - this[kState$1] = "empty"; - this[kResult] = null; - this[kError$3] = null; - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - }; - } - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer(blob) { - webidl$22.brandCheck(this, FileReader); - webidl$22.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsArrayBuffer" }); - blob = webidl$22.converters.Blob(blob, { strict: false }); - readOperation(this, blob, "ArrayBuffer"); - } - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString(blob) { - webidl$22.brandCheck(this, FileReader); - webidl$22.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsBinaryString" }); - blob = webidl$22.converters.Blob(blob, { strict: false }); - readOperation(this, blob, "BinaryString"); - } - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText(blob, encoding = void 0) { - webidl$22.brandCheck(this, FileReader); - webidl$22.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsText" }); - blob = webidl$22.converters.Blob(blob, { strict: false }); - if (encoding !== void 0) encoding = webidl$22.converters.DOMString(encoding); - readOperation(this, blob, "Text", encoding); - } - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL(blob) { - webidl$22.brandCheck(this, FileReader); - webidl$22.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsDataURL" }); - blob = webidl$22.converters.Blob(blob, { strict: false }); - readOperation(this, blob, "DataURL"); - } - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort() { - if (this[kState$1] === "empty" || this[kState$1] === "done") { - this[kResult] = null; - return; - } - if (this[kState$1] === "loading") { - this[kState$1] = "done"; - this[kResult] = null; - } - this[kAborted] = true; - fireAProgressEvent("abort", this); - if (this[kState$1] !== "loading") fireAProgressEvent("loadend", this); - } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState() { - webidl$22.brandCheck(this, FileReader); - switch (this[kState$1]) { - case "empty": return this.EMPTY; - case "loading": return this.LOADING; - case "done": return this.DONE; - } - } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result() { - webidl$22.brandCheck(this, FileReader); - return this[kResult]; - } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error() { - webidl$22.brandCheck(this, FileReader); - return this[kError$3]; - } - get onloadend() { - webidl$22.brandCheck(this, FileReader); - return this[kEvents].loadend; - } - set onloadend(fn) { - webidl$22.brandCheck(this, FileReader); - if (this[kEvents].loadend) this.removeEventListener("loadend", this[kEvents].loadend); - if (typeof fn === "function") { - this[kEvents].loadend = fn; - this.addEventListener("loadend", fn); - } else this[kEvents].loadend = null; - } - get onerror() { - webidl$22.brandCheck(this, FileReader); - return this[kEvents].error; - } - set onerror(fn) { - webidl$22.brandCheck(this, FileReader); - if (this[kEvents].error) this.removeEventListener("error", this[kEvents].error); - if (typeof fn === "function") { - this[kEvents].error = fn; - this.addEventListener("error", fn); - } else this[kEvents].error = null; - } - get onloadstart() { - webidl$22.brandCheck(this, FileReader); - return this[kEvents].loadstart; - } - set onloadstart(fn) { - webidl$22.brandCheck(this, FileReader); - if (this[kEvents].loadstart) this.removeEventListener("loadstart", this[kEvents].loadstart); - if (typeof fn === "function") { - this[kEvents].loadstart = fn; - this.addEventListener("loadstart", fn); - } else this[kEvents].loadstart = null; - } - get onprogress() { - webidl$22.brandCheck(this, FileReader); - return this[kEvents].progress; - } - set onprogress(fn) { - webidl$22.brandCheck(this, FileReader); - if (this[kEvents].progress) this.removeEventListener("progress", this[kEvents].progress); - if (typeof fn === "function") { - this[kEvents].progress = fn; - this.addEventListener("progress", fn); - } else this[kEvents].progress = null; - } - get onload() { - webidl$22.brandCheck(this, FileReader); - return this[kEvents].load; - } - set onload(fn) { - webidl$22.brandCheck(this, FileReader); - if (this[kEvents].load) this.removeEventListener("load", this[kEvents].load); - if (typeof fn === "function") { - this[kEvents].load = fn; - this.addEventListener("load", fn); - } else this[kEvents].load = null; - } - get onabort() { - webidl$22.brandCheck(this, FileReader); - return this[kEvents].abort; - } - set onabort(fn) { - webidl$22.brandCheck(this, FileReader); - if (this[kEvents].abort) this.removeEventListener("abort", this[kEvents].abort); - if (typeof fn === "function") { - this[kEvents].abort = fn; - this.addEventListener("abort", fn); - } else this[kEvents].abort = null; - } - }; - FileReader.EMPTY = FileReader.prototype.EMPTY = 0; - FileReader.LOADING = FileReader.prototype.LOADING = 1; - FileReader.DONE = FileReader.prototype.DONE = 2; - Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors$4, - LOADING: staticPropertyDescriptors$4, - DONE: staticPropertyDescriptors$4, - readAsArrayBuffer: kEnumerableProperty$16, - readAsBinaryString: kEnumerableProperty$16, - readAsText: kEnumerableProperty$16, - readAsDataURL: kEnumerableProperty$16, - abort: kEnumerableProperty$16, - readyState: kEnumerableProperty$16, - result: kEnumerableProperty$16, - error: kEnumerableProperty$16, - onloadstart: kEnumerableProperty$16, - onprogress: kEnumerableProperty$16, - onload: kEnumerableProperty$16, - onabort: kEnumerableProperty$16, - onerror: kEnumerableProperty$16, - onloadend: kEnumerableProperty$16, - [Symbol.toStringTag]: { - value: "FileReader", - writable: false, - enumerable: false, - configurable: true - } - }); - Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors$4, - LOADING: staticPropertyDescriptors$4, - DONE: staticPropertyDescriptors$4 - }); - module.exports = { FileReader }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/symbols.js -var require_symbols$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/symbols.js"(exports, module) { - module.exports = { kConstruct: require_symbols$5().kConstruct }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/util.js -var require_util$8 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/util.js"(exports, module) { - const assert$32 = __require("assert"); - const { URLSerializer: URLSerializer$6 } = require_dataURL(); - const { isValidHeaderName: isValidHeaderName$3 } = require_util$11(); - /** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ - function urlEquals$3(A, B, excludeFragment = false) { - const serializedA = URLSerializer$6(A, excludeFragment); - const serializedB = URLSerializer$6(B, excludeFragment); - return serializedA === serializedB; - } - /** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ - function fieldValues(header) { - assert$32(header !== null); - const values = []; - for (let value of header.split(",")) { - value = value.trim(); - if (!value.length) continue; - else if (!isValidHeaderName$3(value)) continue; - values.push(value); - } - return values; - } - module.exports = { - urlEquals: urlEquals$3, - fieldValues - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cache.js -var require_cache$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cache.js"(exports, module) { - const { kConstruct: kConstruct$9 } = require_symbols$2(); - const { urlEquals: urlEquals$2, fieldValues: getFieldValues$2 } = require_util$8(); - const { kEnumerableProperty: kEnumerableProperty$15, isDisturbed: isDisturbed$4 } = require_util$12(); - const { kHeadersList: kHeadersList$1 } = require_symbols$5(); - const { webidl: webidl$21 } = require_webidl$1(); - const { Response: Response$1, cloneResponse: cloneResponse$2 } = require_response$1(); - const { Request: Request$5 } = require_request$2(); - const { kState, kHeaders, kGuard, kRealm } = require_symbols$4(); - const { fetching: fetching$5 } = require_fetch$1(); - const { urlIsHttpHttpsScheme: urlIsHttpHttpsScheme$3, createDeferredPromise: createDeferredPromise$5, readAllBytes: readAllBytes$2 } = require_util$11(); - const assert$31 = __require("assert"); - const { getGlobalDispatcher: getGlobalDispatcher$7 } = require_global$2(); - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ - var Cache$3 = class Cache$3 { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList; - constructor() { - if (arguments[0] !== kConstruct$9) webidl$21.illegalConstructor(); - this.#relevantRequestResponseList = arguments[1]; - } - async match(request$2, options = {}) { - webidl$21.brandCheck(this, Cache$3); - webidl$21.argumentLengthCheck(arguments, 1, { header: "Cache.match" }); - request$2 = webidl$21.converters.RequestInfo(request$2); - options = webidl$21.converters.CacheQueryOptions(options); - const p = await this.matchAll(request$2, options); - if (p.length === 0) return; - return p[0]; - } - async matchAll(request$2 = void 0, options = {}) { - webidl$21.brandCheck(this, Cache$3); - if (request$2 !== void 0) request$2 = webidl$21.converters.RequestInfo(request$2); - options = webidl$21.converters.CacheQueryOptions(options); - let r = null; - if (request$2 !== void 0) { - if (request$2 instanceof Request$5) { - r = request$2[kState]; - if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request$2 === "string") r = new Request$5(request$2)[kState]; - } - const responses = []; - if (request$2 === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); - else { - const requestResponses = this.#queryCache(r, options); - for (const requestResponse of requestResponses) responses.push(requestResponse[1]); - } - const responseList = []; - for (const response of responses) { - const responseObject = new Response$1(response.body?.source ?? null); - const body = responseObject[kState].body; - responseObject[kState] = response; - responseObject[kState].body = body; - responseObject[kHeaders][kHeadersList$1] = response.headersList; - responseObject[kHeaders][kGuard] = "immutable"; - responseList.push(responseObject); - } - return Object.freeze(responseList); - } - async add(request$2) { - webidl$21.brandCheck(this, Cache$3); - webidl$21.argumentLengthCheck(arguments, 1, { header: "Cache.add" }); - request$2 = webidl$21.converters.RequestInfo(request$2); - const requests = [request$2]; - const responseArrayPromise = this.addAll(requests); - return await responseArrayPromise; - } - async addAll(requests) { - webidl$21.brandCheck(this, Cache$3); - webidl$21.argumentLengthCheck(arguments, 1, { header: "Cache.addAll" }); - requests = webidl$21.converters["sequence"](requests); - const responsePromises = []; - const requestList = []; - for (const request$2 of requests) { - if (typeof request$2 === "string") continue; - const r = request$2[kState]; - if (!urlIsHttpHttpsScheme$3(r.url) || r.method !== "GET") throw webidl$21.errors.exception({ - header: "Cache.addAll", - message: "Expected http/s scheme when method is not GET." - }); - } - /** @type {ReturnType[]} */ - const fetchControllers = []; - for (const request$2 of requests) { - const r = new Request$5(request$2)[kState]; - if (!urlIsHttpHttpsScheme$3(r.url)) throw webidl$21.errors.exception({ - header: "Cache.addAll", - message: "Expected http/s scheme." - }); - r.initiator = "fetch"; - r.destination = "subresource"; - requestList.push(r); - const responsePromise = createDeferredPromise$5(); - fetchControllers.push(fetching$5({ - request: r, - dispatcher: getGlobalDispatcher$7(), - processResponse(response) { - if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl$21.errors.exception({ - header: "Cache.addAll", - message: "Received an invalid status code or the request failed." - })); - else if (response.headersList.contains("vary")) { - const fieldValues$1 = getFieldValues$2(response.headersList.get("vary")); - for (const fieldValue of fieldValues$1) if (fieldValue === "*") { - responsePromise.reject(webidl$21.errors.exception({ - header: "Cache.addAll", - message: "invalid vary field value" - })); - for (const controller of fetchControllers) controller.abort(); - return; - } - } - }, - processResponseEndOfBody(response) { - if (response.aborted) { - responsePromise.reject(new DOMException("aborted", "AbortError")); - return; - } - responsePromise.resolve(response); - } - })); - responsePromises.push(responsePromise.promise); - } - const p = Promise.all(responsePromises); - const responses = await p; - const operations = []; - let index = 0; - for (const response of responses) { - /** @type {CacheBatchOperation} */ - const operation = { - type: "put", - request: requestList[index], - response - }; - operations.push(operation); - index++; - } - const cacheJobPromise = createDeferredPromise$5(); - let errorData = null; - try { - this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - queueMicrotask(() => { - if (errorData === null) cacheJobPromise.resolve(void 0); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; - } - async put(request$2, response) { - webidl$21.brandCheck(this, Cache$3); - webidl$21.argumentLengthCheck(arguments, 2, { header: "Cache.put" }); - request$2 = webidl$21.converters.RequestInfo(request$2); - response = webidl$21.converters.Response(response); - let innerRequest = null; - if (request$2 instanceof Request$5) innerRequest = request$2[kState]; - else innerRequest = new Request$5(request$2)[kState]; - if (!urlIsHttpHttpsScheme$3(innerRequest.url) || innerRequest.method !== "GET") throw webidl$21.errors.exception({ - header: "Cache.put", - message: "Expected an http/s scheme when method is not GET" - }); - const innerResponse = response[kState]; - if (innerResponse.status === 206) throw webidl$21.errors.exception({ - header: "Cache.put", - message: "Got 206 status" - }); - if (innerResponse.headersList.contains("vary")) { - const fieldValues$1 = getFieldValues$2(innerResponse.headersList.get("vary")); - for (const fieldValue of fieldValues$1) if (fieldValue === "*") throw webidl$21.errors.exception({ - header: "Cache.put", - message: "Got * vary field value" - }); - } - if (innerResponse.body && (isDisturbed$4(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl$21.errors.exception({ - header: "Cache.put", - message: "Response body is locked or disturbed" - }); - const clonedResponse = cloneResponse$2(innerResponse); - const bodyReadPromise = createDeferredPromise$5(); - if (innerResponse.body != null) { - const stream$5 = innerResponse.body.stream; - const reader = stream$5.getReader(); - readAllBytes$2(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject); - } else bodyReadPromise.resolve(void 0); - /** @type {CacheBatchOperation[]} */ - const operations = []; - /** @type {CacheBatchOperation} */ - const operation = { - type: "put", - request: innerRequest, - response: clonedResponse - }; - operations.push(operation); - const bytes = await bodyReadPromise.promise; - if (clonedResponse.body != null) clonedResponse.body.source = bytes; - const cacheJobPromise = createDeferredPromise$5(); - let errorData = null; - try { - this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - queueMicrotask(() => { - if (errorData === null) cacheJobPromise.resolve(); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; - } - async delete(request$2, options = {}) { - webidl$21.brandCheck(this, Cache$3); - webidl$21.argumentLengthCheck(arguments, 1, { header: "Cache.delete" }); - request$2 = webidl$21.converters.RequestInfo(request$2); - options = webidl$21.converters.CacheQueryOptions(options); - /** - * @type {Request} - */ - let r = null; - if (request$2 instanceof Request$5) { - r = request$2[kState]; - if (r.method !== "GET" && !options.ignoreMethod) return false; - } else { - assert$31(typeof request$2 === "string"); - r = new Request$5(request$2)[kState]; - } - /** @type {CacheBatchOperation[]} */ - const operations = []; - /** @type {CacheBatchOperation} */ - const operation = { - type: "delete", - request: r, - options - }; - operations.push(operation); - const cacheJobPromise = createDeferredPromise$5(); - let errorData = null; - let requestResponses; - try { - requestResponses = this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - queueMicrotask(() => { - if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; - } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {readonly Request[]} - */ - async keys(request$2 = void 0, options = {}) { - webidl$21.brandCheck(this, Cache$3); - if (request$2 !== void 0) request$2 = webidl$21.converters.RequestInfo(request$2); - options = webidl$21.converters.CacheQueryOptions(options); - let r = null; - if (request$2 !== void 0) { - if (request$2 instanceof Request$5) { - r = request$2[kState]; - if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request$2 === "string") r = new Request$5(request$2)[kState]; - } - const promise = createDeferredPromise$5(); - const requests = []; - if (request$2 === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); - else { - const requestResponses = this.#queryCache(r, options); - for (const requestResponse of requestResponses) requests.push(requestResponse[0]); - } - queueMicrotask(() => { - const requestList = []; - for (const request$3 of requests) { - const requestObject = new Request$5("https://a"); - requestObject[kState] = request$3; - requestObject[kHeaders][kHeadersList$1] = request$3.headersList; - requestObject[kHeaders][kGuard] = "immutable"; - requestObject[kRealm] = request$3.client; - requestList.push(requestObject); - } - promise.resolve(Object.freeze(requestList)); - }); - return promise.promise; - } - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations(operations) { - const cache$1 = this.#relevantRequestResponseList; - const backupCache = [...cache$1]; - const addedItems = []; - const resultList = []; - try { - for (const operation of operations) { - if (operation.type !== "delete" && operation.type !== "put") throw webidl$21.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "operation type does not match \"delete\" or \"put\"" - }); - if (operation.type === "delete" && operation.response != null) throw webidl$21.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "delete operation should not have an associated response" - }); - if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); - let requestResponses; - if (operation.type === "delete") { - requestResponses = this.#queryCache(operation.request, operation.options); - if (requestResponses.length === 0) return []; - for (const requestResponse of requestResponses) { - const idx = cache$1.indexOf(requestResponse); - assert$31(idx !== -1); - cache$1.splice(idx, 1); - } - } else if (operation.type === "put") { - if (operation.response == null) throw webidl$21.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "put operation should have an associated response" - }); - const r = operation.request; - if (!urlIsHttpHttpsScheme$3(r.url)) throw webidl$21.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "expected http or https scheme" - }); - if (r.method !== "GET") throw webidl$21.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "not get method" - }); - if (operation.options != null) throw webidl$21.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "options must not be defined" - }); - requestResponses = this.#queryCache(operation.request); - for (const requestResponse of requestResponses) { - const idx = cache$1.indexOf(requestResponse); - assert$31(idx !== -1); - cache$1.splice(idx, 1); - } - cache$1.push([operation.request, operation.response]); - addedItems.push([operation.request, operation.response]); - } - resultList.push([operation.request, operation.response]); - } - return resultList; - } catch (e) { - this.#relevantRequestResponseList.length = 0; - this.#relevantRequestResponseList = backupCache; - throw e; - } - } - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache(requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = []; - const storage = targetStorage ?? this.#relevantRequestResponseList; - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse; - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); - } - return resultList; - } - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem(requestQuery, request$2, response = null, options) { - const queryURL = new URL(requestQuery.url); - const cachedURL = new URL(request$2.url); - if (options?.ignoreSearch) { - cachedURL.search = ""; - queryURL.search = ""; - } - if (!urlEquals$2(queryURL, cachedURL, true)) return false; - if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; - const fieldValues$1 = getFieldValues$2(response.headersList.get("vary")); - for (const fieldValue of fieldValues$1) { - if (fieldValue === "*") return false; - const requestValue = request$2.headersList.get(fieldValue); - const queryValue = requestQuery.headersList.get(fieldValue); - if (requestValue !== queryValue) return false; - } - return true; - } - }; - Object.defineProperties(Cache$3.prototype, { - [Symbol.toStringTag]: { - value: "Cache", - configurable: true - }, - match: kEnumerableProperty$15, - matchAll: kEnumerableProperty$15, - add: kEnumerableProperty$15, - addAll: kEnumerableProperty$15, - put: kEnumerableProperty$15, - delete: kEnumerableProperty$15, - keys: kEnumerableProperty$15 - }); - const cacheQueryOptionConverters$1 = [ - { - key: "ignoreSearch", - converter: webidl$21.converters.boolean, - defaultValue: false - }, - { - key: "ignoreMethod", - converter: webidl$21.converters.boolean, - defaultValue: false - }, - { - key: "ignoreVary", - converter: webidl$21.converters.boolean, - defaultValue: false - } - ]; - webidl$21.converters.CacheQueryOptions = webidl$21.dictionaryConverter(cacheQueryOptionConverters$1); - webidl$21.converters.MultiCacheQueryOptions = webidl$21.dictionaryConverter([...cacheQueryOptionConverters$1, { - key: "cacheName", - converter: webidl$21.converters.DOMString - }]); - webidl$21.converters.Response = webidl$21.interfaceConverter(Response$1); - webidl$21.converters["sequence"] = webidl$21.sequenceConverter(webidl$21.converters.RequestInfo); - module.exports = { Cache: Cache$3 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js -var require_cachestorage$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js"(exports, module) { - const { kConstruct: kConstruct$8 } = require_symbols$2(); - const { Cache: Cache$2 } = require_cache$3(); - const { webidl: webidl$20 } = require_webidl$1(); - const { kEnumerableProperty: kEnumerableProperty$14 } = require_util$12(); - var CacheStorage$2 = class CacheStorage$2 { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has(cacheName) { - webidl$20.brandCheck(this, CacheStorage$2); - webidl$20.argumentLengthCheck(arguments, 1, { header: "CacheStorage.has" }); - cacheName = webidl$20.converters.DOMString(cacheName); - return this.#caches.has(cacheName); - } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open(cacheName) { - webidl$20.brandCheck(this, CacheStorage$2); - webidl$20.argumentLengthCheck(arguments, 1, { header: "CacheStorage.open" }); - cacheName = webidl$20.converters.DOMString(cacheName); - if (this.#caches.has(cacheName)) { - const cache$2 = this.#caches.get(cacheName); - return new Cache$2(kConstruct$8, cache$2); - } - const cache$1 = []; - this.#caches.set(cacheName, cache$1); - return new Cache$2(kConstruct$8, cache$1); - } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete(cacheName) { - webidl$20.brandCheck(this, CacheStorage$2); - webidl$20.argumentLengthCheck(arguments, 1, { header: "CacheStorage.delete" }); - cacheName = webidl$20.converters.DOMString(cacheName); - return this.#caches.delete(cacheName); - } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {string[]} - */ - async keys() { - webidl$20.brandCheck(this, CacheStorage$2); - const keys = this.#caches.keys(); - return [...keys]; - } - }; - Object.defineProperties(CacheStorage$2.prototype, { - [Symbol.toStringTag]: { - value: "CacheStorage", - configurable: true - }, - match: kEnumerableProperty$14, - has: kEnumerableProperty$14, - open: kEnumerableProperty$14, - delete: kEnumerableProperty$14, - keys: kEnumerableProperty$14 - }); - module.exports = { CacheStorage: CacheStorage$2 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/constants.js -var require_constants$7 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/constants.js"(exports, module) { - const maxAttributeValueSize$3 = 1024; - const maxNameValuePairSize$3 = 4096; - module.exports = { - maxAttributeValueSize: maxAttributeValueSize$3, - maxNameValuePairSize: maxNameValuePairSize$3 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/util.js -var require_util$7 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/util.js"(exports, module) { - /** - * @param {string} value - * @returns {boolean} - */ - function isCTLExcludingHtab$3(value) { - if (value.length === 0) return false; - for (const char of value) { - const code = char.charCodeAt(0); - if (code >= 0 || code <= 8 || code >= 10 || code <= 31 || code === 127) return false; - } - } - /** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ - function validateCookieName$1(name) { - for (const char of name) { - const code = char.charCodeAt(0); - if (code <= 32 || code > 127 || char === "(" || char === ")" || char === ">" || char === "<" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === "\"" || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}") throw new Error("Invalid cookie name"); - } - } - /** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ - function validateCookieValue$1(value) { - for (const char of value) { - const code = char.charCodeAt(0); - if (code < 33 || code === 34 || code === 44 || code === 59 || code === 92 || code > 126) throw new Error("Invalid header value"); - } - } - /** - * path-value = - * @param {string} path - */ - function validateCookiePath$1(path$8) { - for (const char of path$8) { - const code = char.charCodeAt(0); - if (code < 33 || char === ";") throw new Error("Invalid cookie path"); - } - } - /** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ - function validateCookieDomain$1(domain) { - if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); - } - /** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ - function toIMFDate$1(date) { - if (typeof date === "number") date = new Date(date); - const days = [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ]; - const months = [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ]; - const dayName = days[date.getUTCDay()]; - const day = date.getUTCDate().toString().padStart(2, "0"); - const month = months[date.getUTCMonth()]; - const year = date.getUTCFullYear(); - const hour = date.getUTCHours().toString().padStart(2, "0"); - const minute = date.getUTCMinutes().toString().padStart(2, "0"); - const second = date.getUTCSeconds().toString().padStart(2, "0"); - return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`; - } - /** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ - function validateCookieMaxAge$1(maxAge) { - if (maxAge < 0) throw new Error("Invalid cookie max-age"); - } - /** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ - function stringify$4(cookie) { - if (cookie.name.length === 0) return null; - validateCookieName$1(cookie.name); - validateCookieValue$1(cookie.value); - const out = [`${cookie.name}=${cookie.value}`]; - if (cookie.name.startsWith("__Secure-")) cookie.secure = true; - if (cookie.name.startsWith("__Host-")) { - cookie.secure = true; - cookie.domain = null; - cookie.path = "/"; - } - if (cookie.secure) out.push("Secure"); - if (cookie.httpOnly) out.push("HttpOnly"); - if (typeof cookie.maxAge === "number") { - validateCookieMaxAge$1(cookie.maxAge); - out.push(`Max-Age=${cookie.maxAge}`); - } - if (cookie.domain) { - validateCookieDomain$1(cookie.domain); - out.push(`Domain=${cookie.domain}`); - } - if (cookie.path) { - validateCookiePath$1(cookie.path); - out.push(`Path=${cookie.path}`); - } - if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate$1(cookie.expires)}`); - if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); - for (const part of cookie.unparsed) { - if (!part.includes("=")) throw new Error("Invalid unparsed"); - const [key, ...value] = part.split("="); - out.push(`${key.trim()}=${value.join("=")}`); - } - return out.join("; "); - } - module.exports = { - isCTLExcludingHtab: isCTLExcludingHtab$3, - validateCookieName: validateCookieName$1, - validateCookiePath: validateCookiePath$1, - validateCookieValue: validateCookieValue$1, - toIMFDate: toIMFDate$1, - stringify: stringify$4 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/parse.js -var require_parse$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/parse.js"(exports, module) { - const { maxNameValuePairSize: maxNameValuePairSize$2, maxAttributeValueSize: maxAttributeValueSize$2 } = require_constants$7(); - const { isCTLExcludingHtab: isCTLExcludingHtab$2 } = require_util$7(); - const { collectASequenceOfCodePointsFast: collectASequenceOfCodePointsFast$3 } = require_dataURL(); - const assert$30 = __require("assert"); - /** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned - */ - function parseSetCookie$3(header) { - if (isCTLExcludingHtab$2(header)) return null; - let nameValuePair = ""; - let unparsedAttributes = ""; - let name = ""; - let value = ""; - if (header.includes(";")) { - const position = { position: 0 }; - nameValuePair = collectASequenceOfCodePointsFast$3(";", header, position); - unparsedAttributes = header.slice(position.position); - } else nameValuePair = header; - if (!nameValuePair.includes("=")) value = nameValuePair; - else { - const position = { position: 0 }; - name = collectASequenceOfCodePointsFast$3("=", nameValuePair, position); - value = nameValuePair.slice(position.position + 1); - } - name = name.trim(); - value = value.trim(); - if (name.length + value.length > maxNameValuePairSize$2) return null; - return { - name, - value, - ...parseUnparsedAttributes$1(unparsedAttributes) - }; - } - /** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ - function parseUnparsedAttributes$1(unparsedAttributes, cookieAttributeList = {}) { - if (unparsedAttributes.length === 0) return cookieAttributeList; - assert$30(unparsedAttributes[0] === ";"); - unparsedAttributes = unparsedAttributes.slice(1); - let cookieAv = ""; - if (unparsedAttributes.includes(";")) { - cookieAv = collectASequenceOfCodePointsFast$3(";", unparsedAttributes, { position: 0 }); - unparsedAttributes = unparsedAttributes.slice(cookieAv.length); - } else { - cookieAv = unparsedAttributes; - unparsedAttributes = ""; - } - let attributeName = ""; - let attributeValue = ""; - if (cookieAv.includes("=")) { - const position = { position: 0 }; - attributeName = collectASequenceOfCodePointsFast$3("=", cookieAv, position); - attributeValue = cookieAv.slice(position.position + 1); - } else attributeName = cookieAv; - attributeName = attributeName.trim(); - attributeValue = attributeValue.trim(); - if (attributeValue.length > maxAttributeValueSize$2) return parseUnparsedAttributes$1(unparsedAttributes, cookieAttributeList); - const attributeNameLowercase = attributeName.toLowerCase(); - if (attributeNameLowercase === "expires") { - const expiryTime = new Date(attributeValue); - cookieAttributeList.expires = expiryTime; - } else if (attributeNameLowercase === "max-age") { - const charCode = attributeValue.charCodeAt(0); - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes$1(unparsedAttributes, cookieAttributeList); - if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes$1(unparsedAttributes, cookieAttributeList); - const deltaSeconds = Number(attributeValue); - cookieAttributeList.maxAge = deltaSeconds; - } else if (attributeNameLowercase === "domain") { - let cookieDomain = attributeValue; - if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); - cookieDomain = cookieDomain.toLowerCase(); - cookieAttributeList.domain = cookieDomain; - } else if (attributeNameLowercase === "path") { - let cookiePath = ""; - if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; - else cookiePath = attributeValue; - cookieAttributeList.path = cookiePath; - } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; - else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; - else if (attributeNameLowercase === "samesite") { - let enforcement = "Default"; - const attributeValueLowercase = attributeValue.toLowerCase(); - if (attributeValueLowercase.includes("none")) enforcement = "None"; - if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; - if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; - cookieAttributeList.sameSite = enforcement; - } else { - cookieAttributeList.unparsed ??= []; - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); - } - return parseUnparsedAttributes$1(unparsedAttributes, cookieAttributeList); - } - module.exports = { - parseSetCookie: parseSetCookie$3, - parseUnparsedAttributes: parseUnparsedAttributes$1 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/index.js -var require_cookies$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/index.js"(exports, module) { - const { parseSetCookie: parseSetCookie$2 } = require_parse$2(); - const { stringify: stringify$3 } = require_util$7(); - const { webidl: webidl$19 } = require_webidl$1(); - const { Headers: Headers$7 } = require_headers$1(); - /** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ - /** - * @param {Headers} headers - * @returns {Record} - */ - function getCookies$2(headers) { - webidl$19.argumentLengthCheck(arguments, 1, { header: "getCookies" }); - webidl$19.brandCheck(headers, Headers$7, { strict: false }); - const cookie = headers.get("cookie"); - const out = {}; - if (!cookie) return out; - for (const piece of cookie.split(";")) { - const [name, ...value] = piece.split("="); - out[name.trim()] = value.join("="); - } - return out; - } - /** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ - function deleteCookie$2(headers, name, attributes) { - webidl$19.argumentLengthCheck(arguments, 2, { header: "deleteCookie" }); - webidl$19.brandCheck(headers, Headers$7, { strict: false }); - name = webidl$19.converters.DOMString(name); - attributes = webidl$19.converters.DeleteCookieAttributes(attributes); - setCookie$2(headers, { - name, - value: "", - expires: new Date(0), - ...attributes - }); - } - /** - * @param {Headers} headers - * @returns {Cookie[]} - */ - function getSetCookies$2(headers) { - webidl$19.argumentLengthCheck(arguments, 1, { header: "getSetCookies" }); - webidl$19.brandCheck(headers, Headers$7, { strict: false }); - const cookies = headers.getSetCookie(); - if (!cookies) return []; - return cookies.map((pair) => parseSetCookie$2(pair)); - } - /** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ - function setCookie$2(headers, cookie) { - webidl$19.argumentLengthCheck(arguments, 2, { header: "setCookie" }); - webidl$19.brandCheck(headers, Headers$7, { strict: false }); - cookie = webidl$19.converters.Cookie(cookie); - const str = stringify$3(cookie); - if (str) headers.append("Set-Cookie", stringify$3(cookie)); - } - webidl$19.converters.DeleteCookieAttributes = webidl$19.dictionaryConverter([{ - converter: webidl$19.nullableConverter(webidl$19.converters.DOMString), - key: "path", - defaultValue: null - }, { - converter: webidl$19.nullableConverter(webidl$19.converters.DOMString), - key: "domain", - defaultValue: null - }]); - webidl$19.converters.Cookie = webidl$19.dictionaryConverter([ - { - converter: webidl$19.converters.DOMString, - key: "name" - }, - { - converter: webidl$19.converters.DOMString, - key: "value" - }, - { - converter: webidl$19.nullableConverter((value) => { - if (typeof value === "number") return webidl$19.converters["unsigned long long"](value); - return new Date(value); - }), - key: "expires", - defaultValue: null - }, - { - converter: webidl$19.nullableConverter(webidl$19.converters["long long"]), - key: "maxAge", - defaultValue: null - }, - { - converter: webidl$19.nullableConverter(webidl$19.converters.DOMString), - key: "domain", - defaultValue: null - }, - { - converter: webidl$19.nullableConverter(webidl$19.converters.DOMString), - key: "path", - defaultValue: null - }, - { - converter: webidl$19.nullableConverter(webidl$19.converters.boolean), - key: "secure", - defaultValue: null - }, - { - converter: webidl$19.nullableConverter(webidl$19.converters.boolean), - key: "httpOnly", - defaultValue: null - }, - { - converter: webidl$19.converters.USVString, - key: "sameSite", - allowedValues: [ - "Strict", - "Lax", - "None" - ] - }, - { - converter: webidl$19.sequenceConverter(webidl$19.converters.DOMString), - key: "unparsed", - defaultValue: [] - } - ]); - module.exports = { - getCookies: getCookies$2, - deleteCookie: deleteCookie$2, - getSetCookies: getSetCookies$2, - setCookie: setCookie$2 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/constants.js -var require_constants$6 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/constants.js"(exports, module) { - const uid$3 = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; - /** @type {PropertyDescriptor} */ - const staticPropertyDescriptors$3 = { - enumerable: true, - writable: false, - configurable: false - }; - const states$10 = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 - }; - const opcodes$11 = { - CONTINUATION: 0, - TEXT: 1, - BINARY: 2, - CLOSE: 8, - PING: 9, - PONG: 10 - }; - const maxUnsigned16Bit$3 = 2 ** 16 - 1; - const parserStates$3 = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 - }; - const emptyBuffer$5 = Buffer.allocUnsafe(0); - module.exports = { - uid: uid$3, - staticPropertyDescriptors: staticPropertyDescriptors$3, - states: states$10, - opcodes: opcodes$11, - maxUnsigned16Bit: maxUnsigned16Bit$3, - parserStates: parserStates$3, - emptyBuffer: emptyBuffer$5 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js -var require_symbols$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js"(exports, module) { - module.exports = { - kWebSocketURL: Symbol("url"), - kReadyState: Symbol("ready state"), - kController: Symbol("controller"), - kResponse: Symbol("response"), - kBinaryType: Symbol("binary type"), - kSentClose: Symbol("sent close"), - kReceivedClose: Symbol("received close"), - kByteParser: Symbol("byte parser") - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/events.js -var require_events$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/events.js"(exports, module) { - const { webidl: webidl$18 } = require_webidl$1(); - const { kEnumerableProperty: kEnumerableProperty$13 } = require_util$12(); - const { MessagePort: MessagePort$1 } = __require("worker_threads"); - /** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ - var MessageEvent$3 = class MessageEvent$3 extends Event { - #eventInit; - constructor(type, eventInitDict = {}) { - webidl$18.argumentLengthCheck(arguments, 1, { header: "MessageEvent constructor" }); - type = webidl$18.converters.DOMString(type); - eventInitDict = webidl$18.converters.MessageEventInit(eventInitDict); - super(type, eventInitDict); - this.#eventInit = eventInitDict; - } - get data() { - webidl$18.brandCheck(this, MessageEvent$3); - return this.#eventInit.data; - } - get origin() { - webidl$18.brandCheck(this, MessageEvent$3); - return this.#eventInit.origin; - } - get lastEventId() { - webidl$18.brandCheck(this, MessageEvent$3); - return this.#eventInit.lastEventId; - } - get source() { - webidl$18.brandCheck(this, MessageEvent$3); - return this.#eventInit.source; - } - get ports() { - webidl$18.brandCheck(this, MessageEvent$3); - if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); - return this.#eventInit.ports; - } - initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { - webidl$18.brandCheck(this, MessageEvent$3); - webidl$18.argumentLengthCheck(arguments, 1, { header: "MessageEvent.initMessageEvent" }); - return new MessageEvent$3(type, { - bubbles, - cancelable, - data, - origin, - lastEventId, - source, - ports - }); - } - }; - /** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ - var CloseEvent$4 = class CloseEvent$4 extends Event { - #eventInit; - constructor(type, eventInitDict = {}) { - webidl$18.argumentLengthCheck(arguments, 1, { header: "CloseEvent constructor" }); - type = webidl$18.converters.DOMString(type); - eventInitDict = webidl$18.converters.CloseEventInit(eventInitDict); - super(type, eventInitDict); - this.#eventInit = eventInitDict; - } - get wasClean() { - webidl$18.brandCheck(this, CloseEvent$4); - return this.#eventInit.wasClean; - } - get code() { - webidl$18.brandCheck(this, CloseEvent$4); - return this.#eventInit.code; - } - get reason() { - webidl$18.brandCheck(this, CloseEvent$4); - return this.#eventInit.reason; - } - }; - var ErrorEvent$4 = class ErrorEvent$4 extends Event { - #eventInit; - constructor(type, eventInitDict) { - webidl$18.argumentLengthCheck(arguments, 1, { header: "ErrorEvent constructor" }); - super(type, eventInitDict); - type = webidl$18.converters.DOMString(type); - eventInitDict = webidl$18.converters.ErrorEventInit(eventInitDict ?? {}); - this.#eventInit = eventInitDict; - } - get message() { - webidl$18.brandCheck(this, ErrorEvent$4); - return this.#eventInit.message; - } - get filename() { - webidl$18.brandCheck(this, ErrorEvent$4); - return this.#eventInit.filename; - } - get lineno() { - webidl$18.brandCheck(this, ErrorEvent$4); - return this.#eventInit.lineno; - } - get colno() { - webidl$18.brandCheck(this, ErrorEvent$4); - return this.#eventInit.colno; - } - get error() { - webidl$18.brandCheck(this, ErrorEvent$4); - return this.#eventInit.error; - } - }; - Object.defineProperties(MessageEvent$3.prototype, { - [Symbol.toStringTag]: { - value: "MessageEvent", - configurable: true - }, - data: kEnumerableProperty$13, - origin: kEnumerableProperty$13, - lastEventId: kEnumerableProperty$13, - source: kEnumerableProperty$13, - ports: kEnumerableProperty$13, - initMessageEvent: kEnumerableProperty$13 - }); - Object.defineProperties(CloseEvent$4.prototype, { - [Symbol.toStringTag]: { - value: "CloseEvent", - configurable: true - }, - reason: kEnumerableProperty$13, - code: kEnumerableProperty$13, - wasClean: kEnumerableProperty$13 - }); - Object.defineProperties(ErrorEvent$4.prototype, { - [Symbol.toStringTag]: { - value: "ErrorEvent", - configurable: true - }, - message: kEnumerableProperty$13, - filename: kEnumerableProperty$13, - lineno: kEnumerableProperty$13, - colno: kEnumerableProperty$13, - error: kEnumerableProperty$13 - }); - webidl$18.converters.MessagePort = webidl$18.interfaceConverter(MessagePort$1); - webidl$18.converters["sequence"] = webidl$18.sequenceConverter(webidl$18.converters.MessagePort); - const eventInit$1 = [ - { - key: "bubbles", - converter: webidl$18.converters.boolean, - defaultValue: false - }, - { - key: "cancelable", - converter: webidl$18.converters.boolean, - defaultValue: false - }, - { - key: "composed", - converter: webidl$18.converters.boolean, - defaultValue: false - } - ]; - webidl$18.converters.MessageEventInit = webidl$18.dictionaryConverter([ - ...eventInit$1, - { - key: "data", - converter: webidl$18.converters.any, - defaultValue: null - }, - { - key: "origin", - converter: webidl$18.converters.USVString, - defaultValue: "" - }, - { - key: "lastEventId", - converter: webidl$18.converters.DOMString, - defaultValue: "" - }, - { - key: "source", - converter: webidl$18.nullableConverter(webidl$18.converters.MessagePort), - defaultValue: null - }, - { - key: "ports", - converter: webidl$18.converters["sequence"], - get defaultValue() { - return []; - } - } - ]); - webidl$18.converters.CloseEventInit = webidl$18.dictionaryConverter([ - ...eventInit$1, - { - key: "wasClean", - converter: webidl$18.converters.boolean, - defaultValue: false - }, - { - key: "code", - converter: webidl$18.converters["unsigned short"], - defaultValue: 0 - }, - { - key: "reason", - converter: webidl$18.converters.USVString, - defaultValue: "" - } - ]); - webidl$18.converters.ErrorEventInit = webidl$18.dictionaryConverter([ - ...eventInit$1, - { - key: "message", - converter: webidl$18.converters.DOMString, - defaultValue: "" - }, - { - key: "filename", - converter: webidl$18.converters.USVString, - defaultValue: "" - }, - { - key: "lineno", - converter: webidl$18.converters["unsigned long"], - defaultValue: 0 - }, - { - key: "colno", - converter: webidl$18.converters["unsigned long"], - defaultValue: 0 - }, - { - key: "error", - converter: webidl$18.converters.any - } - ]); - module.exports = { - MessageEvent: MessageEvent$3, - CloseEvent: CloseEvent$4, - ErrorEvent: ErrorEvent$4 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/util.js -var require_util$6 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/util.js"(exports, module) { - const { kReadyState: kReadyState$3, kController: kController$1, kResponse: kResponse$2, kBinaryType: kBinaryType$1, kWebSocketURL: kWebSocketURL$1 } = require_symbols$1(); - const { states: states$9, opcodes: opcodes$10 } = require_constants$6(); - const { MessageEvent: MessageEvent$2, ErrorEvent: ErrorEvent$3 } = require_events$1(); - /** - * @param {import('./websocket').WebSocket} ws - */ - function isEstablished$5(ws) { - return ws[kReadyState$3] === states$9.OPEN; - } - /** - * @param {import('./websocket').WebSocket} ws - */ - function isClosing$4(ws) { - return ws[kReadyState$3] === states$9.CLOSING; - } - /** - * @param {import('./websocket').WebSocket} ws - */ - function isClosed$2(ws) { - return ws[kReadyState$3] === states$9.CLOSED; - } - /** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {EventInit | undefined} eventInitDict - */ - function fireEvent$4(e, target, eventConstructor = Event, eventInitDict) { - const event = new eventConstructor(e, eventInitDict); - target.dispatchEvent(event); - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ - function websocketMessageReceived$3(ws, type, data) { - if (ws[kReadyState$3] !== states$9.OPEN) return; - let dataForEvent; - if (type === opcodes$10.TEXT) try { - dataForEvent = new TextDecoder("utf-8", { fatal: true }).decode(data); - } catch { - failWebsocketConnection$7(ws, "Received invalid UTF-8 in text frame."); - return; - } - else if (type === opcodes$10.BINARY) if (ws[kBinaryType$1] === "blob") dataForEvent = new Blob([data]); - else dataForEvent = new Uint8Array(data).buffer; - fireEvent$4("message", ws, MessageEvent$2, { - origin: ws[kWebSocketURL$1].origin, - data: dataForEvent - }); - } - /** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - */ - function isValidSubprotocol$4(protocol) { - if (protocol.length === 0) return false; - for (const char of protocol) { - const code = char.charCodeAt(0); - if (code < 33 || code > 126 || char === "(" || char === ")" || char === "<" || char === ">" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === "\"" || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}" || code === 32 || code === 9) return false; - } - return true; - } - /** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - */ - function isValidStatusCode$3(code) { - if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; - return code >= 3e3 && code <= 4999; - } - /** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason - */ - function failWebsocketConnection$7(ws, reason) { - const { [kController$1]: controller, [kResponse$2]: response } = ws; - controller.abort(); - if (response?.socket && !response.socket.destroyed) response.socket.destroy(); - if (reason) fireEvent$4("error", ws, ErrorEvent$3, { error: new Error(reason) }); - } - module.exports = { - isEstablished: isEstablished$5, - isClosing: isClosing$4, - isClosed: isClosed$2, - fireEvent: fireEvent$4, - isValidSubprotocol: isValidSubprotocol$4, - isValidStatusCode: isValidStatusCode$3, - failWebsocketConnection: failWebsocketConnection$7, - websocketMessageReceived: websocketMessageReceived$3 - }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/connection.js -var require_connection$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/connection.js"(exports, module) { - const diagnosticsChannel$2 = __require("diagnostics_channel"); - const { uid: uid$2, states: states$8 } = require_constants$6(); - const { kReadyState: kReadyState$2, kSentClose: kSentClose$2, kByteParser: kByteParser$1, kReceivedClose: kReceivedClose$1 } = require_symbols$1(); - const { fireEvent: fireEvent$3, failWebsocketConnection: failWebsocketConnection$6 } = require_util$6(); - const { CloseEvent: CloseEvent$3 } = require_events$1(); - const { makeRequest: makeRequest$3 } = require_request$2(); - const { fetching: fetching$4 } = require_fetch$1(); - const { Headers: Headers$6 } = require_headers$1(); - const { getGlobalDispatcher: getGlobalDispatcher$6 } = require_global$2(); - const { kHeadersList } = require_symbols$5(); - const channels$10 = {}; - channels$10.open = diagnosticsChannel$2.channel("undici:websocket:open"); - channels$10.close = diagnosticsChannel$2.channel("undici:websocket:close"); - channels$10.socketError = diagnosticsChannel$2.channel("undici:websocket:socket_error"); - /** @type {import('crypto')} */ - let crypto$5; - try { - crypto$5 = __require("crypto"); - } catch {} - /** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any) => void} onEstablish - * @param {Partial} options - */ - function establishWebSocketConnection$4(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; - const request$2 = makeRequest$3({ - urlList: [requestURL], - serviceWorkers: "none", - referrer: "no-referrer", - mode: "websocket", - credentials: "include", - cache: "no-store", - redirect: "error" - }); - if (options.headers) { - const headersList = new Headers$6(options.headers)[kHeadersList]; - request$2.headersList = headersList; - } - const keyValue = crypto$5.randomBytes(16).toString("base64"); - request$2.headersList.append("sec-websocket-key", keyValue); - request$2.headersList.append("sec-websocket-version", "13"); - for (const protocol of protocols) request$2.headersList.append("sec-websocket-protocol", protocol); - const permessageDeflate = ""; - const controller = fetching$4({ - request: request$2, - useParallelQueue: true, - dispatcher: options.dispatcher ?? getGlobalDispatcher$6(), - processResponse(response) { - if (response.type === "error" || response.status !== 101) { - failWebsocketConnection$6(ws, "Received network error or non-101 status code."); - return; - } - if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { - failWebsocketConnection$6(ws, "Server did not respond with sent protocols."); - return; - } - if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { - failWebsocketConnection$6(ws, "Server did not set Upgrade header to \"websocket\"."); - return; - } - if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { - failWebsocketConnection$6(ws, "Server did not set Connection header to \"upgrade\"."); - return; - } - const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto$5.createHash("sha1").update(keyValue + uid$2).digest("base64"); - if (secWSAccept !== digest) { - failWebsocketConnection$6(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); - return; - } - const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); - if (secExtension !== null && secExtension !== permessageDeflate) { - failWebsocketConnection$6(ws, "Received different permessage-deflate than the one set."); - return; - } - const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); - if (secProtocol !== null && secProtocol !== request$2.headersList.get("Sec-WebSocket-Protocol")) { - failWebsocketConnection$6(ws, "Protocol was not set in the opening handshake."); - return; - } - response.socket.on("data", onSocketData); - response.socket.on("close", onSocketClose$2); - response.socket.on("error", onSocketError); - if (channels$10.open.hasSubscribers) channels$10.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }); - onEstablish(response); - } - }); - return controller; - } - /** - * @param {Buffer} chunk - */ - function onSocketData(chunk) { - if (!this.ws[kByteParser$1].write(chunk)) this.pause(); - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ - function onSocketClose$2() { - const { ws } = this; - const wasClean = ws[kSentClose$2] && ws[kReceivedClose$1]; - let code = 1005; - let reason = ""; - const result = ws[kByteParser$1].closingInfo; - if (result) { - code = result.code ?? 1005; - reason = result.reason; - } else if (!ws[kSentClose$2]) code = 1006; - ws[kReadyState$2] = states$8.CLOSED; - fireEvent$3("close", ws, CloseEvent$3, { - wasClean, - code, - reason - }); - if (channels$10.close.hasSubscribers) channels$10.close.publish({ - websocket: ws, - code, - reason - }); - } - function onSocketError(error$1) { - const { ws } = this; - ws[kReadyState$2] = states$8.CLOSING; - if (channels$10.socketError.hasSubscribers) channels$10.socketError.publish(error$1); - this.destroy(); - } - module.exports = { establishWebSocketConnection: establishWebSocketConnection$4 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/frame.js -var require_frame$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/frame.js"(exports, module) { - const { maxUnsigned16Bit: maxUnsigned16Bit$2 } = require_constants$6(); - /** @type {import('crypto')} */ - let crypto$4; - try { - crypto$4 = __require("crypto"); - } catch {} - var WebsocketFrameSend$7 = class { - /** - * @param {Buffer|undefined} data - */ - constructor(data) { - this.frameData = data; - this.maskKey = crypto$4.randomBytes(4); - } - createFrame(opcode) { - const bodyLength$2 = this.frameData?.byteLength ?? 0; - /** @type {number} */ - let payloadLength = bodyLength$2; - let offset = 6; - if (bodyLength$2 > maxUnsigned16Bit$2) { - offset += 8; - payloadLength = 127; - } else if (bodyLength$2 > 125) { - offset += 2; - payloadLength = 126; - } - const buffer$1 = Buffer.allocUnsafe(bodyLength$2 + offset); - buffer$1[0] = buffer$1[1] = 0; - buffer$1[0] |= 128; - buffer$1[0] = (buffer$1[0] & 240) + opcode; - /*! ws. MIT License. Einar Otto Stangvik */ - buffer$1[offset - 4] = this.maskKey[0]; - buffer$1[offset - 3] = this.maskKey[1]; - buffer$1[offset - 2] = this.maskKey[2]; - buffer$1[offset - 1] = this.maskKey[3]; - buffer$1[1] = payloadLength; - if (payloadLength === 126) buffer$1.writeUInt16BE(bodyLength$2, 2); - else if (payloadLength === 127) { - buffer$1[2] = buffer$1[3] = 0; - buffer$1.writeUIntBE(bodyLength$2, 4, 6); - } - buffer$1[1] |= 128; - for (let i$1 = 0; i$1 < bodyLength$2; i$1++) buffer$1[offset + i$1] = this.frameData[i$1] ^ this.maskKey[i$1 % 4]; - return buffer$1; - } - }; - module.exports = { WebsocketFrameSend: WebsocketFrameSend$7 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js -var require_receiver$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js"(exports, module) { - const { Writable: Writable$3 } = __require("stream"); - const diagnosticsChannel$1 = __require("diagnostics_channel"); - const { parserStates: parserStates$2, opcodes: opcodes$9, states: states$7, emptyBuffer: emptyBuffer$4 } = require_constants$6(); - const { kReadyState: kReadyState$1, kSentClose: kSentClose$1, kResponse: kResponse$1, kReceivedClose } = require_symbols$1(); - const { isValidStatusCode: isValidStatusCode$2, failWebsocketConnection: failWebsocketConnection$5, websocketMessageReceived: websocketMessageReceived$2 } = require_util$6(); - const { WebsocketFrameSend: WebsocketFrameSend$6 } = require_frame$1(); - const channels$9 = {}; - channels$9.ping = diagnosticsChannel$1.channel("undici:websocket:ping"); - channels$9.pong = diagnosticsChannel$1.channel("undici:websocket:pong"); - var ByteParser$4 = class extends Writable$3 { - #buffers = []; - #byteOffset = 0; - #state = parserStates$2.INFO; - #info = {}; - #fragments = []; - constructor(ws) { - super(); - this.ws = ws; - } - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write(chunk, _, callback) { - this.#buffers.push(chunk); - this.#byteOffset += chunk.length; - this.run(callback); - } - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run(callback) { - while (true) { - if (this.#state === parserStates$2.INFO) { - if (this.#byteOffset < 2) return callback(); - const buffer$1 = this.consume(2); - this.#info.fin = (buffer$1[0] & 128) !== 0; - this.#info.opcode = buffer$1[0] & 15; - this.#info.originalOpcode ??= this.#info.opcode; - this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes$9.CONTINUATION; - if (this.#info.fragmented && this.#info.opcode !== opcodes$9.BINARY && this.#info.opcode !== opcodes$9.TEXT) { - failWebsocketConnection$5(this.ws, "Invalid frame type was fragmented."); - return; - } - const payloadLength = buffer$1[1] & 127; - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength; - this.#state = parserStates$2.READ_DATA; - } else if (payloadLength === 126) this.#state = parserStates$2.PAYLOADLENGTH_16; - else if (payloadLength === 127) this.#state = parserStates$2.PAYLOADLENGTH_64; - if (this.#info.fragmented && payloadLength > 125) { - failWebsocketConnection$5(this.ws, "Fragmented frame exceeded 125 bytes."); - return; - } else if ((this.#info.opcode === opcodes$9.PING || this.#info.opcode === opcodes$9.PONG || this.#info.opcode === opcodes$9.CLOSE) && payloadLength > 125) { - failWebsocketConnection$5(this.ws, "Payload length for control frame exceeded 125 bytes."); - return; - } else if (this.#info.opcode === opcodes$9.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection$5(this.ws, "Received close frame with a 1-byte body."); - return; - } - const body = this.consume(payloadLength); - this.#info.closeInfo = this.parseCloseBody(false, body); - if (!this.ws[kSentClose$1]) { - const body$1 = Buffer.allocUnsafe(2); - body$1.writeUInt16BE(this.#info.closeInfo.code, 0); - const closeFrame = new WebsocketFrameSend$6(body$1); - this.ws[kResponse$1].socket.write(closeFrame.createFrame(opcodes$9.CLOSE), (err) => { - if (!err) this.ws[kSentClose$1] = true; - }); - } - this.ws[kReadyState$1] = states$7.CLOSING; - this.ws[kReceivedClose] = true; - this.end(); - return; - } else if (this.#info.opcode === opcodes$9.PING) { - const body = this.consume(payloadLength); - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend$6(body); - this.ws[kResponse$1].socket.write(frame.createFrame(opcodes$9.PONG)); - if (channels$9.ping.hasSubscribers) channels$9.ping.publish({ payload: body }); - } - this.#state = parserStates$2.INFO; - if (this.#byteOffset > 0) continue; - else { - callback(); - return; - } - } else if (this.#info.opcode === opcodes$9.PONG) { - const body = this.consume(payloadLength); - if (channels$9.pong.hasSubscribers) channels$9.pong.publish({ payload: body }); - if (this.#byteOffset > 0) continue; - else { - callback(); - return; - } - } - } else if (this.#state === parserStates$2.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) return callback(); - const buffer$1 = this.consume(2); - this.#info.payloadLength = buffer$1.readUInt16BE(0); - this.#state = parserStates$2.READ_DATA; - } else if (this.#state === parserStates$2.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) return callback(); - const buffer$1 = this.consume(8); - const upper = buffer$1.readUInt32BE(0); - if (upper > 2 ** 31 - 1) { - failWebsocketConnection$5(this.ws, "Received payload length > 2^31 bytes."); - return; - } - const lower = buffer$1.readUInt32BE(4); - this.#info.payloadLength = (upper << 8) + lower; - this.#state = parserStates$2.READ_DATA; - } else if (this.#state === parserStates$2.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) return callback(); - else if (this.#byteOffset >= this.#info.payloadLength) { - const body = this.consume(this.#info.payloadLength); - this.#fragments.push(body); - if (!this.#info.fragmented || this.#info.fin && this.#info.opcode === opcodes$9.CONTINUATION) { - const fullMessage = Buffer.concat(this.#fragments); - websocketMessageReceived$2(this.ws, this.#info.originalOpcode, fullMessage); - this.#info = {}; - this.#fragments.length = 0; - } - this.#state = parserStates$2.INFO; - } - } - if (this.#byteOffset > 0) continue; - else { - callback(); - break; - } - } - } - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer|null} - */ - consume(n) { - if (n > this.#byteOffset) return null; - else if (n === 0) return emptyBuffer$4; - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length; - return this.#buffers.shift(); - } - const buffer$1 = Buffer.allocUnsafe(n); - let offset = 0; - while (offset !== n) { - const next = this.#buffers[0]; - const { length } = next; - if (length + offset === n) { - buffer$1.set(this.#buffers.shift(), offset); - break; - } else if (length + offset > n) { - buffer$1.set(next.subarray(0, n - offset), offset); - this.#buffers[0] = next.subarray(n - offset); - break; - } else { - buffer$1.set(this.#buffers.shift(), offset); - offset += next.length; - } - } - this.#byteOffset -= n; - return buffer$1; - } - parseCloseBody(onlyCode, data) { - /** @type {number|undefined} */ - let code; - if (data.length >= 2) code = data.readUInt16BE(0); - if (onlyCode) { - if (!isValidStatusCode$2(code)) return null; - return { code }; - } - /** @type {Buffer} */ - let reason = data.subarray(2); - if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); - if (code !== void 0 && !isValidStatusCode$2(code)) return null; - try { - reason = new TextDecoder("utf-8", { fatal: true }).decode(reason); - } catch { - return null; - } - return { - code, - reason - }; - } - get closingInfo() { - return this.#info.closeInfo; - } - }; - module.exports = { ByteParser: ByteParser$4 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js -var require_websocket$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js"(exports, module) { - const { webidl: webidl$17 } = require_webidl$1(); - const { DOMException: DOMException$1 } = require_constants$9(); - const { URLSerializer: URLSerializer$5 } = require_dataURL(); - const { getGlobalOrigin: getGlobalOrigin$3 } = require_global$3(); - const { staticPropertyDescriptors: staticPropertyDescriptors$2, states: states$6, opcodes: opcodes$8, emptyBuffer: emptyBuffer$3 } = require_constants$6(); - const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols$1(); - const { isEstablished: isEstablished$4, isClosing: isClosing$3, isValidSubprotocol: isValidSubprotocol$3, failWebsocketConnection: failWebsocketConnection$4, fireEvent: fireEvent$2 } = require_util$6(); - const { establishWebSocketConnection: establishWebSocketConnection$3 } = require_connection$1(); - const { WebsocketFrameSend: WebsocketFrameSend$5 } = require_frame$1(); - const { ByteParser: ByteParser$3 } = require_receiver$1(); - const { kEnumerableProperty: kEnumerableProperty$12, isBlobLike: isBlobLike$2 } = require_util$12(); - const { getGlobalDispatcher: getGlobalDispatcher$5 } = require_global$2(); - const { types: types$4 } = __require("util"); - let experimentalWarned$1 = false; - var WebSocket$1 = class WebSocket$1 extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - }; - #bufferedAmount = 0; - #protocol = ""; - #extensions = ""; - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor(url, protocols = []) { - super(); - webidl$17.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); - if (!experimentalWarned$1) { - experimentalWarned$1 = true; - process.emitWarning("WebSockets are experimental, expect them to change at any time.", { code: "UNDICI-WS" }); - } - const options = webidl$17.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl$17.converters.USVString(url); - protocols = options.protocols; - const baseURL = getGlobalOrigin$3(); - let urlRecord; - try { - urlRecord = new URL(url, baseURL); - } catch (e) { - throw new DOMException$1(e, "SyntaxError"); - } - if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; - else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; - if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException$1(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); - if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new DOMException$1("Got fragment", "SyntaxError"); - if (typeof protocols === "string") protocols = [protocols]; - if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException$1("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol$3(p))) throw new DOMException$1("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - this[kWebSocketURL] = new URL(urlRecord.href); - this[kController] = establishWebSocketConnection$3(urlRecord, protocols, this, (response) => this.#onConnectionEstablished(response), options); - this[kReadyState] = WebSocket$1.CONNECTING; - this[kBinaryType] = "blob"; - } - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close(code = void 0, reason = void 0) { - webidl$17.brandCheck(this, WebSocket$1); - if (code !== void 0) code = webidl$17.converters["unsigned short"](code, { clamp: true }); - if (reason !== void 0) reason = webidl$17.converters.USVString(reason); - if (code !== void 0) { - if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException$1("invalid code", "InvalidAccessError"); - } - let reasonByteLength = 0; - if (reason !== void 0) { - reasonByteLength = Buffer.byteLength(reason); - if (reasonByteLength > 123) throw new DOMException$1(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); - } - if (this[kReadyState] === WebSocket$1.CLOSING || this[kReadyState] === WebSocket$1.CLOSED) {} else if (!isEstablished$4(this)) { - failWebsocketConnection$4(this, "Connection was closed before it was established."); - this[kReadyState] = WebSocket$1.CLOSING; - } else if (!isClosing$3(this)) { - const frame = new WebsocketFrameSend$5(); - if (code !== void 0 && reason === void 0) { - frame.frameData = Buffer.allocUnsafe(2); - frame.frameData.writeUInt16BE(code, 0); - } else if (code !== void 0 && reason !== void 0) { - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); - frame.frameData.writeUInt16BE(code, 0); - frame.frameData.write(reason, 2, "utf-8"); - } else frame.frameData = emptyBuffer$3; - /** @type {import('stream').Duplex} */ - const socket = this[kResponse].socket; - socket.write(frame.createFrame(opcodes$8.CLOSE), (err) => { - if (!err) this[kSentClose] = true; - }); - this[kReadyState] = states$6.CLOSING; - } else this[kReadyState] = WebSocket$1.CLOSING; - } - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send(data) { - webidl$17.brandCheck(this, WebSocket$1); - webidl$17.argumentLengthCheck(arguments, 1, { header: "WebSocket.send" }); - data = webidl$17.converters.WebSocketSendData(data); - if (this[kReadyState] === WebSocket$1.CONNECTING) throw new DOMException$1("Sent before connected.", "InvalidStateError"); - if (!isEstablished$4(this) || isClosing$3(this)) return; - /** @type {import('stream').Duplex} */ - const socket = this[kResponse].socket; - if (typeof data === "string") { - const value = Buffer.from(data); - const frame = new WebsocketFrameSend$5(value); - const buffer$1 = frame.createFrame(opcodes$8.TEXT); - this.#bufferedAmount += value.byteLength; - socket.write(buffer$1, () => { - this.#bufferedAmount -= value.byteLength; - }); - } else if (types$4.isArrayBuffer(data)) { - const value = Buffer.from(data); - const frame = new WebsocketFrameSend$5(value); - const buffer$1 = frame.createFrame(opcodes$8.BINARY); - this.#bufferedAmount += value.byteLength; - socket.write(buffer$1, () => { - this.#bufferedAmount -= value.byteLength; - }); - } else if (ArrayBuffer.isView(data)) { - const ab = Buffer.from(data, data.byteOffset, data.byteLength); - const frame = new WebsocketFrameSend$5(ab); - const buffer$1 = frame.createFrame(opcodes$8.BINARY); - this.#bufferedAmount += ab.byteLength; - socket.write(buffer$1, () => { - this.#bufferedAmount -= ab.byteLength; - }); - } else if (isBlobLike$2(data)) { - const frame = new WebsocketFrameSend$5(); - data.arrayBuffer().then((ab) => { - const value = Buffer.from(ab); - frame.frameData = value; - const buffer$1 = frame.createFrame(opcodes$8.BINARY); - this.#bufferedAmount += value.byteLength; - socket.write(buffer$1, () => { - this.#bufferedAmount -= value.byteLength; - }); - }); - } - } - get readyState() { - webidl$17.brandCheck(this, WebSocket$1); - return this[kReadyState]; - } - get bufferedAmount() { - webidl$17.brandCheck(this, WebSocket$1); - return this.#bufferedAmount; - } - get url() { - webidl$17.brandCheck(this, WebSocket$1); - return URLSerializer$5(this[kWebSocketURL]); - } - get extensions() { - webidl$17.brandCheck(this, WebSocket$1); - return this.#extensions; - } - get protocol() { - webidl$17.brandCheck(this, WebSocket$1); - return this.#protocol; - } - get onopen() { - webidl$17.brandCheck(this, WebSocket$1); - return this.#events.open; - } - set onopen(fn) { - webidl$17.brandCheck(this, WebSocket$1); - if (this.#events.open) this.removeEventListener("open", this.#events.open); - if (typeof fn === "function") { - this.#events.open = fn; - this.addEventListener("open", fn); - } else this.#events.open = null; - } - get onerror() { - webidl$17.brandCheck(this, WebSocket$1); - return this.#events.error; - } - set onerror(fn) { - webidl$17.brandCheck(this, WebSocket$1); - if (this.#events.error) this.removeEventListener("error", this.#events.error); - if (typeof fn === "function") { - this.#events.error = fn; - this.addEventListener("error", fn); - } else this.#events.error = null; - } - get onclose() { - webidl$17.brandCheck(this, WebSocket$1); - return this.#events.close; - } - set onclose(fn) { - webidl$17.brandCheck(this, WebSocket$1); - if (this.#events.close) this.removeEventListener("close", this.#events.close); - if (typeof fn === "function") { - this.#events.close = fn; - this.addEventListener("close", fn); - } else this.#events.close = null; - } - get onmessage() { - webidl$17.brandCheck(this, WebSocket$1); - return this.#events.message; - } - set onmessage(fn) { - webidl$17.brandCheck(this, WebSocket$1); - if (this.#events.message) this.removeEventListener("message", this.#events.message); - if (typeof fn === "function") { - this.#events.message = fn; - this.addEventListener("message", fn); - } else this.#events.message = null; - } - get binaryType() { - webidl$17.brandCheck(this, WebSocket$1); - return this[kBinaryType]; - } - set binaryType(type) { - webidl$17.brandCheck(this, WebSocket$1); - if (type !== "blob" && type !== "arraybuffer") this[kBinaryType] = "blob"; - else this[kBinaryType] = type; - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished(response) { - this[kResponse] = response; - const parser = new ByteParser$3(this); - parser.on("drain", function onParserDrain() { - this.ws[kResponse].socket.resume(); - }); - response.socket.ws = this; - this[kByteParser] = parser; - this[kReadyState] = states$6.OPEN; - const extensions = response.headersList.get("sec-websocket-extensions"); - if (extensions !== null) this.#extensions = extensions; - const protocol = response.headersList.get("sec-websocket-protocol"); - if (protocol !== null) this.#protocol = protocol; - fireEvent$2("open", this); - } - }; - WebSocket$1.CONNECTING = WebSocket$1.prototype.CONNECTING = states$6.CONNECTING; - WebSocket$1.OPEN = WebSocket$1.prototype.OPEN = states$6.OPEN; - WebSocket$1.CLOSING = WebSocket$1.prototype.CLOSING = states$6.CLOSING; - WebSocket$1.CLOSED = WebSocket$1.prototype.CLOSED = states$6.CLOSED; - Object.defineProperties(WebSocket$1.prototype, { - CONNECTING: staticPropertyDescriptors$2, - OPEN: staticPropertyDescriptors$2, - CLOSING: staticPropertyDescriptors$2, - CLOSED: staticPropertyDescriptors$2, - url: kEnumerableProperty$12, - readyState: kEnumerableProperty$12, - bufferedAmount: kEnumerableProperty$12, - onopen: kEnumerableProperty$12, - onerror: kEnumerableProperty$12, - onclose: kEnumerableProperty$12, - close: kEnumerableProperty$12, - onmessage: kEnumerableProperty$12, - binaryType: kEnumerableProperty$12, - send: kEnumerableProperty$12, - extensions: kEnumerableProperty$12, - protocol: kEnumerableProperty$12, - [Symbol.toStringTag]: { - value: "WebSocket", - writable: false, - enumerable: false, - configurable: true - } - }); - Object.defineProperties(WebSocket$1, { - CONNECTING: staticPropertyDescriptors$2, - OPEN: staticPropertyDescriptors$2, - CLOSING: staticPropertyDescriptors$2, - CLOSED: staticPropertyDescriptors$2 - }); - webidl$17.converters["sequence"] = webidl$17.sequenceConverter(webidl$17.converters.DOMString); - webidl$17.converters["DOMString or sequence"] = function(V) { - if (webidl$17.util.Type(V) === "Object" && Symbol.iterator in V) return webidl$17.converters["sequence"](V); - return webidl$17.converters.DOMString(V); - }; - webidl$17.converters.WebSocketInit = webidl$17.dictionaryConverter([ - { - key: "protocols", - converter: webidl$17.converters["DOMString or sequence"], - get defaultValue() { - return []; - } - }, - { - key: "dispatcher", - converter: (V) => V, - get defaultValue() { - return getGlobalDispatcher$5(); - } - }, - { - key: "headers", - converter: webidl$17.nullableConverter(webidl$17.converters.HeadersInit) - } - ]); - webidl$17.converters["DOMString or sequence or WebSocketInit"] = function(V) { - if (webidl$17.util.Type(V) === "Object" && !(Symbol.iterator in V)) return webidl$17.converters.WebSocketInit(V); - return { protocols: webidl$17.converters["DOMString or sequence"](V) }; - }; - webidl$17.converters.WebSocketSendData = function(V) { - if (webidl$17.util.Type(V) === "Object") { - if (isBlobLike$2(V)) return webidl$17.converters.Blob(V, { strict: false }); - if (ArrayBuffer.isView(V) || types$4.isAnyArrayBuffer(V)) return webidl$17.converters.BufferSource(V); - } - return webidl$17.converters.USVString(V); - }; - module.exports = { WebSocket: WebSocket$1 }; -} }); - -//#endregion -//#region node_modules/.deno/undici@5.29.0/node_modules/undici/index.js -var require_undici$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/index.js"(exports, module) { - const Client$6 = require_client$1(); - const Dispatcher$5 = require_dispatcher$1(); - const errors$1 = require_errors$1(); - const Pool$6 = require_pool$1(); - const BalancedPool$2 = require_balanced_pool$1(); - const Agent$6 = require_agent$1(); - const util$23 = require_util$12(); - const { InvalidArgumentError: InvalidArgumentError$30 } = errors$1; - const api$1 = require_api$1(); - const buildConnector$5 = require_connect$1(); - const MockClient$3 = require_mock_client$1(); - const MockAgent$2 = require_mock_agent$1(); - const MockPool$3 = require_mock_pool$1(); - const mockErrors$1 = require_mock_errors$1(); - const ProxyAgent$3 = require_proxy_agent$1(); - const RetryHandler$4 = require_RetryHandler(); - const { getGlobalDispatcher: getGlobalDispatcher$4, setGlobalDispatcher: setGlobalDispatcher$2 } = require_global$2(); - const DecoratorHandler$4 = require_DecoratorHandler(); - const RedirectHandler$3 = require_RedirectHandler(); - const createRedirectInterceptor$1 = require_redirectInterceptor(); - let hasCrypto; - try { - __require("crypto"); - hasCrypto = true; - } catch { - hasCrypto = false; - } - Object.assign(Dispatcher$5.prototype, api$1); - module.exports.Dispatcher = Dispatcher$5; - module.exports.Client = Client$6; - module.exports.Pool = Pool$6; - module.exports.BalancedPool = BalancedPool$2; - module.exports.Agent = Agent$6; - module.exports.ProxyAgent = ProxyAgent$3; - module.exports.RetryHandler = RetryHandler$4; - module.exports.DecoratorHandler = DecoratorHandler$4; - module.exports.RedirectHandler = RedirectHandler$3; - module.exports.createRedirectInterceptor = createRedirectInterceptor$1; - module.exports.buildConnector = buildConnector$5; - module.exports.errors = errors$1; - function makeDispatcher$1(fn) { - return (url, opts, handler) => { - if (typeof opts === "function") { - handler = opts; - opts = null; - } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError$30("invalid url"); - if (opts != null && typeof opts !== "object") throw new InvalidArgumentError$30("invalid opts"); - if (opts && opts.path != null) { - if (typeof opts.path !== "string") throw new InvalidArgumentError$30("invalid opts.path"); - let path$8 = opts.path; - if (!opts.path.startsWith("/")) path$8 = `/${path$8}`; - url = new URL(util$23.parseOrigin(url).origin + path$8); - } else { - if (!opts) opts = typeof url === "object" ? url : {}; - url = util$23.parseURL(url); - } - const { agent, dispatcher = getGlobalDispatcher$4() } = opts; - if (agent) throw new InvalidArgumentError$30("unsupported opts.agent. Did you mean opts.client?"); - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? "PUT" : "GET") - }, handler); - }; - } - module.exports.setGlobalDispatcher = setGlobalDispatcher$2; - module.exports.getGlobalDispatcher = getGlobalDispatcher$4; - if (util$23.nodeMajor > 16 || util$23.nodeMajor === 16 && util$23.nodeMinor >= 8) { - let fetchImpl$1 = null; - module.exports.fetch = async function fetch$2(resource) { - if (!fetchImpl$1) fetchImpl$1 = require_fetch$1().fetch; - try { - return await fetchImpl$1(...arguments); - } catch (err) { - if (typeof err === "object") Error.captureStackTrace(err, this); - throw err; - } - }; - module.exports.Headers = require_headers$1().Headers; - module.exports.Response = require_response$1().Response; - module.exports.Request = require_request$2().Request; - module.exports.FormData = require_formdata$1().FormData; - module.exports.File = require_file().File; - module.exports.FileReader = require_filereader().FileReader; - const { setGlobalOrigin: setGlobalOrigin$3, getGlobalOrigin: getGlobalOrigin$8 } = require_global$3(); - module.exports.setGlobalOrigin = setGlobalOrigin$3; - module.exports.getGlobalOrigin = getGlobalOrigin$8; - const { CacheStorage: CacheStorage$3 } = require_cachestorage$1(); - const { kConstruct: kConstruct$13 } = require_symbols$2(); - module.exports.caches = new CacheStorage$3(kConstruct$13); - } - if (util$23.nodeMajor >= 16) { - const { deleteCookie: deleteCookie$3, getCookies: getCookies$3, getSetCookies: getSetCookies$3, setCookie: setCookie$3 } = require_cookies$1(); - module.exports.deleteCookie = deleteCookie$3; - module.exports.getCookies = getCookies$3; - module.exports.getSetCookies = getSetCookies$3; - module.exports.setCookie = setCookie$3; - const { parseMIMEType: parseMIMEType$8, serializeAMimeType: serializeAMimeType$9 } = require_dataURL(); - module.exports.parseMIMEType = parseMIMEType$8; - module.exports.serializeAMimeType = serializeAMimeType$9; - } - if (util$23.nodeMajor >= 18 && hasCrypto) { - const { WebSocket: WebSocket$2 } = require_websocket$1(); - module.exports.WebSocket = WebSocket$2; - } - module.exports.request = makeDispatcher$1(api$1.request); - module.exports.stream = makeDispatcher$1(api$1.stream); - module.exports.pipeline = makeDispatcher$1(api$1.pipeline); - module.exports.connect = makeDispatcher$1(api$1.connect); - module.exports.upgrade = makeDispatcher$1(api$1.upgrade); - module.exports.MockClient = MockClient$3; - module.exports.MockPool = MockPool$3; - module.exports.MockAgent = MockAgent$2; - module.exports.mockErrors = mockErrors$1; -} }); - -//#endregion -//#region node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js -var require_lib = __commonJS({ "node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js"(exports) { - var __createBinding$10 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$10 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$10 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$10(result, mod, k); - } - __setModuleDefault$10(result, mod); - return result; - }; - var __awaiter$12 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; - const http$1 = __importStar$10(__require("http")); - const https = __importStar$10(__require("https")); - const pm = __importStar$10(require_proxy()); - const tunnel = __importStar$10(require_tunnel()); - const undici_1 = require_undici$1(); - var HttpCodes; - (function(HttpCodes$1) { - HttpCodes$1[HttpCodes$1["OK"] = 200] = "OK"; - HttpCodes$1[HttpCodes$1["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes$1[HttpCodes$1["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes$1[HttpCodes$1["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes$1[HttpCodes$1["SeeOther"] = 303] = "SeeOther"; - HttpCodes$1[HttpCodes$1["NotModified"] = 304] = "NotModified"; - HttpCodes$1[HttpCodes$1["UseProxy"] = 305] = "UseProxy"; - HttpCodes$1[HttpCodes$1["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes$1[HttpCodes$1["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes$1[HttpCodes$1["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes$1[HttpCodes$1["BadRequest"] = 400] = "BadRequest"; - HttpCodes$1[HttpCodes$1["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes$1[HttpCodes$1["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes$1[HttpCodes$1["Forbidden"] = 403] = "Forbidden"; - HttpCodes$1[HttpCodes$1["NotFound"] = 404] = "NotFound"; - HttpCodes$1[HttpCodes$1["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes$1[HttpCodes$1["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes$1[HttpCodes$1["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes$1[HttpCodes$1["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes$1[HttpCodes$1["Conflict"] = 409] = "Conflict"; - HttpCodes$1[HttpCodes$1["Gone"] = 410] = "Gone"; - HttpCodes$1[HttpCodes$1["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes$1[HttpCodes$1["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes$1[HttpCodes$1["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes$1[HttpCodes$1["BadGateway"] = 502] = "BadGateway"; - HttpCodes$1[HttpCodes$1["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes$1[HttpCodes$1["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports.HttpCodes = HttpCodes = {})); - var Headers$5; - (function(Headers$12) { - Headers$12["Accept"] = "accept"; - Headers$12["ContentType"] = "content-type"; - })(Headers$5 || (exports.Headers = Headers$5 = {})); - var MediaTypes; - (function(MediaTypes$1) { - MediaTypes$1["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports.MediaTypes = MediaTypes = {})); - /** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports.getProxyUrl = getProxyUrl; - const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - const RetryableHttpVerbs = [ - "OPTIONS", - "GET", - "DELETE", - "HEAD" - ]; - const ExponentialBackoffCeiling = 10; - const ExponentialBackoffTimeSlice = 5; - var HttpClientError = class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } - }; - exports.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter$12(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter$12(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter$12(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter$12(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports.isHttps = isHttps; - var HttpClient = class { - constructor(userAgent$1, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent$1; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) this._ignoreSslError = requestOptions.ignoreSslError; - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) this._allowRedirects = requestOptions.allowRedirects; - if (requestOptions.allowRedirectDowngrade != null) this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - if (requestOptions.maxRedirects != null) this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - if (requestOptions.keepAlive != null) this._keepAlive = requestOptions.keepAlive; - if (requestOptions.allowRetries != null) this._allowRetries = requestOptions.allowRetries; - if (requestOptions.maxRetries != null) this._maxRetries = requestOptions.maxRetries; - } - } - options(requestUrl, additionalHeaders) { - return __awaiter$12(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter$12(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter$12(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter$12(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter$12(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter$12(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter$12(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream$5, additionalHeaders) { - return __awaiter$12(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream$5, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter$12(this, void 0, void 0, function* () { - additionalHeaders[Headers$5.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers$5.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter$12(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers$5.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers$5.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers$5.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers$5.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter$12(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers$5.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers$5.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers$5.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers$5.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter$12(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers$5.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers$5.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers$5.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers$5.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter$12(this, void 0, void 0, function* () { - if (this._disposed) throw new Error("Client has already been disposed."); - const parsedUrl = new URL(requestUrl); - let info$1 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info$1, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - if (authenticationHandler) return authenticationHandler.handleAuthentication(this, info$1, data); - else return response; - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) break; - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) if (header.toLowerCase() === "authorization") delete headers[header]; - } - info$1 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info$1, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) return response; - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) this._agent.destroy(); - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info$1, data) { - return __awaiter$12(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) reject(err); - else if (!res) reject(new Error("Unknown error")); - else resolve(res); - } - this.requestRawWithCallback(info$1, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info$1, data, onResult) { - if (typeof data === "string") { - if (!info$1.options.headers) info$1.options.headers = {}; - info$1.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult$1(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info$1.httpModule.request(info$1.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult$1(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) socket.end(); - handleResult$1(new Error(`Request timeout: ${info$1.options.path}`)); - }); - req.on("error", function(err) { - handleResult$1(err); - }); - if (data && typeof data === "string") req.write(data, "utf8"); - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else req.end(); - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) return; - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info$1 = {}; - info$1.parsedUrl = requestUrl; - const usingSsl = info$1.parsedUrl.protocol === "https:"; - info$1.httpModule = usingSsl ? https : http$1; - const defaultPort = usingSsl ? 443 : 80; - info$1.options = {}; - info$1.options.host = info$1.parsedUrl.hostname; - info$1.options.port = info$1.parsedUrl.port ? parseInt(info$1.parsedUrl.port) : defaultPort; - info$1.options.path = (info$1.parsedUrl.pathname || "") + (info$1.parsedUrl.search || ""); - info$1.options.method = method; - info$1.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) info$1.options.headers["user-agent"] = this.userAgent; - info$1.options.agent = this._getAgent(info$1.parsedUrl); - if (this.handlers) for (const handler of this.handlers) handler.prepareRequest(info$1.options); - return info$1; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) agent = this._proxyAgent; - if (!useProxy) agent = this._agent; - if (agent) return agent; - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) maxSockets = this.requestOptions.maxSockets || http$1.globalAgent.maxSockets; - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }), { - host: proxyUrl.hostname, - port: proxyUrl.port - }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - else tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { - keepAlive: this._keepAlive, - maxSockets - }; - agent = usingSsl ? new https.Agent(options) : new http$1.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) proxyAgent = this._proxyAgentDispatcher; - if (proxyAgent) return proxyAgent; - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ - uri: proxyUrl.href, - pipelining: !this._keepAlive ? 0 : 1 - }, (proxyUrl.username || proxyUrl.password) && { token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { rejectUnauthorized: false }); - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter$12(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve) => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter$12(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter$12(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) resolve(response); - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) return a; - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) obj = JSON.parse(contents, dateTimeDeserializer); - else obj = JSON.parse(contents); - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) {} - if (statusCode > 299) { - let msg; - if (obj && obj.message) msg = obj.message; - else if (contents && contents.length > 0) msg = contents; - else msg = `Failed request: (${statusCode})`; - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else resolve(response); - })); - }); - } - }; - exports.HttpClient = HttpClient; - const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); -} }); - -//#endregion -//#region node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js -var require_auth = __commonJS({ "node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js"(exports) { - var __awaiter$11 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) throw Error("The request has no headers"); - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter$11(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - prepareRequest(options) { - if (!options.headers) throw Error("The request has no headers"); - options.headers["Authorization"] = `Bearer ${this.token}`; - } - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter$11(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - prepareRequest(options) { - if (!options.headers) throw Error("The request has no headers"); - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter$11(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js -var require_oidc_utils = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js"(exports) { - var __awaiter$10 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.OidcClient = void 0; - const http_client_1 = require_lib(); - const auth_1 = require_auth(); - const core_1$1 = require_core(); - var OidcClient = class OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; - if (!token) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; - if (!runtimeUrl) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); - return runtimeUrl; - } - static getCall(id_token_url) { - var _a$1; - return __awaiter$10(this, void 0, void 0, function* () { - const httpclient = OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error$1) => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error$1.statusCode}\n - Error Message: ${error$1.message}`); - }); - const id_token = (_a$1 = res.result) === null || _a$1 === void 0 ? void 0 : _a$1.value; - if (!id_token) throw new Error("Response json body do not have ID Token field"); - return id_token; - }); - } - static getIDToken(audience) { - return __awaiter$10(this, void 0, void 0, function* () { - try { - let id_token_url = OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - (0, core_1$1.debug)(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - (0, core_1$1.setSecret)(id_token); - return id_token; - } catch (error$1) { - throw new Error(`Error message: ${error$1.message}`); - } - }); - } - }; - exports.OidcClient = OidcClient; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js -var require_summary = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js"(exports) { - var __awaiter$9 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; - const os_1$1 = __require("os"); - const fs_1 = __require("fs"); - const { access, appendFile, writeFile } = fs_1.promises; - exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; - exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; - var Summary = class { - constructor() { - this._buffer = ""; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter$9(this, void 0, void 0, function* () { - if (this._filePath) return this._filePath; - const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; - if (!pathFromEnv) throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a$1) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); - if (!content) return `<${tag}${htmlAttrs}>`; - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter$9(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter$9(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ""; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1$1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, lang && { lang }); - const element = this.wrap("pre", this.wrap("code", code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? "ol" : "ul"; - const listItems = items.map((item) => this.wrap("li", item)).join(""); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows.map((row) => { - const cells = row.map((cell) => { - if (typeof cell === "string") return this.wrap("td", cell); - const { header, data, colspan, rowspan } = cell; - const tag = header ? "th" : "td"; - const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); - return this.wrap(tag, data, attrs); - }).join(""); - return this.wrap("tr", cells); - }).join(""); - const element = this.wrap("table", tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap("details", this.wrap("summary", label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src$3, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); - const element = this.wrap("img", null, Object.assign({ - src: src$3, - alt - }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = [ - "h1", - "h2", - "h3", - "h4", - "h5", - "h6" - ].includes(tag) ? tag : "h1"; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap("hr", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap("br", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, cite && { cite }); - const element = this.wrap("blockquote", text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap("a", text, { href }); - return this.addRaw(element).addEOL(); - } - }; - const _summary = new Summary(); - /** - * @deprecated use `core.summary` - */ - exports.markdownSummary = _summary; - exports.summary = _summary; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js -var require_path_utils = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js"(exports) { - var __createBinding$9 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$9 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$9 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$9(result, mod, k); - } - __setModuleDefault$9(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - const path$7 = __importStar$9(__require("path")); - /** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ - function toPosixPath(pth) { - return pth.replace(/[\\]/g, "/"); - } - exports.toPosixPath = toPosixPath; - /** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ - function toWin32Path(pth) { - return pth.replace(/[/]/g, "\\"); - } - exports.toWin32Path = toWin32Path; - /** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ - function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path$7.sep); - } - exports.toPlatformPath = toPlatformPath; -} }); - -//#endregion -//#region node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js -var require_io_util = __commonJS({ "node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js"(exports) { - var __createBinding$8 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function() { - return m[k]; - } - }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$8 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$8 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$8(result, mod, k); - } - __setModuleDefault$8(result, mod); - return result; - }; - var __awaiter$8 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; - const fs$4 = __importStar$8(__require("fs")); - const path$6 = __importStar$8(__require("path")); - _a = fs$4.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; - exports.IS_WINDOWS = process.platform === "win32"; - exports.UV_FS_O_EXLOCK = 268435456; - exports.READONLY = fs$4.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter$8(this, void 0, void 0, function* () { - try { - yield exports.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") return false; - throw err; - } - return true; - }); - } - exports.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter$8(this, void 0, void 0, function* () { - const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports.isDirectory = isDirectory; - /** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) throw new Error("isRooted() parameter \"p\" cannot be empty"); - if (exports.IS_WINDOWS) return p.startsWith("\\") || /^[A-Z]:/i.test(p); - return p.startsWith("/"); - } - exports.isRooted = isRooted; - /** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ - function tryGetExecutablePath(filePath, extensions) { - return __awaiter$8(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - const upperExt = path$6.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) return filePath; - } else if (isUnixExecutable(stats)) return filePath; - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - try { - const directory = path$6.dirname(filePath); - const upperName = path$6.basename(filePath).toUpperCase(); - for (const actualName of yield exports.readdir(directory)) if (upperName === actualName.toUpperCase()) { - filePath = path$6.join(directory, actualName); - break; - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else if (isUnixExecutable(stats)) return filePath; - } - } - return ""; - }); - } - exports.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a$1; - return (_a$1 = process.env["COMSPEC"]) !== null && _a$1 !== void 0 ? _a$1 : `cmd.exe`; - } - exports.getCmdPath = getCmdPath; -} }); - -//#endregion -//#region node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js -var require_io = __commonJS({ "node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js"(exports) { - var __createBinding$7 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function() { - return m[k]; - } - }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$7 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$7 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$7(result, mod, k); - } - __setModuleDefault$7(result, mod); - return result; - }; - var __awaiter$7 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; - const assert_1$1 = __require("assert"); - const path$5 = __importStar$7(__require("path")); - const ioUtil$1 = __importStar$7(require_io_util()); - /** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ - function cp$1(source, dest, options = {}) { - return __awaiter$7(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil$1.exists(dest)) ? yield ioUtil$1.stat(dest) : null; - if (destStat && destStat.isFile() && !force) return; - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path$5.join(dest, path$5.basename(source)) : dest; - if (!(yield ioUtil$1.exists(source))) throw new Error(`no such file or directory: ${source}`); - const sourceStat = yield ioUtil$1.stat(source); - if (sourceStat.isDirectory()) if (!recursive) throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - else yield cpDirRecursive(source, newDest, 0, force); - else { - if (path$5.relative(source, newDest) === "") throw new Error(`'${newDest}' and '${source}' are the same file`); - yield copyFile(source, newDest, force); - } - }); - } - exports.cp = cp$1; - /** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ - function mv(source, dest, options = {}) { - return __awaiter$7(this, void 0, void 0, function* () { - if (yield ioUtil$1.exists(dest)) { - let destExists = true; - if (yield ioUtil$1.isDirectory(dest)) { - dest = path$5.join(dest, path$5.basename(source)); - destExists = yield ioUtil$1.exists(dest); - } - if (destExists) if (options.force == null || options.force) yield rmRF(dest); - else throw new Error("Destination already exists"); - } - yield mkdirP(path$5.dirname(dest)); - yield ioUtil$1.rename(source, dest); - }); - } - exports.mv = mv; - /** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ - function rmRF(inputPath) { - return __awaiter$7(this, void 0, void 0, function* () { - if (ioUtil$1.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) throw new Error("File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows"); - } - try { - yield ioUtil$1.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports.rmRF = rmRF; - /** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ - function mkdirP(fsPath) { - return __awaiter$7(this, void 0, void 0, function* () { - assert_1$1.ok(fsPath, "a path argument must be provided"); - yield ioUtil$1.mkdir(fsPath, { recursive: true }); - }); - } - exports.mkdirP = mkdirP; - /** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ - function which(tool, check) { - return __awaiter$7(this, void 0, void 0, function* () { - if (!tool) throw new Error("parameter 'tool' is required"); - if (check) { - const result = yield which(tool, false); - if (!result) if (ioUtil$1.IS_WINDOWS) throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - else throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) return matches[0]; - return ""; - }); - } - exports.which = which; - /** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ - function findInPath(tool) { - return __awaiter$7(this, void 0, void 0, function* () { - if (!tool) throw new Error("parameter 'tool' is required"); - const extensions = []; - if (ioUtil$1.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path$5.delimiter)) if (extension) extensions.push(extension); - } - if (ioUtil$1.isRooted(tool)) { - const filePath = yield ioUtil$1.tryGetExecutablePath(tool, extensions); - if (filePath) return [filePath]; - return []; - } - if (tool.includes(path$5.sep)) return []; - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path$5.delimiter)) if (p) directories.push(p); - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil$1.tryGetExecutablePath(path$5.join(directory, tool), extensions); - if (filePath) matches.push(filePath); - } - return matches; - }); - } - exports.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { - force, - recursive, - copySourceDirectory - }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter$7(this, void 0, void 0, function* () { - if (currentDepth >= 255) return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil$1.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil$1.lstat(srcFile); - if (srcFileStat.isDirectory()) yield cpDirRecursive(srcFile, destFile, currentDepth, force); - else yield copyFile(srcFile, destFile, force); - } - yield ioUtil$1.chmod(destDir, (yield ioUtil$1.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter$7(this, void 0, void 0, function* () { - if ((yield ioUtil$1.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil$1.lstat(destFile); - yield ioUtil$1.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil$1.chmod(destFile, "0666"); - yield ioUtil$1.unlink(destFile); - } - } - const symlinkFull = yield ioUtil$1.readlink(srcFile); - yield ioUtil$1.symlink(symlinkFull, destFile, ioUtil$1.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil$1.exists(destFile)) || force) yield ioUtil$1.copyFile(srcFile, destFile); - }); - } -} }); - -//#endregion -//#region node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js -var require_toolrunner = __commonJS({ "node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js"(exports) { - var __createBinding$6 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function() { - return m[k]; - } - }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$6 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$6 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$6(result, mod, k); - } - __setModuleDefault$6(result, mod); - return result; - }; - var __awaiter$6 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.argStringToArray = exports.ToolRunner = void 0; - const os$4 = __importStar$6(__require("os")); - const events = __importStar$6(__require("events")); - const child = __importStar$6(__require("child_process")); - const path$4 = __importStar$6(__require("path")); - const io$1 = __importStar$6(require_io()); - const ioUtil = __importStar$6(require_io_util()); - const timers_1 = __require("timers"); - const IS_WINDOWS$1 = process.platform === "win32"; - var ToolRunner = class extends events.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) throw new Error("Parameter 'toolPath' cannot be null or empty."); - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) this.options.listeners.debug(message); - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? "" : "[command]"; - if (IS_WINDOWS$1) if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) cmd += ` ${a}`; - } else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) cmd += ` ${a}`; - } else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - else { - cmd += toolPath; - for (const a of args) cmd += ` ${a}`; - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(os$4.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - s = s.substring(n + os$4.EOL.length); - n = s.indexOf(os$4.EOL); - } - return s; - } catch (err) { - this._debug(`error processing line. Failed with error ${err}`); - return ""; - } - } - _getSpawnFileName() { - if (IS_WINDOWS$1) { - if (this._isCmdFile()) return process.env["COMSPEC"] || "cmd.exe"; - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (IS_WINDOWS$1) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += " "; - argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); - } - argline += "\""; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); - } - _windowsQuoteCmdArg(arg) { - if (!this._isCmdFile()) return this._uvQuoteCmdArg(arg); - if (!arg) return "\"\""; - const cmdSpecialChars = [ - " ", - " ", - "&", - "(", - ")", - "[", - "]", - "{", - "}", - "^", - "=", - ";", - "!", - "'", - "+", - ",", - "`", - "~", - "|", - "<", - ">", - "\"" - ]; - let needsQuotes = false; - for (const char of arg) if (cmdSpecialChars.some((x) => x === char)) { - needsQuotes = true; - break; - } - if (!needsQuotes) return arg; - let reverse = "\""; - let quoteHit = true; - for (let i$1 = arg.length; i$1 > 0; i$1--) { - reverse += arg[i$1 - 1]; - if (quoteHit && arg[i$1 - 1] === "\\") reverse += "\\"; - else if (arg[i$1 - 1] === "\"") { - quoteHit = true; - reverse += "\""; - } else quoteHit = false; - } - reverse += "\""; - return reverse.split("").reverse().join(""); - } - _uvQuoteCmdArg(arg) { - if (!arg) return "\"\""; - if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes("\"")) return arg; - if (!arg.includes("\"") && !arg.includes("\\")) return `"${arg}"`; - let reverse = "\""; - let quoteHit = true; - for (let i$1 = arg.length; i$1 > 0; i$1--) { - reverse += arg[i$1 - 1]; - if (quoteHit && arg[i$1 - 1] === "\\") reverse += "\\"; - else if (arg[i$1 - 1] === "\"") { - quoteHit = true; - reverse += "\\"; - } else quoteHit = false; - } - reverse += "\""; - return reverse.split("").reverse().join(""); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 1e4 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) result.argv0 = `"${toolPath}"`; - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return __awaiter$6(this, void 0, void 0, function* () { - if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS$1 && this.toolPath.includes("\\"))) this.toolPath = path$4.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - this.toolPath = yield io$1.which(this.toolPath, true); - return new Promise((resolve, reject) => __awaiter$6(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug("arguments:"); - for (const arg of this.args) this._debug(` ${arg}`); - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os$4.EOL); - const state = new ExecState(optionsNonNull, this.toolPath); - state.on("debug", (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - const fileName = this._getSpawnFileName(); - const cp$2 = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ""; - if (cp$2.stdout) cp$2.stdout.on("data", (data) => { - if (this.options.listeners && this.options.listeners.stdout) this.options.listeners.stdout(data); - if (!optionsNonNull.silent && optionsNonNull.outStream) optionsNonNull.outStream.write(data); - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) this.options.listeners.stdline(line); - }); - }); - let errbuffer = ""; - if (cp$2.stderr) cp$2.stderr.on("data", (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) this.options.listeners.stderr(data); - if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) this.options.listeners.errline(line); - }); - }); - cp$2.on("error", (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp$2.on("exit", (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp$2.on("close", (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on("done", (error$1, exitCode) => { - if (stdbuffer.length > 0) this.emit("stdline", stdbuffer); - if (errbuffer.length > 0) this.emit("errline", errbuffer); - cp$2.removeAllListeners(); - if (error$1) reject(error$1); - else resolve(exitCode); - }); - if (this.options.input) { - if (!cp$2.stdin) throw new Error("child process missing stdin"); - cp$2.stdin.end(this.options.input); - } - })); - }); - } - }; - exports.ToolRunner = ToolRunner; - /** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ - function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ""; - function append(c) { - if (escaped && c !== "\"") arg += "\\"; - arg += c; - escaped = false; - } - for (let i$1 = 0; i$1 < argString.length; i$1++) { - const c = argString.charAt(i$1); - if (c === "\"") { - if (!escaped) inQuotes = !inQuotes; - else append(c); - continue; - } - if (c === "\\" && escaped) { - append(c); - continue; - } - if (c === "\\" && inQuotes) { - escaped = true; - continue; - } - if (c === " " && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ""; - } - continue; - } - append(c); - } - if (arg.length > 0) args.push(arg.trim()); - return args; - } - exports.argStringToArray = argStringToArray; - var ExecState = class ExecState extends events.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; - this.processError = ""; - this.processExitCode = 0; - this.processExited = false; - this.processStderr = false; - this.delay = 1e4; - this.done = false; - this.timeout = null; - if (!toolPath) throw new Error("toolPath must not be empty"); - this.options = options; - this.toolPath = toolPath; - if (options.delay) this.delay = options.delay; - } - CheckComplete() { - if (this.done) return; - if (this.processClosed) this._setResult(); - else if (this.processExited) this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); - } - _debug(message) { - this.emit("debug", message); - } - _setResult() { - let error$1; - if (this.processExited) { - if (this.processError) error$1 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) error$1 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - else if (this.processStderr && this.options.failOnStdErr) error$1 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit("done", error$1, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) return; - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } - }; -} }); - -//#endregion -//#region node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js -var require_exec = __commonJS({ "node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js"(exports) { - var __createBinding$5 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function() { - return m[k]; - } - }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$5 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$5 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$5(result, mod, k); - } - __setModuleDefault$5(result, mod); - return result; - }; - var __awaiter$5 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getExecOutput = exports.exec = void 0; - const string_decoder_1 = __require("string_decoder"); - const tr = __importStar$5(require_toolrunner()); - /** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ - function exec$1(commandLine, args, options) { - return __awaiter$5(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); - } - exports.exec = exec$1; - /** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ - function getExecOutput(commandLine, args, options) { - var _a$1, _b; - return __awaiter$5(this, void 0, void 0, function* () { - let stdout = ""; - let stderr = ""; - const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); - const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a$1 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a$1 === void 0 ? void 0 : _a$1.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) originalStdErrListener(data); - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) originalStdoutListener(data); - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { - stdout: stdOutListener, - stderr: stdErrListener - }); - const exitCode = yield exec$1(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); - } - exports.getExecOutput = getExecOutput; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js -var require_platform = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js"(exports) { - var __createBinding$4 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$4 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$4 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$4(result, mod, k); - } - __setModuleDefault$4(result, mod); - return result; - }; - var __awaiter$4 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; - const os_1 = __importDefault(__require("os")); - const exec = __importStar$4(require_exec()); - const getWindowsInfo = () => __awaiter$4(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"", void 0, { silent: true }); - const { stdout: name } = yield exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"", void 0, { silent: true }); - return { - name: name.trim(), - version: version.trim() - }; - }); - const getMacOsInfo = () => __awaiter$4(void 0, void 0, void 0, function* () { - var _a$1, _b, _c, _d; - const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true }); - const version = (_b = (_a$1 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a$1 === void 0 ? void 0 : _a$1[1]) !== null && _b !== void 0 ? _b : ""; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; - return { - name, - version - }; - }); - const getLinuxInfo = () => __awaiter$4(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput("lsb_release", [ - "-i", - "-r", - "-s" - ], { silent: true }); - const [name, version] = stdout.trim().split("\n"); - return { - name, - version - }; - }); - exports.platform = os_1.default.platform(); - exports.arch = os_1.default.arch(); - exports.isWindows = exports.platform === "win32"; - exports.isMacOS = exports.platform === "darwin"; - exports.isLinux = exports.platform === "linux"; - function getDetails() { - return __awaiter$4(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, yield exports.isWindows ? getWindowsInfo() : exports.isMacOS ? getMacOsInfo() : getLinuxInfo()), { - platform: exports.platform, - arch: exports.arch, - isWindows: exports.isWindows, - isMacOS: exports.isMacOS, - isLinux: exports.isLinux - }); - }); - } - exports.getDetails = getDetails; -} }); - -//#endregion -//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js -var require_core = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js"(exports) { - var __createBinding$3 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; - } - }; - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar$3 = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$3(result, mod, k); - } - __setModuleDefault$3(result, mod); - return result; - }; - var __awaiter$3 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; - const command_1 = require_command(); - const file_command_1 = require_file_command(); - const utils_1$1 = require_utils$2(); - const os$3 = __importStar$3(__require("os")); - const path$3 = __importStar$3(__require("path")); - const oidc_utils_1 = require_oidc_utils(); - /** - * The code to exit an action - */ - var ExitCode; - (function(ExitCode$1) { - /** - * A code indicating that the action was successful - */ - ExitCode$1[ExitCode$1["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode$1[ExitCode$1["Failure"] = 1] = "Failure"; - })(ExitCode || (exports.ExitCode = ExitCode = {})); - /** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ - function exportVariable(name, val) { - const convertedVal = (0, utils_1$1.toCommandValue)(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); - (0, command_1.issueCommand)("set-env", { name }, convertedVal); - } - exports.exportVariable = exportVariable; - /** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ - function setSecret(secret) { - (0, command_1.issueCommand)("add-mask", {}, secret); - } - exports.setSecret = setSecret; - /** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ - function addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) (0, file_command_1.issueFileCommand)("PATH", inputPath); - else (0, command_1.issueCommand)("add-path", {}, inputPath); - process.env["PATH"] = `${inputPath}${path$3.delimiter}${process.env["PATH"]}`; - } - exports.addPath = addPath; - /** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ - function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) throw new Error(`Input required and not supplied: ${name}`); - if (options && options.trimWhitespace === false) return val; - return val.trim(); - } - exports.getInput = getInput; - /** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ - function getMultilineInput(name, options) { - const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); - if (options && options.trimWhitespace === false) return inputs; - return inputs.map((input) => input.trim()); - } - exports.getMultilineInput = getMultilineInput; - /** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ - function getBooleanInput(name, options) { - const trueValue = [ - "true", - "True", - "TRUE" - ]; - const falseValue = [ - "false", - "False", - "FALSE" - ]; - const val = getInput(name, options); - if (trueValue.includes(val)) return true; - if (falseValue.includes(val)) return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``); - } - exports.getBooleanInput = getBooleanInput; - /** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ - function setOutput(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); - process.stdout.write(os$3.EOL); - (0, command_1.issueCommand)("set-output", { name }, (0, utils_1$1.toCommandValue)(value)); - } - exports.setOutput = setOutput; - /** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ - function setCommandEcho(enabled) { - (0, command_1.issue)("echo", enabled ? "on" : "off"); - } - exports.setCommandEcho = setCommandEcho; - /** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ - function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); - } - exports.setFailed = setFailed; - /** - * Gets whether Actions Step Debug is on or not - */ - function isDebug() { - return process.env["RUNNER_DEBUG"] === "1"; - } - exports.isDebug = isDebug; - /** - * Writes debug message to user log - * @param message debug message - */ - function debug$6(message) { - (0, command_1.issueCommand)("debug", {}, message); - } - exports.debug = debug$6; - /** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ - function error(message, properties = {}) { - (0, command_1.issueCommand)("error", (0, utils_1$1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - exports.error = error; - /** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ - function warning(message, properties = {}) { - (0, command_1.issueCommand)("warning", (0, utils_1$1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - exports.warning = warning; - /** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ - function notice(message, properties = {}) { - (0, command_1.issueCommand)("notice", (0, utils_1$1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - exports.notice = notice; - /** - * Writes info to log with console.log. - * @param message info message - */ - function info(message) { - process.stdout.write(message + os$3.EOL); - } - exports.info = info; - /** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ - function startGroup(name) { - (0, command_1.issue)("group", name); - } - exports.startGroup = startGroup; - /** - * End an output group. - */ - function endGroup() { - (0, command_1.issue)("endgroup"); - } - exports.endGroup = endGroup; - /** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ - function group(name, fn) { - return __awaiter$3(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } finally { - endGroup(); - } - return result; - }); - } - exports.group = group; - /** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ - function saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); - (0, command_1.issueCommand)("save-state", { name }, (0, utils_1$1.toCommandValue)(value)); - } - exports.saveState = saveState; - /** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ - function getState(name) { - return process.env[`STATE_${name}`] || ""; - } - exports.getState = getState; - function getIDToken(aud) { - return __awaiter$3(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); - } - exports.getIDToken = getIDToken; - /** - * Summary exports - */ - var summary_1 = require_summary(); - Object.defineProperty(exports, "summary", { - enumerable: true, - get: function() { - return summary_1.summary; - } - }); - /** - * @deprecated use core.summary - */ - var summary_2 = require_summary(); - Object.defineProperty(exports, "markdownSummary", { - enumerable: true, - get: function() { - return summary_2.markdownSummary; - } - }); - /** - * Path exports - */ - var path_utils_1 = require_path_utils(); - Object.defineProperty(exports, "toPosixPath", { - enumerable: true, - get: function() { - return path_utils_1.toPosixPath; - } - }); - Object.defineProperty(exports, "toWin32Path", { - enumerable: true, - get: function() { - return path_utils_1.toWin32Path; - } - }); - Object.defineProperty(exports, "toPlatformPath", { - enumerable: true, - get: function() { - return path_utils_1.toPlatformPath; - } - }); - /** - * Platform utilities exports - */ - exports.platform = __importStar$3(require_platform()); -} }); -var import_core = __toESM(require_core()); - -//#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/internal/constants.js var require_constants$5 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/internal/constants.js"(exports, module) { const SEMVER_SPEC_VERSION = "2.0.0"; - const MAX_LENGTH$3 = 256; - const MAX_SAFE_INTEGER$2 = Number.MAX_SAFE_INTEGER || 9007199254740991; - const MAX_SAFE_COMPONENT_LENGTH$2 = 16; - const MAX_SAFE_BUILD_LENGTH$2 = MAX_LENGTH$3 - 6; + const MAX_LENGTH$2 = 256; + const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; + const MAX_SAFE_COMPONENT_LENGTH$1 = 16; + const MAX_SAFE_BUILD_LENGTH$1 = MAX_LENGTH$2 - 6; const RELEASE_TYPES = [ "major", "premajor", @@ -17102,10 +25,10 @@ var require_constants$5 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_mod "prerelease" ]; module.exports = { - MAX_LENGTH: MAX_LENGTH$3, - MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$2, - MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH$2, - MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$2, + MAX_LENGTH: MAX_LENGTH$2, + MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$1, + MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH$1, + MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1, RELEASE_TYPES, SEMVER_SPEC_VERSION, FLAG_INCLUDE_PRERELEASE: 1, @@ -17116,85 +39,85 @@ var require_constants$5 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_mod //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/internal/debug.js var require_debug = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/internal/debug.js"(exports, module) { - const debug$5 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {}; - module.exports = debug$5; + const debug$4 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {}; + module.exports = debug$4; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/internal/re.js var require_re = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/internal/re.js"(exports, module) { - const { MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$1, MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH$1, MAX_LENGTH: MAX_LENGTH$2 } = require_constants$5(); - const debug$4 = require_debug(); + const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants$5(); + const debug$3 = require_debug(); exports = module.exports = {}; - const re$5 = exports.re = []; - const safeRe$1 = exports.safeRe = []; - const src$2 = exports.src = []; + const re$4 = exports.re = []; + const safeRe = exports.safeRe = []; + const src$1 = exports.src = []; const safeSrc = exports.safeSrc = []; - const t$5 = exports.t = {}; - let R$1 = 0; - const LETTERDASHNUMBER$1 = "[a-zA-Z0-9-]"; - const safeRegexReplacements$1 = [ + const t$4 = exports.t = {}; + let R = 0; + const LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + const safeRegexReplacements = [ ["\\s", 1], - ["\\d", MAX_LENGTH$2], - [LETTERDASHNUMBER$1, MAX_SAFE_BUILD_LENGTH$1] + ["\\d", MAX_LENGTH$1], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] ]; const makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements$1) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); + for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); return value; }; const createToken = (name, value, isGlobal) => { const safe = makeSafeRegex(value); - const index = R$1++; - debug$4(name, index, value); - t$5[name] = index; - src$2[index] = value; + const index = R++; + debug$3(name, index, value); + t$4[name] = index; + src$1[index] = value; safeSrc[index] = safe; - re$5[index] = new RegExp(value, isGlobal ? "g" : void 0); - safeRe$1[index] = new RegExp(safe, isGlobal ? "g" : void 0); + re$4[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); }; createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); - createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER$1}*`); - createToken("MAINVERSION", `(${src$2[t$5.NUMERICIDENTIFIER]})\\.(${src$2[t$5.NUMERICIDENTIFIER]})\\.(${src$2[t$5.NUMERICIDENTIFIER]})`); - createToken("MAINVERSIONLOOSE", `(${src$2[t$5.NUMERICIDENTIFIERLOOSE]})\\.(${src$2[t$5.NUMERICIDENTIFIERLOOSE]})\\.(${src$2[t$5.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASEIDENTIFIER", `(?:${src$2[t$5.NUMERICIDENTIFIER]}|${src$2[t$5.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src$2[t$5.NUMERICIDENTIFIERLOOSE]}|${src$2[t$5.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASE", `(?:-(${src$2[t$5.PRERELEASEIDENTIFIER]}(?:\\.${src$2[t$5.PRERELEASEIDENTIFIER]})*))`); - createToken("PRERELEASELOOSE", `(?:-?(${src$2[t$5.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src$2[t$5.PRERELEASEIDENTIFIERLOOSE]})*))`); - createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER$1}+`); - createToken("BUILD", `(?:\\+(${src$2[t$5.BUILDIDENTIFIER]}(?:\\.${src$2[t$5.BUILDIDENTIFIER]})*))`); - createToken("FULLPLAIN", `v?${src$2[t$5.MAINVERSION]}${src$2[t$5.PRERELEASE]}?${src$2[t$5.BUILD]}?`); - createToken("FULL", `^${src$2[t$5.FULLPLAIN]}$`); - createToken("LOOSEPLAIN", `[v=\\s]*${src$2[t$5.MAINVERSIONLOOSE]}${src$2[t$5.PRERELEASELOOSE]}?${src$2[t$5.BUILD]}?`); - createToken("LOOSE", `^${src$2[t$5.LOOSEPLAIN]}$`); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src$1[t$4.NUMERICIDENTIFIER]})\\.(${src$1[t$4.NUMERICIDENTIFIER]})\\.(${src$1[t$4.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src$1[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src$1[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src$1[t$4.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src$1[t$4.NUMERICIDENTIFIER]}|${src$1[t$4.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src$1[t$4.NUMERICIDENTIFIERLOOSE]}|${src$1[t$4.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASE", `(?:-(${src$1[t$4.PRERELEASEIDENTIFIER]}(?:\\.${src$1[t$4.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src$1[t$4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src$1[t$4.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src$1[t$4.BUILDIDENTIFIER]}(?:\\.${src$1[t$4.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src$1[t$4.MAINVERSION]}${src$1[t$4.PRERELEASE]}?${src$1[t$4.BUILD]}?`); + createToken("FULL", `^${src$1[t$4.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src$1[t$4.MAINVERSIONLOOSE]}${src$1[t$4.PRERELEASELOOSE]}?${src$1[t$4.BUILD]}?`); + createToken("LOOSE", `^${src$1[t$4.LOOSEPLAIN]}$`); createToken("GTLT", "((?:<|>)?=?)"); - createToken("XRANGEIDENTIFIERLOOSE", `${src$2[t$5.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); - createToken("XRANGEIDENTIFIER", `${src$2[t$5.NUMERICIDENTIFIER]}|x|X|\\*`); - createToken("XRANGEPLAIN", `[v=\\s]*(${src$2[t$5.XRANGEIDENTIFIER]})(?:\\.(${src$2[t$5.XRANGEIDENTIFIER]})(?:\\.(${src$2[t$5.XRANGEIDENTIFIER]})(?:${src$2[t$5.PRERELEASE]})?${src$2[t$5.BUILD]}?)?)?`); - createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src$2[t$5.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src$2[t$5.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src$2[t$5.XRANGEIDENTIFIERLOOSE]})(?:${src$2[t$5.PRERELEASELOOSE]})?${src$2[t$5.BUILD]}?)?)?`); - createToken("XRANGE", `^${src$2[t$5.GTLT]}\\s*${src$2[t$5.XRANGEPLAIN]}$`); - createToken("XRANGELOOSE", `^${src$2[t$5.GTLT]}\\s*${src$2[t$5.XRANGEPLAINLOOSE]}$`); - createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH$1}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH$1}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH$1}}))?`); - createToken("COERCE", `${src$2[t$5.COERCEPLAIN]}(?:$|[^\\d])`); - createToken("COERCEFULL", src$2[t$5.COERCEPLAIN] + `(?:${src$2[t$5.PRERELEASE]})?(?:${src$2[t$5.BUILD]})?(?:$|[^\\d])`); - createToken("COERCERTL", src$2[t$5.COERCE], true); - createToken("COERCERTLFULL", src$2[t$5.COERCEFULL], true); + createToken("XRANGEIDENTIFIERLOOSE", `${src$1[t$4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src$1[t$4.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src$1[t$4.XRANGEIDENTIFIER]})(?:\\.(${src$1[t$4.XRANGEIDENTIFIER]})(?:\\.(${src$1[t$4.XRANGEIDENTIFIER]})(?:${src$1[t$4.PRERELEASE]})?${src$1[t$4.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src$1[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src$1[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src$1[t$4.XRANGEIDENTIFIERLOOSE]})(?:${src$1[t$4.PRERELEASELOOSE]})?${src$1[t$4.BUILD]}?)?)?`); + createToken("XRANGE", `^${src$1[t$4.GTLT]}\\s*${src$1[t$4.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src$1[t$4.GTLT]}\\s*${src$1[t$4.XRANGEPLAINLOOSE]}$`); + createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); + createToken("COERCE", `${src$1[t$4.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src$1[t$4.COERCEPLAIN] + `(?:${src$1[t$4.PRERELEASE]})?(?:${src$1[t$4.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src$1[t$4.COERCE], true); + createToken("COERCERTLFULL", src$1[t$4.COERCEFULL], true); createToken("LONETILDE", "(?:~>?)"); - createToken("TILDETRIM", `(\\s*)${src$2[t$5.LONETILDE]}\\s+`, true); + createToken("TILDETRIM", `(\\s*)${src$1[t$4.LONETILDE]}\\s+`, true); exports.tildeTrimReplace = "$1~"; - createToken("TILDE", `^${src$2[t$5.LONETILDE]}${src$2[t$5.XRANGEPLAIN]}$`); - createToken("TILDELOOSE", `^${src$2[t$5.LONETILDE]}${src$2[t$5.XRANGEPLAINLOOSE]}$`); + createToken("TILDE", `^${src$1[t$4.LONETILDE]}${src$1[t$4.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src$1[t$4.LONETILDE]}${src$1[t$4.XRANGEPLAINLOOSE]}$`); createToken("LONECARET", "(?:\\^)"); - createToken("CARETTRIM", `(\\s*)${src$2[t$5.LONECARET]}\\s+`, true); + createToken("CARETTRIM", `(\\s*)${src$1[t$4.LONECARET]}\\s+`, true); exports.caretTrimReplace = "$1^"; - createToken("CARET", `^${src$2[t$5.LONECARET]}${src$2[t$5.XRANGEPLAIN]}$`); - createToken("CARETLOOSE", `^${src$2[t$5.LONECARET]}${src$2[t$5.XRANGEPLAINLOOSE]}$`); - createToken("COMPARATORLOOSE", `^${src$2[t$5.GTLT]}\\s*(${src$2[t$5.LOOSEPLAIN]})$|^$`); - createToken("COMPARATOR", `^${src$2[t$5.GTLT]}\\s*(${src$2[t$5.FULLPLAIN]})$|^$`); - createToken("COMPARATORTRIM", `(\\s*)${src$2[t$5.GTLT]}\\s*(${src$2[t$5.LOOSEPLAIN]}|${src$2[t$5.XRANGEPLAIN]})`, true); + createToken("CARET", `^${src$1[t$4.LONECARET]}${src$1[t$4.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src$1[t$4.LONECARET]}${src$1[t$4.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src$1[t$4.GTLT]}\\s*(${src$1[t$4.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src$1[t$4.GTLT]}\\s*(${src$1[t$4.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src$1[t$4.GTLT]}\\s*(${src$1[t$4.LOOSEPLAIN]}|${src$1[t$4.XRANGEPLAIN]})`, true); exports.comparatorTrimReplace = "$1$2$3"; - createToken("HYPHENRANGE", `^\\s*(${src$2[t$5.XRANGEPLAIN]})\\s+-\\s+(${src$2[t$5.XRANGEPLAIN]})\\s*$`); - createToken("HYPHENRANGELOOSE", `^\\s*(${src$2[t$5.XRANGEPLAINLOOSE]})\\s+-\\s+(${src$2[t$5.XRANGEPLAINLOOSE]})\\s*$`); + createToken("HYPHENRANGE", `^\\s*(${src$1[t$4.XRANGEPLAIN]})\\s+-\\s+(${src$1[t$4.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src$1[t$4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src$1[t$4.XRANGEPLAINLOOSE]})\\s*$`); createToken("STAR", "(<|>)?=?\\s*\\*"); createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); @@ -17216,56 +139,56 @@ var require_parse_options = __commonJS({ "node_modules/.deno/semver@7.7.1/node_m //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/internal/identifiers.js var require_identifiers = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/internal/identifiers.js"(exports, module) { - const numeric$1 = /^[0-9]+$/; - const compareIdentifiers$2 = (a, b) => { - const anum = numeric$1.test(a); - const bnum = numeric$1.test(b); + const numeric = /^[0-9]+$/; + const compareIdentifiers$1 = (a, b) => { + const anum = numeric.test(a); + const bnum = numeric.test(b); if (anum && bnum) { a = +a; b = +b; } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; }; - const rcompareIdentifiers$1 = (a, b) => compareIdentifiers$2(b, a); + const rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a); module.exports = { - compareIdentifiers: compareIdentifiers$2, - rcompareIdentifiers: rcompareIdentifiers$1 + compareIdentifiers: compareIdentifiers$1, + rcompareIdentifiers }; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/classes/semver.js -var require_semver$2 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/classes/semver.js"(exports, module) { - const debug$3 = require_debug(); - const { MAX_LENGTH: MAX_LENGTH$1, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1 } = require_constants$5(); - const { safeRe: re$4, safeSrc: src$1, t: t$4 } = require_re(); +var require_semver$3 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/classes/semver.js"(exports, module) { + const debug$2 = require_debug(); + const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants$5(); + const { safeRe: re$3, safeSrc: src, t: t$3 } = require_re(); const parseOptions$2 = require_parse_options(); - const { compareIdentifiers: compareIdentifiers$1 } = require_identifiers(); - var SemVer$16 = class SemVer$16 { + const { compareIdentifiers } = require_identifiers(); + var SemVer$15 = class SemVer$15 { constructor(version, options) { options = parseOptions$2(options); - if (version instanceof SemVer$16) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version; + if (version instanceof SemVer$15) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version; else version = version.version; else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); - if (version.length > MAX_LENGTH$1) throw new TypeError(`version is longer than ${MAX_LENGTH$1} characters`); - debug$3("SemVer", version, options); + if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`); + debug$2("SemVer", version, options); this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; - const m = version.trim().match(options.loose ? re$4[t$4.LOOSE] : re$4[t$4.FULL]); + const m = version.trim().match(options.loose ? re$3[t$3.LOOSE] : re$3[t$3.FULL]); if (!m) throw new TypeError(`Invalid Version: ${version}`); this.raw = version; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER$1 || this.major < 0) throw new TypeError("Invalid major version"); - if (this.minor > MAX_SAFE_INTEGER$1 || this.minor < 0) throw new TypeError("Invalid minor version"); - if (this.patch > MAX_SAFE_INTEGER$1 || this.patch < 0) throw new TypeError("Invalid patch version"); + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version"); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version"); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version"); if (!m[4]) this.prerelease = []; else this.prerelease = m[4].split(".").map((id) => { if (/^[0-9]+$/.test(id)) { const num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER$1) return num; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; } return id; }); @@ -17281,54 +204,54 @@ var require_semver$2 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_module return this.version; } compare(other) { - debug$3("SemVer.compare", this.version, this.options, other); - if (!(other instanceof SemVer$16)) { + debug$2("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer$15)) { if (typeof other === "string" && other === this.version) return 0; - other = new SemVer$16(other, this.options); + other = new SemVer$15(other, this.options); } if (other.version === this.version) return 0; return this.compareMain(other) || this.comparePre(other); } compareMain(other) { - if (!(other instanceof SemVer$16)) other = new SemVer$16(other, this.options); - return compareIdentifiers$1(this.major, other.major) || compareIdentifiers$1(this.minor, other.minor) || compareIdentifiers$1(this.patch, other.patch); + if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options); + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); } comparePre(other) { - if (!(other instanceof SemVer$16)) other = new SemVer$16(other, this.options); + if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options); if (this.prerelease.length && !other.prerelease.length) return -1; else if (!this.prerelease.length && other.prerelease.length) return 1; else if (!this.prerelease.length && !other.prerelease.length) return 0; - let i$1 = 0; + let i = 0; do { - const a = this.prerelease[i$1]; - const b = other.prerelease[i$1]; - debug$3("prerelease compare", i$1, a, b); + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug$2("prerelease compare", i, a, b); if (a === void 0 && b === void 0) return 0; else if (b === void 0) return 1; else if (a === void 0) return -1; else if (a === b) continue; - else return compareIdentifiers$1(a, b); - } while (++i$1); + else return compareIdentifiers(a, b); + } while (++i); } compareBuild(other) { - if (!(other instanceof SemVer$16)) other = new SemVer$16(other, this.options); - let i$1 = 0; + if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options); + let i = 0; do { - const a = this.build[i$1]; - const b = other.build[i$1]; - debug$3("build compare", i$1, a, b); + const a = this.build[i]; + const b = other.build[i]; + debug$2("build compare", i, a, b); if (a === void 0 && b === void 0) return 0; else if (b === void 0) return 1; else if (a === void 0) return -1; else if (a === b) continue; - else return compareIdentifiers$1(a, b); - } while (++i$1); + else return compareIdentifiers(a, b); + } while (++i); } inc(release, identifier, identifierBase) { if (release.startsWith("pre")) { if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty"); if (identifier) { - const r = new RegExp(`^${this.options.loose ? src$1[t$4.PRERELEASELOOSE] : src$1[t$4.PRERELEASE]}$`); + const r = new RegExp(`^${this.options.loose ? src[t$3.PRERELEASELOOSE] : src[t$3.PRERELEASE]}$`); const match = `-${identifier}`.match(r); if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`); } @@ -17379,22 +302,22 @@ var require_semver$2 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_module const base = Number(identifierBase) ? 1 : 0; if (this.prerelease.length === 0) this.prerelease = [base]; else { - let i$1 = this.prerelease.length; - while (--i$1 >= 0) if (typeof this.prerelease[i$1] === "number") { - this.prerelease[i$1]++; - i$1 = -2; + let i = this.prerelease.length; + while (--i >= 0) if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; } - if (i$1 === -1) { + if (i === -1) { if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists"); this.prerelease.push(base); } } if (identifier) { - let prerelease$3 = [identifier, base]; - if (identifierBase === false) prerelease$3 = [identifier]; - if (compareIdentifiers$1(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) this.prerelease = prerelease$3; - } else this.prerelease = prerelease$3; + let prerelease$2 = [identifier, base]; + if (identifierBase === false) prerelease$2 = [identifier]; + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) this.prerelease = prerelease$2; + } else this.prerelease = prerelease$2; } break; } @@ -17405,73 +328,73 @@ var require_semver$2 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_module return this; } }; - module.exports = SemVer$16; + module.exports = SemVer$15; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/parse.js var require_parse$1 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/parse.js"(exports, module) { - const SemVer$15 = require_semver$2(); - const parse$7 = (version, options, throwErrors = false) => { - if (version instanceof SemVer$15) return version; + const SemVer$14 = require_semver$3(); + const parse$6 = (version, options, throwErrors = false) => { + if (version instanceof SemVer$14) return version; try { - return new SemVer$15(version, options); + return new SemVer$14(version, options); } catch (er) { if (!throwErrors) return null; throw er; } }; - module.exports = parse$7; + module.exports = parse$6; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/valid.js var require_valid$1 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/valid.js"(exports, module) { - const parse$6 = require_parse$1(); - const valid$2 = (version, options) => { - const v = parse$6(version, options); + const parse$5 = require_parse$1(); + const valid$1 = (version, options) => { + const v = parse$5(version, options); return v ? v.version : null; }; - module.exports = valid$2; + module.exports = valid$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/clean.js var require_clean = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/clean.js"(exports, module) { - const parse$5 = require_parse$1(); - const clean$2 = (version, options) => { - const s = parse$5(version.trim().replace(/^[=v]+/, ""), options); + const parse$4 = require_parse$1(); + const clean$1 = (version, options) => { + const s = parse$4(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; }; - module.exports = clean$2; + module.exports = clean$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/inc.js var require_inc = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/inc.js"(exports, module) { - const SemVer$14 = require_semver$2(); - const inc$2 = (version, release, options, identifier, identifierBase) => { + const SemVer$13 = require_semver$3(); + const inc$1 = (version, release, options, identifier, identifierBase) => { if (typeof options === "string") { identifierBase = identifier; identifier = options; options = void 0; } try { - return new SemVer$14(version instanceof SemVer$14 ? version.version : version, options).inc(release, identifier, identifierBase).version; + return new SemVer$13(version instanceof SemVer$13 ? version.version : version, options).inc(release, identifier, identifierBase).version; } catch (er) { return null; } }; - module.exports = inc$2; + module.exports = inc$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/diff.js var require_diff = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/diff.js"(exports, module) { - const parse$4 = require_parse$1(); - const diff$2 = (version1, version2) => { - const v1 = parse$4(version1, null, true); - const v2 = parse$4(version2, null, true); + const parse$3 = require_parse$1(); + const diff$1 = (version1, version2) => { + const v1 = parse$3(version1, null, true); + const v2 = parse$3(version2, null, true); const comparison = v1.compare(v2); if (comparison === 0) return null; const v1Higher = comparison > 0; @@ -17492,154 +415,154 @@ var require_diff = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/se if (v1.patch !== v2.patch) return prefix + "patch"; return "prerelease"; }; - module.exports = diff$2; + module.exports = diff$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/major.js var require_major = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/major.js"(exports, module) { - const SemVer$13 = require_semver$2(); - const major$2 = (a, loose) => new SemVer$13(a, loose).major; - module.exports = major$2; + const SemVer$12 = require_semver$3(); + const major$1 = (a, loose) => new SemVer$12(a, loose).major; + module.exports = major$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/minor.js var require_minor = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/minor.js"(exports, module) { - const SemVer$12 = require_semver$2(); - const minor$2 = (a, loose) => new SemVer$12(a, loose).minor; - module.exports = minor$2; + const SemVer$11 = require_semver$3(); + const minor$1 = (a, loose) => new SemVer$11(a, loose).minor; + module.exports = minor$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/patch.js var require_patch = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/patch.js"(exports, module) { - const SemVer$11 = require_semver$2(); - const patch$2 = (a, loose) => new SemVer$11(a, loose).patch; - module.exports = patch$2; + const SemVer$10 = require_semver$3(); + const patch$1 = (a, loose) => new SemVer$10(a, loose).patch; + module.exports = patch$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/prerelease.js var require_prerelease = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/prerelease.js"(exports, module) { - const parse$3 = require_parse$1(); - const prerelease$2 = (version, options) => { - const parsed = parse$3(version, options); + const parse$2 = require_parse$1(); + const prerelease$1 = (version, options) => { + const parsed = parse$2(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }; - module.exports = prerelease$2; + module.exports = prerelease$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/compare.js var require_compare = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/compare.js"(exports, module) { - const SemVer$10 = require_semver$2(); - const compare$12 = (a, b, loose) => new SemVer$10(a, loose).compare(new SemVer$10(b, loose)); - module.exports = compare$12; + const SemVer$9 = require_semver$3(); + const compare$11 = (a, b, loose) => new SemVer$9(a, loose).compare(new SemVer$9(b, loose)); + module.exports = compare$11; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/rcompare.js var require_rcompare = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/rcompare.js"(exports, module) { - const compare$11 = require_compare(); - const rcompare$2 = (a, b, loose) => compare$11(b, a, loose); - module.exports = rcompare$2; + const compare$10 = require_compare(); + const rcompare$1 = (a, b, loose) => compare$10(b, a, loose); + module.exports = rcompare$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/compare-loose.js var require_compare_loose = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/compare-loose.js"(exports, module) { - const compare$10 = require_compare(); - const compareLoose$2 = (a, b) => compare$10(a, b, true); - module.exports = compareLoose$2; + const compare$9 = require_compare(); + const compareLoose$1 = (a, b) => compare$9(a, b, true); + module.exports = compareLoose$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/compare-build.js var require_compare_build = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/compare-build.js"(exports, module) { - const SemVer$9 = require_semver$2(); - const compareBuild$4 = (a, b, loose) => { - const versionA = new SemVer$9(a, loose); - const versionB = new SemVer$9(b, loose); + const SemVer$8 = require_semver$3(); + const compareBuild$3 = (a, b, loose) => { + const versionA = new SemVer$8(a, loose); + const versionB = new SemVer$8(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); }; - module.exports = compareBuild$4; + module.exports = compareBuild$3; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/sort.js var require_sort = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/sort.js"(exports, module) { - const compareBuild$3 = require_compare_build(); - const sort$2 = (list, loose) => list.sort((a, b) => compareBuild$3(a, b, loose)); - module.exports = sort$2; + const compareBuild$2 = require_compare_build(); + const sort$1 = (list, loose) => list.sort((a, b) => compareBuild$2(a, b, loose)); + module.exports = sort$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/rsort.js var require_rsort = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/rsort.js"(exports, module) { - const compareBuild$2 = require_compare_build(); - const rsort$2 = (list, loose) => list.sort((a, b) => compareBuild$2(b, a, loose)); - module.exports = rsort$2; + const compareBuild$1 = require_compare_build(); + const rsort$1 = (list, loose) => list.sort((a, b) => compareBuild$1(b, a, loose)); + module.exports = rsort$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/gt.js var require_gt = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/gt.js"(exports, module) { - const compare$9 = require_compare(); - const gt$5 = (a, b, loose) => compare$9(a, b, loose) > 0; - module.exports = gt$5; + const compare$8 = require_compare(); + const gt$4 = (a, b, loose) => compare$8(a, b, loose) > 0; + module.exports = gt$4; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/lt.js var require_lt = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/lt.js"(exports, module) { - const compare$8 = require_compare(); - const lt$4 = (a, b, loose) => compare$8(a, b, loose) < 0; - module.exports = lt$4; + const compare$7 = require_compare(); + const lt$3 = (a, b, loose) => compare$7(a, b, loose) < 0; + module.exports = lt$3; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/eq.js var require_eq = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/eq.js"(exports, module) { - const compare$7 = require_compare(); - const eq$3 = (a, b, loose) => compare$7(a, b, loose) === 0; - module.exports = eq$3; + const compare$6 = require_compare(); + const eq$2 = (a, b, loose) => compare$6(a, b, loose) === 0; + module.exports = eq$2; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/neq.js var require_neq = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/neq.js"(exports, module) { - const compare$6 = require_compare(); - const neq$3 = (a, b, loose) => compare$6(a, b, loose) !== 0; - module.exports = neq$3; + const compare$5 = require_compare(); + const neq$2 = (a, b, loose) => compare$5(a, b, loose) !== 0; + module.exports = neq$2; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/gte.js var require_gte = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/gte.js"(exports, module) { - const compare$5 = require_compare(); - const gte$4 = (a, b, loose) => compare$5(a, b, loose) >= 0; - module.exports = gte$4; + const compare$4 = require_compare(); + const gte$3 = (a, b, loose) => compare$4(a, b, loose) >= 0; + module.exports = gte$3; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/lte.js var require_lte = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/lte.js"(exports, module) { - const compare$4 = require_compare(); - const lte$4 = (a, b, loose) => compare$4(a, b, loose) <= 0; - module.exports = lte$4; + const compare$3 = require_compare(); + const lte$3 = (a, b, loose) => compare$3(a, b, loose) <= 0; + module.exports = lte$3; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/cmp.js var require_cmp = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/cmp.js"(exports, module) { - const eq$2 = require_eq(); - const neq$2 = require_neq(); - const gt$4 = require_gt(); - const gte$3 = require_gte(); - const lt$3 = require_lt(); - const lte$3 = require_lte(); - const cmp$3 = (a, op, b, loose) => { + const eq$1 = require_eq(); + const neq$1 = require_neq(); + const gt$3 = require_gt(); + const gte$2 = require_gte(); + const lt$2 = require_lt(); + const lte$2 = require_lte(); + const cmp$2 = (a, op, b, loose) => { switch (op) { case "===": if (typeof a === "object") a = a.version; @@ -17651,33 +574,33 @@ var require_cmp = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/sem return a !== b; case "": case "=": - case "==": return eq$2(a, b, loose); - case "!=": return neq$2(a, b, loose); - case ">": return gt$4(a, b, loose); - case ">=": return gte$3(a, b, loose); - case "<": return lt$3(a, b, loose); - case "<=": return lte$3(a, b, loose); + case "==": return eq$1(a, b, loose); + case "!=": return neq$1(a, b, loose); + case ">": return gt$3(a, b, loose); + case ">=": return gte$2(a, b, loose); + case "<": return lt$2(a, b, loose); + case "<=": return lte$2(a, b, loose); default: throw new TypeError(`Invalid operator: ${op}`); } }; - module.exports = cmp$3; + module.exports = cmp$2; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/coerce.js var require_coerce = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/coerce.js"(exports, module) { - const SemVer$8 = require_semver$2(); - const parse$2 = require_parse$1(); - const { safeRe: re$3, t: t$3 } = require_re(); - const coerce$2 = (version, options) => { - if (version instanceof SemVer$8) return version; + const SemVer$7 = require_semver$3(); + const parse$1 = require_parse$1(); + const { safeRe: re$2, t: t$2 } = require_re(); + const coerce$1 = (version, options) => { + if (version instanceof SemVer$7) return version; if (typeof version === "number") version = String(version); if (typeof version !== "string") return null; options = options || {}; let match = null; - if (!options.rtl) match = version.match(options.includePrerelease ? re$3[t$3.COERCEFULL] : re$3[t$3.COERCE]); + if (!options.rtl) match = version.match(options.includePrerelease ? re$2[t$2.COERCEFULL] : re$2[t$2.COERCE]); else { - const coerceRtlRegex = options.includePrerelease ? re$3[t$3.COERCERTLFULL] : re$3[t$3.COERCERTL]; + const coerceRtlRegex = options.includePrerelease ? re$2[t$2.COERCERTLFULL] : re$2[t$2.COERCERTL]; let next; while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) match = next; @@ -17686,14 +609,14 @@ var require_coerce = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/ coerceRtlRegex.lastIndex = -1; } if (match === null) return null; - const major$3 = match[2]; - const minor$3 = match[3] || "0"; - const patch$3 = match[4] || "0"; - const prerelease$3 = options.includePrerelease && match[5] ? `-${match[5]}` : ""; + const major$2 = match[2]; + const minor$2 = match[3] || "0"; + const patch$2 = match[4] || "0"; + const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : ""; const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; - return parse$2(`${major$3}.${minor$3}.${patch$3}${prerelease$3}${build}`, options); + return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build}`, options); }; - module.exports = coerce$2; + module.exports = coerce$1; } }); //#endregion @@ -17735,12 +658,12 @@ var require_lrucache = __commonJS({ "node_modules/.deno/semver@7.7.1/node_module //#region node_modules/.deno/semver@7.7.1/node_modules/semver/classes/range.js var require_range = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/classes/range.js"(exports, module) { const SPACE_CHARACTERS = /\s+/g; - var Range$12 = class Range$12 { + var Range$11 = class Range$11 { constructor(range, options) { options = parseOptions$1(options); - if (range instanceof Range$12) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; - else return new Range$12(range.raw, options); - if (range instanceof Comparator$5) { + if (range instanceof Range$11) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; + else return new Range$11(range.raw, options); + if (range instanceof Comparator$4) { this.raw = range.value; this.set = [[range]]; this.formatted = void 0; @@ -17768,9 +691,9 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/s get range() { if (this.formatted === void 0) { this.formatted = ""; - for (let i$1 = 0; i$1 < this.set.length; i$1++) { - if (i$1 > 0) this.formatted += "||"; - const comps = this.set[i$1]; + for (let i = 0; i < this.set.length; i++) { + if (i > 0) this.formatted += "||"; + const comps = this.set[i]; for (let k = 0; k < comps.length; k++) { if (k > 0) this.formatted += " "; this.formatted += comps[k].toString().trim(); @@ -17791,23 +714,23 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/s const cached = cache.get(memoKey); if (cached) return cached; const loose = this.options.loose; - const hr = loose ? re$2[t$2.HYPHENRANGELOOSE] : re$2[t$2.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace$1(this.options.includePrerelease)); - debug$2("hyphen replace", range); - range = range.replace(re$2[t$2.COMPARATORTRIM], comparatorTrimReplace$1); - debug$2("comparator trim", range); - range = range.replace(re$2[t$2.TILDETRIM], tildeTrimReplace$1); - debug$2("tilde trim", range); - range = range.replace(re$2[t$2.CARETTRIM], caretTrimReplace$1); - debug$2("caret trim", range); - let rangeList = range.split(" ").map((comp) => parseComparator$1(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + const hr = loose ? re$1[t$1.HYPHENRANGELOOSE] : re$1[t$1.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug$1("hyphen replace", range); + range = range.replace(re$1[t$1.COMPARATORTRIM], comparatorTrimReplace); + debug$1("comparator trim", range); + range = range.replace(re$1[t$1.TILDETRIM], tildeTrimReplace); + debug$1("tilde trim", range); + range = range.replace(re$1[t$1.CARETTRIM], caretTrimReplace); + debug$1("caret trim", range); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); if (loose) rangeList = rangeList.filter((comp) => { - debug$2("loose invalid filter", comp, this.options); - return !!comp.match(re$2[t$2.COMPARATORLOOSE]); + debug$1("loose invalid filter", comp, this.options); + return !!comp.match(re$1[t$1.COMPARATORLOOSE]); }); - debug$2("range list", rangeList); + debug$1("range list", rangeList); const rangeMap = new Map(); - const comparators = rangeList.map((comp) => new Comparator$5(comp, this.options)); + const comparators = rangeList.map((comp) => new Comparator$4(comp, this.options)); for (const comp of comparators) { if (isNullSet(comp)) return [comp]; rangeMap.set(comp.value, comp); @@ -17818,10 +741,10 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/s return result; } intersects(range, options) { - if (!(range instanceof Range$12)) throw new TypeError("a Range is required"); + if (!(range instanceof Range$11)) throw new TypeError("a Range is required"); return this.set.some((thisComparators) => { - return isSatisfiable$1(thisComparators, options) && range.set.some((rangeComparators) => { - return isSatisfiable$1(rangeComparators, options) && thisComparators.every((thisComparator) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { return rangeComparators.every((rangeComparator) => { return thisComparator.intersects(rangeComparator, options); }); @@ -17832,26 +755,26 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/s test(version) { if (!version) return false; if (typeof version === "string") try { - version = new SemVer$7(version, this.options); + version = new SemVer$6(version, this.options); } catch (er) { return false; } - for (let i$1 = 0; i$1 < this.set.length; i$1++) if (testSet$1(this.set[i$1], version, this.options)) return true; + for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true; return false; } }; - module.exports = Range$12; + module.exports = Range$11; const LRU = require_lrucache(); const cache = new LRU(); const parseOptions$1 = require_parse_options(); - const Comparator$5 = require_comparator(); - const debug$2 = require_debug(); - const SemVer$7 = require_semver$2(); - const { safeRe: re$2, t: t$2, comparatorTrimReplace: comparatorTrimReplace$1, tildeTrimReplace: tildeTrimReplace$1, caretTrimReplace: caretTrimReplace$1 } = require_re(); + const Comparator$4 = require_comparator(); + const debug$1 = require_debug(); + const SemVer$6 = require_semver$3(); + const { safeRe: re$1, t: t$1, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re(); const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants$5(); const isNullSet = (c) => c.value === "<0.0.0-0"; const isAny = (c) => c.value === ""; - const isSatisfiable$1 = (comparators, options) => { + const isSatisfiable = (comparators, options) => { let result = true; const remainingComparators = comparators.slice(); let testComparator = remainingComparators.pop(); @@ -17863,79 +786,79 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/s } return result; }; - const parseComparator$1 = (comp, options) => { - debug$2("comp", comp, options); - comp = replaceCarets$1(comp, options); - debug$2("caret", comp); - comp = replaceTildes$1(comp, options); - debug$2("tildes", comp); - comp = replaceXRanges$1(comp, options); - debug$2("xrange", comp); - comp = replaceStars$1(comp, options); - debug$2("stars", comp); + const parseComparator = (comp, options) => { + debug$1("comp", comp, options); + comp = replaceCarets(comp, options); + debug$1("caret", comp); + comp = replaceTildes(comp, options); + debug$1("tildes", comp); + comp = replaceXRanges(comp, options); + debug$1("xrange", comp); + comp = replaceStars(comp, options); + debug$1("stars", comp); return comp; }; - const isX$1 = (id) => !id || id.toLowerCase() === "x" || id === "*"; - const replaceTildes$1 = (comp, options) => { - return comp.trim().split(/\s+/).map((c) => replaceTilde$1(c, options)).join(" "); + const isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + const replaceTildes = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); }; - const replaceTilde$1 = (comp, options) => { - const r = options.loose ? re$2[t$2.TILDELOOSE] : re$2[t$2.TILDE]; + const replaceTilde = (comp, options) => { + const r = options.loose ? re$1[t$1.TILDELOOSE] : re$1[t$1.TILDE]; return comp.replace(r, (_, M, m, p, pr) => { - debug$2("tilde", comp, _, M, m, p, pr); + debug$1("tilde", comp, _, M, m, p, pr); let ret; - if (isX$1(M)) ret = ""; - else if (isX$1(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; - else if (isX$1(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; + if (isX(M)) ret = ""; + else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; + else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; else if (pr) { - debug$2("replaceTilde pr", pr); + debug$1("replaceTilde pr", pr); ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; } else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; - debug$2("tilde return", ret); + debug$1("tilde return", ret); return ret; }); }; - const replaceCarets$1 = (comp, options) => { - return comp.trim().split(/\s+/).map((c) => replaceCaret$1(c, options)).join(" "); + const replaceCarets = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); }; - const replaceCaret$1 = (comp, options) => { - debug$2("caret", comp, options); - const r = options.loose ? re$2[t$2.CARETLOOSE] : re$2[t$2.CARET]; + const replaceCaret = (comp, options) => { + debug$1("caret", comp, options); + const r = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET]; const z = options.includePrerelease ? "-0" : ""; return comp.replace(r, (_, M, m, p, pr) => { - debug$2("caret", comp, _, M, m, p, pr); + debug$1("caret", comp, _, M, m, p, pr); let ret; - if (isX$1(M)) ret = ""; - else if (isX$1(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; - else if (isX$1(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + if (isX(M)) ret = ""; + else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; else if (pr) { - debug$2("replaceCaret pr", pr); + debug$1("replaceCaret pr", pr); if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; } else { - debug$2("no pr"); + debug$1("no pr"); if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; } - debug$2("caret return", ret); + debug$1("caret return", ret); return ret; }); }; - const replaceXRanges$1 = (comp, options) => { - debug$2("replaceXRanges", comp, options); - return comp.split(/\s+/).map((c) => replaceXRange$1(c, options)).join(" "); + const replaceXRanges = (comp, options) => { + debug$1("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); }; - const replaceXRange$1 = (comp, options) => { + const replaceXRange = (comp, options) => { comp = comp.trim(); - const r = options.loose ? re$2[t$2.XRANGELOOSE] : re$2[t$2.XRANGE]; + const r = options.loose ? re$1[t$1.XRANGELOOSE] : re$1[t$1.XRANGE]; return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug$2("xRange", comp, ret, gtlt, M, m, p, pr); - const xM = isX$1(M); - const xm = xM || isX$1(m); - const xp = xm || isX$1(p); + debug$1("xRange", comp, ret, gtlt, M, m, p, pr); + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); const anyX = xp; if (gtlt === "=" && anyX) gtlt = ""; pr = options.includePrerelease ? "-0" : ""; @@ -17963,40 +886,40 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/s ret = `${gtlt + M}.${m}.${p}${pr}`; } else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; - debug$2("xRange return", ret); + debug$1("xRange return", ret); return ret; }); }; - const replaceStars$1 = (comp, options) => { - debug$2("replaceStars", comp, options); - return comp.trim().replace(re$2[t$2.STAR], ""); + const replaceStars = (comp, options) => { + debug$1("replaceStars", comp, options); + return comp.trim().replace(re$1[t$1.STAR], ""); }; const replaceGTE0 = (comp, options) => { - debug$2("replaceGTE0", comp, options); - return comp.trim().replace(re$2[options.includePrerelease ? t$2.GTE0PRE : t$2.GTE0], ""); + debug$1("replaceGTE0", comp, options); + return comp.trim().replace(re$1[options.includePrerelease ? t$1.GTE0PRE : t$1.GTE0], ""); }; - const hyphenReplace$1 = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { - if (isX$1(fM)) from = ""; - else if (isX$1(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`; - else if (isX$1(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { + if (isX(fM)) from = ""; + else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; else if (fpr) from = `>=${from}`; else from = `>=${from}${incPr ? "-0" : ""}`; - if (isX$1(tM)) to = ""; - else if (isX$1(tm)) to = `<${+tM + 1}.0.0-0`; - else if (isX$1(tp)) to = `<${tM}.${+tm + 1}.0-0`; + if (isX(tM)) to = ""; + else if (isX(tm)) to = `<${+tM + 1}.0.0-0`; + else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`; else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`; else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`; else to = `<=${to}`; return `${from} ${to}`.trim(); }; - const testSet$1 = (set, version, options) => { - for (let i$1 = 0; i$1 < set.length; i$1++) if (!set[i$1].test(version)) return false; + const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false; if (version.prerelease.length && !options.includePrerelease) { - for (let i$1 = 0; i$1 < set.length; i$1++) { - debug$2(set[i$1].semver); - if (set[i$1].semver === Comparator$5.ANY) continue; - if (set[i$1].semver.prerelease.length > 0) { - const allowed = set[i$1].semver; + for (let i = 0; i < set.length; i++) { + debug$1(set[i].semver); + if (set[i].semver === Comparator$4.ANY) continue; + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; } } @@ -18009,54 +932,54 @@ var require_range = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/s //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/classes/comparator.js var require_comparator = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/classes/comparator.js"(exports, module) { - const ANY$3 = Symbol("SemVer ANY"); - var Comparator$4 = class Comparator$4 { + const ANY$2 = Symbol("SemVer ANY"); + var Comparator$3 = class Comparator$3 { static get ANY() { - return ANY$3; + return ANY$2; } constructor(comp, options) { options = parseOptions(options); - if (comp instanceof Comparator$4) if (comp.loose === !!options.loose) return comp; + if (comp instanceof Comparator$3) if (comp.loose === !!options.loose) return comp; else comp = comp.value; comp = comp.trim().split(/\s+/).join(" "); - debug$1("comparator", comp, options); + debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); - if (this.semver === ANY$3) this.value = ""; + if (this.semver === ANY$2) this.value = ""; else this.value = this.operator + this.semver.version; - debug$1("comp", this); + debug("comp", this); } parse(comp) { - const r = this.options.loose ? re$1[t$1.COMPARATORLOOSE] : re$1[t$1.COMPARATOR]; + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; const m = comp.match(r); if (!m) throw new TypeError(`Invalid comparator: ${comp}`); this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") this.operator = ""; - if (!m[2]) this.semver = ANY$3; - else this.semver = new SemVer$6(m[2], this.options.loose); + if (!m[2]) this.semver = ANY$2; + else this.semver = new SemVer$5(m[2], this.options.loose); } toString() { return this.value; } test(version) { - debug$1("Comparator.test", version, this.options.loose); - if (this.semver === ANY$3 || version === ANY$3) return true; + debug("Comparator.test", version, this.options.loose); + if (this.semver === ANY$2 || version === ANY$2) return true; if (typeof version === "string") try { - version = new SemVer$6(version, this.options); + version = new SemVer$5(version, this.options); } catch (er) { return false; } - return cmp$2(version, this.operator, this.semver, this.options); + return cmp$1(version, this.operator, this.semver, this.options); } intersects(comp, options) { - if (!(comp instanceof Comparator$4)) throw new TypeError("a Comparator is required"); + if (!(comp instanceof Comparator$3)) throw new TypeError("a Comparator is required"); if (this.operator === "") { if (this.value === "") return true; - return new Range$11(comp.value, options).test(this.value); + return new Range$10(comp.value, options).test(this.value); } else if (comp.operator === "") { if (comp.value === "") return true; - return new Range$11(this.value, options).test(comp.semver); + return new Range$10(this.value, options).test(comp.semver); } options = parseOptions(options); if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false; @@ -18064,115 +987,115 @@ var require_comparator = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modu if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true; if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true; if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true; - if (cmp$2(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true; - if (cmp$2(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true; + if (cmp$1(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true; + if (cmp$1(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true; return false; } }; - module.exports = Comparator$4; + module.exports = Comparator$3; const parseOptions = require_parse_options(); - const { safeRe: re$1, t: t$1 } = require_re(); - const cmp$2 = require_cmp(); - const debug$1 = require_debug(); - const SemVer$6 = require_semver$2(); - const Range$11 = require_range(); + const { safeRe: re, t } = require_re(); + const cmp$1 = require_cmp(); + const debug = require_debug(); + const SemVer$5 = require_semver$3(); + const Range$10 = require_range(); } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/functions/satisfies.js var require_satisfies = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/functions/satisfies.js"(exports, module) { - const Range$10 = require_range(); - const satisfies$5 = (version, range, options) => { + const Range$9 = require_range(); + const satisfies$4 = (version, range, options) => { try { - range = new Range$10(range, options); + range = new Range$9(range, options); } catch (er) { return false; } return range.test(version); }; - module.exports = satisfies$5; + module.exports = satisfies$4; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/to-comparators.js var require_to_comparators = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/to-comparators.js"(exports, module) { - const Range$9 = require_range(); - const toComparators$2 = (range, options) => new Range$9(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); - module.exports = toComparators$2; + const Range$8 = require_range(); + const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module.exports = toComparators$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/max-satisfying.js var require_max_satisfying = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/max-satisfying.js"(exports, module) { - const SemVer$5 = require_semver$2(); - const Range$8 = require_range(); - const maxSatisfying$2 = (versions, range, options) => { + const SemVer$4 = require_semver$3(); + const Range$7 = require_range(); + const maxSatisfying$1 = (versions, range, options) => { let max = null; let maxSV = null; let rangeObj = null; - try { - rangeObj = new Range$8(range, options); - } catch (er) { - return null; - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!max || maxSV.compare(v) === -1) { - max = v; - maxSV = new SemVer$5(max, options); - } - } - }); - return max; - }; - module.exports = maxSatisfying$2; -} }); - -//#endregion -//#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/min-satisfying.js -var require_min_satisfying = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/min-satisfying.js"(exports, module) { - const SemVer$4 = require_semver$2(); - const Range$7 = require_range(); - const minSatisfying$2 = (versions, range, options) => { - let min = null; - let minSV = null; - let rangeObj = null; try { rangeObj = new Range$7(range, options); } catch (er) { return null; } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer$4(max, options); + } + } + }); + return max; + }; + module.exports = maxSatisfying$1; +} }); + +//#endregion +//#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/min-satisfying.js"(exports, module) { + const SemVer$3 = require_semver$3(); + const Range$6 = require_range(); + const minSatisfying$1 = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range$6(range, options); + } catch (er) { + return null; + } versions.forEach((v) => { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; - minSV = new SemVer$4(min, options); + minSV = new SemVer$3(min, options); } } }); return min; }; - module.exports = minSatisfying$2; + module.exports = minSatisfying$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/min-version.js var require_min_version = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/min-version.js"(exports, module) { - const SemVer$3 = require_semver$2(); - const Range$6 = require_range(); - const gt$3 = require_gt(); - const minVersion$2 = (range, loose) => { - range = new Range$6(range, loose); - let minver = new SemVer$3("0.0.0"); + const SemVer$2 = require_semver$3(); + const Range$5 = require_range(); + const gt$2 = require_gt(); + const minVersion$1 = (range, loose) => { + range = new Range$5(range, loose); + let minver = new SemVer$2("0.0.0"); if (range.test(minver)) return minver; - minver = new SemVer$3("0.0.0-0"); + minver = new SemVer$2("0.0.0-0"); if (range.test(minver)) return minver; minver = null; - for (let i$1 = 0; i$1 < range.set.length; ++i$1) { - const comparators = range.set[i$1]; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; let setMin = null; comparators.forEach((comparator) => { - const compver = new SemVer$3(comparator.semver.version); + const compver = new SemVer$2(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) compver.patch++; @@ -18180,75 +1103,75 @@ var require_min_version = __commonJS({ "node_modules/.deno/semver@7.7.1/node_mod compver.raw = compver.format(); case "": case ">=": - if (!setMin || gt$3(compver, setMin)) setMin = compver; + if (!setMin || gt$2(compver, setMin)) setMin = compver; break; case "<": case "<=": break; default: throw new Error(`Unexpected operation: ${comparator.operator}`); } }); - if (setMin && (!minver || gt$3(minver, setMin))) minver = setMin; + if (setMin && (!minver || gt$2(minver, setMin))) minver = setMin; } if (minver && range.test(minver)) return minver; return null; }; - module.exports = minVersion$2; + module.exports = minVersion$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/valid.js var require_valid = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/valid.js"(exports, module) { - const Range$5 = require_range(); - const validRange$2 = (range, options) => { + const Range$4 = require_range(); + const validRange$1 = (range, options) => { try { - return new Range$5(range, options).range || "*"; + return new Range$4(range, options).range || "*"; } catch (er) { return null; } }; - module.exports = validRange$2; + module.exports = validRange$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/outside.js var require_outside = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/outside.js"(exports, module) { - const SemVer$2 = require_semver$2(); - const Comparator$3 = require_comparator(); - const { ANY: ANY$2 } = Comparator$3; - const Range$4 = require_range(); - const satisfies$4 = require_satisfies(); - const gt$2 = require_gt(); - const lt$2 = require_lt(); - const lte$2 = require_lte(); - const gte$2 = require_gte(); - const outside$4 = (version, range, hilo, options) => { - version = new SemVer$2(version, options); - range = new Range$4(range, options); + const SemVer$1 = require_semver$3(); + const Comparator$2 = require_comparator(); + const { ANY: ANY$1 } = Comparator$2; + const Range$3 = require_range(); + const satisfies$3 = require_satisfies(); + const gt$1 = require_gt(); + const lt$1 = require_lt(); + const lte$1 = require_lte(); + const gte$1 = require_gte(); + const outside$3 = (version, range, hilo, options) => { + version = new SemVer$1(version, options); + range = new Range$3(range, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": - gtfn = gt$2; - ltefn = lte$2; - ltfn = lt$2; + gtfn = gt$1; + ltefn = lte$1; + ltfn = lt$1; comp = ">"; ecomp = ">="; break; case "<": - gtfn = lt$2; - ltefn = gte$2; - ltfn = gt$2; + gtfn = lt$1; + ltefn = gte$1; + ltfn = gt$1; comp = "<"; ecomp = "<="; break; default: throw new TypeError("Must provide a hilo val of \"<\" or \">\""); } - if (satisfies$4(version, range, options)) return false; - for (let i$1 = 0; i$1 < range.set.length; ++i$1) { - const comparators = range.set[i$1]; + if (satisfies$3(version, range, options)) return false; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; let high = null; let low = null; comparators.forEach((comparator) => { - if (comparator.semver === ANY$2) comparator = new Comparator$3(">=0.0.0"); + if (comparator.semver === ANY$1) comparator = new Comparator$2(">=0.0.0"); high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) high = comparator; @@ -18260,49 +1183,49 @@ var require_outside = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules } return true; }; - module.exports = outside$4; + module.exports = outside$3; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/gtr.js var require_gtr = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/gtr.js"(exports, module) { - const outside$3 = require_outside(); - const gtr$2 = (version, range, options) => outside$3(version, range, ">", options); - module.exports = gtr$2; + const outside$2 = require_outside(); + const gtr$1 = (version, range, options) => outside$2(version, range, ">", options); + module.exports = gtr$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/ltr.js var require_ltr = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/ltr.js"(exports, module) { - const outside$2 = require_outside(); - const ltr$2 = (version, range, options) => outside$2(version, range, "<", options); - module.exports = ltr$2; + const outside$1 = require_outside(); + const ltr$1 = (version, range, options) => outside$1(version, range, "<", options); + module.exports = ltr$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/intersects.js var require_intersects = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/intersects.js"(exports, module) { - const Range$3 = require_range(); - const intersects$2 = (r1, r2, options) => { - r1 = new Range$3(r1, options); - r2 = new Range$3(r2, options); + const Range$2 = require_range(); + const intersects$1 = (r1, r2, options) => { + r1 = new Range$2(r1, options); + r2 = new Range$2(r2, options); return r1.intersects(r2, options); }; - module.exports = intersects$2; + module.exports = intersects$1; } }); //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/simplify.js var require_simplify = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/simplify.js"(exports, module) { - const satisfies$3 = require_satisfies(); - const compare$3 = require_compare(); + const satisfies$2 = require_satisfies(); + const compare$2 = require_compare(); module.exports = (versions, range, options) => { const set = []; let first = null; let prev = null; - const v = versions.sort((a, b) => compare$3(a, b, options)); + const v = versions.sort((a, b) => compare$2(a, b, options)); for (const version of v) { - const included = satisfies$3(version, range, options); + const included = satisfies$2(version, range, options); if (included) { prev = version; if (!first) first = version; @@ -18328,15 +1251,15 @@ var require_simplify = __commonJS({ "node_modules/.deno/semver@7.7.1/node_module //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/subset.js var require_subset = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/ranges/subset.js"(exports, module) { - const Range$2 = require_range(); - const Comparator$2 = require_comparator(); - const { ANY: ANY$1 } = Comparator$2; - const satisfies$2 = require_satisfies(); - const compare$2 = require_compare(); + const Range$1 = require_range(); + const Comparator$1 = require_comparator(); + const { ANY } = Comparator$1; + const satisfies$1 = require_satisfies(); + const compare$1 = require_compare(); const subset$1 = (sub, dom, options = {}) => { if (sub === dom) return true; - sub = new Range$2(sub, options); - dom = new Range$2(dom, options); + sub = new Range$1(sub, options); + dom = new Range$1(dom, options); let sawNonNull = false; OUTER: for (const simpleSub of sub.set) { for (const simpleDom of dom.set) { @@ -18348,74 +1271,74 @@ var require_subset = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/ } return true; }; - const minimumVersionWithPreRelease = [new Comparator$2(">=0.0.0-0")]; - const minimumVersion = [new Comparator$2(">=0.0.0")]; + const minimumVersionWithPreRelease = [new Comparator$1(">=0.0.0-0")]; + const minimumVersion = [new Comparator$1(">=0.0.0")]; const simpleSubset = (sub, dom, options) => { if (sub === dom) return true; - if (sub.length === 1 && sub[0].semver === ANY$1) if (dom.length === 1 && dom[0].semver === ANY$1) return true; + if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true; else if (options.includePrerelease) sub = minimumVersionWithPreRelease; else sub = minimumVersion; - if (dom.length === 1 && dom[0].semver === ANY$1) if (options.includePrerelease) return true; + if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true; else dom = minimumVersion; const eqSet = new Set(); - let gt$6, lt$5; - for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt$6 = higherGT(gt$6, c, options); - else if (c.operator === "<" || c.operator === "<=") lt$5 = lowerLT(lt$5, c, options); + let gt$5, lt$4; + for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt$5 = higherGT(gt$5, c, options); + else if (c.operator === "<" || c.operator === "<=") lt$4 = lowerLT(lt$4, c, options); else eqSet.add(c.semver); if (eqSet.size > 1) return null; let gtltComp; - if (gt$6 && lt$5) { - gtltComp = compare$2(gt$6.semver, lt$5.semver, options); + if (gt$5 && lt$4) { + gtltComp = compare$1(gt$5.semver, lt$4.semver, options); if (gtltComp > 0) return null; - else if (gtltComp === 0 && (gt$6.operator !== ">=" || lt$5.operator !== "<=")) return null; + else if (gtltComp === 0 && (gt$5.operator !== ">=" || lt$4.operator !== "<=")) return null; } - for (const eq$4 of eqSet) { - if (gt$6 && !satisfies$2(eq$4, String(gt$6), options)) return null; - if (lt$5 && !satisfies$2(eq$4, String(lt$5), options)) return null; - for (const c of dom) if (!satisfies$2(eq$4, String(c), options)) return false; + for (const eq$3 of eqSet) { + if (gt$5 && !satisfies$1(eq$3, String(gt$5), options)) return null; + if (lt$4 && !satisfies$1(eq$3, String(lt$4), options)) return null; + for (const c of dom) if (!satisfies$1(eq$3, String(c), options)) return false; return true; } let higher, lower; let hasDomLT, hasDomGT; - let needDomLTPre = lt$5 && !options.includePrerelease && lt$5.semver.prerelease.length ? lt$5.semver : false; - let needDomGTPre = gt$6 && !options.includePrerelease && gt$6.semver.prerelease.length ? gt$6.semver : false; - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt$5.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false; + let needDomLTPre = lt$4 && !options.includePrerelease && lt$4.semver.prerelease.length ? lt$4.semver : false; + let needDomGTPre = gt$5 && !options.includePrerelease && gt$5.semver.prerelease.length ? gt$5.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt$4.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false; for (const c of dom) { hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; - if (gt$6) { + if (gt$5) { if (needDomGTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false; } if (c.operator === ">" || c.operator === ">=") { - higher = higherGT(gt$6, c, options); - if (higher === c && higher !== gt$6) return false; - } else if (gt$6.operator === ">=" && !satisfies$2(gt$6.semver, String(c), options)) return false; + higher = higherGT(gt$5, c, options); + if (higher === c && higher !== gt$5) return false; + } else if (gt$5.operator === ">=" && !satisfies$1(gt$5.semver, String(c), options)) return false; } - if (lt$5) { + if (lt$4) { if (needDomLTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false; } if (c.operator === "<" || c.operator === "<=") { - lower = lowerLT(lt$5, c, options); - if (lower === c && lower !== lt$5) return false; - } else if (lt$5.operator === "<=" && !satisfies$2(lt$5.semver, String(c), options)) return false; + lower = lowerLT(lt$4, c, options); + if (lower === c && lower !== lt$4) return false; + } else if (lt$4.operator === "<=" && !satisfies$1(lt$4.semver, String(c), options)) return false; } - if (!c.operator && (lt$5 || gt$6) && gtltComp !== 0) return false; + if (!c.operator && (lt$4 || gt$5) && gtltComp !== 0) return false; } - if (gt$6 && hasDomLT && !lt$5 && gtltComp !== 0) return false; - if (lt$5 && hasDomGT && !gt$6 && gtltComp !== 0) return false; + if (gt$5 && hasDomLT && !lt$4 && gtltComp !== 0) return false; + if (lt$4 && hasDomGT && !gt$5 && gtltComp !== 0) return false; if (needDomGTPre || needDomLTPre) return false; return true; }; const higherGT = (a, b, options) => { if (!a) return b; - const comp = compare$2(a.semver, b.semver, options); + const comp = compare$1(a.semver, b.semver, options); return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; }; const lowerLT = (a, b, options) => { if (!a) return b; - const comp = compare$2(a.semver, b.semver, options); + const comp = compare$1(a.semver, b.semver, options); return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; }; module.exports = subset$1; @@ -18423,87 +1346,87 @@ var require_subset = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/ //#endregion //#region node_modules/.deno/semver@7.7.1/node_modules/semver/index.js -var require_semver$1 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/index.js"(exports, module) { +var require_semver$2 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_modules/semver/index.js"(exports, module) { const internalRe = require_re(); const constants$1 = require_constants$5(); - const SemVer$1 = require_semver$2(); + const SemVer = require_semver$3(); const identifiers = require_identifiers(); - const parse$1 = require_parse$1(); - const valid$1 = require_valid$1(); - const clean$1 = require_clean(); - const inc$1 = require_inc(); - const diff$1 = require_diff(); - const major$1 = require_major(); - const minor$1 = require_minor(); - const patch$1 = require_patch(); - const prerelease$1 = require_prerelease(); - const compare$1 = require_compare(); - const rcompare$1 = require_rcompare(); - const compareLoose$1 = require_compare_loose(); - const compareBuild$1 = require_compare_build(); - const sort$1 = require_sort(); - const rsort$1 = require_rsort(); - const gt$1 = require_gt(); - const lt$1 = require_lt(); - const eq$1 = require_eq(); - const neq$1 = require_neq(); - const gte$1 = require_gte(); - const lte$1 = require_lte(); - const cmp$1 = require_cmp(); - const coerce$1 = require_coerce(); - const Comparator$1 = require_comparator(); - const Range$1 = require_range(); - const satisfies$1 = require_satisfies(); - const toComparators$1 = require_to_comparators(); - const maxSatisfying$1 = require_max_satisfying(); - const minSatisfying$1 = require_min_satisfying(); - const minVersion$1 = require_min_version(); - const validRange$1 = require_valid(); - const outside$1 = require_outside(); - const gtr$1 = require_gtr(); - const ltr$1 = require_ltr(); - const intersects$1 = require_intersects(); + const parse = require_parse$1(); + const valid = require_valid$1(); + const clean = require_clean(); + const inc = require_inc(); + const diff = require_diff(); + const major = require_major(); + const minor = require_minor(); + const patch = require_patch(); + const prerelease = require_prerelease(); + const compare = require_compare(); + const rcompare = require_rcompare(); + const compareLoose = require_compare_loose(); + const compareBuild = require_compare_build(); + const sort = require_sort(); + const rsort = require_rsort(); + const gt = require_gt(); + const lt = require_lt(); + const eq = require_eq(); + const neq = require_neq(); + const gte = require_gte(); + const lte = require_lte(); + const cmp = require_cmp(); + const coerce = require_coerce(); + const Comparator = require_comparator(); + const Range = require_range(); + const satisfies = require_satisfies(); + const toComparators = require_to_comparators(); + const maxSatisfying = require_max_satisfying(); + const minSatisfying = require_min_satisfying(); + const minVersion = require_min_version(); + const validRange = require_valid(); + const outside = require_outside(); + const gtr = require_gtr(); + const ltr = require_ltr(); + const intersects = require_intersects(); const simplifyRange = require_simplify(); const subset = require_subset(); module.exports = { - parse: parse$1, - valid: valid$1, - clean: clean$1, - inc: inc$1, - diff: diff$1, - major: major$1, - minor: minor$1, - patch: patch$1, - prerelease: prerelease$1, - compare: compare$1, - rcompare: rcompare$1, - compareLoose: compareLoose$1, - compareBuild: compareBuild$1, - sort: sort$1, - rsort: rsort$1, - gt: gt$1, - lt: lt$1, - eq: eq$1, - neq: neq$1, - gte: gte$1, - lte: lte$1, - cmp: cmp$1, - coerce: coerce$1, - Comparator: Comparator$1, - Range: Range$1, - satisfies: satisfies$1, - toComparators: toComparators$1, - maxSatisfying: maxSatisfying$1, - minSatisfying: minSatisfying$1, - minVersion: minVersion$1, - validRange: validRange$1, - outside: outside$1, - gtr: gtr$1, - ltr: ltr$1, - intersects: intersects$1, + parse, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, simplifyRange, subset, - SemVer: SemVer$1, + SemVer, re: internalRe.re, src: internalRe.src, tokens: internalRe.t, @@ -18513,7 +1436,7 @@ var require_semver$1 = __commonJS({ "node_modules/.deno/semver@7.7.1/node_module rcompareIdentifiers: identifiers.rcompareIdentifiers }; } }); -var import_semver = __toESM(require_semver$1()); +var import_semver = __toESM(require_semver$2()); //#endregion //#region node_modules/.deno/undici@7.9.0/node_modules/undici/lib/core/symbols.js @@ -19215,8 +2138,8 @@ var require_constants$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod if (buffer$1 === void 0) buffer$1 = Buffer.from(header); return buffer$1; } - for (let i$1 = 0; i$1 < wellknownHeaderNames$1.length; ++i$1) { - const key = wellknownHeaderNames$1[i$1]; + for (let i = 0; i < wellknownHeaderNames$1.length; ++i) { + const key = wellknownHeaderNames$1[i]; const lowerCasedKey = key.toLowerCase(); headerNameLowerCasedRecord$3[key] = headerNameLowerCasedRecord$3[lowerCasedKey] = lowerCasedKey; } @@ -19337,8 +2260,8 @@ var require_tree = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/un } }; const tree$1 = new TernarySearchTree(); - for (let i$1 = 0; i$1 < wellknownHeaderNames.length; ++i$1) { - const key = headerNameLowerCasedRecord$2[wellknownHeaderNames[i$1]]; + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord$2[wellknownHeaderNames[i]]; tree$1.insert(key, key); } module.exports = { @@ -19468,10 +2391,10 @@ var require_util$5 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$28("Invalid URL protocol: the URL must start with `http:` or `https:`."); const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path$8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path$3 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1); - if (path$8 && path$8[0] !== "/") path$8 = `/${path$8}`; - return new URL(`${origin}${path$8}`); + if (path$3 && path$3[0] !== "/") path$3 = `/${path$3}`; + return new URL(`${origin}${path$3}`); } if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$28("Invalid URL protocol: the URL must start with `http:` or `https:`."); return url; @@ -19560,15 +2483,15 @@ var require_util$5 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @param {Error} [err] * @returns {void} */ - function destroy$1(stream$5, err) { - if (stream$5 == null || !isStream$1(stream$5) || isDestroyed(stream$5)) return; - if (typeof stream$5.destroy === "function") { - if (Object.getPrototypeOf(stream$5).constructor === IncomingMessage) stream$5.socket = null; - stream$5.destroy(err); + function destroy$1(stream$3, err) { + if (stream$3 == null || !isStream$1(stream$3) || isDestroyed(stream$3)) return; + if (typeof stream$3.destroy === "function") { + if (Object.getPrototypeOf(stream$3).constructor === IncomingMessage) stream$3.socket = null; + stream$3.destroy(err); } else if (err) queueMicrotask(() => { - stream$5.emit("error", err); + stream$3.emit("error", err); }); - if (stream$5.destroyed !== true) stream$5[kDestroyed$2] = true; + if (stream$3.destroyed !== true) stream$3[kDestroyed$2] = true; } const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; /** @@ -19602,17 +2525,17 @@ var require_util$5 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ */ function parseHeaders$1(headers, obj) { if (obj === void 0) obj = {}; - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) { - const key = headerNameToString(headers[i$1]); + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); let val = obj[key]; if (val) { if (typeof val === "string") { val = [val]; obj[key] = val; } - val.push(headers[i$1 + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } else { - const headersValue = headers[i$1 + 1]; + const headersValue = headers[i + 1]; if (typeof headersValue === "string") obj[key] = headersValue; else obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); } @@ -19672,13 +2595,13 @@ var require_util$5 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @param {string} [upgrade] * @returns {asserts handler is import('../api/api-request').RequestHandler} */ - function assertRequestHandler$1(handler, method, upgrade$2) { + function assertRequestHandler$1(handler, method, upgrade$1) { if (!handler || typeof handler !== "object") throw new InvalidArgumentError$28("handler must be an object"); if (typeof handler.onRequestStart === "function") return; if (typeof handler.onConnect !== "function") throw new InvalidArgumentError$28("invalid onConnect method"); if (typeof handler.onError !== "function") throw new InvalidArgumentError$28("invalid onError method"); if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError$28("invalid onBodySent method"); - if (upgrade$2 || method === "CONNECT") { + if (upgrade$1 || method === "CONNECT") { if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError$28("invalid onUpgrade method"); } else { if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError$28("invalid onHeaders method"); @@ -19840,7 +2763,7 @@ var require_util$5 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ */ function isValidHTTPToken$3(characters) { if (characters.length === 0) return false; - for (let i$1 = 0; i$1 < characters.length; ++i$1) if (!isTokenCharCode(characters.charCodeAt(i$1))) return false; + for (let i = 0; i < characters.length; ++i) if (!isTokenCharCode(characters.charCodeAt(i))) return false; return true; } /** @@ -19913,10 +2836,10 @@ var require_util$5 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @param {import ('../core/request')} request * @param {Error} err */ - function errorRequest(client, request$2, err) { + function errorRequest(client, request$1, err) { try { - request$2.onError(err); - assert$29(request$2.aborted); + request$1.onError(err); + assert$29(request$1.aborted); } catch (err$1) { client.emit("error", err$1); } @@ -20112,12 +3035,12 @@ var require_diagnostics = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod debugLog("connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); }); diagnosticsChannel.subscribe("undici:client:connectError", (evt) => { - const { connectParams: { version, protocol, port, host }, error: error$1 } = evt; - debugLog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version, error$1.message); + const { connectParams: { version, protocol, port, host }, error } = evt; + debugLog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version, error.message); }); diagnosticsChannel.subscribe("undici:client:sendHeaders", (evt) => { - const { request: { method, path: path$8, origin } } = evt; - debugLog("sending request to %s %s/%s", method, origin, path$8); + const { request: { method, path: path$3, origin } } = evt; + debugLog("sending request to %s %s/%s", method, origin, path$3); }); } let isTrackingRequestEvents = false; @@ -20125,16 +3048,16 @@ var require_diagnostics = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod if (isTrackingRequestEvents) return; isTrackingRequestEvents = true; diagnosticsChannel.subscribe("undici:request:headers", (evt) => { - const { request: { method, path: path$8, origin }, response: { statusCode } } = evt; - debugLog("received response to %s %s/%s - HTTP %d", method, origin, path$8, statusCode); + const { request: { method, path: path$3, origin }, response: { statusCode } } = evt; + debugLog("received response to %s %s/%s - HTTP %d", method, origin, path$3, statusCode); }); diagnosticsChannel.subscribe("undici:request:trailers", (evt) => { - const { request: { method, path: path$8, origin } } = evt; - debugLog("trailers received from %s %s/%s", method, origin, path$8); + const { request: { method, path: path$3, origin } } = evt; + debugLog("trailers received from %s %s/%s", method, origin, path$3); }); diagnosticsChannel.subscribe("undici:request:error", (evt) => { - const { request: { method, path: path$8, origin }, error: error$1 } = evt; - debugLog("request to %s %s/%s errored - %s", method, origin, path$8, error$1.message); + const { request: { method, path: path$3, origin }, error } = evt; + debugLog("request to %s %s/%s errored - %s", method, origin, path$3, error.message); }); } let isTrackingWebSocketEvents = false; @@ -20181,13 +3104,13 @@ var require_request$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul const invalidPathRegex = /[^\u0021-\u00ff]/; const kHandler = Symbol("handler"); var Request$4 = class { - constructor(origin, { path: path$8, method, body, headers, query, idempotent, blocking, upgrade: upgrade$2, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError }, handler) { - if (typeof path$8 !== "string") throw new InvalidArgumentError$27("path must be a string"); - else if (path$8[0] !== "/" && !(path$8.startsWith("http://") || path$8.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$27("path must be an absolute URL or start with a slash"); - else if (invalidPathRegex.test(path$8)) throw new InvalidArgumentError$27("invalid request path"); + constructor(origin, { path: path$3, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError }, handler) { + if (typeof path$3 !== "string") throw new InvalidArgumentError$27("path must be a string"); + else if (path$3[0] !== "/" && !(path$3.startsWith("http://") || path$3.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$27("path must be an absolute URL or start with a slash"); + else if (invalidPathRegex.test(path$3)) throw new InvalidArgumentError$27("invalid request path"); if (typeof method !== "string") throw new InvalidArgumentError$27("method must be a string"); else if (normalizedMethodRecords$1[method] === void 0 && !isValidHTTPToken$2(method)) throw new InvalidArgumentError$27("invalid request method"); - if (upgrade$2 && typeof upgrade$2 !== "string") throw new InvalidArgumentError$27("upgrade must be a string"); + if (upgrade$1 && typeof upgrade$1 !== "string") throw new InvalidArgumentError$27("upgrade must be a string"); if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$27("invalid headersTimeout"); if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$27("invalid bodyTimeout"); if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError$27("invalid reset"); @@ -20220,8 +3143,8 @@ var require_request$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul else throw new InvalidArgumentError$27("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); this.completed = false; this.aborted = false; - this.upgrade = upgrade$2 || null; - this.path = query ? serializePathWithQuery$2(path$8, query) : path$8; + this.upgrade = upgrade$1 || null; + this.path = query ? serializePathWithQuery$2(path$3, query) : path$3; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking ?? this.method !== "HEAD"; @@ -20233,17 +3156,17 @@ var require_request$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul this.expectContinue = expectContinue != null ? expectContinue : false; if (Array.isArray(headers)) { if (headers.length % 2 !== 0) throw new InvalidArgumentError$27("headers array must be even"); - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) processHeader(this, headers[i$1], headers[i$1 + 1]); + for (let i = 0; i < headers.length; i += 2) processHeader(this, headers[i], headers[i + 1]); } else if (headers && typeof headers === "object") if (headers[Symbol.iterator]) for (const header of headers) { if (!Array.isArray(header) || header.length !== 2) throw new InvalidArgumentError$27("headers must be in key-value pair format"); processHeader(this, header[0], header[1]); } else { const keys = Object.keys(headers); - for (let i$1 = 0; i$1 < keys.length; ++i$1) processHeader(this, keys[i$1], headers[keys[i$1]]); + for (let i = 0; i < keys.length; ++i) processHeader(this, keys[i], headers[keys[i]]); } else if (headers != null) throw new InvalidArgumentError$27("headers must be an object or an array"); - assertRequestHandler(handler, method, upgrade$2); + assertRequestHandler(handler, method, upgrade$1); this.servername = servername || getServerName(this.host) || null; this[kHandler] = handler; if (channels$7.create.hasSubscribers) channels$7.create.publish({ request: this }); @@ -20263,19 +3186,19 @@ var require_request$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul this.abort(err); } } - onConnect(abort$2) { + onConnect(abort$1) { assert$28(!this.aborted); assert$28(!this.completed); - if (this.error) abort$2(this.error); + if (this.error) abort$1(this.error); else { - this.abort = abort$2; - return this[kHandler].onConnect(abort$2); + this.abort = abort$1; + return this[kHandler].onConnect(abort$1); } } onResponseStarted() { return this[kHandler].onResponseStarted?.(); } - onHeaders(statusCode, headers, resume$2, statusText) { + onHeaders(statusCode, headers, resume$1, statusText) { assert$28(!this.aborted); assert$28(!this.completed); if (channels$7.headers.hasSubscribers) channels$7.headers.publish({ @@ -20287,7 +3210,7 @@ var require_request$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul } }); try { - return this[kHandler].onHeaders(statusCode, headers, resume$2, statusText); + return this[kHandler].onHeaders(statusCode, headers, resume$1, statusText); } catch (err) { this.abort(err); } @@ -20322,15 +3245,15 @@ var require_request$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul this.onError(err); } } - onError(error$1) { + onError(error) { this.onFinally(); if (channels$7.error.hasSubscribers) channels$7.error.publish({ request: this, - error: error$1 + error }); if (this.aborted) return; this.aborted = true; - return this[kHandler].onError(error$1); + return this[kHandler].onError(error); } onFinally() { if (this.errorHandler) { @@ -20347,7 +3270,7 @@ var require_request$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul return this; } }; - function processHeader(request$2, key, val) { + function processHeader(request$1, key, val) { if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError$27(`invalid ${key} header`); else if (val === void 0) return; let headerName = headerNameLowerCasedRecord[key]; @@ -20357,33 +3280,33 @@ var require_request$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul } if (Array.isArray(val)) { const arr = []; - for (let i$1 = 0; i$1 < val.length; i$1++) if (typeof val[i$1] === "string") { - if (!isValidHeaderValue$2(val[i$1])) throw new InvalidArgumentError$27(`invalid ${key} header`); - arr.push(val[i$1]); - } else if (val[i$1] === null) arr.push(""); - else if (typeof val[i$1] === "object") throw new InvalidArgumentError$27(`invalid ${key} header`); - else arr.push(`${val[i$1]}`); + for (let i = 0; i < val.length; i++) if (typeof val[i] === "string") { + if (!isValidHeaderValue$2(val[i])) throw new InvalidArgumentError$27(`invalid ${key} header`); + arr.push(val[i]); + } else if (val[i] === null) arr.push(""); + else if (typeof val[i] === "object") throw new InvalidArgumentError$27(`invalid ${key} header`); + else arr.push(`${val[i]}`); val = arr; } else if (typeof val === "string") { if (!isValidHeaderValue$2(val)) throw new InvalidArgumentError$27(`invalid ${key} header`); } else if (val === null) val = ""; else val = `${val}`; - if (request$2.host === null && headerName === "host") { + if (request$1.host === null && headerName === "host") { if (typeof val !== "string") throw new InvalidArgumentError$27("invalid host header"); - request$2.host = val; - } else if (request$2.contentLength === null && headerName === "content-length") { - request$2.contentLength = parseInt(val, 10); - if (!Number.isFinite(request$2.contentLength)) throw new InvalidArgumentError$27("invalid content-length header"); - } else if (request$2.contentType === null && headerName === "content-type") { - request$2.contentType = val; - request$2.headers.push(key, val); + request$1.host = val; + } else if (request$1.contentLength === null && headerName === "content-length") { + request$1.contentLength = parseInt(val, 10); + if (!Number.isFinite(request$1.contentLength)) throw new InvalidArgumentError$27("invalid content-length header"); + } else if (request$1.contentType === null && headerName === "content-type") { + request$1.contentType = val; + request$1.headers.push(key, val); } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") throw new InvalidArgumentError$27(`invalid ${headerName} header`); else if (headerName === "connection") { const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError$27("invalid connection header"); - if (value === "close") request$2.reset = true; + if (value === "close") request$1.reset = true; } else if (headerName === "expect") throw new NotSupportedError$1("expect header not supported"); - else request$2.headers.push(key, val); + else request$1.headers.push(key, val); } module.exports = Request$4; } }); @@ -20400,11 +3323,11 @@ var require_wrap_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mo static wrap(handler) { return handler.onRequestStart ? handler : new WrapHandler$3(handler); } - onConnect(abort$2, context) { - return this.#handler.onConnect?.(abort$2, context); + onConnect(abort$1, context) { + return this.#handler.onConnect?.(abort$1, context); } - onHeaders(statusCode, rawHeaders, resume$2, statusMessage) { - return this.#handler.onHeaders?.(statusCode, rawHeaders, resume$2, statusMessage); + onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { + return this.#handler.onHeaders?.(statusCode, rawHeaders, resume$1, statusMessage); } onUpgrade(statusCode, rawHeaders, socket) { return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket); @@ -20491,8 +3414,8 @@ var require_unwrap_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_ #aborted = false; #abort; [kResume$4] = null; - constructor(abort$2) { - this.#abort = abort$2; + constructor(abort$1) { + this.#abort = abort$1; } pause() { this.#paused = true; @@ -20529,15 +3452,15 @@ var require_unwrap_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/node_ static unwrap(handler) { return !handler.onRequestStart ? handler : new UnwrapHandler$1(handler); } - onConnect(abort$2, context) { - this.#controller = new UnwrapController(abort$2); + onConnect(abort$1, context) { + this.#controller = new UnwrapController(abort$1); this.#handler.onRequestStart?.(this.#controller, context); } onUpgrade(statusCode, rawHeaders, socket) { this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket); } - onHeaders(statusCode, rawHeaders, resume$2, statusMessage) { - this.#controller[kResume$4] = resume$2; + onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { + this.#controller[kResume$4] = resume$1; this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage); return !this.#controller.paused; } @@ -20599,7 +3522,7 @@ var require_dispatcher_base = __commonJS({ "node_modules/.deno/undici@7.9.0/node const onClosed = () => { const callbacks = this[kOnClosed]; this[kOnClosed] = null; - for (let i$1 = 0; i$1 < callbacks.length; i$1++) callbacks[i$1](null, null); + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); }; this[kClose$8]().then(() => this.destroy()).then(() => { queueMicrotask(onClosed); @@ -20628,7 +3551,7 @@ var require_dispatcher_base = __commonJS({ "node_modules/.deno/undici@7.9.0/node const onDestroyed = () => { const callbacks = this[kOnDestroyed]; this[kOnDestroyed] = null; - for (let i$1 = 0; i$1 < callbacks.length; i$1++) callbacks[i$1](null, null); + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); }; this[kDestroy$6](err).then(() => { queueMicrotask(onDestroyed); @@ -20707,7 +3630,7 @@ var require_connect = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); timeout = timeout == null ? 1e4 : timeout; allowH2 = allowH2 != null ? allowH2 : false; - return function connect$5({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + return function connect$3({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { if (!tls) tls = __require("node:tls"); @@ -20777,8 +3700,8 @@ var require_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u Object.defineProperty(exports, "__esModule", { value: true }); exports.enumToMap = void 0; function enumToMap(obj, filter = [], exceptions = []) { - var _a$1, _b; - const emptyFilter = ((_a$1 = filter === null || filter === void 0 ? void 0 : filter.length) !== null && _a$1 !== void 0 ? _a$1 : 0) === 0; + var _a, _b; + const emptyFilter = ((_a = filter === null || filter === void 0 ? void 0 : filter.length) !== null && _a !== void 0 ? _a : 0) === 0; const emptyExceptions = ((_b = exceptions === null || exceptions === void 0 ? void 0 : exceptions.length) !== null && _b !== void 0 ? _b : 0) === 0; return Object.fromEntries(Object.entries(obj).filter(([, value]) => { return typeof value === "number" && (emptyFilter || filter.includes(value)) && (emptyExceptions || !exceptions.includes(value)); @@ -21184,9 +4107,9 @@ var require_constants$3 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod exports.STATUSES.NETWORK_CONNECT_TIMEOUT ]; exports.ALPHA = []; - for (let i$1 = "A".charCodeAt(0); i$1 <= "Z".charCodeAt(0); i$1++) { - exports.ALPHA.push(String.fromCharCode(i$1)); - exports.ALPHA.push(String.fromCharCode(i$1 + 32)); + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports.ALPHA.push(String.fromCharCode(i)); + exports.ALPHA.push(String.fromCharCode(i + 32)); } exports.NUM_MAP = { 0: 0, @@ -21322,13 +4245,13 @@ var require_constants$3 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod "~" ].concat(exports.ALPHANUM); exports.HEADER_CHARS = [" "]; - for (let i$1 = 32; i$1 <= 255; i$1++) if (i$1 !== 127) exports.HEADER_CHARS.push(i$1); + for (let i = 32; i <= 255; i++) if (i !== 127) exports.HEADER_CHARS.push(i); exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); exports.QUOTED_STRING = [" ", " "]; - for (let i$1 = 33; i$1 <= 255; i$1++) if (i$1 !== 34 && i$1 !== 92) exports.QUOTED_STRING.push(i$1); + for (let i = 33; i <= 255; i++) if (i !== 34 && i !== 92) exports.QUOTED_STRING.push(i); exports.HTAB_SP_VCHAR_OBS_TEXT = [" ", " "]; - for (let i$1 = 33; i$1 <= 126; i$1++) exports.HTAB_SP_VCHAR_OBS_TEXT.push(i$1); - for (let i$1 = 128; i$1 <= 255; i$1++) exports.HTAB_SP_VCHAR_OBS_TEXT.push(i$1); + for (let i = 33; i <= 126; i++) exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); + for (let i = 128; i <= 255; i++) exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); exports.MAJOR = exports.NUM_MAP; exports.MINOR = exports.MAJOR; exports.SPECIAL_HEADERS = { @@ -21725,13 +4648,13 @@ var require_data_url = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module /** @type {Uint8Array} */ const output = new Uint8Array(length); let j = 0; - for (let i$1 = 0; i$1 < length; ++i$1) { - const byte = input[i$1]; + for (let i = 0; i < length; ++i) { + const byte = input[i]; if (byte !== 37) output[j++] = byte; - else if (byte === 37 && !(isHexCharByte(input[i$1 + 1]) && isHexCharByte(input[i$1 + 2]))) output[j++] = 37; + else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) output[j++] = 37; else { - output[j++] = hexByteToNumber(input[i$1 + 1]) << 4 | hexByteToNumber(input[i$1 + 2]); - i$1 += 2; + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; } } return length === j ? output : output.subarray(0, j); @@ -21903,11 +4826,11 @@ var require_data_url = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module const length = input.length; if (65535 > length) return String.fromCharCode.apply(null, input); let result = ""; - let i$1 = 0; + let i = 0; let addition = 65535; - while (i$1 < length) { - if (i$1 + addition > length) addition = length - i$1; - result += String.fromCharCode.apply(null, input.subarray(i$1, i$1 += addition)); + while (i < length) { + if (i + addition > length) addition = length - i; + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); } return result; } @@ -22368,8 +5291,8 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @returns {boolean} */ function isValidEncodedURL(url) { - for (let i$1 = 0; i$1 < url.length; ++i$1) { - const code = url.charCodeAt(i$1); + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); if (code > 126 || code < 32) return false; } return true; @@ -22384,11 +5307,11 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ return Buffer.from(value, "binary").toString("utf8"); } /** @returns {URL} */ - function requestCurrentURL$1(request$2) { - return request$2.urlList[request$2.urlList.length - 1]; + function requestCurrentURL$1(request$1) { + return request$1.urlList[request$1.urlList.length - 1]; } - function requestBadPort$1(request$2) { - const url = requestCurrentURL$1(request$2); + function requestBadPort$1(request$1) { + const url = requestCurrentURL$1(request$1); if (urlIsHttpHttpsScheme$2(url) && badPortsSet.has(url.port)) return "blocked"; return "allowed"; } @@ -22396,8 +5319,8 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; } function isValidReasonPhrase$1(statusText) { - for (let i$1 = 0; i$1 < statusText.length; ++i$1) { - const c = statusText.charCodeAt(i$1); + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; } return true; @@ -22421,8 +5344,8 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ function parseReferrerPolicy(actualResponse) { const policyHeader = (actualResponse.headersList.get("referrer-policy", true) ?? "").split(","); let policy = ""; - if (policyHeader.length) for (let i$1 = policyHeader.length; i$1 !== 0; i$1--) { - const token = policyHeader[i$1 - 1].trim(); + if (policyHeader.length) for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); if (referrerPolicyTokens.has(token)) { policy = token; break; @@ -22438,9 +5361,9 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @param {import('./request').Request} request * @param {import('./response').Response} actualResponse */ - function setRequestReferrerPolicyOnRedirect$1(request$2, actualResponse) { + function setRequestReferrerPolicyOnRedirect$1(request$1, actualResponse) { const policy = parseReferrerPolicy(actualResponse); - if (policy !== "") request$2.referrerPolicy = policy; + if (policy !== "") request$1.referrerPolicy = policy; } function crossOriginResourcePolicyCheck$1() { return "allowed"; @@ -22456,26 +5379,26 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ header = httpRequest.mode; httpRequest.headersList.set("sec-fetch-mode", header, true); } - function appendRequestOriginHeader$1(request$2) { - let serializedOrigin = request$2.origin; + function appendRequestOriginHeader$1(request$1) { + let serializedOrigin = request$1.origin; if (serializedOrigin === "client" || serializedOrigin === void 0) return; - if (request$2.responseTainting === "cors" || request$2.mode === "websocket") request$2.headersList.append("origin", serializedOrigin, true); - else if (request$2.method !== "GET" && request$2.method !== "HEAD") { - switch (request$2.referrerPolicy) { + if (request$1.responseTainting === "cors" || request$1.mode === "websocket") request$1.headersList.append("origin", serializedOrigin, true); + else if (request$1.method !== "GET" && request$1.method !== "HEAD") { + switch (request$1.referrerPolicy) { case "no-referrer": serializedOrigin = null; break; case "no-referrer-when-downgrade": case "strict-origin": case "strict-origin-when-cross-origin": - if (request$2.origin && urlHasHttpsScheme$1(request$2.origin) && !urlHasHttpsScheme$1(requestCurrentURL$1(request$2))) serializedOrigin = null; + if (request$1.origin && urlHasHttpsScheme$1(request$1.origin) && !urlHasHttpsScheme$1(requestCurrentURL$1(request$1))) serializedOrigin = null; break; case "same-origin": - if (!sameOrigin$2(request$2, requestCurrentURL$1(request$2))) serializedOrigin = null; + if (!sameOrigin$2(request$1, requestCurrentURL$1(request$1))) serializedOrigin = null; break; default: } - request$2.headersList.append("origin", serializedOrigin, true); + request$1.headersList.append("origin", serializedOrigin, true); } } function coarsenTime(timestamp, crossOriginIsolatedCapability) { @@ -22528,15 +5451,15 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * * @see https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer */ - function determineRequestsReferrer$1(request$2) { - const policy = request$2.referrerPolicy; + function determineRequestsReferrer$1(request$1) { + const policy = request$1.referrerPolicy; assert$25(policy); let referrerSource = null; - if (request$2.referrer === "client") { - const globalOrigin$2 = getGlobalOrigin$1(); - if (!globalOrigin$2 || globalOrigin$2.origin === "null") return "no-referrer"; - referrerSource = new URL(globalOrigin$2); - } else if (webidl$15.is.URL(request$2.referrer)) referrerSource = request$2.referrer; + if (request$1.referrer === "client") { + const globalOrigin$1 = getGlobalOrigin$1(); + if (!globalOrigin$1 || globalOrigin$1.origin === "null") return "no-referrer"; + referrerSource = new URL(globalOrigin$1); + } else if (webidl$15.is.URL(request$1.referrer)) referrerSource = request$1.referrer; let referrerURL = stripURLForReferrer(referrerSource); const referrerOrigin = stripURLForReferrer(referrerSource, true); if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; @@ -22547,24 +5470,24 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ return stripURLForReferrer(referrerSource, true); case "unsafe-url": return referrerURL; case "strict-origin": { - const currentURL = requestCurrentURL$1(request$2); + const currentURL = requestCurrentURL$1(request$1); if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; return referrerOrigin; } case "strict-origin-when-cross-origin": { - const currentURL = requestCurrentURL$1(request$2); + const currentURL = requestCurrentURL$1(request$1); if (sameOrigin$2(referrerURL, currentURL)) return referrerURL; if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; return referrerOrigin; } case "same-origin": - if (sameOrigin$2(request$2, referrerURL)) return referrerURL; + if (sameOrigin$2(request$1, referrerURL)) return referrerURL; return "no-referrer"; case "origin-when-cross-origin": - if (sameOrigin$2(request$2, referrerURL)) return referrerURL; + if (sameOrigin$2(request$1, referrerURL)) return referrerURL; return referrerOrigin; case "no-referrer-when-downgrade": { - const currentURL = requestCurrentURL$1(request$2); + const currentURL = requestCurrentURL$1(request$1); if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; return referrerOrigin; } @@ -22698,8 +5621,8 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ function getStrongestMetadata(metadataList) { let algorithm = metadataList[0].algo; if (algorithm[3] === "5") return algorithm; - for (let i$1 = 1; i$1 < metadataList.length; ++i$1) { - const metadata = metadataList[i$1]; + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; if (metadata.algo[3] === "5") { algorithm = "sha512"; break; @@ -22711,7 +5634,7 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ function filterMetadataListByAlgorithm(metadataList, algorithm) { if (metadataList.length === 1) return metadataList; let pos = 0; - for (let i$1 = 0; i$1 < metadataList.length; ++i$1) if (metadataList[i$1].algo === algorithm) metadataList[pos++] = metadataList[i$1]; + for (let i = 0; i < metadataList.length; ++i) if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; metadataList.length = pos; return metadataList; } @@ -22725,13 +5648,13 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ */ function compareBase64Mixed(actualValue, expectedValue) { if (actualValue.length !== expectedValue.length) return false; - for (let i$1 = 0; i$1 < actualValue.length; ++i$1) if (actualValue[i$1] !== expectedValue[i$1]) { - if (actualValue[i$1] === "+" && expectedValue[i$1] === "-" || actualValue[i$1] === "/" && expectedValue[i$1] === "_") continue; + for (let i = 0; i < actualValue.length; ++i) if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; return false; } return true; } - function tryUpgradeRequestToAPotentiallyTrustworthyURL$1(request$2) {} + function tryUpgradeRequestToAPotentiallyTrustworthyURL$1(request$1) {} /** * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} * @param {URL} A @@ -22862,7 +5785,7 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @param {string | number} [valueIndex] */ function iteratorMixin$2(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator$3 = createIterator(name, kInternalIterator, keyIndex, valueIndex); + const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); const properties = { keys: { writable: true, @@ -22870,7 +5793,7 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ configurable: true, value: function keys() { webidl$15.brandCheck(this, object); - return makeIterator$3(this, "key"); + return makeIterator(this, "key"); } }, values: { @@ -22879,7 +5802,7 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ configurable: true, value: function values() { webidl$15.brandCheck(this, object); - return makeIterator$3(this, "value"); + return makeIterator(this, "value"); } }, entries: { @@ -22888,7 +5811,7 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ configurable: true, value: function entries() { webidl$15.brandCheck(this, object); - return makeIterator$3(this, "key+value"); + return makeIterator(this, "key+value"); } }, forEach: { @@ -22899,7 +5822,7 @@ var require_util$4 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ webidl$15.brandCheck(this, object); webidl$15.argumentLengthCheck(arguments, 1, `${name}.forEach`); if (typeof callbackfn !== "function") throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); - for (const { 0: key, 1: value } of makeIterator$3(this, "key+value")) callbackfn.call(thisArg, value, key, this); + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) callbackfn.call(thisArg, value, key, this); } } }; @@ -23395,7 +6318,7 @@ var require_formdata_parser = __commonJS({ "node_modules/.deno/undici@7.9.0/node * @param {string} chars */ function isAsciiString(chars) { - for (let i$1 = 0; i$1 < chars.length; ++i$1) if ((chars.charCodeAt(i$1) & -128) !== 0) return false; + for (let i = 0; i < chars.length; ++i) if ((chars.charCodeAt(i) & -128) !== 0) return false; return true; } /** @@ -23405,9 +6328,9 @@ var require_formdata_parser = __commonJS({ "node_modules/.deno/undici@7.9.0/node function validateBoundary(boundary) { const length = boundary.length; if (length < 27 || length > 70) return false; - for (let i$1 = 0; i$1 < length; ++i$1) { - const cp$2 = boundary.charCodeAt(i$1); - if (!(cp$2 >= 48 && cp$2 <= 57 || cp$2 >= 65 && cp$2 <= 90 || cp$2 >= 97 && cp$2 <= 122 || cp$2 === 39 || cp$2 === 45 || cp$2 === 95)) return false; + for (let i = 0; i < length; ++i) { + const cp$1 = boundary.charCodeAt(i); + if (!(cp$1 >= 48 && cp$1 <= 57 || cp$1 >= 65 && cp$1 <= 90 || cp$1 >= 97 && cp$1 <= 122 || cp$1 === 39 || cp$1 === 45 || cp$1 === 95)) return false; } return true; } @@ -23571,7 +6494,7 @@ var require_formdata_parser = __commonJS({ "node_modules/.deno/undici@7.9.0/node */ function bufferStartsWith(buffer$1, start, position) { if (buffer$1.length < start.length) return false; - for (let i$1 = 0; i$1 < start.length; i$1++) if (start[i$1] !== buffer$1[position.position + i$1]) return false; + for (let i = 0; i < start.length; i++) if (start[i] !== buffer$1[position.position + i]) return false; return true; } function parsingError(cause) { @@ -23598,8 +6521,8 @@ var require_body = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/un const { multipartFormDataParser } = require_formdata_parser(); let random; try { - const crypto$8 = __require("node:crypto"); - random = (max) => crypto$8.randomInt(0, max); + const crypto$4 = __require("node:crypto"); + random = (max) => crypto$4.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random() * max); } @@ -23608,14 +6531,14 @@ var require_body = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/un const hasFinalizationRegistry$1 = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; let streamRegistry$1; if (hasFinalizationRegistry$1) streamRegistry$1 = new FinalizationRegistry((weakRef) => { - const stream$5 = weakRef.deref(); - if (stream$5 && !stream$5.locked && !isDisturbed$2(stream$5) && !isErrored$1(stream$5)) stream$5.cancel("Response object has been garbage collected").catch(noop$8); + const stream$3 = weakRef.deref(); + if (stream$3 && !stream$3.locked && !isDisturbed$2(stream$3) && !isErrored$1(stream$3)) stream$3.cancel("Response object has been garbage collected").catch(noop$8); }); function extractBody$5(object, keepalive = false) { - let stream$5 = null; - if (webidl$12.is.ReadableStream(object)) stream$5 = object; - else if (webidl$12.is.Blob(object)) stream$5 = object.stream(); - else stream$5 = new ReadableStream({ + let stream$3 = null; + if (webidl$12.is.ReadableStream(object)) stream$3 = object; + else if (webidl$12.is.Blob(object)) stream$3 = object.stream(); + else stream$3 = new ReadableStream({ async pull(controller) { const buffer$1 = typeof source === "string" ? textEncoder$1.encode(source) : source; if (buffer$1.byteLength) controller.enqueue(buffer$1); @@ -23624,7 +6547,7 @@ var require_body = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/un start() {}, type: "bytes" }); - assert$23(webidl$12.is.ReadableStream(stream$5)); + assert$23(webidl$12.is.ReadableStream(stream$3)); let action = null; let source = null; let length = null; @@ -23675,12 +6598,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); } else if (typeof object[Symbol.asyncIterator] === "function") { if (keepalive) throw new TypeError("keepalive"); if (util$20.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); - stream$5 = webidl$12.is.ReadableStream(object) ? object : ReadableStreamFrom$1(object); + stream$3 = webidl$12.is.ReadableStream(object) ? object : ReadableStreamFrom$1(object); } if (typeof source === "string" || util$20.isBuffer(source)) length = Buffer.byteLength(source); if (action != null) { let iterator; - stream$5 = new ReadableStream({ + stream$3 = new ReadableStream({ async start() { iterator = action(object)[Symbol.asyncIterator](); }, @@ -23690,7 +6613,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); controller.close(); controller.byobRequest?.respond(0); }); - else if (!isErrored$1(stream$5)) { + else if (!isErrored$1(stream$3)) { const buffer$1 = new Uint8Array(value); if (buffer$1.byteLength) controller.enqueue(buffer$1); } @@ -23703,7 +6626,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); }); } const body = { - stream: stream$5, + stream: stream$3, source, length }; @@ -23796,7 +6719,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); if (bodyUnusable$2(state)) throw new TypeError("Body is unusable: Body has already been read"); throwIfAborted(state); const promise = createDeferredPromise$3(); - const errorSteps = (error$1) => promise.reject(error$1); + const errorSteps = (error) => promise.reject(error); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -23895,9 +6818,9 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)); }, - wasm_on_headers_complete: (p, statusCode, upgrade$2, shouldKeepAlive) => { + wasm_on_headers_complete: (p, statusCode, upgrade$1, shouldKeepAlive) => { assert$22(currentParser.ptr === p); - return currentParser.onHeadersComplete(statusCode, upgrade$2 === 1, shouldKeepAlive === 1); + return currentParser.onHeadersComplete(statusCode, upgrade$1 === 1, shouldKeepAlive === 1); }, wasm_on_body: (p, at, len) => { assert$22(currentParser.ptr === p); @@ -24076,9 +6999,9 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul const { socket, client } = this; /* istanbul ignore next: difficult to make a test case for */ if (socket.destroyed) return -1; - const request$2 = client[kQueue$3][client[kRunningIdx$2]]; - if (!request$2) return -1; - request$2.onResponseStarted(); + const request$1 = client[kQueue$3][client[kRunningIdx$2]]; + if (!request$1) return -1; + request$1.onResponseStarted(); return 0; } /** @@ -24122,15 +7045,15 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @param {Buffer} head */ onUpgrade(head) { - const { upgrade: upgrade$2, client, socket, headers, statusCode } = this; - assert$22(upgrade$2); + const { upgrade: upgrade$1, client, socket, headers, statusCode } = this; + assert$22(upgrade$1); assert$22(client[kSocket$1] === socket); assert$22(!socket.destroyed); assert$22(!this.paused); assert$22((headers.length & 1) === 0); - const request$2 = client[kQueue$3][client[kRunningIdx$2]]; - assert$22(request$2); - assert$22(request$2.upgrade || request$2.method === "CONNECT"); + const request$1 = client[kQueue$3][client[kRunningIdx$2]]; + assert$22(request$1); + assert$22(request$1.upgrade || request$1.method === "CONNECT"); this.statusCode = 0; this.statusText = ""; this.shouldKeepAlive = false; @@ -24147,7 +7070,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul client[kQueue$3][client[kRunningIdx$2]++] = null; client.emit("disconnect", client[kUrl$6], [client], new InformationalError$3("upgrade")); try { - request$2.onUpgrade(statusCode, headers, socket); + request$1.onUpgrade(statusCode, headers, socket); } catch (err) { util$19.destroy(socket, err); } @@ -24159,39 +7082,39 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @param {boolean} shouldKeepAlive * @returns {number} */ - onHeadersComplete(statusCode, upgrade$2, shouldKeepAlive) { + onHeadersComplete(statusCode, upgrade$1, shouldKeepAlive) { const { client, socket, headers, statusText } = this; /* istanbul ignore next: difficult to make a test case for */ if (socket.destroyed) return -1; - const request$2 = client[kQueue$3][client[kRunningIdx$2]]; + const request$1 = client[kQueue$3][client[kRunningIdx$2]]; /* istanbul ignore next: difficult to make a test case for */ - if (!request$2) return -1; + if (!request$1) return -1; assert$22(!this.upgrade); assert$22(this.statusCode < 200); if (statusCode === 100) { util$19.destroy(socket, new SocketError$3("bad response", util$19.getSocketInfo(socket))); return -1; } - if (upgrade$2 && !request$2.upgrade) { + if (upgrade$1 && !request$1.upgrade) { util$19.destroy(socket, new SocketError$3("bad upgrade", util$19.getSocketInfo(socket))); return -1; } assert$22(this.timeoutType === TIMEOUT_HEADERS); this.statusCode = statusCode; - this.shouldKeepAlive = shouldKeepAlive || request$2.method === "HEAD" && !socket[kReset$1] && this.connection.toLowerCase() === "keep-alive"; + this.shouldKeepAlive = shouldKeepAlive || request$1.method === "HEAD" && !socket[kReset$1] && this.connection.toLowerCase() === "keep-alive"; if (this.statusCode >= 200) { - const bodyTimeout = request$2.bodyTimeout != null ? request$2.bodyTimeout : client[kBodyTimeout$2]; + const bodyTimeout = request$1.bodyTimeout != null ? request$1.bodyTimeout : client[kBodyTimeout$2]; this.setTimeout(bodyTimeout, TIMEOUT_BODY); } else if (this.timeout) { // istanbul ignore else: only for jest if (this.timeout.refresh) this.timeout.refresh(); } - if (request$2.method === "CONNECT") { + if (request$1.method === "CONNECT") { assert$22(client[kRunning$4] === 1); this.upgrade = true; return 2; } - if (upgrade$2) { + if (upgrade$1) { assert$22(client[kRunning$4] === 1); this.upgrade = true; return 2; @@ -24207,9 +7130,9 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul else client[kKeepAliveTimeoutValue$1] = timeout; } else client[kKeepAliveTimeoutValue$1] = client[kKeepAliveDefaultTimeout$1]; } else socket[kReset$1] = true; - const pause = request$2.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request$2.aborted) return -1; - if (request$2.method === "HEAD") return 1; + const pause = request$1.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request$1.aborted) return -1; + if (request$1.method === "HEAD") return 1; if (statusCode < 200) return 1; if (socket[kBlocking]) { socket[kBlocking] = false; @@ -24224,8 +7147,8 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul onBody(buf) { const { client, socket, statusCode, maxResponseSize } = this; if (socket.destroyed) return -1; - const request$2 = client[kQueue$3][client[kRunningIdx$2]]; - assert$22(request$2); + const request$1 = client[kQueue$3][client[kRunningIdx$2]]; + assert$22(request$1); assert$22(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { // istanbul ignore else: only for jest @@ -24237,20 +7160,20 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul return -1; } this.bytesRead += buf.length; - if (request$2.onData(buf) === false) return constants.ERROR.PAUSED; + if (request$1.onData(buf) === false) return constants.ERROR.PAUSED; return 0; } /** * @returns {number} */ onMessageComplete() { - const { client, socket, statusCode, upgrade: upgrade$2, headers, contentLength, bytesRead, shouldKeepAlive } = this; + const { client, socket, statusCode, upgrade: upgrade$1, headers, contentLength, bytesRead, shouldKeepAlive } = this; if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; - if (upgrade$2) return 0; + if (upgrade$1) return 0; assert$22(statusCode >= 100); assert$22((this.headers.length & 1) === 0); - const request$2 = client[kQueue$3][client[kRunningIdx$2]]; - assert$22(request$2); + const request$1 = client[kQueue$3][client[kRunningIdx$2]]; + assert$22(request$1); this.statusCode = 0; this.statusText = ""; this.bytesRead = 0; @@ -24261,11 +7184,11 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul this.headersSize = 0; if (statusCode < 200) return 0; /* istanbul ignore next: should be handled by llhttp? */ - if (request$2.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + if (request$1.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { util$19.destroy(socket, new ResponseContentLengthMismatchError()); return -1; } - request$2.onComplete(headers); + request$1.onComplete(headers); client[kQueue$3][client[kRunningIdx$2]++] = null; if (socket[kWriting]) { assert$22(client[kRunning$4] === 0); @@ -24305,11 +7228,11 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul async function connectH1$1(client, socket) { client[kSocket$1] = socket; if (!llhttpInstance) { - const noop$11 = () => {}; - socket.on("error", noop$11); + const noop$10 = () => {}; + socket.on("error", noop$10); llhttpInstance = await llhttpPromise; llhttpPromise = null; - socket.off("error", noop$11); + socket.off("error", noop$10); } if (socket.errored) throw socket.errored; if (socket.destroyed) throw new SocketError$3("destroyed"); @@ -24327,8 +7250,8 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul return { version: "h1", defaultPipelining: 1, - write(request$2) { - return writeH1(client, request$2); + write(request$1) { + return writeH1(client, request$1); }, resume() { resumeH1(client); @@ -24343,12 +7266,12 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul get destroyed() { return socket.destroyed; }, - busy(request$2) { + busy(request$1) { if (socket[kWriting] || socket[kReset$1] || socket[kBlocking]) return true; - if (request$2) { - if (client[kRunning$4] > 0 && !request$2.idempotent) return true; - if (client[kRunning$4] > 0 && (request$2.upgrade || request$2.method === "CONNECT")) return true; - if (client[kRunning$4] > 0 && util$19.bodyLength(request$2.body) !== 0 && (util$19.isStream(request$2.body) || util$19.isAsyncIterable(request$2.body) || util$19.isFormDataLike(request$2.body))) return true; + if (request$1) { + if (client[kRunning$4] > 0 && !request$1.idempotent) return true; + if (client[kRunning$4] > 0 && (request$1.upgrade || request$1.method === "CONNECT")) return true; + if (client[kRunning$4] > 0 && util$19.bodyLength(request$1.body) !== 0 && (util$19.isStream(request$1.body) || util$19.isAsyncIterable(request$1.body) || util$19.isFormDataLike(request$1.body))) return true; } return false; } @@ -24389,14 +7312,14 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul if (client.destroyed) { assert$22(client[kPending$3] === 0); const requests = client[kQueue$3].splice(client[kRunningIdx$2]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$2 = requests[i$1]; - util$19.errorRequest(client, request$2, err); + for (let i = 0; i < requests.length; i++) { + const request$1 = requests[i]; + util$19.errorRequest(client, request$1, err); } } else if (client[kRunning$4] > 0 && err.code !== "UND_ERR_INFO") { - const request$2 = client[kQueue$3][client[kRunningIdx$2]]; + const request$1 = client[kQueue$3][client[kRunningIdx$2]]; client[kQueue$3][client[kRunningIdx$2]++] = null; - util$19.errorRequest(client, request$2, err); + util$19.errorRequest(client, request$1, err); } client[kPendingIdx$2] = client[kRunningIdx$2]; assert$22(client[kRunning$4] === 0); @@ -24425,8 +7348,8 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue$1], TIMEOUT_KEEP_ALIVE); } else if (client[kRunning$4] > 0 && socket[kParser].statusCode < 200) { if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request$2 = client[kQueue$3][client[kRunningIdx$2]]; - const headersTimeout = request$2.headersTimeout != null ? request$2.headersTimeout : client[kHeadersTimeout$1]; + const request$1 = client[kQueue$3][client[kRunningIdx$2]]; + const headersTimeout = request$1.headersTimeout != null ? request$1.headersTimeout : client[kHeadersTimeout$1]; socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); } } @@ -24440,25 +7363,25 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @param {import('../core/request.js')} request * @returns */ - function writeH1(client, request$2) { - const { method, path: path$8, host, upgrade: upgrade$2, blocking, reset } = request$2; - let { body, headers, contentLength } = request$2; + function writeH1(client, request$1) { + const { method, path: path$3, host, upgrade: upgrade$1, blocking, reset } = request$1; + let { body, headers, contentLength } = request$1; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util$19.isFormDataLike(body)) { if (!extractBody$4) extractBody$4 = require_body().extractBody; const [bodyStream, contentType] = extractBody$4(body); - if (request$2.contentType == null) headers.push("content-type", contentType); + if (request$1.contentType == null) headers.push("content-type", contentType); body = bodyStream.stream; contentLength = bodyStream.length; - } else if (util$19.isBlobLike(body) && request$2.contentType == null && body.type) headers.push("content-type", body.type); + } else if (util$19.isBlobLike(body) && request$1.contentType == null && body.type) headers.push("content-type", body.type); if (body && typeof body.read === "function") body.read(0); - const bodyLength$2 = util$19.bodyLength(body); - contentLength = bodyLength$2 ?? contentLength; - if (contentLength === null) contentLength = request$2.contentLength; + const bodyLength$1 = util$19.bodyLength(body); + contentLength = bodyLength$1 ?? contentLength; + if (contentLength === null) contentLength = request$1.contentLength; if (contentLength === 0 && !expectsPayload) contentLength = null; - if (shouldSendContentLength$1(method) && contentLength > 0 && request$2.contentLength !== null && request$2.contentLength !== contentLength) { + if (shouldSendContentLength$1(method) && contentLength > 0 && request$1.contentLength !== null && request$1.contentLength !== contentLength) { if (client[kStrictContentLength$2]) { - util$19.errorRequest(client, request$2, new RequestContentLengthMismatchError$1()); + util$19.errorRequest(client, request$1, new RequestContentLengthMismatchError$1()); return false; } process.emitWarning(new RequestContentLengthMismatchError$1()); @@ -24468,47 +7391,47 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @param {Error} [err] * @returns {void} */ - const abort$2 = (err) => { - if (request$2.aborted || request$2.completed) return; - util$19.errorRequest(client, request$2, err || new RequestAbortedError$7()); + const abort$1 = (err) => { + if (request$1.aborted || request$1.completed) return; + util$19.errorRequest(client, request$1, err || new RequestAbortedError$7()); util$19.destroy(body); util$19.destroy(socket, new InformationalError$3("aborted")); }; try { - request$2.onConnect(abort$2); + request$1.onConnect(abort$1); } catch (err) { - util$19.errorRequest(client, request$2, err); + util$19.errorRequest(client, request$1, err); } - if (request$2.aborted) return false; + if (request$1.aborted) return false; if (method === "HEAD") socket[kReset$1] = true; - if (upgrade$2 || method === "CONNECT") socket[kReset$1] = true; + if (upgrade$1 || method === "CONNECT") socket[kReset$1] = true; if (reset != null) socket[kReset$1] = reset; if (client[kMaxRequests$1] && socket[kCounter$1]++ >= client[kMaxRequests$1]) socket[kReset$1] = true; if (blocking) socket[kBlocking] = true; - let header = `${method} ${path$8} HTTP/1.1\r\n`; + let header = `${method} ${path$3} HTTP/1.1\r\n`; if (typeof host === "string") header += `host: ${host}\r\n`; else header += client[kHostHeader$1]; - if (upgrade$2) header += `connection: upgrade\r\nupgrade: ${upgrade$2}\r\n`; + if (upgrade$1) header += `connection: upgrade\r\nupgrade: ${upgrade$1}\r\n`; else if (client[kPipelining$1] && !socket[kReset$1]) header += "connection: keep-alive\r\n"; else header += "connection: close\r\n"; if (Array.isArray(headers)) for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0]; const val = headers[n + 1]; - if (Array.isArray(val)) for (let i$1 = 0; i$1 < val.length; i$1++) header += `${key}: ${val[i$1]}\r\n`; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) header += `${key}: ${val[i]}\r\n`; else header += `${key}: ${val}\r\n`; } if (channels$6.sendHeaders.hasSubscribers) channels$6.sendHeaders.publish({ - request: request$2, + request: request$1, headers: header, socket }); /* istanbul ignore else: assertion */ - if (!body || bodyLength$2 === 0) writeBuffer$1(abort$2, null, client, request$2, socket, contentLength, header, expectsPayload); - else if (util$19.isBuffer(body)) writeBuffer$1(abort$2, body, client, request$2, socket, contentLength, header, expectsPayload); - else if (util$19.isBlobLike(body)) if (typeof body.stream === "function") writeIterable$1(abort$2, body.stream(), client, request$2, socket, contentLength, header, expectsPayload); - else writeBlob$1(abort$2, body, client, request$2, socket, contentLength, header, expectsPayload); - else if (util$19.isStream(body)) writeStream$1(abort$2, body, client, request$2, socket, contentLength, header, expectsPayload); - else if (util$19.isIterable(body)) writeIterable$1(abort$2, body, client, request$2, socket, contentLength, header, expectsPayload); + if (!body || bodyLength$1 === 0) writeBuffer$1(abort$1, null, client, request$1, socket, contentLength, header, expectsPayload); + else if (util$19.isBuffer(body)) writeBuffer$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload); + else if (util$19.isBlobLike(body)) if (typeof body.stream === "function") writeIterable$1(abort$1, body.stream(), client, request$1, socket, contentLength, header, expectsPayload); + else writeBlob$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload); + else if (util$19.isStream(body)) writeStream$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload); + else if (util$19.isIterable(body)) writeIterable$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload); else assert$22(false); return true; } @@ -24522,13 +7445,13 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @param {string} header * @param {boolean} expectsPayload */ - function writeStream$1(abort$2, body, client, request$2, socket, contentLength, header, expectsPayload) { + function writeStream$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload) { assert$22(contentLength !== 0 || client[kRunning$4] === 0, "stream body cannot be pipelined"); - let finished$3 = false; + let finished$2 = false; const writer = new AsyncWriter({ - abort: abort$2, + abort: abort$1, socket, - request: request$2, + request: request$1, contentLength, client, expectsPayload, @@ -24539,7 +7462,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @returns {void} */ const onData = function(chunk) { - if (finished$3) return; + if (finished$2) return; try { if (!writer.write(chunk) && this.pause) this.pause(); } catch (err) { @@ -24550,7 +7473,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @returns {void} */ const onDrain = function() { - if (finished$3) return; + if (finished$2) return; if (body.resume) body.resume(); }; /** @@ -24560,7 +7483,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul queueMicrotask(() => { body.removeListener("error", onFinished); }); - if (!finished$3) { + if (!finished$2) { const err = new RequestAbortedError$7(); queueMicrotask(() => onFinished(err)); } @@ -24570,8 +7493,8 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @returns */ const onFinished = function(err) { - if (finished$3) return; - finished$3 = true; + if (finished$2) return; + finished$2 = true; assert$22(socket.destroyed || socket[kWriting] && client[kRunning$4] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); @@ -24608,7 +7531,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @param {boolean} expectsPayload * @returns {void} */ - function writeBuffer$1(abort$2, body, client, request$2, socket, contentLength, header, expectsPayload) { + function writeBuffer$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload) { try { if (!body) if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); else { @@ -24621,13 +7544,13 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); socket.write(body); socket.uncork(); - request$2.onBodySent(body); - if (!expectsPayload && request$2.reset !== false) socket[kReset$1] = true; + request$1.onBodySent(body); + if (!expectsPayload && request$1.reset !== false) socket[kReset$1] = true; } - request$2.onRequestSent(); + request$1.onRequestSent(); client[kResume$3](); } catch (err) { - abort$2(err); + abort$1(err); } } /** @@ -24641,7 +7564,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @param {boolean} expectsPayload * @returns {Promise} */ - async function writeBlob$1(abort$2, body, client, request$2, socket, contentLength, header, expectsPayload) { + async function writeBlob$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload) { assert$22(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError$1(); @@ -24650,12 +7573,12 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); socket.write(buffer$1); socket.uncork(); - request$2.onBodySent(buffer$1); - request$2.onRequestSent(); - if (!expectsPayload && request$2.reset !== false) socket[kReset$1] = true; + request$1.onBodySent(buffer$1); + request$1.onRequestSent(); + if (!expectsPayload && request$1.reset !== false) socket[kReset$1] = true; client[kResume$3](); } catch (err) { - abort$2(err); + abort$1(err); } } /** @@ -24669,7 +7592,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @param {boolean} expectsPayload * @returns {Promise} */ - async function writeIterable$1(abort$2, body, client, request$2, socket, contentLength, header, expectsPayload) { + async function writeIterable$1(abort$1, body, client, request$1, socket, contentLength, header, expectsPayload) { assert$22(contentLength !== 0 || client[kRunning$4] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { @@ -24686,9 +7609,9 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul }); socket.on("close", onDrain).on("drain", onDrain); const writer = new AsyncWriter({ - abort: abort$2, + abort: abort$1, socket, - request: request$2, + request: request$1, contentLength, client, expectsPayload, @@ -24718,15 +7641,15 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @param {boolean} arg.expectsPayload * @param {string} arg.header */ - constructor({ abort: abort$2, socket, request: request$2, contentLength, client, expectsPayload, header }) { + constructor({ abort: abort$1, socket, request: request$1, contentLength, client, expectsPayload, header }) { this.socket = socket; - this.request = request$2; + this.request = request$1; this.contentLength = contentLength; this.client = client; this.bytesWritten = 0; this.expectsPayload = expectsPayload; this.header = header; - this.abort = abort$2; + this.abort = abort$1; socket[kWriting] = true; } /** @@ -24734,7 +7657,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @returns */ write(chunk) { - const { socket, request: request$2, contentLength, client, bytesWritten, expectsPayload, header } = this; + const { socket, request: request$1, contentLength, client, bytesWritten, expectsPayload, header } = this; if (socket[kError$2]) throw socket[kError$2]; if (socket.destroyed) return false; const len = Buffer.byteLength(chunk); @@ -24745,7 +7668,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul } socket.cork(); if (bytesWritten === 0) { - if (!expectsPayload && request$2.reset !== false) socket[kReset$1] = true; + if (!expectsPayload && request$1.reset !== false) socket[kReset$1] = true; if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); } @@ -24753,7 +7676,7 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul this.bytesWritten += len; const ret = socket.write(chunk); socket.uncork(); - request$2.onBodySent(chunk); + request$1.onBodySent(chunk); if (!ret) { if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { // istanbul ignore else: only for jest @@ -24766,8 +7689,8 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @returns {void} */ end() { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request$2 } = this; - request$2.onRequestSent(); + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request$1 } = this; + request$1.onRequestSent(); socket[kWriting] = false; if (socket[kError$2]) throw socket[kError$2]; if (socket.destroyed) return; @@ -24787,11 +7710,11 @@ var require_client_h1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul * @returns {void} */ destroy(err) { - const { socket, client, abort: abort$2 } = this; + const { socket, client, abort: abort$1 } = this; socket[kWriting] = false; if (err) { assert$22(client[kRunning$4] <= 1, "pipeline should only contain this request"); - abort$2(err); + abort$1(err); } } }; @@ -24850,8 +7773,8 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul return { version: "h2", defaultPipelining: Infinity, - write(request$2) { - return writeH2(client, request$2); + write(request$1) { + return writeH2(client, request$1); }, resume() { resumeH2(client); @@ -24912,9 +7835,9 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul this[kHTTP2Session] = null; util$18.destroy(this[kSocket], err); if (client[kRunningIdx$1] < client[kQueue$2].length) { - const request$2 = client[kQueue$2][client[kRunningIdx$1]]; + const request$1 = client[kQueue$2][client[kRunningIdx$1]]; client[kQueue$2][client[kRunningIdx$1]++] = null; - util$18.errorRequest(client, request$2, err); + util$18.errorRequest(client, request$1, err); client[kPendingIdx$1] = client[kRunningIdx$1]; } assert$21(client[kRunning$3] === 0); @@ -24931,9 +7854,9 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul if (client.destroyed) { assert$21(client[kPending$2] === 0); const requests = client[kQueue$2].splice(client[kRunningIdx$1]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$2 = requests[i$1]; - util$18.errorRequest(client, request$2, err); + for (let i = 0; i < requests.length; i++) { + const request$1 = requests[i]; + util$18.errorRequest(client, request$1, err); } } } @@ -24962,70 +7885,70 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul function shouldSendContentLength(method) { return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } - function writeH2(client, request$2) { - const requestTimeout = request$2.bodyTimeout ?? client[kBodyTimeout$1]; + function writeH2(client, request$1) { + const requestTimeout = request$1.bodyTimeout ?? client[kBodyTimeout$1]; const session = client[kHTTP2Session]; - const { method, path: path$8, host, upgrade: upgrade$2, expectContinue, signal, headers: reqHeaders } = request$2; - let { body } = request$2; - if (upgrade$2) { - util$18.errorRequest(client, request$2, new Error("Upgrade not supported for H2")); + const { method, path: path$3, host, upgrade: upgrade$1, expectContinue, signal, headers: reqHeaders } = request$1; + let { body } = request$1; + if (upgrade$1) { + util$18.errorRequest(client, request$1, new Error("Upgrade not supported for H2")); return false; } const headers = {}; for (let n = 0; n < reqHeaders.length; n += 2) { const key = reqHeaders[n + 0]; const val = reqHeaders[n + 1]; - if (Array.isArray(val)) for (let i$1 = 0; i$1 < val.length; i$1++) if (headers[key]) headers[key] += `, ${val[i$1]}`; - else headers[key] = val[i$1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) if (headers[key]) headers[key] += `, ${val[i]}`; + else headers[key] = val[i]; else if (headers[key]) headers[key] += `, ${val}`; else headers[key] = val; } /** @type {import('node:http2').ClientHttp2Stream} */ - let stream$5 = null; + let stream$3 = null; const { hostname, port } = client[kUrl$5]; headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; headers[HTTP2_HEADER_METHOD] = method; - const abort$2 = (err) => { - if (request$2.aborted || request$2.completed) return; + const abort$1 = (err) => { + if (request$1.aborted || request$1.completed) return; err = err || new RequestAbortedError$6(); - util$18.errorRequest(client, request$2, err); - if (stream$5 != null) { - stream$5.removeAllListeners("data"); - stream$5.close(); + util$18.errorRequest(client, request$1, err); + if (stream$3 != null) { + stream$3.removeAllListeners("data"); + stream$3.close(); client[kOnError$1](err); client[kResume$2](); } util$18.destroy(body, err); }; try { - request$2.onConnect(abort$2); + request$1.onConnect(abort$1); } catch (err) { - util$18.errorRequest(client, request$2, err); + util$18.errorRequest(client, request$1, err); } - if (request$2.aborted) return false; + if (request$1.aborted) return false; if (method === "CONNECT") { session.ref(); - stream$5 = session.request(headers, { + stream$3 = session.request(headers, { endStream: false, signal }); - if (!stream$5.pending) { - request$2.onUpgrade(null, null, stream$5); + if (!stream$3.pending) { + request$1.onUpgrade(null, null, stream$3); ++session[kOpenStreams]; client[kQueue$2][client[kRunningIdx$1]++] = null; - } else stream$5.once("ready", () => { - request$2.onUpgrade(null, null, stream$5); + } else stream$3.once("ready", () => { + request$1.onUpgrade(null, null, stream$3); ++session[kOpenStreams]; client[kQueue$2][client[kRunningIdx$1]++] = null; }); - stream$5.once("close", () => { + stream$3.once("close", () => { session[kOpenStreams] -= 1; if (session[kOpenStreams] === 0) session.unref(); }); - stream$5.setTimeout(requestTimeout); + stream$3.setTimeout(requestTimeout); return true; } - headers[HTTP2_HEADER_PATH] = path$8; + headers[HTTP2_HEADER_PATH] = path$3; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") body.read(0); @@ -25037,11 +7960,11 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul body = bodyStream.stream; contentLength = bodyStream.length; } - if (contentLength == null) contentLength = request$2.contentLength; + if (contentLength == null) contentLength = request$1.contentLength; if (contentLength === 0 || !expectsPayload) contentLength = null; - if (shouldSendContentLength(method) && contentLength > 0 && request$2.contentLength != null && request$2.contentLength !== contentLength) { + if (shouldSendContentLength(method) && contentLength > 0 && request$1.contentLength != null && request$1.contentLength !== contentLength) { if (client[kStrictContentLength$1]) { - util$18.errorRequest(client, request$2, new RequestContentLengthMismatchError()); + util$18.errorRequest(client, request$1, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); @@ -25055,7 +7978,7 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul let header = ""; for (const key in headers) header += `${key}: ${headers[key]}\r\n`; channels$5.sendHeaders.publish({ - request: request$2, + request: request$1, headers: header, socket: session[kSocket] }); @@ -25063,87 +7986,87 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; - stream$5 = session.request(headers, { + stream$3 = session.request(headers, { endStream: shouldEndStream, signal }); - stream$5.once("continue", writeBodyH2); + stream$3.once("continue", writeBodyH2); } else { - stream$5 = session.request(headers, { + stream$3 = session.request(headers, { endStream: shouldEndStream, signal }); writeBodyH2(); } ++session[kOpenStreams]; - stream$5.setTimeout(requestTimeout); - stream$5.once("response", (headers$1) => { + stream$3.setTimeout(requestTimeout); + stream$3.once("response", (headers$1) => { const { [HTTP2_HEADER_STATUS]: statusCode,...realHeaders } = headers$1; - request$2.onResponseStarted(); - if (request$2.aborted) { - stream$5.removeAllListeners("data"); + request$1.onResponseStarted(); + if (request$1.aborted) { + stream$3.removeAllListeners("data"); return; } - if (request$2.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream$5.resume.bind(stream$5), "") === false) stream$5.pause(); + if (request$1.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream$3.resume.bind(stream$3), "") === false) stream$3.pause(); }); - stream$5.on("data", (chunk) => { - if (request$2.onData(chunk) === false) stream$5.pause(); + stream$3.on("data", (chunk) => { + if (request$1.onData(chunk) === false) stream$3.pause(); }); - stream$5.once("end", (err) => { - stream$5.removeAllListeners("data"); - if (stream$5.state?.state == null || stream$5.state.state < 6) { - if (!request$2.aborted && !request$2.completed) request$2.onComplete({}); + stream$3.once("end", (err) => { + stream$3.removeAllListeners("data"); + if (stream$3.state?.state == null || stream$3.state.state < 6) { + if (!request$1.aborted && !request$1.completed) request$1.onComplete({}); client[kQueue$2][client[kRunningIdx$1]++] = null; client[kResume$2](); } else { --session[kOpenStreams]; if (session[kOpenStreams] === 0) session.unref(); - abort$2(err ?? new InformationalError$2("HTTP/2: stream half-closed (remote)")); + abort$1(err ?? new InformationalError$2("HTTP/2: stream half-closed (remote)")); client[kQueue$2][client[kRunningIdx$1]++] = null; client[kPendingIdx$1] = client[kRunningIdx$1]; client[kResume$2](); } }); - stream$5.once("close", () => { - stream$5.removeAllListeners("data"); + stream$3.once("close", () => { + stream$3.removeAllListeners("data"); session[kOpenStreams] -= 1; if (session[kOpenStreams] === 0) session.unref(); }); - stream$5.once("error", function(err) { - stream$5.removeAllListeners("data"); - abort$2(err); + stream$3.once("error", function(err) { + stream$3.removeAllListeners("data"); + abort$1(err); }); - stream$5.once("frameError", (type, code) => { - stream$5.removeAllListeners("data"); - abort$2(new InformationalError$2(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + stream$3.once("frameError", (type, code) => { + stream$3.removeAllListeners("data"); + abort$1(new InformationalError$2(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); }); - stream$5.on("aborted", () => { - stream$5.removeAllListeners("data"); + stream$3.on("aborted", () => { + stream$3.removeAllListeners("data"); }); - stream$5.on("timeout", () => { + stream$3.on("timeout", () => { const err = new InformationalError$2(`HTTP/2: "stream timeout after ${requestTimeout}"`); - stream$5.removeAllListeners("data"); + stream$3.removeAllListeners("data"); session[kOpenStreams] -= 1; if (session[kOpenStreams] === 0) session.unref(); - abort$2(err); + abort$1(err); }); - stream$5.once("trailers", (trailers) => { - if (request$2.aborted || request$2.completed) return; - request$2.onComplete(trailers); + stream$3.once("trailers", (trailers) => { + if (request$1.aborted || request$1.completed) return; + request$1.onComplete(trailers); }); return true; function writeBodyH2() { /* istanbul ignore else: assertion */ - if (!body || contentLength === 0) writeBuffer(abort$2, stream$5, null, client, request$2, client[kSocket], contentLength, expectsPayload); - else if (util$18.isBuffer(body)) writeBuffer(abort$2, stream$5, body, client, request$2, client[kSocket], contentLength, expectsPayload); - else if (util$18.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort$2, stream$5, body.stream(), client, request$2, client[kSocket], contentLength, expectsPayload); - else writeBlob(abort$2, stream$5, body, client, request$2, client[kSocket], contentLength, expectsPayload); - else if (util$18.isStream(body)) writeStream(abort$2, client[kSocket], expectsPayload, stream$5, body, client, request$2, contentLength); - else if (util$18.isIterable(body)) writeIterable(abort$2, stream$5, body, client, request$2, client[kSocket], contentLength, expectsPayload); + if (!body || contentLength === 0) writeBuffer(abort$1, stream$3, null, client, request$1, client[kSocket], contentLength, expectsPayload); + else if (util$18.isBuffer(body)) writeBuffer(abort$1, stream$3, body, client, request$1, client[kSocket], contentLength, expectsPayload); + else if (util$18.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort$1, stream$3, body.stream(), client, request$1, client[kSocket], contentLength, expectsPayload); + else writeBlob(abort$1, stream$3, body, client, request$1, client[kSocket], contentLength, expectsPayload); + else if (util$18.isStream(body)) writeStream(abort$1, client[kSocket], expectsPayload, stream$3, body, client, request$1, contentLength); + else if (util$18.isIterable(body)) writeIterable(abort$1, stream$3, body, client, request$1, client[kSocket], contentLength, expectsPayload); else assert$21(false); } } - function writeBuffer(abort$2, h2stream, body, client, request$2, socket, contentLength, expectsPayload) { + function writeBuffer(abort$1, h2stream, body, client, request$1, socket, contentLength, expectsPayload) { try { if (body != null && util$18.isBuffer(body)) { assert$21(contentLength === body.byteLength, "buffer body must have content length"); @@ -25151,34 +8074,34 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul h2stream.write(body); h2stream.uncork(); h2stream.end(); - request$2.onBodySent(body); + request$1.onBodySent(body); } if (!expectsPayload) socket[kReset] = true; - request$2.onRequestSent(); + request$1.onRequestSent(); client[kResume$2](); - } catch (error$1) { - abort$2(error$1); + } catch (error) { + abort$1(error); } } - function writeStream(abort$2, socket, expectsPayload, h2stream, body, client, request$2, contentLength) { + function writeStream(abort$1, socket, expectsPayload, h2stream, body, client, request$1, contentLength) { assert$21(contentLength !== 0 || client[kRunning$3] === 0, "stream body cannot be pipelined"); const pipe = pipeline$3(body, h2stream, (err) => { if (err) { util$18.destroy(pipe, err); - abort$2(err); + abort$1(err); } else { util$18.removeAllListeners(pipe); - request$2.onRequestSent(); + request$1.onRequestSent(); if (!expectsPayload) socket[kReset] = true; client[kResume$2](); } }); util$18.addListener(pipe, "data", onPipeData); function onPipeData(chunk) { - request$2.onBodySent(chunk); + request$1.onBodySent(chunk); } } - async function writeBlob(abort$2, h2stream, body, client, request$2, socket, contentLength, expectsPayload) { + async function writeBlob(abort$1, h2stream, body, client, request$1, socket, contentLength, expectsPayload) { assert$21(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); @@ -25187,15 +8110,15 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul h2stream.write(buffer$1); h2stream.uncork(); h2stream.end(); - request$2.onBodySent(buffer$1); - request$2.onRequestSent(); + request$1.onBodySent(buffer$1); + request$1.onRequestSent(); if (!expectsPayload) socket[kReset] = true; client[kResume$2](); } catch (err) { - abort$2(err); + abort$1(err); } } - async function writeIterable(abort$2, h2stream, body, client, request$2, socket, contentLength, expectsPayload) { + async function writeIterable(abort$1, h2stream, body, client, request$1, socket, contentLength, expectsPayload) { assert$21(contentLength !== 0 || client[kRunning$3] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { @@ -25215,15 +8138,15 @@ var require_client_h2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modul for await (const chunk of body) { if (socket[kError$1]) throw socket[kError$1]; const res = h2stream.write(chunk); - request$2.onBodySent(chunk); + request$1.onBodySent(chunk); if (!res) await waitForDrain(); } h2stream.end(); - request$2.onRequestSent(); + request$1.onRequestSent(); if (!expectsPayload) socket[kReset] = true; client[kResume$2](); } catch (err) { - abort$2(err); + abort$1(err); } finally { h2stream.off("close", onDrain).off("drain", onDrain); } @@ -25264,7 +8187,7 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @param {string|URL} url * @param {import('../../types/client.js').Client.Options} options */ - constructor(url, { maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls: tls$3, strictContentLength, maxCachedSessions, connect: connect$5, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2 } = {}) { + constructor(url, { maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls: tls$1, strictContentLength, maxCachedSessions, connect: connect$3, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2 } = {}) { if (keepAlive !== void 0) throw new InvalidArgumentError$22("unsupported keepAlive, use pipelining=0 instead"); if (socketTimeout !== void 0) throw new InvalidArgumentError$22("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); if (requestTimeout !== void 0) throw new InvalidArgumentError$22("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); @@ -25280,7 +8203,7 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError$22("invalid keepAliveTimeoutThreshold"); if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$22("headersTimeout must be a positive integer or zero"); if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$22("bodyTimeout must be a positive integer or zero"); - if (connect$5 != null && typeof connect$5 !== "function" && typeof connect$5 !== "object") throw new InvalidArgumentError$22("connect must be a function or an object"); + if (connect$3 != null && typeof connect$3 !== "function" && typeof connect$3 !== "object") throw new InvalidArgumentError$22("connect must be a function or an object"); if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError$22("maxRequestsPerClient must be a positive number"); if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError$22("localAddress must be valid string IP address"); if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError$22("maxResponseSize must be a positive number"); @@ -25288,8 +8211,8 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError$22("allowH2 must be a valid boolean value"); if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError$22("maxConcurrentStreams must be a positive integer, greater than 0"); super(); - if (typeof connect$5 !== "function") connect$5 = buildConnector$3({ - ...tls$3, + if (typeof connect$3 !== "function") connect$3 = buildConnector$3({ + ...tls$1, maxCachedSessions, allowH2, socketPath, @@ -25298,10 +8221,10 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, - ...connect$5 + ...connect$3 }); this[kUrl$4] = util$17.parseOrigin(url); - this[kConnector] = connect$5; + this[kConnector] = connect$3; this[kPipelining] = pipelining != null ? pipelining : 1; this[kMaxHeadersSize] = maxHeaderSize; this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; @@ -25359,9 +8282,9 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ } [kDispatch$3](opts, handler) { const origin = opts.origin || this[kUrl$4].origin; - const request$2 = new Request$3(origin, opts, handler); - this[kQueue$1].push(request$2); - if (this[kResuming]) {} else if (util$17.bodyLength(request$2.body) == null && util$17.isIterable(request$2.body)) { + const request$1 = new Request$3(origin, opts, handler); + this[kQueue$1].push(request$1); + if (this[kResuming]) {} else if (util$17.bodyLength(request$1.body) == null && util$17.isIterable(request$1.body)) { this[kResuming] = 1; queueMicrotask(() => resume(this)); } else this[kResume$1](true); @@ -25377,9 +8300,9 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ async [kDestroy$5](err) { return new Promise((resolve) => { const requests = this[kQueue$1].splice(this[kPendingIdx]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$2 = requests[i$1]; - util$17.errorRequest(this, request$2, err); + for (let i = 0; i < requests.length; i++) { + const request$1 = requests[i]; + util$17.errorRequest(this, request$1, err); } const callback = () => { if (this[kClosedResolve$1]) { @@ -25400,9 +8323,9 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ if (client[kRunning$2] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { assert$20(client[kPendingIdx] === client[kRunningIdx]); const requests = client[kQueue$1].splice(client[kRunningIdx]); - for (let i$1 = 0; i$1 < requests.length; i$1++) { - const request$2 = requests[i$1]; - util$17.errorRequest(client, request$2, err); + for (let i = 0; i < requests.length; i++) { + const request$1 = requests[i]; + util$17.errorRequest(client, request$1, err); } assert$20(client[kSize$3] === 0); } @@ -25498,8 +8421,8 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { assert$20(client[kRunning$2] === 0); while (client[kPending$1] > 0 && client[kQueue$1][client[kPendingIdx]].servername === client[kServerName]) { - const request$2 = client[kQueue$1][client[kPendingIdx]++]; - util$17.errorRequest(client, request$2, err); + const request$1 = client[kQueue$1][client[kPendingIdx]++]; + util$17.errorRequest(client, request$1, err); } } else onError(client, err); client.emit("connectionError", client[kUrl$4], [client], err); @@ -25543,10 +8466,10 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ } if (client[kPending$1] === 0) return; if (client[kRunning$2] >= (getPipelining(client) || 1)) return; - const request$2 = client[kQueue$1][client[kPendingIdx]]; - if (client[kUrl$4].protocol === "https:" && client[kServerName] !== request$2.servername) { + const request$1 = client[kQueue$1][client[kPendingIdx]]; + if (client[kUrl$4].protocol === "https:" && client[kServerName] !== request$1.servername) { if (client[kRunning$2] > 0) return; - client[kServerName] = request$2.servername; + client[kServerName] = request$1.servername; client[kHTTPContext]?.destroy(new InformationalError$1("servername changed"), () => { client[kHTTPContext] = null; resume(client); @@ -25558,8 +8481,8 @@ var require_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ return; } if (client[kHTTPContext].destroyed) return; - if (client[kHTTPContext].busy(request$2)) return; - if (!request$2.aborted && client[kHTTPContext].write(request$2)) client[kPendingIdx]++; + if (client[kHTTPContext].busy(request$1)) return; + if (!request$1.aborted && client[kHTTPContext].write(request$1)) client[kPendingIdx]++; else client[kQueue$1].splice(client[kPendingIdx], 1); } } @@ -25628,7 +8551,7 @@ var require_fixed_queue = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod /** * @template T */ - module.exports = class FixedQueue$3 { + module.exports = class FixedQueue$2 { constructor() { /** * @type {FixedCircularBuffer} @@ -25812,13 +8735,13 @@ var require_pool = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/un return new Client$4(origin, opts); } var Pool$5 = class extends PoolBase$1 { - constructor(origin, { connections, factory = defaultFactory$3, connect: connect$5, connectTimeout, tls: tls$3, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2,...options } = {}) { + constructor(origin, { connections, factory = defaultFactory$3, connect: connect$3, connectTimeout, tls: tls$1, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2,...options } = {}) { if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError$21("invalid connections"); if (typeof factory !== "function") throw new InvalidArgumentError$21("factory must be a function."); - if (connect$5 != null && typeof connect$5 !== "function" && typeof connect$5 !== "object") throw new InvalidArgumentError$21("connect must be a function or an object"); + if (connect$3 != null && typeof connect$3 !== "function" && typeof connect$3 !== "object") throw new InvalidArgumentError$21("connect must be a function or an object"); super(); - if (typeof connect$5 !== "function") connect$5 = buildConnector$2({ - ...tls$3, + if (typeof connect$3 !== "function") connect$3 = buildConnector$2({ + ...tls$1, maxCachedSessions, allowH2, socketPath, @@ -25827,18 +8750,18 @@ var require_pool = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/un autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, - ...connect$5 + ...connect$3 }); this[kConnections] = connections || null; this[kUrl$2] = util$16.parseOrigin(origin); this[kOptions$3] = { ...util$16.deepClone(options), - connect: connect$5, + connect: connect$3, allowH2 }; this[kOptions$3].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory$3] = factory; - this.on("connectionError", (origin$1, targets, error$1) => { + this.on("connectionError", (origin$1, targets, error) => { for (const target of targets) { const idx = this[kClients$3].indexOf(target); if (idx !== -1) this[kClients$3].splice(idx, 1); @@ -25884,9 +8807,9 @@ var require_balanced_pool = __commonJS({ "node_modules/.deno/undici@7.9.0/node_m function getGreatestCommonDivisor(a, b) { if (a === 0) return b; while (b !== 0) { - const t$6 = b; + const t$5 = b; b = a % b; - a = t$6; + a = t$5; } return a; } @@ -25932,7 +8855,7 @@ var require_balanced_pool = __commonJS({ "node_modules/.deno/undici@7.9.0/node_m } _updateBalancedPoolStats() { let result = 0; - for (let i$1 = 0; i$1 < this[kClients$2].length; i$1++) result = getGreatestCommonDivisor(this[kClients$2][i$1][kWeight], result); + for (let i = 0; i < this[kClients$2].length; i++) result = getGreatestCommonDivisor(this[kClients$2][i][kWeight], result); this[kGreatestCommonDivisor] = result; } removeUpstream(upstream) { @@ -25989,14 +8912,14 @@ var require_agent = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u return opts && opts.connections === 1 ? new Client$3(origin, opts) : new Pool$3(origin, opts); } var Agent$5 = class extends DispatcherBase$3 { - constructor({ factory = defaultFactory$1, connect: connect$5,...options } = {}) { + constructor({ factory = defaultFactory$1, connect: connect$3,...options } = {}) { if (typeof factory !== "function") throw new InvalidArgumentError$19("factory must be a function."); - if (connect$5 != null && typeof connect$5 !== "function" && typeof connect$5 !== "object") throw new InvalidArgumentError$19("connect must be a function or an object"); + if (connect$3 != null && typeof connect$3 !== "function" && typeof connect$3 !== "object") throw new InvalidArgumentError$19("connect must be a function or an object"); super(); - if (connect$5 && typeof connect$5 !== "function") connect$5 = { ...connect$5 }; + if (connect$3 && typeof connect$3 !== "function") connect$3 = { ...connect$3 }; this[kOptions$1] = { ...util$15.deepClone(options), - connect: connect$5 + connect: connect$3 }; this[kFactory$1] = factory; this[kClients$1] = new Map(); @@ -26092,9 +9015,9 @@ var require_proxy_agent = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; - const connect$5 = buildConnector$1({ ...opts.proxyTls }); + const connect$3 = buildConnector$1({ ...opts.proxyTls }); this[kConnectEndpoint] = buildConnector$1({ ...opts.requestTls }); - this[kClient] = clientFactory(url, { connect: connect$5 }); + this[kClient] = clientFactory(url, { connect: connect$3 }); this[kAgent$1] = new Agent$4({ ...opts, connect: async (opts$1, callback) => { @@ -26173,7 +9096,7 @@ var require_proxy_agent = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod if (Array.isArray(headers)) { /** @type {Record} */ const headersPair = {}; - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) headersPair[headers[i$1]] = headers[i$1 + 1]; + for (let i = 0; i < headers.length; i += 2) headersPair[headers[i]] = headers[i + 1]; return headersPair; } return headers; @@ -26254,8 +9177,8 @@ var require_env_http_proxy_agent = __commonJS({ "node_modules/.deno/undici@7.9.0 if (this.#noProxyChanged) this.#parseNoProxy(); if (this.#noProxyEntries.length === 0) return true; if (this.#noProxyValue === "*") return false; - for (let i$1 = 0; i$1 < this.#noProxyEntries.length; i$1++) { - const entry = this.#noProxyEntries[i$1]; + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; if (entry.port && entry.port !== port) continue; if (!/^[.*]/.test(entry.hostname)) { if (hostname === entry.hostname) return false; @@ -26267,8 +9190,8 @@ var require_env_http_proxy_agent = __commonJS({ "node_modules/.deno/undici@7.9.0 const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; const noProxySplit = noProxyValue.split(/[,\s]/); const noProxyEntries = []; - for (let i$1 = 0; i$1 < noProxySplit.length; i$1++) { - const entry = noProxySplit[i$1]; + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; if (!entry) continue; const parsed = entry.match(/^(.+):(\d+)$/); noProxyEntries.push({ @@ -26547,7 +9470,7 @@ var require_h2c_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu super(); if (typeof origin === "string") origin = new URL(origin); if (origin.protocol !== "http:") throw new InvalidArgumentError$17("h2c-client: Only h2c protocol is supported"); - const { connect: connect$5, maxConcurrentStreams, pipelining,...opts } = clientOpts ?? {}; + const { connect: connect$3, maxConcurrentStreams, pipelining,...opts } = clientOpts ?? {}; let defaultMaxConcurrentStreams = 100; let defaultPipelining = 100; if (maxConcurrentStreams != null && Number.isInteger(maxConcurrentStreams) && maxConcurrentStreams > 0) defaultMaxConcurrentStreams = maxConcurrentStreams; @@ -26555,7 +9478,7 @@ var require_h2c_client = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu if (defaultPipelining > defaultMaxConcurrentStreams) throw new InvalidArgumentError$17("h2c-client: pipelining cannot be greater than maxConcurrentStreams"); this.#client = new Client$2(origin, { ...opts, - connect: this.#buildConnector(connect$5), + connect: this.#buildConnector(connect$3), maxConcurrentStreams: defaultMaxConcurrentStreams, pipelining: defaultPipelining, allowH2: true @@ -26643,14 +9566,14 @@ var require_readable = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module * @param {number} [opts.contentLength] * @param {number} [opts.highWaterMark = 64 * 1024] */ - constructor({ resume: resume$2, abort: abort$2, contentType = "", contentLength, highWaterMark = 64 * 1024 }) { + constructor({ resume: resume$1, abort: abort$1, contentType = "", contentLength, highWaterMark = 64 * 1024 }) { super({ autoDestroy: true, - read: resume$2, + read: resume$1, highWaterMark }); this._readableState.dataEmitted = false; - this[kAbort] = abort$2; + this[kAbort] = abort$1; /** * @type {Consume | null} */ @@ -26878,32 +9801,32 @@ var require_readable = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module * @param {string} type * @returns {Promise} */ - function consume(stream$5, type) { - assert$18(!stream$5[kConsume]); + function consume(stream$3, type) { + assert$18(!stream$3[kConsume]); return new Promise((resolve, reject) => { - if (isUnusable(stream$5)) { - const rState = stream$5._readableState; - if (rState.destroyed && rState.closeEmitted === false) stream$5.on("error", (err) => { + if (isUnusable(stream$3)) { + const rState = stream$3._readableState; + if (rState.destroyed && rState.closeEmitted === false) stream$3.on("error", (err) => { reject(err); }).on("close", () => { reject(new TypeError("unusable")); }); else reject(rState.errored ?? new TypeError("unusable")); } else queueMicrotask(() => { - stream$5[kConsume] = { + stream$3[kConsume] = { type, - stream: stream$5, + stream: stream$3, resolve, reject, length: 0, body: [] }; - stream$5.on("error", function(err) { + stream$3.on("error", function(err) { consumeFinish(this[kConsume], err); }).on("close", function() { if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError$4()); }); - consumeStart(stream$5[kConsume]); + consumeStart(stream$3[kConsume]); }); }); } @@ -26911,20 +9834,20 @@ var require_readable = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module * @param {Consume} consume * @returns {void} */ - function consumeStart(consume$2) { - if (consume$2.body === null) return; - const { _readableState: state } = consume$2.stream; + function consumeStart(consume$1) { + if (consume$1.body === null) return; + const { _readableState: state } = consume$1.stream; if (state.bufferIndex) { const start = state.bufferIndex; const end = state.buffer.length; - for (let n = start; n < end; n++) consumePush(consume$2, state.buffer[n]); - } else for (const chunk of state.buffer) consumePush(consume$2, chunk); + for (let n = start; n < end; n++) consumePush(consume$1, state.buffer[n]); + } else for (const chunk of state.buffer) consumePush(consume$1, chunk); if (state.endEmitted) consumeEnd(this[kConsume], this._readableState.encoding); - else consume$2.stream.on("end", function() { + else consume$1.stream.on("end", function() { consumeEnd(this[kConsume], this._readableState.encoding); }); - consume$2.stream.resume(); - while (consume$2.stream.read() != null); + consume$1.stream.resume(); + while (consume$1.stream.read() != null); } /** * @param {Buffer[]} chunks @@ -26950,8 +9873,8 @@ var require_readable = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module if (chunks.length === 1) return new Uint8Array(chunks[0]); const buffer$1 = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); let offset = 0; - for (let i$1 = 0; i$1 < chunks.length; ++i$1) { - const chunk = chunks[i$1]; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; buffer$1.set(chunk, offset); offset += chunk.length; } @@ -26962,17 +9885,17 @@ var require_readable = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module * @param {BufferEncoding} encoding * @returns {void} */ - function consumeEnd(consume$2, encoding) { - const { type, body, resolve, stream: stream$5, length } = consume$2; + function consumeEnd(consume$1, encoding) { + const { type, body, resolve, stream: stream$3, length } = consume$1; try { if (type === "text") resolve(chunksDecode(body, length, encoding)); else if (type === "json") resolve(JSON.parse(chunksDecode(body, length, encoding))); else if (type === "arrayBuffer") resolve(chunksConcat(body, length).buffer); - else if (type === "blob") resolve(new Blob(body, { type: stream$5[kContentType] })); + else if (type === "blob") resolve(new Blob(body, { type: stream$3[kContentType] })); else if (type === "bytes") resolve(chunksConcat(body, length)); - consumeFinish(consume$2); + consumeFinish(consume$1); } catch (err) { - stream$5.destroy(err); + stream$3.destroy(err); } } /** @@ -26980,25 +9903,25 @@ var require_readable = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module * @param {Buffer} chunk * @returns {void} */ - function consumePush(consume$2, chunk) { - consume$2.length += chunk.length; - consume$2.body.push(chunk); + function consumePush(consume$1, chunk) { + consume$1.length += chunk.length; + consume$1.body.push(chunk); } /** * @param {Consume} consume * @param {Error} [err] * @returns {void} */ - function consumeFinish(consume$2, err) { - if (consume$2.body === null) return; - if (err) consume$2.reject(err); - else consume$2.resolve(); - consume$2.type = null; - consume$2.stream = null; - consume$2.resolve = null; - consume$2.reject = null; - consume$2.length = 0; - consume$2.body = null; + function consumeFinish(consume$1, err) { + if (consume$1.body === null) return; + if (err) consume$1.reject(err); + else consume$1.resolve(); + consume$1.type = null; + consume$1.stream = null; + consume$1.resolve = null; + consume$1.reject = null; + consume$1.length = 0; + consume$1.body = null; } module.exports = { Readable: BodyReadable, @@ -27050,17 +9973,17 @@ var require_api_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod else if (this.abort) this.abort(this.reason); }); } - onConnect(abort$2, context) { + onConnect(abort$1, context) { if (this.reason) { - abort$2(this.reason); + abort$1(this.reason); return; } assert$17(this.callback); - this.abort = abort$2; + this.abort = abort$1; this.context = context; } - onHeaders(statusCode, rawHeaders, resume$2, statusMessage) { - const { callback, opaque, abort: abort$2, context, responseHeaders, highWaterMark } = this; + onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { + const { callback, opaque, abort: abort$1, context, responseHeaders, highWaterMark } = this; const headers = responseHeaders === "raw" ? util$12.parseRawHeaders(rawHeaders) : util$12.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) this.onInfo({ @@ -27073,8 +9996,8 @@ var require_api_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod const contentType = parsedHeaders["content-type"]; const contentLength = parsedHeaders["content-length"]; const res = new Readable$3({ - resume: resume$2, - abort: abort$2, + resume: resume$1, + abort: abort$1, contentType, contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, highWaterMark @@ -27227,16 +10150,16 @@ var require_api_stream = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu }); addSignal$3(this, signal); } - onConnect(abort$2, context) { + onConnect(abort$1, context) { if (this.reason) { - abort$2(this.reason); + abort$1(this.reason); return; } assert$16(this.callback); - this.abort = abort$2; + this.abort = abort$1; this.context = context; } - onHeaders(statusCode, rawHeaders, resume$2, statusMessage) { + onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { const { factory, opaque, context, responseHeaders } = this; const headers = responseHeaders === "raw" ? util$11.parseRawHeaders(rawHeaders) : util$11.parseHeaders(rawHeaders); if (statusCode < 200) { @@ -27256,7 +10179,7 @@ var require_api_stream = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu }); if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError$1("expected Writable"); finished$1(res, { readable: false }, (err) => { - const { callback, res: res$1, opaque: opaque$1, trailers, abort: abort$2 } = this; + const { callback, res: res$1, opaque: opaque$1, trailers, abort: abort$1 } = this; this.res = null; if (err || !res$1.readable) util$11.destroy(res$1, err); this.callback = null; @@ -27264,9 +10187,9 @@ var require_api_stream = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu opaque: opaque$1, trailers }); - if (err) abort$2(); + if (err) abort$1(); }); - res.on("drain", resume$2); + res.on("drain", resume$1); this.res = res; const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain; return needDrain !== true; @@ -27336,10 +10259,10 @@ var require_api_pipeline = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mo this[kResume] = null; } _read() { - const { [kResume]: resume$2 } = this; - if (resume$2) { + const { [kResume]: resume$1 } = this; + if (resume$1) { this[kResume] = null; - resume$2(); + resume$1(); } } _destroy(err, callback) { @@ -27348,9 +10271,9 @@ var require_api_pipeline = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mo } }; var PipelineResponse = class extends Readable$2 { - constructor(resume$2) { + constructor(resume$1) { super({ autoDestroy: true }); - this[kResume] = resume$2; + this[kResume] = resume$1; } _read() { this[kResume](); @@ -27389,9 +10312,9 @@ var require_api_pipeline = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mo else req[kResume] = callback; }, destroy: (err, callback) => { - const { body, req, res, ret, abort: abort$2 } = this; + const { body, req, res, ret, abort: abort$1 } = this; if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError$1(); - if (abort$2 && err) abort$2(); + if (abort$1 && err) abort$1(); util$10.destroy(body, err); util$10.destroy(req, err); util$10.destroy(res, err); @@ -27405,17 +10328,17 @@ var require_api_pipeline = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mo this.res = null; addSignal$2(this, signal); } - onConnect(abort$2, context) { + onConnect(abort$1, context) { const { res } = this; if (this.reason) { - abort$2(this.reason); + abort$1(this.reason); return; } assert$15(!res, "pipeline cannot be retried"); - this.abort = abort$2; + this.abort = abort$1; this.context = context; } - onHeaders(statusCode, rawHeaders, resume$2) { + onHeaders(statusCode, rawHeaders, resume$1) { const { opaque, handler, context } = this; if (statusCode < 200) { if (this.onInfo) { @@ -27427,7 +10350,7 @@ var require_api_pipeline = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mo } return; } - this.res = new PipelineResponse(resume$2); + this.res = new PipelineResponse(resume$1); let body; try { this.handler = null; @@ -27510,13 +10433,13 @@ var require_api_upgrade = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod this.context = null; addSignal$1(this, signal); } - onConnect(abort$2, context) { + onConnect(abort$1, context) { if (this.reason) { - abort$2(this.reason); + abort$1(this.reason); return; } assert$14(this.callback); - this.abort = abort$2; + this.abort = abort$1; this.context = null; } onHeaders() { @@ -27590,13 +10513,13 @@ var require_api_connect = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod this.abort = null; addSignal(this, signal); } - onConnect(abort$2, context) { + onConnect(abort$1, context) { if (this.reason) { - abort$2(this.reason); + abort$1(this.reason); return; } assert$13(this.callback); - this.abort = abort$2; + this.abort = abort$1; this.context = context; } onHeaders() { @@ -27737,7 +10660,7 @@ var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu */ function getHeaderByName(headers, key) { if (Array.isArray(headers)) { - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (headers[i$1].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i$1 + 1]; + for (let i = 0; i < headers.length; i += 2) if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; return void 0; } else if (typeof headers.get === "function") return headers.get(key); else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; @@ -27749,14 +10672,14 @@ var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); return Object.fromEntries(entries); } - function matchHeaders(mockDispatch$2, headers) { - if (typeof mockDispatch$2.headers === "function") { + function matchHeaders(mockDispatch$1, headers) { + if (typeof mockDispatch$1.headers === "function") { if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); - return mockDispatch$2.headers(headers ? lowerCaseEntries(headers) : {}); + return mockDispatch$1.headers(headers ? lowerCaseEntries(headers) : {}); } - if (typeof mockDispatch$2.headers === "undefined") return true; - if (typeof headers !== "object" || typeof mockDispatch$2.headers !== "object") return false; - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch$2.headers)) { + if (typeof mockDispatch$1.headers === "undefined") return true; + if (typeof headers !== "object" || typeof mockDispatch$1.headers !== "object") return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch$1.headers)) { const headerValue = getHeaderByName(headers, matchHeaderName); if (!matchValue$1(matchHeaderValue, headerValue)) return false; } @@ -27782,19 +10705,19 @@ var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu } return normalizedQp; } - function safeUrl(path$8) { - if (typeof path$8 !== "string") return path$8; - const pathSegments = path$8.split("?", 3); - if (pathSegments.length !== 2) return path$8; + function safeUrl(path$3) { + if (typeof path$3 !== "string") return path$3; + const pathSegments = path$3.split("?", 3); + if (pathSegments.length !== 2) return path$3; const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch$2, { path: path$8, method, body, headers }) { - const pathMatch = matchValue$1(mockDispatch$2.path, path$8); - const methodMatch = matchValue$1(mockDispatch$2.method, method); - const bodyMatch = typeof mockDispatch$2.body !== "undefined" ? matchValue$1(mockDispatch$2.body, body) : true; - const headersMatch = matchHeaders(mockDispatch$2, headers); + function matchKey(mockDispatch$1, { path: path$3, method, body, headers }) { + const pathMatch = matchValue$1(mockDispatch$1.path, path$3); + const methodMatch = matchValue$1(mockDispatch$1.method, method); + const bodyMatch = typeof mockDispatch$1.body !== "undefined" ? matchValue$1(mockDispatch$1.body, body) : true; + const headersMatch = matchHeaders(mockDispatch$1, headers); return pathMatch && methodMatch && bodyMatch && headersMatch; } function getResponseData$1(data) { @@ -27809,15 +10732,15 @@ var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu const basePath = key.query ? serializePathWithQuery$1(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath); - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$8, ignoreTrailingSlash }) => { - return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$8)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path$8), resolvedPath); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$3, ignoreTrailingSlash }) => { + return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$3)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path$3), resolvedPath); }); if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$1(method, key.method)); if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue$1(body, key.body) : true); if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch$2) => matchHeaders(mockDispatch$2, key.headers)); + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch$1) => matchHeaders(mockDispatch$1, key.headers)); if (matchedMockDispatches.length === 0) { const headers = typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers; throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`); @@ -27855,15 +10778,15 @@ var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu /** * @param {string} path Path to remove trailing slash from */ - function removeTrailingSlash(path$8) { - while (path$8.endsWith("/")) path$8 = path$8.slice(0, -1); - if (path$8.length === 0) path$8 = "/"; - return path$8; + function removeTrailingSlash(path$3) { + while (path$3.endsWith("/")) path$3 = path$3.slice(0, -1); + if (path$3.length === 0) path$3 = "/"; + return path$3; } function buildKey$1(opts) { - const { path: path$8, method, body, headers, query } = opts; + const { path: path$3, method, body, headers, query } = opts; return { - path: path$8, + path: path$3, method, body, headers, @@ -27873,8 +10796,8 @@ var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu function generateKeyValues(data) { const keys = Object.keys(data); const result = []; - for (let i$1 = 0; i$1 < keys.length; ++i$1) { - const key = keys[i$1]; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; const value = data[key]; const name = Buffer.from(`${key}`); if (Array.isArray(value)) for (let j = 0; j < value.length; ++j) result.push(name, Buffer.from(`${value[j]}`)); @@ -27899,19 +10822,19 @@ var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu */ function mockDispatch(opts, handler) { const key = buildKey$1(opts); - const mockDispatch$2 = getMockDispatch(this[kDispatches$4], key); - mockDispatch$2.timesInvoked++; - if (mockDispatch$2.data.callback) mockDispatch$2.data = { - ...mockDispatch$2.data, - ...mockDispatch$2.data.callback(opts) + const mockDispatch$1 = getMockDispatch(this[kDispatches$4], key); + mockDispatch$1.timesInvoked++; + if (mockDispatch$1.data.callback) mockDispatch$1.data = { + ...mockDispatch$1.data, + ...mockDispatch$1.data.callback(opts) }; - const { data: { statusCode, data, headers, trailers, error: error$1 }, delay: delay$2, persist } = mockDispatch$2; - const { timesInvoked, times } = mockDispatch$2; - mockDispatch$2.consumed = !persist && timesInvoked >= times; - mockDispatch$2.pending = timesInvoked < times; - if (error$1 !== null) { + const { data: { statusCode, data, headers, trailers, error }, delay: delay$2, persist } = mockDispatch$1; + const { timesInvoked, times } = mockDispatch$1; + mockDispatch$1.consumed = !persist && timesInvoked >= times; + mockDispatch$1.pending = timesInvoked < times; + if (error !== null) { deleteMockDispatch(this[kDispatches$4], key); - handler.onError(error$1); + handler.onError(error); return true; } if (typeof delay$2 === "number" && delay$2 > 0) setTimeout(() => { @@ -27932,12 +10855,12 @@ var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu const responseHeaders = generateKeyValues(headers); const responseTrailers = generateKeyValues(trailers); handler.onConnect?.((err) => handler.onError(err), null); - handler.onHeaders?.(statusCode, responseHeaders, resume$2, getStatusText(statusCode)); + handler.onHeaders?.(statusCode, responseHeaders, resume$1, getStatusText(statusCode)); handler.onData?.(Buffer.from(responseData)); handler.onComplete?.(responseTrailers); deleteMockDispatch(mockDispatches, key); } - function resume$2() {} + function resume$1() {} return true; } function buildMockDispatch$2() { @@ -27947,13 +10870,13 @@ var require_mock_utils = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu return function dispatch(opts, handler) { if (agent.isMockActive) try { mockDispatch.call(this, opts, handler); - } catch (error$1) { - if (error$1 instanceof MockNotMatchedError) { + } catch (error) { + if (error instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect$1](); - if (netConnect === false) throw new MockNotMatchedError(`${error$1.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if (netConnect === false) throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); - else throw new MockNotMatchedError(`${error$1.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); - } else throw error$1; + else throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error; } else originalDispatch.call(this, opts, handler); }; @@ -28003,8 +10926,8 @@ var require_mock_interceptor = __commonJS({ "node_modules/.deno/undici@7.9.0/nod * Defines the scope API for an interceptor reply */ var MockScope = class { - constructor(mockDispatch$2) { - this[kMockDispatch] = mockDispatch$2; + constructor(mockDispatch$1) { + this[kMockDispatch] = mockDispatch$1; } /** * Delay a reply by a set amount in ms. @@ -28106,9 +11029,9 @@ var require_mock_interceptor = __commonJS({ "node_modules/.deno/undici@7.9.0/nod /** * Mock an undici request with a defined error. */ - replyWithError(error$1) { - if (typeof error$1 === "undefined") throw new InvalidArgumentError$9("error must be defined"); - const newMockDispatch = addMockDispatch(this[kDispatches$3], this[kDispatchKey], { error: error$1 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash$2] }); + replyWithError(error) { + if (typeof error === "undefined") throw new InvalidArgumentError$9("error must be defined"); + const newMockDispatch = addMockDispatch(this[kDispatches$3], this[kDispatchKey], { error }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash$2] }); return new MockScope(newMockDispatch); } /** @@ -28229,8 +11152,8 @@ var require_mock_call_history = __commonJS({ "node_modules/.deno/undici@7.9.0/no if (url.search.length !== 0) return url; url.search = new URLSearchParams(requestInit.query).toString(); return url; - } catch (error$1) { - throw new InvalidArgumentError$7("An error occurred when computing MockCallHistoryLog.url", { cause: error$1 }); + } catch (error) { + throw new InvalidArgumentError$7("An error occurred when computing MockCallHistoryLog.url", { cause: error }); } } var MockCallHistoryLog$1 = class { @@ -28401,7 +11324,7 @@ var require_pending_interceptors_formatter = __commonJS({ "node_modules/.deno/un /** * Gets the output of `console.table(…)` as a string. */ - module.exports = class PendingInterceptorsFormatter$2 { + module.exports = class PendingInterceptorsFormatter$1 { constructor({ disableColors } = {}) { this.transform = new Transform$1({ transform(chunk, _enc, cb) { cb(null, chunk); @@ -28412,10 +11335,10 @@ var require_pending_interceptors_formatter = __commonJS({ "node_modules/.deno/un }); } format(pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$3, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path$8, + Path: path$3, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -28469,9 +11392,9 @@ var require_mock_agent = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters]; const dispatchOpts = { ...opts }; if (acceptNonStandardSearchParameters && dispatchOpts.path) { - const [path$8, searchParams] = dispatchOpts.path.split("?"); + const [path$3, searchParams] = dispatchOpts.path.split("?"); const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters); - dispatchOpts.path = `${path$8}?${normalizedSearchParams}`; + dispatchOpts.path = `${path$3}?${normalizedSearchParams}`; } return this[kAgent].dispatch(dispatchOpts, handler); } @@ -28595,7 +11518,7 @@ var require_decorator_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/no /** * @deprecated */ - module.exports = class DecoratorHandler$5 { + module.exports = class DecoratorHandler$4 { #handler; #onCompleteCalled = false; #onErrorCalled = false; @@ -28728,9 +11651,9 @@ var require_redirect_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/nod return; } const { origin, pathname, search } = util$7.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path$8 = search ? `${pathname}${search}` : pathname; + const path$3 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path$8; + this.opts.path = path$3; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -28742,8 +11665,8 @@ var require_redirect_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/nod if (this.location) this.dispatch(this.opts, this); else this.handler.onResponseEnd(controller, trailers); } - onResponseError(controller, error$1) { - this.handler.onResponseError?.(controller, error$1); + onResponseError(controller, error) { + this.handler.onResponseError?.(controller, error); } }; function shouldRemoveHeader(header, removeContent, unknownOrigin) { @@ -28758,7 +11681,7 @@ var require_redirect_handler = __commonJS({ "node_modules/.deno/undici@7.9.0/nod function cleanRequestHeaders(headers, removeContent, unknownOrigin) { const ret = []; if (Array.isArray(headers)) { - for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (!shouldRemoveHeader(headers[i$1], removeContent, unknownOrigin)) ret.push(headers[i$1], headers[i$1 + 1]); + for (let i = 0; i < headers.length; i += 2) if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); } else if (headers && typeof headers === "object") { const entries = typeof headers[Symbol.iterator] === "function" ? headers : Object.entries(headers); for (const [key, value] of entries) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, value); @@ -29281,8 +12204,8 @@ var require_cache$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules directives = []; for (const directive of header) directives.push(...directive.split(",")); } else directives = header.split(","); - for (let i$1 = 0; i$1 < directives.length; i$1++) { - const directive = directives[i$1].toLowerCase(); + for (let i = 0; i < directives.length; i++) { + const directive = directives[i].toLowerCase(); const keyValueDelimiter = directive.indexOf("="); let key; let value; @@ -29310,7 +12233,7 @@ var require_cache$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules if (value[0] === "\"") { const headers = [value.substring(1)]; let foundEndingQuote = value[value.length - 1] === "\""; - if (!foundEndingQuote) for (let j = i$1 + 1; j < directives.length; j++) { + if (!foundEndingQuote) for (let j = i + 1; j < directives.length; j++) { const nextPart = directives[j]; const nextPartLength = nextPart.length; headers.push(nextPart.trim()); @@ -30140,45 +13063,45 @@ var require_cache$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules * @param {boolean} isStale */ function sendCachedValue(handler, opts, result, age, context, isStale) { - const stream$5 = util$5.isStream(result.body) ? result.body : Readable$1.from(result.body ?? []); - assert$9(!stream$5.destroyed, "stream should not be destroyed"); - assert$9(!stream$5.readableDidRead, "stream should not be readableDidRead"); + const stream$3 = util$5.isStream(result.body) ? result.body : Readable$1.from(result.body ?? []); + assert$9(!stream$3.destroyed, "stream should not be destroyed"); + assert$9(!stream$3.readableDidRead, "stream should not be readableDidRead"); const controller = { resume() { - stream$5.resume(); + stream$3.resume(); }, pause() { - stream$5.pause(); + stream$3.pause(); }, get paused() { - return stream$5.isPaused(); + return stream$3.isPaused(); }, get aborted() { - return stream$5.destroyed; + return stream$3.destroyed; }, get reason() { - return stream$5.errored; + return stream$3.errored; }, abort(reason) { - stream$5.destroy(reason ?? new AbortError()); + stream$3.destroy(reason ?? new AbortError()); } }; - stream$5.on("error", function(err) { + stream$3.on("error", function(err) { if (!this.readableEnded) if (typeof handler.onResponseError === "function") handler.onResponseError(controller, err); else throw err; }).on("close", function() { if (!this.errored) handler.onResponseEnd?.(controller, {}); }); handler.onRequestStart?.(controller, context); - if (stream$5.destroyed) return; + if (stream$3.destroyed) return; const headers = { ...result.headers, age: String(age) }; if (isStale) headers.warning = "110 - \"response is stale\""; handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage); - if (opts.method === "HEAD") stream$5.destroy(); - else stream$5.on("data", function(chunk) { + if (opts.method === "HEAD") stream$3.destroy(); + else stream$3.on("data", function(chunk) { handler.onResponseData?.(controller, chunk); }); } @@ -30579,7 +13502,7 @@ var require_sqlite_cache_store = __commonJS({ "node_modules/.deno/undici@7.9.0/n if (lhs == null && rhs != null || lhs != null && rhs == null) return false; if (Array.isArray(lhs) && Array.isArray(rhs)) { if (lhs.length !== rhs.length) return false; - return lhs.every((x, i$1) => x === rhs[i$1]); + return lhs.every((x, i) => x === rhs[i]); } return lhs === rhs; } @@ -30607,19 +13530,19 @@ var require_headers = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules * @returns {string} */ function headerValueNormalize(potentialValue) { - let i$1 = 0; + let i = 0; let j = potentialValue.length; - while (j > i$1 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; - while (j > i$1 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i$1))) ++i$1; - return i$1 === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i$1, j); + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); } /** * @param {Headers} headers * @param {Array|Object} object */ function fill$1(headers, object) { - if (Array.isArray(object)) for (let i$1 = 0; i$1 < object.length; ++i$1) { - const header = object[i$1]; + if (Array.isArray(object)) for (let i = 0; i < object.length; ++i) { + const header = object[i]; if (header.length !== 2) throw webidl$11.errors.exception({ header: "Headers constructor", message: `expected name/value pair to be length 2, found ${header.length}.` @@ -30628,7 +13551,7 @@ var require_headers = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules } else if (typeof object === "object" && object !== null) { const keys = Object.keys(object); - for (let i$1 = 0; i$1 < keys.length; ++i$1) appendHeader(headers, keys[i$1], object[keys[i$1]]); + for (let i = 0; i < keys.length; ++i) appendHeader(headers, keys[i], object[keys[i]]); } else throw webidl$11.errors.conversionFailed({ prefix: "Headers constructor", argument: "Argument 1", @@ -30667,8 +13590,8 @@ var require_headers = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules const names = headersList.toSortedArray(); const cookies = headersList.cookies; if (cookies === null || cookies.length === 1) return headersList.sortedMap = names; - for (let i$1 = 0; i$1 < names.length; ++i$1) { - const { 0: name, 1: value } = names[i$1]; + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i]; if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); else headers.push([name, value]); } @@ -30714,12 +13637,12 @@ var require_headers = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules append(name, value, isLowerCase) { this.sortedMap = null; const lowercaseName = isLowerCase ? name : name.toLowerCase(); - const exists$1 = this.headersMap.get(lowercaseName); - if (exists$1) { + const exists = this.headersMap.get(lowercaseName); + if (exists) { const delimiter = lowercaseName === "cookie" ? "; " : ", "; this.headersMap.set(lowercaseName, { - name: exists$1.name, - value: `${exists$1.value}${delimiter}${value}` + name: exists.name, + value: `${exists.value}${delimiter}${value}` }); } else this.headersMap.set(lowercaseName, { name, @@ -30788,19 +13711,19 @@ var require_headers = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules const firstValue = iterator.next().value; array[0] = [firstValue[0], firstValue[1].value]; assert$8(firstValue[1].value !== null); - for (let i$1 = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i$1 < size; ++i$1) { + for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { value = iterator.next().value; - x = array[i$1] = [value[0], value[1].value]; + x = array[i] = [value[0], value[1].value]; assert$8(x[1] !== null); left = 0; - right = i$1; + right = i; while (left < right) { pivot = left + (right - left >> 1); if (array[pivot][0] <= x[0]) left = pivot + 1; else right = pivot; } - if (i$1 !== pivot) { - j = i$1; + if (i !== pivot) { + j = i; while (j > left) array[j] = array[--j]; array[left] = x; } @@ -30809,9 +13732,9 @@ var require_headers = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules if (!iterator.next().done) throw new TypeError("Unreachable"); return array; } else { - let i$1 = 0; + let i = 0; for (const { 0: name, 1: { value } } of this.headersMap) { - array[i$1++] = [name, value]; + array[i++] = [name, value]; assert$8(value !== null); } return array.sort(compareHeaderName); @@ -31383,8 +14306,8 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules const assert$6 = __require("node:assert"); const { getMaxListeners, setMaxListeners, defaultMaxListeners } = __require("node:events"); const kAbortController = Symbol("abortController"); - const requestFinalizer = new FinalizationRegistry$1(({ signal, abort: abort$2 }) => { - signal.removeEventListener("abort", abort$2); + const requestFinalizer = new FinalizationRegistry$1(({ signal, abort: abort$1 }) => { + signal.removeEventListener("abort", abort$1); }); const dependentControllerMap = new WeakMap(); let abortSignalHasEventHandlerLeakWarning; @@ -31394,12 +14317,12 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules abortSignalHasEventHandlerLeakWarning = false; } function buildAbort(acRef) { - return abort$2; - function abort$2() { + return abort$1; + function abort$1() { const ac = acRef.deref(); if (ac !== void 0) { - requestFinalizer.unregister(abort$2); - this.removeEventListener("abort", abort$2); + requestFinalizer.unregister(abort$1); + this.removeEventListener("abort", abort$1); ac.abort(this.reason); const controllerList = dependentControllerMap.get(ac.signal); if (controllerList !== void 0) { @@ -31431,7 +14354,7 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules webidl$9.argumentLengthCheck(arguments, 1, prefix); input = webidl$9.converters.RequestInfo(input, prefix, "input"); init = webidl$9.converters.RequestInit(init, prefix, "init"); - let request$2 = null; + let request$1 = null; let fallbackMode = null; const baseUrl = environmentSettingsObject$3.settingsObject.baseUrl; let signal = null; @@ -31444,53 +14367,53 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules throw new TypeError("Failed to parse URL from " + input, { cause: err }); } if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); - request$2 = makeRequest$2({ urlList: [parsedURL] }); + request$1 = makeRequest$2({ urlList: [parsedURL] }); fallbackMode = "cors"; } else { assert$6(webidl$9.is.Request(input)); - request$2 = input.#state; + request$1 = input.#state; signal = input.#signal; this.#dispatcher = init.dispatcher || input.#dispatcher; } const origin = environmentSettingsObject$3.settingsObject.origin; let window = "client"; - if (request$2.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin$1(request$2.window, origin)) window = request$2.window; + if (request$1.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin$1(request$1.window, origin)) window = request$1.window; if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); if ("window" in init) window = "no-window"; - request$2 = makeRequest$2({ - method: request$2.method, - headersList: request$2.headersList, - unsafeRequest: request$2.unsafeRequest, + request$1 = makeRequest$2({ + method: request$1.method, + headersList: request$1.headersList, + unsafeRequest: request$1.unsafeRequest, client: environmentSettingsObject$3.settingsObject, window, - priority: request$2.priority, - origin: request$2.origin, - referrer: request$2.referrer, - referrerPolicy: request$2.referrerPolicy, - mode: request$2.mode, - credentials: request$2.credentials, - cache: request$2.cache, - redirect: request$2.redirect, - integrity: request$2.integrity, - keepalive: request$2.keepalive, - reloadNavigation: request$2.reloadNavigation, - historyNavigation: request$2.historyNavigation, - urlList: [...request$2.urlList] + priority: request$1.priority, + origin: request$1.origin, + referrer: request$1.referrer, + referrerPolicy: request$1.referrerPolicy, + mode: request$1.mode, + credentials: request$1.credentials, + cache: request$1.cache, + redirect: request$1.redirect, + integrity: request$1.integrity, + keepalive: request$1.keepalive, + reloadNavigation: request$1.reloadNavigation, + historyNavigation: request$1.historyNavigation, + urlList: [...request$1.urlList] }); const initHasKey = Object.keys(init).length !== 0; if (initHasKey) { - if (request$2.mode === "navigate") request$2.mode = "same-origin"; - request$2.reloadNavigation = false; - request$2.historyNavigation = false; - request$2.origin = "client"; - request$2.referrer = "client"; - request$2.referrerPolicy = ""; - request$2.url = request$2.urlList[request$2.urlList.length - 1]; - request$2.urlList = [request$2.url]; + if (request$1.mode === "navigate") request$1.mode = "same-origin"; + request$1.reloadNavigation = false; + request$1.historyNavigation = false; + request$1.origin = "client"; + request$1.referrer = "client"; + request$1.referrerPolicy = ""; + request$1.url = request$1.urlList[request$1.urlList.length - 1]; + request$1.urlList = [request$1.url]; } if (init.referrer !== void 0) { const referrer = init.referrer; - if (referrer === "") request$2.referrer = "no-referrer"; + if (referrer === "") request$1.referrer = "no-referrer"; else { let parsedReferrer; try { @@ -31498,11 +14421,11 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules } catch (err) { throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); } - if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin$1(parsedReferrer, environmentSettingsObject$3.settingsObject.baseUrl)) request$2.referrer = "client"; - else request$2.referrer = parsedReferrer; + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin$1(parsedReferrer, environmentSettingsObject$3.settingsObject.baseUrl)) request$1.referrer = "client"; + else request$1.referrer = parsedReferrer; } } - if (init.referrerPolicy !== void 0) request$2.referrerPolicy = init.referrerPolicy; + if (init.referrerPolicy !== void 0) request$1.referrerPolicy = init.referrerPolicy; let mode; if (init.mode !== void 0) mode = init.mode; else mode = fallbackMode; @@ -31510,50 +14433,50 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules header: "Request constructor", message: "invalid request mode navigate." }); - if (mode != null) request$2.mode = mode; - if (init.credentials !== void 0) request$2.credentials = init.credentials; - if (init.cache !== void 0) request$2.cache = init.cache; - if (request$2.cache === "only-if-cached" && request$2.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); - if (init.redirect !== void 0) request$2.redirect = init.redirect; - if (init.integrity != null) request$2.integrity = String(init.integrity); - if (init.keepalive !== void 0) request$2.keepalive = Boolean(init.keepalive); + if (mode != null) request$1.mode = mode; + if (init.credentials !== void 0) request$1.credentials = init.credentials; + if (init.cache !== void 0) request$1.cache = init.cache; + if (request$1.cache === "only-if-cached" && request$1.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + if (init.redirect !== void 0) request$1.redirect = init.redirect; + if (init.integrity != null) request$1.integrity = String(init.integrity); + if (init.keepalive !== void 0) request$1.keepalive = Boolean(init.keepalive); if (init.method !== void 0) { let method = init.method; const mayBeNormalized = normalizedMethodRecords[method]; - if (mayBeNormalized !== void 0) request$2.method = mayBeNormalized; + if (mayBeNormalized !== void 0) request$1.method = mayBeNormalized; else { if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); const upperCase = method.toUpperCase(); if (forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); method = normalizedMethodRecordsBase[upperCase] ?? method; - request$2.method = method; + request$1.method = method; } - if (!patchMethodWarning && request$2.method === "patch") { + if (!patchMethodWarning && request$1.method === "patch") { process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: "UNDICI-FETCH-patch" }); patchMethodWarning = true; } } if (init.signal !== void 0) signal = init.signal; - this.#state = request$2; + this.#state = request$1; const ac = new AbortController(); this.#signal = ac.signal; if (signal != null) if (signal.aborted) ac.abort(signal.reason); else { this[kAbortController] = ac; const acRef = new WeakRef(ac); - const abort$2 = buildAbort(acRef); + const abort$1 = buildAbort(acRef); if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(1500, signal); - util$2.addAbortListener(signal, abort$2); + util$2.addAbortListener(signal, abort$1); requestFinalizer.register(ac, { signal, - abort: abort$2 - }, abort$2); + abort: abort$1 + }, abort$1); } this.#headers = new Headers$2(kConstruct$5); - setHeadersList(this.#headers, request$2.headersList); + setHeadersList(this.#headers, request$1.headersList); setHeadersGuard(this.#headers, "request"); if (mode === "no-cors") { - if (!corsSafeListedMethodsSet.has(request$2.method)) throw new TypeError(`'${request$2.method} is unsupported in no-cors mode.`); + if (!corsSafeListedMethodsSet.has(request$1.method)) throw new TypeError(`'${request$1.method} is unsupported in no-cors mode.`); setHeadersGuard(this.#headers, "request-no-cors"); } if (initHasKey) { @@ -31567,18 +14490,18 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules } else fillHeaders(this.#headers, headers); } const inputBody = webidl$9.is.Request(input) ? input.#state.body : null; - if ((init.body != null || inputBody != null) && (request$2.method === "GET" || request$2.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); + if ((init.body != null || inputBody != null) && (request$1.method === "GET" || request$1.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); let initBody = null; if (init.body != null) { - const [extractedBody, contentType] = extractBody$1(init.body, request$2.keepalive); + const [extractedBody, contentType] = extractBody$1(init.body, request$1.keepalive); initBody = extractedBody; if (contentType && !getHeadersList$1(this.#headers).contains("content-type", true)) this.#headers.append("content-type", contentType, true); } const inputOrInitBody = initBody ?? inputBody; if (inputOrInitBody != null && inputOrInitBody.source == null) { if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); - if (request$2.mode !== "same-origin" && request$2.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); - request$2.useCORSPreflightFlag = true; + if (request$1.mode !== "same-origin" && request$1.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); + request$1.useCORSPreflightFlag = true; } let finalBody = inputOrInitBody; if (initBody == null && inputBody != null) { @@ -31711,42 +14634,42 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules * @param {Request} request * @param {AbortSignal} newSignal */ - static setRequestSignal(request$2, newSignal) { - request$2.#signal = newSignal; - return request$2; + static setRequestSignal(request$1, newSignal) { + request$1.#signal = newSignal; + return request$1; } /** * @param {Request} request */ - static getRequestDispatcher(request$2) { - return request$2.#dispatcher; + static getRequestDispatcher(request$1) { + return request$1.#dispatcher; } /** * @param {Request} request * @param {import('../../dispatcher/dispatcher')} newDispatcher */ - static setRequestDispatcher(request$2, newDispatcher) { - request$2.#dispatcher = newDispatcher; + static setRequestDispatcher(request$1, newDispatcher) { + request$1.#dispatcher = newDispatcher; } /** * @param {Request} request * @param {Headers} newHeaders */ - static setRequestHeaders(request$2, newHeaders) { - request$2.#headers = newHeaders; + static setRequestHeaders(request$1, newHeaders) { + request$1.#headers = newHeaders; } /** * @param {Request} request */ - static getRequestState(request$2) { - return request$2.#state; + static getRequestState(request$1) { + return request$1.#state; } /** * @param {Request} request * @param {any} newState */ - static setRequestState(request$2, newState) { - request$2.#state = newState; + static setRequestState(request$1, newState) { + request$1.#state = newState; } }; const { setRequestSignal, getRequestDispatcher: getRequestDispatcher$1, setRequestDispatcher, setRequestHeaders, getRequestState: getRequestState$2, setRequestState } = Request$2; @@ -31799,12 +14722,12 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules headersList: init.headersList ? new HeadersList$1(init.headersList) : new HeadersList$1() }; } - function cloneRequest$1(request$2) { + function cloneRequest$1(request$1) { const newRequest = makeRequest$2({ - ...request$2, + ...request$1, body: null }); - if (request$2.body != null) newRequest.body = cloneBody(newRequest, request$2.body); + if (request$1.body != null) newRequest.body = cloneBody(newRequest, request$1.body); return newRequest; } /** @@ -31816,15 +14739,15 @@ var require_request = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules * @returns {Request} */ function fromInnerRequest$1(innerRequest, dispatcher, signal, guard) { - const request$2 = new Request$2(kConstruct$5); - setRequestState(request$2, innerRequest); - setRequestDispatcher(request$2, dispatcher); - setRequestSignal(request$2, signal); + const request$1 = new Request$2(kConstruct$5); + setRequestState(request$1, innerRequest); + setRequestDispatcher(request$1, dispatcher); + setRequestSignal(request$1, signal); const headers = new Headers$2(kConstruct$5); - setRequestHeaders(request$2, headers); + setRequestHeaders(request$1, headers); setHeadersList(headers, innerRequest.headersList); setHeadersGuard(headers, guard); - return request$2; + return request$1; } Object.defineProperties(Request$2.prototype, { method: kEnumerableProperty$7, @@ -31972,13 +14895,13 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u this.connection?.destroy(reason); this.emit("terminated", reason); } - abort(error$1) { + abort(error) { if (this.state !== "ongoing") return; this.state = "aborted"; - if (!error$1) error$1 = new DOMException("The operation was aborted.", "AbortError"); - this.serializedAbortReason = error$1; - this.connection?.destroy(error$1); - this.emit("terminated", error$1); + if (!error) error = new DOMException("The operation was aborted.", "AbortError"); + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit("terminated", error); } }; function handleFetchDone(response) { @@ -31994,13 +14917,13 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u p.reject(e); return p.promise; } - const request$2 = getRequestState$1(requestObject); + const request$1 = getRequestState$1(requestObject); if (requestObject.signal.aborted) { - abortFetch(p, request$2, null, requestObject.signal.reason); + abortFetch(p, request$1, null, requestObject.signal.reason); return p.promise; } - const globalObject = request$2.client.globalObject; - if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request$2.serviceWorkers = "none"; + const globalObject = request$1.client.globalObject; + if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request$1.serviceWorkers = "none"; let responseObject = null; let locallyAborted = false; let controller = null; @@ -32009,12 +14932,12 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u assert$5(controller != null); controller.abort(requestObject.signal.reason); const realResponse = responseObject?.deref(); - abortFetch(p, request$2, realResponse, requestObject.signal.reason); + abortFetch(p, request$1, realResponse, requestObject.signal.reason); }); const processResponse = (response) => { if (locallyAborted) return; if (response.aborted) { - abortFetch(p, request$2, responseObject, controller.serializedAbortReason); + abortFetch(p, request$1, responseObject, controller.serializedAbortReason); return; } if (response.type === "error") { @@ -32026,7 +14949,7 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u p = null; }; controller = fetching$3({ - request: request$2, + request: request$1, processResponseEndOfBody: handleFetchDone, processResponse, dispatcher: getRequestDispatcher(requestObject) @@ -32050,32 +14973,32 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState, "", response.status); } const markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request$2, responseObject, error$1) { - if (p) p.reject(error$1); - if (request$2.body?.stream != null && isReadable(request$2.body.stream)) request$2.body.stream.cancel(error$1).catch((err) => { + function abortFetch(p, request$1, responseObject, error) { + if (p) p.reject(error); + if (request$1.body?.stream != null && isReadable(request$1.body.stream)) request$1.body.stream.cancel(error).catch((err) => { if (err.code === "ERR_INVALID_STATE") return; throw err; }); if (responseObject == null) return; const response = getResponseState$1(responseObject); - if (response.body?.stream != null && isReadable(response.body.stream)) response.body.stream.cancel(error$1).catch((err) => { + if (response.body?.stream != null && isReadable(response.body.stream)) response.body.stream.cancel(error).catch((err) => { if (err.code === "ERR_INVALID_STATE") return; throw err; }); } - function fetching$3({ request: request$2, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher$2() }) { + function fetching$3({ request: request$1, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher$2() }) { assert$5(dispatcher); let taskDestination = null; let crossOriginIsolatedCapability = false; - if (request$2.client != null) { - taskDestination = request$2.client.globalObject; - crossOriginIsolatedCapability = request$2.client.crossOriginIsolatedCapability; + if (request$1.client != null) { + taskDestination = request$1.client.globalObject; + crossOriginIsolatedCapability = request$1.client.crossOriginIsolatedCapability; } const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); const timingInfo = createOpaqueTimingInfo({ startTime: currentTime }); const fetchParams = { controller: new Fetch(dispatcher), - request: request$2, + request: request$1, timingInfo, processRequestBodyChunkLength, processRequestEndOfBody, @@ -32085,72 +15008,72 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u taskDestination, crossOriginIsolatedCapability }; - assert$5(!request$2.body || request$2.body.stream); - if (request$2.window === "client") request$2.window = request$2.client?.globalObject?.constructor?.name === "Window" ? request$2.client : "no-window"; - if (request$2.origin === "client") request$2.origin = request$2.client.origin; - if (request$2.policyContainer === "client") if (request$2.client != null) request$2.policyContainer = clonePolicyContainer(request$2.client.policyContainer); - else request$2.policyContainer = makePolicyContainer(); - if (!request$2.headersList.contains("accept", true)) { + assert$5(!request$1.body || request$1.body.stream); + if (request$1.window === "client") request$1.window = request$1.client?.globalObject?.constructor?.name === "Window" ? request$1.client : "no-window"; + if (request$1.origin === "client") request$1.origin = request$1.client.origin; + if (request$1.policyContainer === "client") if (request$1.client != null) request$1.policyContainer = clonePolicyContainer(request$1.client.policyContainer); + else request$1.policyContainer = makePolicyContainer(); + if (!request$1.headersList.contains("accept", true)) { const value = "*/*"; - request$2.headersList.append("accept", value, true); + request$1.headersList.append("accept", value, true); } - if (!request$2.headersList.contains("accept-language", true)) request$2.headersList.append("accept-language", "*", true); - if (request$2.priority === null) {} - if (subresourceSet.has(request$2.destination)) {} + if (!request$1.headersList.contains("accept-language", true)) request$1.headersList.append("accept-language", "*", true); + if (request$1.priority === null) {} + if (subresourceSet.has(request$1.destination)) {} mainFetch(fetchParams).catch((err) => { fetchParams.controller.terminate(err); }); return fetchParams.controller; } async function mainFetch(fetchParams, recursive = false) { - const request$2 = fetchParams.request; + const request$1 = fetchParams.request; let response = null; - if (request$2.localURLsOnly && !urlIsLocal(requestCurrentURL(request$2))) response = makeNetworkError("local URLs only"); - tryUpgradeRequestToAPotentiallyTrustworthyURL(request$2); - if (requestBadPort(request$2) === "blocked") response = makeNetworkError("bad port"); - if (request$2.referrerPolicy === "") request$2.referrerPolicy = request$2.policyContainer.referrerPolicy; - if (request$2.referrer !== "no-referrer") request$2.referrer = determineRequestsReferrer(request$2); + if (request$1.localURLsOnly && !urlIsLocal(requestCurrentURL(request$1))) response = makeNetworkError("local URLs only"); + tryUpgradeRequestToAPotentiallyTrustworthyURL(request$1); + if (requestBadPort(request$1) === "blocked") response = makeNetworkError("bad port"); + if (request$1.referrerPolicy === "") request$1.referrerPolicy = request$1.policyContainer.referrerPolicy; + if (request$1.referrer !== "no-referrer") request$1.referrer = determineRequestsReferrer(request$1); if (response === null) { - const currentURL = requestCurrentURL(request$2); - if (sameOrigin(currentURL, request$2.url) && request$2.responseTainting === "basic" || currentURL.protocol === "data:" || request$2.mode === "navigate" || request$2.mode === "websocket") { - request$2.responseTainting = "basic"; + const currentURL = requestCurrentURL(request$1); + if (sameOrigin(currentURL, request$1.url) && request$1.responseTainting === "basic" || currentURL.protocol === "data:" || request$1.mode === "navigate" || request$1.mode === "websocket") { + request$1.responseTainting = "basic"; response = await schemeFetch(fetchParams); - } else if (request$2.mode === "same-origin") response = makeNetworkError("request mode cannot be \"same-origin\""); - else if (request$2.mode === "no-cors") if (request$2.redirect !== "follow") response = makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); + } else if (request$1.mode === "same-origin") response = makeNetworkError("request mode cannot be \"same-origin\""); + else if (request$1.mode === "no-cors") if (request$1.redirect !== "follow") response = makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); else { - request$2.responseTainting = "opaque"; + request$1.responseTainting = "opaque"; response = await schemeFetch(fetchParams); } - else if (!urlIsHttpHttpsScheme$1(requestCurrentURL(request$2))) response = makeNetworkError("URL scheme must be a HTTP(S) scheme"); + else if (!urlIsHttpHttpsScheme$1(requestCurrentURL(request$1))) response = makeNetworkError("URL scheme must be a HTTP(S) scheme"); else { - request$2.responseTainting = "cors"; + request$1.responseTainting = "cors"; response = await httpFetch(fetchParams); } } if (recursive) return response; if (response.status !== 0 && !response.internalResponse) { - if (request$2.responseTainting === "cors") {} - if (request$2.responseTainting === "basic") response = filterResponse(response, "basic"); - else if (request$2.responseTainting === "cors") response = filterResponse(response, "cors"); - else if (request$2.responseTainting === "opaque") response = filterResponse(response, "opaque"); + if (request$1.responseTainting === "cors") {} + if (request$1.responseTainting === "basic") response = filterResponse(response, "basic"); + else if (request$1.responseTainting === "cors") response = filterResponse(response, "cors"); + else if (request$1.responseTainting === "opaque") response = filterResponse(response, "opaque"); else assert$5(false); } let internalResponse = response.status === 0 ? response : response.internalResponse; - if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request$2.urlList); - if (!request$2.timingAllowFailed) response.timingAllowPassed = true; - if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request$2.headers.contains("range", true)) response = internalResponse = makeNetworkError(); - if (response.status !== 0 && (request$2.method === "HEAD" || request$2.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request$1.urlList); + if (!request$1.timingAllowFailed) response.timingAllowPassed = true; + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request$1.headers.contains("range", true)) response = internalResponse = makeNetworkError(); + if (response.status !== 0 && (request$1.method === "HEAD" || request$1.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { internalResponse.body = null; fetchParams.controller.dump = true; } - if (request$2.integrity) { + if (request$1.integrity) { const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); - if (request$2.responseTainting === "opaque" || response.body == null) { + if (request$1.responseTainting === "opaque" || response.body == null) { processBodyError(response.error); return; } const processBody = (bytes) => { - if (!bytesMatch(bytes, request$2.integrity)) { + if (!bytesMatch(bytes, request$1.integrity)) { processBodyError("integrity mismatch"); return; } @@ -32162,21 +15085,21 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u } function schemeFetch(fetchParams) { if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); - const { request: request$2 } = fetchParams; - const { protocol: scheme } = requestCurrentURL(request$2); + const { request: request$1 } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request$1); switch (scheme) { case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); case "blob:": { if (!resolveObjectURL) resolveObjectURL = __require("node:buffer").resolveObjectURL; - const blobURLEntry = requestCurrentURL(request$2); + const blobURLEntry = requestCurrentURL(request$1); if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); const blob = resolveObjectURL(blobURLEntry.toString()); - if (request$2.method !== "GET" || !webidl$8.is.Blob(blob)) return Promise.resolve(makeNetworkError("invalid method")); + if (request$1.method !== "GET" || !webidl$8.is.Blob(blob)) return Promise.resolve(makeNetworkError("invalid method")); const response = makeResponse(); const fullLength = blob.size; const serializedFullLength = isomorphicEncode(`${fullLength}`); const type = blob.type; - if (!request$2.headersList.contains("range", true)) { + if (!request$1.headersList.contains("range", true)) { const bodyWithType = extractBody(blob); response.statusText = "OK"; response.body = bodyWithType[0]; @@ -32184,7 +15107,7 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u response.headersList.set("content-type", type, true); } else { response.rangeRequested = true; - const rangeHeader = request$2.headersList.get("range", true); + const rangeHeader = request$1.headersList.get("range", true); const rangeValue = simpleRangeHeaderValue(rangeHeader, true); if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; @@ -32209,7 +15132,7 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u return Promise.resolve(response); } case "data:": { - const currentURL = requestCurrentURL(request$2); + const currentURL = requestCurrentURL(request$1); const dataURLStruct = dataURLProcessor(currentURL); if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); const mimeType = serializeAMimeType$1(dataURLStruct.mimeType); @@ -32272,82 +15195,82 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u }); } async function httpFetch(fetchParams) { - const request$2 = fetchParams.request; + const request$1 = fetchParams.request; let response = null; let actualResponse = null; const timingInfo = fetchParams.timingInfo; - if (request$2.serviceWorkers === "all") {} + if (request$1.serviceWorkers === "all") {} if (response === null) { - if (request$2.redirect === "follow") request$2.serviceWorkers = "none"; + if (request$1.redirect === "follow") request$1.serviceWorkers = "none"; actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); - if (request$2.responseTainting === "cors" && corsCheck(request$2, response) === "failure") return makeNetworkError("cors failure"); - if (TAOCheck(request$2, response) === "failure") request$2.timingAllowFailed = true; + if (request$1.responseTainting === "cors" && corsCheck(request$1, response) === "failure") return makeNetworkError("cors failure"); + if (TAOCheck(request$1, response) === "failure") request$1.timingAllowFailed = true; } - if ((request$2.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request$2.origin, request$2.client, request$2.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); + if ((request$1.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request$1.origin, request$1.client, request$1.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); if (redirectStatusSet.has(actualResponse.status)) { - if (request$2.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); - if (request$2.redirect === "error") response = makeNetworkError("unexpected redirect"); - else if (request$2.redirect === "manual") response = actualResponse; - else if (request$2.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); + if (request$1.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); + if (request$1.redirect === "error") response = makeNetworkError("unexpected redirect"); + else if (request$1.redirect === "manual") response = actualResponse; + else if (request$1.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); else assert$5(false); } response.timingInfo = timingInfo; return response; } function httpRedirectFetch(fetchParams, response) { - const request$2 = fetchParams.request; + const request$1 = fetchParams.request; const actualResponse = response.internalResponse ? response.internalResponse : response; let locationURL; try { - locationURL = responseLocationURL(actualResponse, requestCurrentURL(request$2).hash); + locationURL = responseLocationURL(actualResponse, requestCurrentURL(request$1).hash); if (locationURL == null) return response; } catch (err) { return Promise.resolve(makeNetworkError(err)); } if (!urlIsHttpHttpsScheme$1(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); - if (request$2.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); - request$2.redirectCount += 1; - if (request$2.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request$2, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); - if (request$2.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); - if (actualResponse.status !== 303 && request$2.body != null && request$2.body.source == null) return Promise.resolve(makeNetworkError()); - if ([301, 302].includes(actualResponse.status) && request$2.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request$2.method)) { - request$2.method = "GET"; - request$2.body = null; - for (const headerName of requestBodyHeader) request$2.headersList.delete(headerName); + if (request$1.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); + request$1.redirectCount += 1; + if (request$1.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request$1, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); + if (request$1.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); + if (actualResponse.status !== 303 && request$1.body != null && request$1.body.source == null) return Promise.resolve(makeNetworkError()); + if ([301, 302].includes(actualResponse.status) && request$1.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request$1.method)) { + request$1.method = "GET"; + request$1.body = null; + for (const headerName of requestBodyHeader) request$1.headersList.delete(headerName); } - if (!sameOrigin(requestCurrentURL(request$2), locationURL)) { - request$2.headersList.delete("authorization", true); - request$2.headersList.delete("proxy-authorization", true); - request$2.headersList.delete("cookie", true); - request$2.headersList.delete("host", true); + if (!sameOrigin(requestCurrentURL(request$1), locationURL)) { + request$1.headersList.delete("authorization", true); + request$1.headersList.delete("proxy-authorization", true); + request$1.headersList.delete("cookie", true); + request$1.headersList.delete("host", true); } - if (request$2.body != null) { - assert$5(request$2.body.source != null); - request$2.body = safelyExtractBody(request$2.body.source)[0]; + if (request$1.body != null) { + assert$5(request$1.body.source != null); + request$1.body = safelyExtractBody(request$1.body.source)[0]; } const timingInfo = fetchParams.timingInfo; timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; - request$2.urlList.push(locationURL); - setRequestReferrerPolicyOnRedirect(request$2, actualResponse); + request$1.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request$1, actualResponse); return mainFetch(fetchParams, true); } async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { - const request$2 = fetchParams.request; + const request$1 = fetchParams.request; let httpFetchParams = null; let httpRequest = null; let response = null; const httpCache = null; const revalidatingFlag = false; - if (request$2.window === "no-window" && request$2.redirect === "error") { + if (request$1.window === "no-window" && request$1.redirect === "error") { httpFetchParams = fetchParams; - httpRequest = request$2; + httpRequest = request$1; } else { - httpRequest = cloneRequest(request$2); + httpRequest = cloneRequest(request$1); httpFetchParams = { ...fetchParams }; httpFetchParams.request = httpRequest; } - const includeCredentials = request$2.credentials === "include" || request$2.credentials === "same-origin" && request$2.responseTainting === "basic"; + const includeCredentials = request$1.credentials === "include" || request$1.credentials === "same-origin" && request$1.responseTainting === "basic"; const contentLength = httpRequest.body ? httpRequest.body.length : null; let contentLengthHeaderValue = null; if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; @@ -32382,11 +15305,11 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u if (httpRequest.headersList.contains("range", true)) response.rangeRequested = true; response.requestIncludesCredentials = includeCredentials; if (response.status === 407) { - if (request$2.window === "no-window") return makeNetworkError(); + if (request$1.window === "no-window") return makeNetworkError(); if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); return makeNetworkError("proxy authentication required"); } - if (response.status === 421 && !isNewConnectionFetch && (request$2.body == null || request$2.body.source != null)) { + if (response.status === 421 && !isNewConnectionFetch && (request$1.body == null || request$1.body.source != null)) { if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); fetchParams.controller.connection.destroy(); response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); @@ -32399,23 +15322,23 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u fetchParams.controller.connection = { abort: null, destroyed: false, - destroy(err, abort$2 = true) { + destroy(err, abort$1 = true) { if (!this.destroyed) { this.destroyed = true; - if (abort$2) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); + if (abort$1) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); } } }; - const request$2 = fetchParams.request; + const request$1 = fetchParams.request; let response = null; const timingInfo = fetchParams.timingInfo; const httpCache = null; - if (httpCache == null) request$2.cache = "no-store"; + if (httpCache == null) request$1.cache = "no-store"; const newConnection = forceNewConnection ? "yes" : "no"; - if (request$2.mode === "websocket") {} + if (request$1.mode === "websocket") {} let requestBody = null; - if (request$2.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); - else if (request$2.body != null) { + if (request$1.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); + else if (request$1.body != null) { const processBodyChunk = async function* (bytes) { if (isCancelled(fetchParams)) return; yield bytes; @@ -32432,7 +15355,7 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u }; requestBody = async function* () { try { - for await (const bytes of request$2.body.stream) yield* processBodyChunk(bytes); + for await (const bytes of request$1.body.stream) yield* processBodyChunk(bytes); processEndOfBody(); } catch (err) { processBodyError(err); @@ -32469,7 +15392,7 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u const cancelAlgorithm = (reason) => { if (!isCancelled(fetchParams)) fetchParams.controller.abort(reason); }; - const stream$5 = new ReadableStream({ + const stream$3 = new ReadableStream({ async start(controller) { fetchParams.controller.controller = controller; }, @@ -32482,7 +15405,7 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u type: "bytes" }); response.body = { - stream: stream$5, + stream: stream$3, source: null, length: null }; @@ -32514,7 +15437,7 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u } const buffer$1 = new Uint8Array(bytes); if (buffer$1.byteLength) fetchParams.controller.controller.enqueue(buffer$1); - if (isErrored(stream$5)) { + if (isErrored(stream$3)) { fetchParams.controller.terminate(); return; } @@ -32524,79 +15447,79 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u function onAborted(reason) { if (isAborted(fetchParams)) { response.aborted = true; - if (isReadable(stream$5)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); - } else if (isReadable(stream$5)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); + if (isReadable(stream$3)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else if (isReadable(stream$3)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); fetchParams.controller.connection.destroy(); } return response; function dispatch({ body }) { - const url = requestCurrentURL(request$2); + const url = requestCurrentURL(request$1); /** @type {import('../..').Agent} */ const agent = fetchParams.controller.dispatcher; return new Promise((resolve, reject) => agent.dispatch({ path: url.pathname + url.search, origin: url.origin, - method: request$2.method, - body: agent.isMockActive ? request$2.body && (request$2.body.source || request$2.body.stream) : body, - headers: request$2.headersList.entries, + method: request$1.method, + body: agent.isMockActive ? request$1.body && (request$1.body.source || request$1.body.stream) : body, + headers: request$1.headersList.entries, maxRedirections: 0, - upgrade: request$2.mode === "websocket" ? "websocket" : void 0 + upgrade: request$1.mode === "websocket" ? "websocket" : void 0 }, { body: null, abort: null, - onConnect(abort$2) { + onConnect(abort$1) { const { connection } = fetchParams.controller; timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); - if (connection.destroyed) abort$2(new DOMException("The operation was aborted.", "AbortError")); + if (connection.destroyed) abort$1(new DOMException("The operation was aborted.", "AbortError")); else { - fetchParams.controller.on("terminated", abort$2); - this.abort = connection.abort = abort$2; + fetchParams.controller.on("terminated", abort$1); + this.abort = connection.abort = abort$1; } timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); }, onResponseStarted() { timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); }, - onHeaders(status, rawHeaders, resume$2, statusText) { + onHeaders(status, rawHeaders, resume$1, statusText) { if (status < 200) return; /** @type {string[]} */ let codings = []; let location = ""; const headersList = new HeadersList(); - for (let i$1 = 0; i$1 < rawHeaders.length; i$1 += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i$1]), rawHeaders[i$1 + 1].toString("latin1"), true); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); const contentEncoding = headersList.get("content-encoding", true); if (contentEncoding) codings = contentEncoding.toLowerCase().split(",").map((x) => x.trim()); location = headersList.get("location", true); - this.body = new Readable({ read: resume$2 }); - const decoders$1 = []; - const willFollow = location && request$2.redirect === "follow" && redirectStatusSet.has(status); - if (codings.length !== 0 && request$2.method !== "HEAD" && request$2.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) for (let i$1 = codings.length - 1; i$1 >= 0; --i$1) { - const coding = codings[i$1]; - if (coding === "x-gzip" || coding === "gzip") decoders$1.push(zlib.createGunzip({ + this.body = new Readable({ read: resume$1 }); + const decoders = []; + const willFollow = location && request$1.redirect === "follow" && redirectStatusSet.has(status); + if (codings.length !== 0 && request$1.method !== "HEAD" && request$1.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) for (let i = codings.length - 1; i >= 0; --i) { + const coding = codings[i]; + if (coding === "x-gzip" || coding === "gzip") decoders.push(zlib.createGunzip({ flush: zlib.constants.Z_SYNC_FLUSH, finishFlush: zlib.constants.Z_SYNC_FLUSH })); - else if (coding === "deflate") decoders$1.push(createInflate({ + else if (coding === "deflate") decoders.push(createInflate({ flush: zlib.constants.Z_SYNC_FLUSH, finishFlush: zlib.constants.Z_SYNC_FLUSH })); - else if (coding === "br") decoders$1.push(zlib.createBrotliDecompress({ + else if (coding === "br") decoders.push(zlib.createBrotliDecompress({ flush: zlib.constants.BROTLI_OPERATION_FLUSH, finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH })); else { - decoders$1.length = 0; + decoders.length = 0; break; } } - const onError$2 = this.onError.bind(this); + const onError$1 = this.onError.bind(this); resolve({ status, statusText, headersList, - body: decoders$1.length ? pipeline$1(this.body, ...decoders$1, (err) => { + body: decoders.length ? pipeline$1(this.body, ...decoders, (err) => { if (err) this.onError(err); - }).on("error", onError$2) : this.body.on("error", onError$2) + }).on("error", onError$1) : this.body.on("error", onError$1) }); return true; }, @@ -32611,16 +15534,16 @@ var require_fetch = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u fetchParams.controller.ended = true; this.body.push(null); }, - onError(error$1) { + onError(error) { if (this.abort) fetchParams.controller.off("terminated", this.abort); - this.body?.destroy(error$1); - fetchParams.controller.terminate(error$1); - reject(error$1); + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) return; const headersList = new HeadersList(); - for (let i$1 = 0; i$1 < rawHeaders.length; i$1 += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i$1]), rawHeaders[i$1 + 1].toString("latin1"), true); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); resolve({ status, statusText: STATUS_CODES[status], @@ -32712,29 +15635,29 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u webidl$7.util.markAsUncloneable(this); this.#relevantRequestResponseList = arguments[1]; } - async match(request$2, options = {}) { + async match(request$1, options = {}) { webidl$7.brandCheck(this, Cache$1); const prefix = "Cache.match"; webidl$7.argumentLengthCheck(arguments, 1, prefix); - request$2 = webidl$7.converters.RequestInfo(request$2, prefix, "request"); + request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); options = webidl$7.converters.CacheQueryOptions(options, prefix, "options"); - const p = this.#internalMatchAll(request$2, options, 1); + const p = this.#internalMatchAll(request$1, options, 1); if (p.length === 0) return; return p[0]; } - async matchAll(request$2 = void 0, options = {}) { + async matchAll(request$1 = void 0, options = {}) { webidl$7.brandCheck(this, Cache$1); const prefix = "Cache.matchAll"; - if (request$2 !== void 0) request$2 = webidl$7.converters.RequestInfo(request$2, prefix, "request"); + if (request$1 !== void 0) request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); options = webidl$7.converters.CacheQueryOptions(options, prefix, "options"); - return this.#internalMatchAll(request$2, options); + return this.#internalMatchAll(request$1, options); } - async add(request$2) { + async add(request$1) { webidl$7.brandCheck(this, Cache$1); const prefix = "Cache.add"; webidl$7.argumentLengthCheck(arguments, 1, prefix); - request$2 = webidl$7.converters.RequestInfo(request$2, prefix, "request"); - const requests = [request$2]; + request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); + const requests = [request$1]; const responseArrayPromise = this.addAll(requests); return await responseArrayPromise; } @@ -32744,15 +15667,15 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u webidl$7.argumentLengthCheck(arguments, 1, prefix); const responsePromises = []; const requestList = []; - for (let request$2 of requests) { - if (request$2 === void 0) throw webidl$7.errors.conversionFailed({ + for (let request$1 of requests) { + if (request$1 === void 0) throw webidl$7.errors.conversionFailed({ prefix, argument: "Argument 1", types: ["undefined is not allowed"] }); - request$2 = webidl$7.converters.RequestInfo(request$2); - if (typeof request$2 === "string") continue; - const r = getRequestState(request$2); + request$1 = webidl$7.converters.RequestInfo(request$1); + if (typeof request$1 === "string") continue; + const r = getRequestState(request$1); if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl$7.errors.exception({ header: prefix, message: "Expected http/s scheme when method is not GET." @@ -32760,8 +15683,8 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u } /** @type {ReturnType[]} */ const fetchControllers = []; - for (const request$2 of requests) { - const r = getRequestState(new Request(request$2)); + for (const request$1 of requests) { + const r = getRequestState(new Request(request$1)); if (!urlIsHttpHttpsScheme(r.url)) throw webidl$7.errors.exception({ header: prefix, message: "Expected http/s scheme." @@ -32778,8 +15701,8 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u message: "Received an invalid status code or the request failed." })); else if (response.headersList.contains("vary")) { - const fieldValues$1 = getFieldValues(response.headersList.get("vary")); - for (const fieldValue of fieldValues$1) if (fieldValue === "*") { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") { responsePromise.reject(webidl$7.errors.exception({ header: "Cache.addAll", message: "invalid vary field value" @@ -32826,15 +15749,15 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u }); return cacheJobPromise.promise; } - async put(request$2, response) { + async put(request$1, response) { webidl$7.brandCheck(this, Cache$1); const prefix = "Cache.put"; webidl$7.argumentLengthCheck(arguments, 2, prefix); - request$2 = webidl$7.converters.RequestInfo(request$2, prefix, "request"); + request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); response = webidl$7.converters.Response(response, prefix, "response"); let innerRequest = null; - if (webidl$7.is.Request(request$2)) innerRequest = getRequestState(request$2); - else innerRequest = getRequestState(new Request(request$2)); + if (webidl$7.is.Request(request$1)) innerRequest = getRequestState(request$1); + else innerRequest = getRequestState(new Request(request$1)); if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl$7.errors.exception({ header: prefix, message: "Expected an http/s scheme when method is not GET" @@ -32845,8 +15768,8 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u message: "Got 206 status" }); if (innerResponse.headersList.contains("vary")) { - const fieldValues$1 = getFieldValues(innerResponse.headersList.get("vary")); - for (const fieldValue of fieldValues$1) if (fieldValue === "*") throw webidl$7.errors.exception({ + const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") throw webidl$7.errors.exception({ header: prefix, message: "Got * vary field value" }); @@ -32858,8 +15781,8 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u const clonedResponse = cloneResponse(innerResponse); const bodyReadPromise = createDeferredPromise$1(); if (innerResponse.body != null) { - const stream$5 = innerResponse.body.stream; - const reader = stream$5.getReader(); + const stream$3 = innerResponse.body.stream; + const reader = stream$3.getReader(); readAllBytes(reader, bodyReadPromise.resolve, bodyReadPromise.reject); } else bodyReadPromise.resolve(void 0); /** @type {CacheBatchOperation[]} */ @@ -32886,22 +15809,22 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u }); return cacheJobPromise.promise; } - async delete(request$2, options = {}) { + async delete(request$1, options = {}) { webidl$7.brandCheck(this, Cache$1); const prefix = "Cache.delete"; webidl$7.argumentLengthCheck(arguments, 1, prefix); - request$2 = webidl$7.converters.RequestInfo(request$2, prefix, "request"); + request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); options = webidl$7.converters.CacheQueryOptions(options, prefix, "options"); /** * @type {Request} */ let r = null; - if (webidl$7.is.Request(request$2)) { - r = getRequestState(request$2); + if (webidl$7.is.Request(request$1)) { + r = getRequestState(request$1); if (r.method !== "GET" && !options.ignoreMethod) return false; } else { - assert$3(typeof request$2 === "string"); - r = getRequestState(new Request(request$2)); + assert$3(typeof request$1 === "string"); + r = getRequestState(new Request(request$1)); } /** @type {CacheBatchOperation[]} */ const operations = []; @@ -32932,29 +15855,29 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u * @param {import('../../types/cache').CacheQueryOptions} options * @returns {Promise} */ - async keys(request$2 = void 0, options = {}) { + async keys(request$1 = void 0, options = {}) { webidl$7.brandCheck(this, Cache$1); const prefix = "Cache.keys"; - if (request$2 !== void 0) request$2 = webidl$7.converters.RequestInfo(request$2, prefix, "request"); + if (request$1 !== void 0) request$1 = webidl$7.converters.RequestInfo(request$1, prefix, "request"); options = webidl$7.converters.CacheQueryOptions(options, prefix, "options"); let r = null; - if (request$2 !== void 0) { - if (webidl$7.is.Request(request$2)) { - r = getRequestState(request$2); + if (request$1 !== void 0) { + if (webidl$7.is.Request(request$1)) { + r = getRequestState(request$1); if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request$2 === "string") r = getRequestState(new Request(request$2)); + } else if (typeof request$1 === "string") r = getRequestState(new Request(request$1)); } const promise = createDeferredPromise$1(); const requests = []; - if (request$2 === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); + if (request$1 === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); else { const requestResponses = this.#queryCache(r, options); for (const requestResponse of requestResponses) requests.push(requestResponse[0]); } queueMicrotask(() => { const requestList = []; - for (const request$3 of requests) { - const requestObject = fromInnerRequest(request$3, void 0, new AbortController().signal, "immutable"); + for (const request$2 of requests) { + const requestObject = fromInnerRequest(request$2, void 0, new AbortController().signal, "immutable"); requestList.push(requestObject); } promise.resolve(Object.freeze(requestList)); @@ -33052,34 +15975,34 @@ var require_cache = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u * @param {import('../../types/cache').CacheQueryOptions | undefined} options * @returns {boolean} */ - #requestMatchesCachedItem(requestQuery, request$2, response = null, options) { + #requestMatchesCachedItem(requestQuery, request$1, response = null, options) { const queryURL = new URL(requestQuery.url); - const cachedURL = new URL(request$2.url); + const cachedURL = new URL(request$1.url); if (options?.ignoreSearch) { cachedURL.search = ""; queryURL.search = ""; } if (!urlEquals(queryURL, cachedURL, true)) return false; if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; - const fieldValues$1 = getFieldValues(response.headersList.get("vary")); - for (const fieldValue of fieldValues$1) { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { if (fieldValue === "*") return false; - const requestValue = request$2.headersList.get(fieldValue); + const requestValue = request$1.headersList.get(fieldValue); const queryValue = requestQuery.headersList.get(fieldValue); if (requestValue !== queryValue) return false; } return true; } - #internalMatchAll(request$2, options, maxResponses = Infinity) { + #internalMatchAll(request$1, options, maxResponses = Infinity) { let r = null; - if (request$2 !== void 0) { - if (webidl$7.is.Request(request$2)) { - r = getRequestState(request$2); + if (request$1 !== void 0) { + if (webidl$7.is.Request(request$1)) { + r = getRequestState(request$1); if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request$2 === "string") r = getRequestState(new Request(request$2)); + } else if (typeof request$1 === "string") r = getRequestState(new Request(request$1)); } const responses = []; - if (request$2 === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); + if (request$1 === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); else { const requestResponses = this.#queryCache(r, options); for (const requestResponse of requestResponses) responses.push(requestResponse[1]); @@ -33150,20 +16073,20 @@ var require_cachestorage = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mo if (arguments[0] !== kConstruct$3) webidl$6.illegalConstructor(); webidl$6.util.markAsUncloneable(this); } - async match(request$2, options = {}) { + async match(request$1, options = {}) { webidl$6.brandCheck(this, CacheStorage$1); webidl$6.argumentLengthCheck(arguments, 1, "CacheStorage.match"); - request$2 = webidl$6.converters.RequestInfo(request$2); + request$1 = webidl$6.converters.RequestInfo(request$1); options = webidl$6.converters.MultiCacheQueryOptions(options); if (options.cacheName != null) { if (this.#caches.has(options.cacheName)) { const cacheList = this.#caches.get(options.cacheName); const cache$1 = new Cache(kConstruct$3, cacheList); - return await cache$1.match(request$2, options); + return await cache$1.match(request$1, options); } } else for (const cacheList of this.#caches.values()) { const cache$1 = new Cache(kConstruct$3, cacheList); - const response = await cache$1.match(request$2, options); + const response = await cache$1.match(request$1, options); if (response !== void 0) return response; } } @@ -33252,8 +16175,8 @@ var require_util$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @returns {boolean} */ function isCTLExcludingHtab$1(value) { - for (let i$1 = 0; i$1 < value.length; ++i$1) { - const code = value.charCodeAt(i$1); + for (let i = 0; i < value.length; ++i) { + const code = value.charCodeAt(i); if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) return true; } return false; @@ -33268,8 +16191,8 @@ var require_util$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @param {string} name */ function validateCookieName(name) { - for (let i$1 = 0; i$1 < name.length; ++i$1) { - const code = name.charCodeAt(i$1); + for (let i = 0; i < name.length; ++i) { + const code = name.charCodeAt(i); if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) throw new Error("Invalid cookie name"); } } @@ -33283,14 +16206,14 @@ var require_util$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ */ function validateCookieValue(value) { let len = value.length; - let i$1 = 0; + let i = 0; if (value[0] === "\"") { if (len === 1 || value[len - 1] !== "\"") throw new Error("Invalid cookie value"); --len; - ++i$1; + ++i; } - while (i$1 < len) { - const code = value.charCodeAt(i$1++); + while (i < len) { + const code = value.charCodeAt(i++); if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) throw new Error("Invalid cookie value"); } } @@ -33298,9 +16221,9 @@ var require_util$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * path-value = * @param {string} path */ - function validateCookiePath(path$8) { - for (let i$1 = 0; i$1 < path$8.length; ++i$1) { - const code = path$8.charCodeAt(i$1); + function validateCookiePath(path$3) { + for (let i = 0; i < path$3.length; ++i) { + const code = path$3.charCodeAt(i); if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path"); } } @@ -33335,7 +16258,7 @@ var require_util$2 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ "Nov", "Dec" ]; - const IMFPaddedNumbers = Array(61).fill(0).map((_, i$1) => i$1.toString().padStart(2, "0")); + const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); /** * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 * @param {number|Date} date @@ -34167,8 +17090,8 @@ var require_util$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ */ function isValidSubprotocol$2(protocol) { if (protocol.length === 0) return false; - for (let i$1 = 0; i$1 < protocol.length; ++i$1) { - const code = protocol.charCodeAt(i$1); + for (let i = 0; i < protocol.length; ++i) { + const code = protocol.charCodeAt(i); if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) return false; } return true; @@ -34235,8 +17158,8 @@ var require_util$1 = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ * @returns {boolean} */ function isValidClientWindowBits$1(value) { - for (let i$1 = 0; i$1 < value.length; i$1++) { - const byte = value.charCodeAt(i$1); + for (let i = 0; i < value.length; i++) { + const byte = value.charCodeAt(i); if (byte < 48 || byte > 57) return false; } return true; @@ -34317,7 +17240,7 @@ var require_frame = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u crypto$2 = __require("node:crypto"); } catch { crypto$2 = { randomFillSync: function randomFillSync(buffer$1, _offset, _size) { - for (let i$1 = 0; i$1 < buffer$1.length; ++i$1) buffer$1[i$1] = Math.random() * 255 | 0; + for (let i = 0; i < buffer$1.length; ++i) buffer$1[i] = Math.random() * 255 | 0; return buffer$1; } }; } @@ -34343,18 +17266,18 @@ var require_frame = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u createFrame(opcode) { const frameData = this.frameData; const maskKey = generateMask(); - const bodyLength$2 = frameData?.byteLength ?? 0; + const bodyLength$1 = frameData?.byteLength ?? 0; /** @type {number} */ - let payloadLength = bodyLength$2; + let payloadLength = bodyLength$1; let offset = 6; - if (bodyLength$2 > maxUnsigned16Bit) { + if (bodyLength$1 > maxUnsigned16Bit) { offset += 8; payloadLength = 127; - } else if (bodyLength$2 > 125) { + } else if (bodyLength$1 > 125) { offset += 2; payloadLength = 126; } - const buffer$1 = Buffer.allocUnsafe(bodyLength$2 + offset); + const buffer$1 = Buffer.allocUnsafe(bodyLength$1 + offset); buffer$1[0] = buffer$1[1] = 0; buffer$1[0] |= 128; buffer$1[0] = (buffer$1[0] & 240) + opcode; @@ -34364,13 +17287,13 @@ var require_frame = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u buffer$1[offset - 2] = maskKey[2]; buffer$1[offset - 1] = maskKey[3]; buffer$1[1] = payloadLength; - if (payloadLength === 126) buffer$1.writeUInt16BE(bodyLength$2, 2); + if (payloadLength === 126) buffer$1.writeUInt16BE(bodyLength$1, 2); else if (payloadLength === 127) { buffer$1[2] = buffer$1[3] = 0; - buffer$1.writeUIntBE(bodyLength$2, 4, 6); + buffer$1.writeUIntBE(bodyLength$1, 4, 6); } buffer$1[1] |= 128; - for (let i$1 = 0; i$1 < bodyLength$2; ++i$1) buffer$1[offset + i$1] = frameData[i$1] ^ maskKey[i$1 & 3]; + for (let i = 0; i < bodyLength$1; ++i) buffer$1[offset + i] = frameData[i] ^ maskKey[i & 3]; return buffer$1; } /** @@ -34378,14 +17301,14 @@ var require_frame = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u */ static createFastTextFrame(buffer$1) { const maskKey = generateMask(); - const bodyLength$2 = buffer$1.length; - for (let i$1 = 0; i$1 < bodyLength$2; ++i$1) buffer$1[i$1] ^= maskKey[i$1 & 3]; - let payloadLength = bodyLength$2; + const bodyLength$1 = buffer$1.length; + for (let i = 0; i < bodyLength$1; ++i) buffer$1[i] ^= maskKey[i & 3]; + let payloadLength = bodyLength$1; let offset = 6; - if (bodyLength$2 > maxUnsigned16Bit) { + if (bodyLength$1 > maxUnsigned16Bit) { offset += 8; payloadLength = 127; - } else if (bodyLength$2 > 125) { + } else if (bodyLength$1 > 125) { offset += 2; payloadLength = 126; } @@ -34396,10 +17319,10 @@ var require_frame = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/u head[offset - 3] = maskKey[1]; head[offset - 2] = maskKey[2]; head[offset - 1] = maskKey[3]; - if (payloadLength === 126) head.writeUInt16BE(bodyLength$2, 2); + if (payloadLength === 126) head.writeUInt16BE(bodyLength$1, 2); else if (payloadLength === 127) { head[2] = head[3] = 0; - head.writeUIntBE(bodyLength$2, 4, 6); + head.writeUIntBE(bodyLength$1, 4, 6); } return [head, buffer$1]; } @@ -34434,7 +17357,7 @@ var require_connection = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu function establishWebSocketConnection$2(url, protocols, client, handler, options) { const requestURL = url; requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; - const request$2 = makeRequest$1({ + const request$1 = makeRequest$1({ urlList: [requestURL], client, serviceWorkers: "none", @@ -34446,16 +17369,16 @@ var require_connection = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu }); if (options.headers) { const headersList = getHeadersList(new Headers(options.headers)); - request$2.headersList = headersList; + request$1.headersList = headersList; } const keyValue = crypto$1.randomBytes(16).toString("base64"); - request$2.headersList.append("sec-websocket-key", keyValue, true); - request$2.headersList.append("sec-websocket-version", "13", true); - for (const protocol of protocols) request$2.headersList.append("sec-websocket-protocol", protocol, true); + request$1.headersList.append("sec-websocket-key", keyValue, true); + request$1.headersList.append("sec-websocket-version", "13", true); + for (const protocol of protocols) request$1.headersList.append("sec-websocket-protocol", protocol, true); const permessageDeflate = "permessage-deflate; client_max_window_bits"; - request$2.headersList.append("sec-websocket-extensions", permessageDeflate, true); + request$1.headersList.append("sec-websocket-extensions", permessageDeflate, true); const controller = fetching$1({ - request: request$2, + request: request$1, useParallelQueue: true, dispatcher: options.dispatcher, processResponse(response) { @@ -34493,7 +17416,7 @@ var require_connection = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modu } const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); if (secProtocol !== null) { - const requestProtocols = getDecodeSplit("sec-websocket-protocol", request$2.headersList); + const requestProtocols = getDecodeSplit("sec-websocket-protocol", request$1.headersList); if (!requestProtocols.includes(secProtocol)) { failWebsocketConnection$3(handler, 1002, "Protocol was not set in the opening handshake."); return; @@ -34751,9 +17674,9 @@ var require_receiver = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module if (!this.#info.fragmented && this.#info.fin) websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); this.#state = parserStates.INFO; } else { - this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error$1, data) => { - if (error$1) { - failWebsocketConnection$2(this.#handler, 1007, error$1.message); + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { + if (error) { + failWebsocketConnection$2(this.#handler, 1007, error.message); return; } this.writeFragments(data); @@ -34820,8 +17743,8 @@ var require_receiver = __commonJS({ "node_modules/.deno/undici@7.9.0/node_module } let offset = 0; const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes); - for (let i$1 = 0; i$1 < fragments.length; ++i$1) { - const buffer$1 = fragments[i$1]; + for (let i = 0; i < fragments.length; ++i) { + const buffer$1 = fragments[i]; output.set(buffer$1, offset); offset += buffer$1.length; } @@ -35387,10 +18310,10 @@ var require_websocketerror = __commonJS({ "node_modules/.deno/undici@7.9.0/node_ * @param {string} reason */ static createUnvalidatedWebSocketError(message, code, reason) { - const error$1 = new WebSocketError$1(message, kConstruct$1); - error$1.#closeCode = code; - error$1.#reason = reason; - return error$1; + const error = new WebSocketError$1(message, kConstruct$1); + error.#closeCode = code; + error.#reason = reason; + return error; } }; const { createUnvalidatedWebSocketError: createUnvalidatedWebSocketError$1 } = WebSocketError$1; @@ -35608,10 +18531,10 @@ var require_websocketstream = __commonJS({ "node_modules/.deno/undici@7.9.0/node reason }); } else { - const error$1 = createUnvalidatedWebSocketError("unclean close", code, reason); - this.#readableStreamController.error(error$1); - this.#writableStream.abort(error$1); - this.#closedPromise.reject(error$1); + const error = createUnvalidatedWebSocketError("unclean close", code, reason); + this.#readableStreamController.error(error); + this.#writableStream.abort(error); + this.#closedPromise.reject(error); } } #closeUsingReason(reason) { @@ -35677,7 +18600,7 @@ var require_util = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/un */ function isASCIINumber$1(value) { if (value.length === 0) return false; - for (let i$1 = 0; i$1 < value.length; i$1++) if (value.charCodeAt(i$1) < 48 || value.charCodeAt(i$1) > 57) return false; + for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; return true; } function delay$1(ms) { @@ -36122,8 +19045,8 @@ var require_eventsource = __commonJS({ "node_modules/.deno/undici@7.9.0/node_mod this.dispatchEvent(createFastMessageEvent(event.type, event.options)); } }); - pipeline(response.body.stream, eventSourceStream, (error$1) => { - if (error$1?.aborted === false) { + pipeline(response.body.stream, eventSourceStream, (error) => { + if (error?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -36300,9 +19223,9 @@ var require_undici = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); if (opts && opts.path != null) { if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); - let path$8 = opts.path; - if (!opts.path.startsWith("/")) path$8 = `/${path$8}`; - url = new URL(util$1.parseOrigin(url).origin + path$8); + let path$3 = opts.path; + if (!opts.path.startsWith("/")) path$3 = `/${path$3}`; + url = new URL(util$1.parseOrigin(url).origin + path$3); } else { if (!opts) opts = typeof url === "object" ? url : {}; url = util$1.parseURL(url); @@ -36320,7 +19243,7 @@ var require_undici = __commonJS({ "node_modules/.deno/undici@7.9.0/node_modules/ module.exports.setGlobalDispatcher = setGlobalDispatcher; module.exports.getGlobalDispatcher = getGlobalDispatcher; const fetchImpl = require_fetch().fetch; - module.exports.fetch = async function fetch$2(init, options = void 0) { + module.exports.fetch = async function fetch$1(init, options = void 0) { try { return await fetchImpl(init, options); } catch (err) { @@ -36497,904 +19420,6 @@ async function fetchWithRetries(url, maxRetries = 5) { } } -//#endregion -//#region node_modules/.deno/semver@6.3.1/node_modules/semver/semver.js -var require_semver = __commonJS({ "node_modules/.deno/semver@6.3.1/node_modules/semver/semver.js"(exports, module) { - exports = module.exports = SemVer; - var debug; - /* istanbul ignore next */ - if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) debug = function() { - var args = Array.prototype.slice.call(arguments, 0); - args.unshift("SEMVER"); - console.log.apply(console, args); - }; - else debug = function() {}; - exports.SEMVER_SPEC_VERSION = "2.0.0"; - var MAX_LENGTH = 256; - var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; - var MAX_SAFE_COMPONENT_LENGTH = 16; - var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; - var re = exports.re = []; - var safeRe = exports.safeRe = []; - var src = exports.src = []; - var t = exports.tokens = {}; - var R = 0; - function tok(n) { - t[n] = R++; - } - var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; - var safeRegexReplacements = [ - ["\\s", 1], - ["\\d", MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] - ]; - function makeSafeRe(value) { - for (var i$1 = 0; i$1 < safeRegexReplacements.length; i$1++) { - var token = safeRegexReplacements[i$1][0]; - var max = safeRegexReplacements[i$1][1]; - value = value.split(token + "*").join(token + "{0," + max + "}").split(token + "+").join(token + "{1," + max + "}"); - } - return value; - } - tok("NUMERICIDENTIFIER"); - src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; - tok("NUMERICIDENTIFIERLOOSE"); - src[t.NUMERICIDENTIFIERLOOSE] = "\\d+"; - tok("NONNUMERICIDENTIFIER"); - src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-]" + LETTERDASHNUMBER + "*"; - tok("MAINVERSION"); - src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; - tok("MAINVERSIONLOOSE"); - src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; - tok("PRERELEASEIDENTIFIER"); - src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; - tok("PRERELEASEIDENTIFIERLOOSE"); - src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; - tok("PRERELEASE"); - src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; - tok("PRERELEASELOOSE"); - src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; - tok("BUILDIDENTIFIER"); - src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + "+"; - tok("BUILD"); - src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; - tok("FULL"); - tok("FULLPLAIN"); - src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; - src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; - tok("LOOSEPLAIN"); - src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; - tok("LOOSE"); - src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; - tok("GTLT"); - src[t.GTLT] = "((?:<|>)?=?)"; - tok("XRANGEIDENTIFIERLOOSE"); - src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; - tok("XRANGEIDENTIFIER"); - src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; - tok("XRANGEPLAIN"); - src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; - tok("XRANGEPLAINLOOSE"); - src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; - tok("XRANGE"); - src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; - tok("XRANGELOOSE"); - src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; - tok("COERCE"); - src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; - tok("COERCERTL"); - re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); - safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), "g"); - tok("LONETILDE"); - src[t.LONETILDE] = "(?:~>?)"; - tok("TILDETRIM"); - src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; - re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); - safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), "g"); - var tildeTrimReplace = "$1~"; - tok("TILDE"); - src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; - tok("TILDELOOSE"); - src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; - tok("LONECARET"); - src[t.LONECARET] = "(?:\\^)"; - tok("CARETTRIM"); - src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; - re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); - safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), "g"); - var caretTrimReplace = "$1^"; - tok("CARET"); - src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; - tok("CARETLOOSE"); - src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; - tok("COMPARATORLOOSE"); - src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; - tok("COMPARATOR"); - src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; - tok("COMPARATORTRIM"); - src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; - re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); - safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), "g"); - var comparatorTrimReplace = "$1$2$3"; - tok("HYPHENRANGE"); - src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; - tok("HYPHENRANGELOOSE"); - src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; - tok("STAR"); - src[t.STAR] = "(<|>)?=?\\s*\\*"; - for (var i = 0; i < R; i++) { - debug(i, src[i]); - if (!re[i]) { - re[i] = new RegExp(src[i]); - safeRe[i] = new RegExp(makeSafeRe(src[i])); - } - } - exports.parse = parse; - function parse(version, options) { - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - if (version instanceof SemVer) return version; - if (typeof version !== "string") return null; - if (version.length > MAX_LENGTH) return null; - var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; - if (!r.test(version)) return null; - try { - return new SemVer(version, options); - } catch (er) { - return null; - } - } - exports.valid = valid; - function valid(version, options) { - var v = parse(version, options); - return v ? v.version : null; - } - exports.clean = clean; - function clean(version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ""), options); - return s ? s.version : null; - } - exports.SemVer = SemVer; - function SemVer(version, options) { - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - if (version instanceof SemVer) if (version.loose === options.loose) return version; - else version = version.version; - else if (typeof version !== "string") throw new TypeError("Invalid Version: " + version); - if (version.length > MAX_LENGTH) throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); - if (!(this instanceof SemVer)) return new SemVer(version, options); - debug("SemVer", version, options); - this.options = options; - this.loose = !!options.loose; - var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); - if (!m) throw new TypeError("Invalid Version: " + version); - this.raw = version; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version"); - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version"); - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version"); - if (!m[4]) this.prerelease = []; - else this.prerelease = m[4].split(".").map(function(id) { - if (/^[0-9]+$/.test(id)) { - var num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) return num; - } - return id; - }); - this.build = m[5] ? m[5].split(".") : []; - this.format(); - } - SemVer.prototype.format = function() { - this.version = this.major + "." + this.minor + "." + this.patch; - if (this.prerelease.length) this.version += "-" + this.prerelease.join("."); - return this.version; - }; - SemVer.prototype.toString = function() { - return this.version; - }; - SemVer.prototype.compare = function(other) { - debug("SemVer.compare", this.version, this.options, other); - if (!(other instanceof SemVer)) other = new SemVer(other, this.options); - return this.compareMain(other) || this.comparePre(other); - }; - SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) other = new SemVer(other, this.options); - return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); - }; - SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) other = new SemVer(other, this.options); - if (this.prerelease.length && !other.prerelease.length) return -1; - else if (!this.prerelease.length && other.prerelease.length) return 1; - else if (!this.prerelease.length && !other.prerelease.length) return 0; - var i$1 = 0; - do { - var a = this.prerelease[i$1]; - var b = other.prerelease[i$1]; - debug("prerelease compare", i$1, a, b); - if (a === void 0 && b === void 0) return 0; - else if (b === void 0) return 1; - else if (a === void 0) return -1; - else if (a === b) continue; - else return compareIdentifiers(a, b); - } while (++i$1); - }; - SemVer.prototype.compareBuild = function(other) { - if (!(other instanceof SemVer)) other = new SemVer(other, this.options); - var i$1 = 0; - do { - var a = this.build[i$1]; - var b = other.build[i$1]; - debug("prerelease compare", i$1, a, b); - if (a === void 0 && b === void 0) return 0; - else if (b === void 0) return 1; - else if (a === void 0) return -1; - else if (a === b) continue; - else return compareIdentifiers(a, b); - } while (++i$1); - }; - SemVer.prototype.inc = function(release, identifier) { - switch (release) { - case "premajor": - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc("pre", identifier); - break; - case "preminor": - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc("pre", identifier); - break; - case "prepatch": - this.prerelease.length = 0; - this.inc("patch", identifier); - this.inc("pre", identifier); - break; - case "prerelease": - if (this.prerelease.length === 0) this.inc("patch", identifier); - this.inc("pre", identifier); - break; - case "major": - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case "minor": - if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; - this.patch = 0; - this.prerelease = []; - break; - case "patch": - if (this.prerelease.length === 0) this.patch++; - this.prerelease = []; - break; - case "pre": - if (this.prerelease.length === 0) this.prerelease = [0]; - else { - var i$1 = this.prerelease.length; - while (--i$1 >= 0) if (typeof this.prerelease[i$1] === "number") { - this.prerelease[i$1]++; - i$1 = -2; - } - if (i$1 === -1) this.prerelease.push(0); - } - if (identifier) if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; - } else this.prerelease = [identifier, 0]; - break; - default: throw new Error("invalid increment argument: " + release); - } - this.format(); - this.raw = this.version; - return this; - }; - exports.inc = inc; - function inc(version, release, loose, identifier) { - if (typeof loose === "string") { - identifier = loose; - loose = void 0; - } - try { - return new SemVer(version, loose).inc(release, identifier).version; - } catch (er) { - return null; - } - } - exports.diff = diff; - function diff(version1, version2) { - if (eq(version1, version2)) return null; - else { - var v1 = parse(version1); - var v2 = parse(version2); - var prefix = ""; - if (v1.prerelease.length || v2.prerelease.length) { - prefix = "pre"; - var defaultResult = "prerelease"; - } - for (var key in v1) if (key === "major" || key === "minor" || key === "patch") { - if (v1[key] !== v2[key]) return prefix + key; - } - return defaultResult; - } - } - exports.compareIdentifiers = compareIdentifiers; - var numeric = /^[0-9]+$/; - function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - if (anum && bnum) { - a = +a; - b = +b; - } - return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; - } - exports.rcompareIdentifiers = rcompareIdentifiers; - function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); - } - exports.major = major; - function major(a, loose) { - return new SemVer(a, loose).major; - } - exports.minor = minor; - function minor(a, loose) { - return new SemVer(a, loose).minor; - } - exports.patch = patch; - function patch(a, loose) { - return new SemVer(a, loose).patch; - } - exports.compare = compare; - function compare(a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)); - } - exports.compareLoose = compareLoose; - function compareLoose(a, b) { - return compare(a, b, true); - } - exports.compareBuild = compareBuild; - function compareBuild(a, b, loose) { - var versionA = new SemVer(a, loose); - var versionB = new SemVer(b, loose); - return versionA.compare(versionB) || versionA.compareBuild(versionB); - } - exports.rcompare = rcompare; - function rcompare(a, b, loose) { - return compare(b, a, loose); - } - exports.sort = sort; - function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compareBuild(a, b, loose); - }); - } - exports.rsort = rsort; - function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.compareBuild(b, a, loose); - }); - } - exports.gt = gt; - function gt(a, b, loose) { - return compare(a, b, loose) > 0; - } - exports.lt = lt; - function lt(a, b, loose) { - return compare(a, b, loose) < 0; - } - exports.eq = eq; - function eq(a, b, loose) { - return compare(a, b, loose) === 0; - } - exports.neq = neq; - function neq(a, b, loose) { - return compare(a, b, loose) !== 0; - } - exports.gte = gte; - function gte(a, b, loose) { - return compare(a, b, loose) >= 0; - } - exports.lte = lte; - function lte(a, b, loose) { - return compare(a, b, loose) <= 0; - } - exports.cmp = cmp; - function cmp(a, op, b, loose) { - switch (op) { - case "===": - if (typeof a === "object") a = a.version; - if (typeof b === "object") b = b.version; - return a === b; - case "!==": - if (typeof a === "object") a = a.version; - if (typeof b === "object") b = b.version; - return a !== b; - case "": - case "=": - case "==": return eq(a, b, loose); - case "!=": return neq(a, b, loose); - case ">": return gt(a, b, loose); - case ">=": return gte(a, b, loose); - case "<": return lt(a, b, loose); - case "<=": return lte(a, b, loose); - default: throw new TypeError("Invalid operator: " + op); - } - } - exports.Comparator = Comparator; - function Comparator(comp, options) { - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp; - else comp = comp.value; - if (!(this instanceof Comparator)) return new Comparator(comp, options); - comp = comp.trim().split(/\s+/).join(" "); - debug("comparator", comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); - if (this.semver === ANY) this.value = ""; - else this.value = this.operator + this.semver.version; - debug("comp", this); - } - var ANY = {}; - Comparator.prototype.parse = function(comp) { - var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; - var m = comp.match(r); - if (!m) throw new TypeError("Invalid comparator: " + comp); - this.operator = m[1] !== void 0 ? m[1] : ""; - if (this.operator === "=") this.operator = ""; - if (!m[2]) this.semver = ANY; - else this.semver = new SemVer(m[2], this.options.loose); - }; - Comparator.prototype.toString = function() { - return this.value; - }; - Comparator.prototype.test = function(version) { - debug("Comparator.test", version, this.options.loose); - if (this.semver === ANY || version === ANY) return true; - if (typeof version === "string") try { - version = new SemVer(version, this.options); - } catch (er) { - return false; - } - return cmp(version, this.operator, this.semver, this.options); - }; - Comparator.prototype.intersects = function(comp, options) { - if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required"); - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - var rangeTmp; - if (this.operator === "") { - if (this.value === "") return true; - rangeTmp = new Range(comp.value, options); - return satisfies(this.value, rangeTmp, options); - } else if (comp.operator === "") { - if (comp.value === "") return true; - rangeTmp = new Range(this.value, options); - return satisfies(comp.semver, rangeTmp, options); - } - var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); - var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); - var sameSemVer = this.semver.version === comp.semver.version; - var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); - var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"); - var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"); - return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; - }; - exports.Range = Range; - function Range(range, options) { - if (!options || typeof options !== "object") options = { - loose: !!options, - includePrerelease: false - }; - if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; - else return new Range(range.raw, options); - if (range instanceof Comparator) return new Range(range.value, options); - if (!(this instanceof Range)) return new Range(range, options); - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - this.raw = range.trim().split(/\s+/).join(" "); - this.set = this.raw.split("||").map(function(range$1) { - return this.parseRange(range$1.trim()); - }, this).filter(function(c) { - return c.length; - }); - if (!this.set.length) throw new TypeError("Invalid SemVer Range: " + this.raw); - this.format(); - } - Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(" ").trim(); - }).join("||").trim(); - return this.range; - }; - Range.prototype.toString = function() { - return this.range; - }; - Range.prototype.parseRange = function(range) { - var loose = this.options.loose; - var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug("hyphen replace", range); - range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); - debug("comparator trim", range, safeRe[t.COMPARATORTRIM]); - range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace); - range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace); - range = range.split(/\s+/).join(" "); - var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; - var set = range.split(" ").map(function(comp) { - return parseComparator(comp, this.options); - }, this).join(" ").split(/\s+/); - if (this.options.loose) set = set.filter(function(comp) { - return !!comp.match(compRe); - }); - set = set.map(function(comp) { - return new Comparator(comp, this.options); - }, this); - return set; - }; - Range.prototype.intersects = function(range, options) { - if (!(range instanceof Range)) throw new TypeError("a Range is required"); - return this.set.some(function(thisComparators) { - return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { - return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { - return rangeComparators.every(function(rangeComparator) { - return thisComparator.intersects(rangeComparator, options); - }); - }); - }); - }); - }; - function isSatisfiable(comparators, options) { - var result = true; - var remainingComparators = comparators.slice(); - var testComparator = remainingComparators.pop(); - while (result && remainingComparators.length) { - result = remainingComparators.every(function(otherComparator) { - return testComparator.intersects(otherComparator, options); - }); - testComparator = remainingComparators.pop(); - } - return result; - } - exports.toComparators = toComparators; - function toComparators(range, options) { - return new Range(range, options).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(" ").trim().split(" "); - }); - } - function parseComparator(comp, options) { - debug("comp", comp, options); - comp = replaceCarets(comp, options); - debug("caret", comp); - comp = replaceTildes(comp, options); - debug("tildes", comp); - comp = replaceXRanges(comp, options); - debug("xrange", comp); - comp = replaceStars(comp, options); - debug("stars", comp); - return comp; - } - function isX(id) { - return !id || id.toLowerCase() === "x" || id === "*"; - } - function replaceTildes(comp, options) { - return comp.trim().split(/\s+/).map(function(comp$1) { - return replaceTilde(comp$1, options); - }).join(" "); - } - function replaceTilde(comp, options) { - var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - debug("tilde", comp, _, M, m, p, pr); - var ret; - if (isX(M)) ret = ""; - else if (isX(m)) ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; - else if (isX(p)) ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; - else if (pr) { - debug("replaceTilde pr", pr); - ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; - } else ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; - debug("tilde return", ret); - return ret; - }); - } - function replaceCarets(comp, options) { - return comp.trim().split(/\s+/).map(function(comp$1) { - return replaceCaret(comp$1, options); - }).join(" "); - } - function replaceCaret(comp, options) { - debug("caret", comp, options); - var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - debug("caret", comp, _, M, m, p, pr); - var ret; - if (isX(M)) ret = ""; - else if (isX(m)) ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; - else if (isX(p)) if (M === "0") ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; - else ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; - else if (pr) { - debug("replaceCaret pr", pr); - if (M === "0") if (m === "0") ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); - else ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; - else ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; - } else { - debug("no pr"); - if (M === "0") if (m === "0") ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); - else ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; - else ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; - } - debug("caret return", ret); - return ret; - }); - } - function replaceXRanges(comp, options) { - debug("replaceXRanges", comp, options); - return comp.split(/\s+/).map(function(comp$1) { - return replaceXRange(comp$1, options); - }).join(" "); - } - function replaceXRange(comp, options) { - comp = comp.trim(); - var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug("xRange", comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - if (gtlt === "=" && anyX) gtlt = ""; - pr = options.includePrerelease ? "-0" : ""; - if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0"; - else ret = "*"; - else if (gtlt && anyX) { - if (xm) m = 0; - p = 0; - if (gtlt === ">") { - gtlt = ">="; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else { - m = +m + 1; - p = 0; - } - } else if (gtlt === "<=") { - gtlt = "<"; - if (xm) M = +M + 1; - else m = +m + 1; - } - ret = gtlt + M + "." + m + "." + p + pr; - } else if (xm) ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; - else if (xp) ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; - debug("xRange return", ret); - return ret; - }); - } - function replaceStars(comp, options) { - debug("replaceStars", comp, options); - return comp.trim().replace(safeRe[t.STAR], ""); - } - function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { - if (isX(fM)) from = ""; - else if (isX(fm)) from = ">=" + fM + ".0.0"; - else if (isX(fp)) from = ">=" + fM + "." + fm + ".0"; - else from = ">=" + from; - if (isX(tM)) to = ""; - else if (isX(tm)) to = "<" + (+tM + 1) + ".0.0"; - else if (isX(tp)) to = "<" + tM + "." + (+tm + 1) + ".0"; - else if (tpr) to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; - else to = "<=" + to; - return (from + " " + to).trim(); - } - Range.prototype.test = function(version) { - if (!version) return false; - if (typeof version === "string") try { - version = new SemVer(version, this.options); - } catch (er) { - return false; - } - for (var i$1 = 0; i$1 < this.set.length; i$1++) if (testSet(this.set[i$1], version, this.options)) return true; - return false; - }; - function testSet(set, version, options) { - for (var i$1 = 0; i$1 < set.length; i$1++) if (!set[i$1].test(version)) return false; - if (version.prerelease.length && !options.includePrerelease) { - for (i$1 = 0; i$1 < set.length; i$1++) { - debug(set[i$1].semver); - if (set[i$1].semver === ANY) continue; - if (set[i$1].semver.prerelease.length > 0) { - var allowed = set[i$1].semver; - if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; - } - } - return false; - } - return true; - } - exports.satisfies = satisfies; - function satisfies(version, range, options) { - try { - range = new Range(range, options); - } catch (er) { - return false; - } - return range.test(version); - } - exports.maxSatisfying = maxSatisfying; - function maxSatisfying(versions, range, options) { - var max = null; - var maxSV = null; - try { - var rangeObj = new Range(range, options); - } catch (er) { - return null; - } - versions.forEach(function(v) { - if (rangeObj.test(v)) { - if (!max || maxSV.compare(v) === -1) { - max = v; - maxSV = new SemVer(max, options); - } - } - }); - return max; - } - exports.minSatisfying = minSatisfying; - function minSatisfying(versions, range, options) { - var min = null; - var minSV = null; - try { - var rangeObj = new Range(range, options); - } catch (er) { - return null; - } - versions.forEach(function(v) { - if (rangeObj.test(v)) { - if (!min || minSV.compare(v) === 1) { - min = v; - minSV = new SemVer(min, options); - } - } - }); - return min; - } - exports.minVersion = minVersion; - function minVersion(range, loose) { - range = new Range(range, loose); - var minver = new SemVer("0.0.0"); - if (range.test(minver)) return minver; - minver = new SemVer("0.0.0-0"); - if (range.test(minver)) return minver; - minver = null; - for (var i$1 = 0; i$1 < range.set.length; ++i$1) { - var comparators = range.set[i$1]; - comparators.forEach(function(comparator) { - var compver = new SemVer(comparator.semver.version); - switch (comparator.operator) { - case ">": - if (compver.prerelease.length === 0) compver.patch++; - else compver.prerelease.push(0); - compver.raw = compver.format(); - case "": - case ">=": - if (!minver || gt(minver, compver)) minver = compver; - break; - case "<": - case "<=": break; - default: throw new Error("Unexpected operation: " + comparator.operator); - } - }); - } - if (minver && range.test(minver)) return minver; - return null; - } - exports.validRange = validRange; - function validRange(range, options) { - try { - return new Range(range, options).range || "*"; - } catch (er) { - return null; - } - } - exports.ltr = ltr; - function ltr(version, range, options) { - return outside(version, range, "<", options); - } - exports.gtr = gtr; - function gtr(version, range, options) { - return outside(version, range, ">", options); - } - exports.outside = outside; - function outside(version, range, hilo, options) { - version = new SemVer(version, options); - range = new Range(range, options); - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case ">": - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = ">"; - ecomp = ">="; - break; - case "<": - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = "<"; - ecomp = "<="; - break; - default: throw new TypeError("Must provide a hilo val of \"<\" or \">\""); - } - if (satisfies(version, range, options)) return false; - for (var i$1 = 0; i$1 < range.set.length; ++i$1) { - var comparators = range.set[i$1]; - var high = null; - var low = null; - comparators.forEach(function(comparator) { - if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0"); - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, options)) high = comparator; - else if (ltfn(comparator.semver, low.semver, options)) low = comparator; - }); - if (high.operator === comp || high.operator === ecomp) return false; - if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false; - else if (low.operator === ecomp && ltfn(version, low.semver)) return false; - } - return true; - } - exports.prerelease = prerelease; - function prerelease(version, options) { - var parsed = parse(version, options); - return parsed && parsed.prerelease.length ? parsed.prerelease : null; - } - exports.intersects = intersects; - function intersects(r1, r2, options) { - r1 = new Range(r1, options); - r2 = new Range(r2, options); - return r1.intersects(r2); - } - exports.coerce = coerce; - function coerce(version, options) { - if (version instanceof SemVer) return version; - if (typeof version === "number") version = String(version); - if (typeof version !== "string") return null; - options = options || {}; - var match = null; - if (!options.rtl) match = version.match(safeRe[t.COERCE]); - else { - var next; - while ((next = safeRe[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) match = next; - safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; - } - safeRe[t.COERCERTL].lastIndex = -1; - } - if (match === null) return null; - return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); - } -} }); - //#endregion //#region node_modules/.deno/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/.deno/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/manifest.js"(exports, module) { @@ -37755,24 +19780,24 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. function downloadToolAttempt(url, dest, auth, headers) { return __awaiter(this, void 0, void 0, function* () { if (fs$1.existsSync(dest)) throw new Error(`Destination file path ${dest} already exists`); - const http$4 = new httpm.HttpClient(userAgent, [], { allowRetries: false }); + const http$1 = new httpm.HttpClient(userAgent, [], { allowRetries: false }); if (auth) { core.debug("set auth"); if (headers === void 0) headers = {}; headers.authorization = auth; } - const response = yield http$4.get(url, headers); + const response = yield http$1.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } - const pipeline$7 = util.promisify(stream.pipeline); + const pipeline$4 = util.promisify(stream.pipeline); const responseMessageFactory = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message); const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline$7(readStream, fs$1.createWriteStream(dest)); + yield pipeline$4(readStream, fs$1.createWriteStream(dest)); core.debug("download complete"); succeeded = true; return dest; @@ -38084,9 +20109,9 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. const toolPath = path$2.join(_getCacheDirectory(), toolName); if (fs$1.existsSync(toolPath)) { const children = fs$1.readdirSync(toolPath); - for (const child$1 of children) if (isExplicitVersion(child$1)) { - const fullPath = path$2.join(toolPath, child$1, arch || ""); - if (fs$1.existsSync(fullPath) && fs$1.existsSync(`${fullPath}.complete`)) versions.push(child$1); + for (const child of children) if (isExplicitVersion(child)) { + const fullPath = path$2.join(toolPath, child, arch || ""); + if (fs$1.existsSync(fullPath) && fs$1.existsSync(`${fullPath}.complete`)) versions.push(child); } } return versions; @@ -38096,13 +20121,13 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. return __awaiter(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; - const http$4 = new httpm.HttpClient("tool-cache"); + const http$1 = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { core.debug("set auth"); headers.authorization = auth; } - const response = yield http$4.getJson(treeUrl, headers); + const response = yield http$1.getJson(treeUrl, headers); if (!response.result) return releases; let manifestUrl = ""; for (const item of response.result.tree) if (item.path === "versions-manifest.json") { @@ -38110,12 +20135,12 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. break; } headers["accept"] = "application/vnd.github.VERSION.raw"; - let versionsRaw = yield (yield http$4.get(manifestUrl, headers)).readBody(); + let versionsRaw = yield (yield http$1.get(manifestUrl, headers)).readBody(); if (versionsRaw) { versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); try { releases = JSON.parse(versionsRaw); - } catch (_a$1) { + } catch (_a) { core.debug("Invalid json"); } } @@ -38162,9 +20187,9 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. function isExplicitVersion(versionSpec) { const c = semver.clean(versionSpec) || ""; core.debug(`isExplicit: ${c}`); - const valid$3 = semver.valid(c) != null; - core.debug(`explicit? ${valid$3}`); - return valid$3; + const valid$2 = semver.valid(c) != null; + core.debug(`explicit? ${valid$2}`); + return valid$2; } exports.isExplicitVersion = isExplicitVersion; /** @@ -38180,8 +20205,8 @@ var require_tool_cache = __commonJS({ "node_modules/.deno/@actions+tool-cache@2. if (semver.gt(a, b)) return 1; return -1; }); - for (let i$1 = versions.length - 1; i$1 >= 0; i$1--) { - const potential = versions[i$1]; + for (let i = versions.length - 1; i >= 0; i--) { + const potential = versions[i]; const satisfied = semver.satisfies(potential, versionSpec); if (satisfied) { version = potential; @@ -38306,6 +20331,10 @@ async function main() { import_core.setOutput("deno-version", version.version); import_core.setOutput("release-channel", version.kind); import_core.info("Installation complete."); + if (import_core.getInput("cache") === "true") { + const { restoreCache } = await import("./cache-ByPW8-iO.mjs"); + await restoreCache(import_core.getInput("cache-hash")); + } } catch (err) { import_core.setFailed(err instanceof Error ? err : String(err)); process$1.exit(); diff --git a/dist/post.mjs b/dist/post.mjs new file mode 100644 index 0000000..ace44bf --- /dev/null +++ b/dist/post.mjs @@ -0,0 +1,16 @@ +import { import_core } from "./semver-DmxAwBYV.mjs"; +import { saveCache } from "./cache-DzONlZ-I.mjs"; +import process from "node:process"; + +//#region src/post.ts +async function main() { + try { + await saveCache(); + } catch (err) { + import_core.setFailed(err instanceof Error ? err : String(err)); + process.exit(); + } +} +main(); + +//#endregion \ No newline at end of file diff --git a/dist/semver-DmxAwBYV.mjs b/dist/semver-DmxAwBYV.mjs new file mode 100644 index 0000000..a526ca3 --- /dev/null +++ b/dist/semver-DmxAwBYV.mjs @@ -0,0 +1,17978 @@ +import { createRequire } from "module"; + +//#region rolldown:runtime +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$1 = 0, n = keys.length, key; i$1 < n; i$1++) { + key = keys[i$1]; + if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable + }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { + value: mod, + enumerable: true +}) : target, mod)); +var __require = /* @__PURE__ */ createRequire(import.meta.url); + +//#endregion +//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js +var require_utils$1 = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toCommandProperties = exports.toCommandValue = void 0; + /** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ + function toCommandValue(input) { + if (input === null || input === void 0) return ""; + else if (typeof input === "string" || input instanceof String) return input; + return JSON.stringify(input); + } + exports.toCommandValue = toCommandValue; + /** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) return {}; + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports.toCommandProperties = toCommandProperties; +} }); + +//#endregion +//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js +var require_command = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js"(exports) { + var __createBinding$9 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault$9 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$9 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$9(result, mod, k); + } + __setModuleDefault$9(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.issue = exports.issueCommand = void 0; + const os$3 = __importStar$9(__require("os")); + const utils_1$3 = require_utils$1(); + /** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os$3.EOL); + } + exports.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports.issue = issue; + const CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) command = "missing.command"; + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) first = false; + else cmdStr += ","; + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1$3.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1$3.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } +} }); + +//#endregion +//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js +var require_file_command = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js"(exports) { + var __createBinding$8 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault$8 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$8 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$8(result, mod, k); + } + __setModuleDefault$8(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; + const crypto$3 = __importStar$8(__require("crypto")); + const fs$1 = __importStar$8(__require("fs")); + const os$2 = __importStar$8(__require("os")); + const utils_1$2 = require_utils$1(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) throw new Error(`Unable to find environment variable for file command ${command}`); + if (!fs$1.existsSync(filePath)) throw new Error(`Missing file at path: ${filePath}`); + fs$1.appendFileSync(filePath, `${(0, utils_1$2.toCommandValue)(message)}${os$2.EOL}`, { encoding: "utf8" }); + } + exports.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto$3.randomUUID()}`; + const convertedValue = (0, utils_1$2.toCommandValue)(value); + if (key.includes(delimiter)) throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + if (convertedValue.includes(delimiter)) throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + return `${key}<<${delimiter}${os$2.EOL}${convertedValue}${os$2.EOL}${delimiter}`; + } + exports.prepareKeyValueMessage = prepareKeyValueMessage; +} }); + +//#endregion +//#region node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js +var require_proxy = __commonJS({ "node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkBypass = exports.getProxyUrl = void 0; + function getProxyUrl$1(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) return void 0; + const proxyVar = (() => { + if (usingSsl) return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + else return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + })(); + if (proxyVar) try { + return new DecodedURL(proxyVar); + } catch (_a$1) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); + } + else return void 0; + } + exports.getProxyUrl = getProxyUrl$1; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) return false; + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) return true; + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) return false; + let reqPort; + if (reqUrl.port) reqPort = Number(reqUrl.port); + else if (reqUrl.protocol === "http:") reqPort = 80; + else if (reqUrl.protocol === "https:") reqPort = 443; + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) return true; + return false; + } + exports.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); + } + var DecodedURL = class extends URL { + constructor(url, base) { + super(url, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; +} }); + +//#endregion +//#region node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js +var require_tunnel$1 = __commonJS({ "node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js"(exports) { + var net$3 = __require("net"); + var tls$1 = __require("tls"); + var http$2 = __require("http"); + var https$1 = __require("https"); + var events$1 = __require("events"); + var assert$20 = __require("assert"); + var util$17 = __require("util"); + exports.httpOverHttp = httpOverHttp; + exports.httpsOverHttp = httpsOverHttp; + exports.httpOverHttps = httpOverHttps; + exports.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http$2.request; + return agent; + } + function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http$2.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https$1.request; + return agent; + } + function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https$1.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http$2.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on("free", function onFree(socket, host, port, localAddress) { + var options$1 = toOptions(host, port, localAddress); + for (var i$1 = 0, len = self.requests.length; i$1 < len; ++i$1) { + var pending = self.requests[i$1]; + if (pending.host === options$1.host && pending.port === options$1.port) { + self.requests.splice(i$1, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); + } + util$17.inherits(TunnelingAgent, events$1.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + self.requests.push(options); + return; + } + self.createSocket(options, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self.emit("free", socket, options); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false, + headers: { host: options.host + ":" + options.port } + }); + if (options.localAddress) connectOptions.localAddress = options.localAddress; + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + } + debug$2("making CONNECT request"); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError$1); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug$2("tunneling socket could not be established, statusCode=%d", res.statusCode); + socket.destroy(); + var error$1 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error$1.code = "ECONNRESET"; + options.request.emit("error", error$1); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug$2("got illegal response body from proxy"); + socket.destroy(); + var error$1 = new Error("got illegal response body from proxy"); + error$1.code = "ECONNRESET"; + options.request.emit("error", error$1); + self.removeSocket(placeholder); + return; + } + debug$2("tunneling connection has established"); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError$1(cause) { + connectReq.removeAllListeners(); + debug$2("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); + var error$1 = new Error("tunneling socket could not be established, cause=" + cause.message); + error$1.code = "ECONNRESET"; + options.request.emit("error", error$1); + self.removeSocket(placeholder); + } + }; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) return; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) this.createSocket(pending, function(socket$1) { + pending.request.onSocket(socket$1); + }); + }; + function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader("host"); + var tlsOptions = mergeOptions({}, self.options, { + socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host + }); + var secureSocket = tls$1.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); + } + function toOptions(host, port, localAddress) { + if (typeof host === "string") return { + host, + port, + localAddress + }; + return host; + } + function mergeOptions(target) { + for (var i$1 = 1, len = arguments.length; i$1 < len; ++i$1) { + var overrides = arguments[i$1]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) target[k] = overrides[k]; + } + } + } + return target; + } + var debug$2; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug$2 = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; + else args.unshift("TUNNEL:"); + console.error.apply(console, args); + }; + else debug$2 = function() {}; + exports.debug = debug$2; +} }); + +//#endregion +//#region node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/index.js +var require_tunnel = __commonJS({ "node_modules/.deno/tunnel@0.0.6/node_modules/tunnel/index.js"(exports, module) { + module.exports = require_tunnel$1(); +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/symbols.js +var require_symbols$4 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/symbols.js"(exports, module) { + module.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kHeadersList: Symbol("headers list"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kHTTP2BuildRequest: Symbol("http2 build request"), + kHTTP1BuildRequest: Symbol("http1 build request"), + kHTTP2CopyHeaders: Symbol("http2 copy headers"), + kHTTPConnVersion: Symbol("http connection version"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable") + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/errors.js +var require_errors = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/errors.js"(exports, module) { + var UndiciError$2 = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + }; + var ConnectTimeoutError$1 = class ConnectTimeoutError$1 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, ConnectTimeoutError$1); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; + } + }; + var HeadersTimeoutError$1 = class HeadersTimeoutError$1 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, HeadersTimeoutError$1); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + }; + var HeadersOverflowError$1 = class HeadersOverflowError$1 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, HeadersOverflowError$1); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + }; + var BodyTimeoutError$1 = class BodyTimeoutError$1 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, BodyTimeoutError$1); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + }; + var ResponseStatusCodeError$1 = class ResponseStatusCodeError$1 extends UndiciError$2 { + constructor(message, statusCode, headers, body) { + super(message); + Error.captureStackTrace(this, ResponseStatusCodeError$1); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + }; + var InvalidArgumentError$22 = class InvalidArgumentError$22 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, InvalidArgumentError$22); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + }; + var InvalidReturnValueError$2 = class InvalidReturnValueError$2 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, InvalidReturnValueError$2); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + }; + var RequestAbortedError$9 = class RequestAbortedError$9 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, RequestAbortedError$9); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + }; + var InformationalError$1 = class InformationalError$1 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, InformationalError$1); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + }; + var RequestContentLengthMismatchError$1 = class RequestContentLengthMismatchError$1 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, RequestContentLengthMismatchError$1); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + }; + var ResponseContentLengthMismatchError$1 = class ResponseContentLengthMismatchError$1 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, ResponseContentLengthMismatchError$1); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + }; + var ClientDestroyedError$2 = class ClientDestroyedError$2 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, ClientDestroyedError$2); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + }; + var ClientClosedError$1 = class ClientClosedError$1 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, ClientClosedError$1); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + }; + var SocketError$3 = class SocketError$3 extends UndiciError$2 { + constructor(message, socket) { + super(message); + Error.captureStackTrace(this, SocketError$3); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + }; + var NotSupportedError$2 = class NotSupportedError$2 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, NotSupportedError$2); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + }; + var BalancedPoolMissingUpstreamError$1 = class extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, NotSupportedError$2); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + }; + var HTTPParserError$1 = class HTTPParserError$1 extends Error { + constructor(message, code, data) { + super(message); + Error.captureStackTrace(this, HTTPParserError$1); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; + } + }; + var ResponseExceededMaxSizeError$1 = class ResponseExceededMaxSizeError$1 extends UndiciError$2 { + constructor(message) { + super(message); + Error.captureStackTrace(this, ResponseExceededMaxSizeError$1); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + }; + var RequestRetryError$1 = class RequestRetryError$1 extends UndiciError$2 { + constructor(message, code, { headers, data }) { + super(message); + Error.captureStackTrace(this, RequestRetryError$1); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + }; + module.exports = { + HTTPParserError: HTTPParserError$1, + UndiciError: UndiciError$2, + HeadersTimeoutError: HeadersTimeoutError$1, + HeadersOverflowError: HeadersOverflowError$1, + BodyTimeoutError: BodyTimeoutError$1, + RequestContentLengthMismatchError: RequestContentLengthMismatchError$1, + ConnectTimeoutError: ConnectTimeoutError$1, + ResponseStatusCodeError: ResponseStatusCodeError$1, + InvalidArgumentError: InvalidArgumentError$22, + InvalidReturnValueError: InvalidReturnValueError$2, + RequestAbortedError: RequestAbortedError$9, + ClientDestroyedError: ClientDestroyedError$2, + ClientClosedError: ClientClosedError$1, + InformationalError: InformationalError$1, + SocketError: SocketError$3, + NotSupportedError: NotSupportedError$2, + ResponseContentLengthMismatchError: ResponseContentLengthMismatchError$1, + BalancedPoolMissingUpstreamError: BalancedPoolMissingUpstreamError$1, + ResponseExceededMaxSizeError: ResponseExceededMaxSizeError$1, + RequestRetryError: RequestRetryError$1 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/constants.js +var require_constants$4 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/constants.js"(exports, module) { + /** @type {Record} */ + const headerNameLowerCasedRecord$1 = {}; + const wellknownHeaderNames = [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ]; + for (let i$1 = 0; i$1 < wellknownHeaderNames.length; ++i$1) { + const key = wellknownHeaderNames[i$1]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord$1[key] = headerNameLowerCasedRecord$1[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord$1, null); + module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord: headerNameLowerCasedRecord$1 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/util.js +var require_util$6 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/util.js"(exports, module) { + const assert$19 = __require("assert"); + const { kDestroyed: kDestroyed$1, kBodyUsed: kBodyUsed$2 } = require_symbols$4(); + const { IncomingMessage } = __require("http"); + const stream$1 = __require("stream"); + const net$2 = __require("net"); + const { InvalidArgumentError: InvalidArgumentError$21 } = require_errors(); + const { Blob: Blob$5 } = __require("buffer"); + const nodeUtil = __require("util"); + const { stringify: stringify$2 } = __require("querystring"); + const { headerNameLowerCasedRecord } = require_constants$4(); + const [nodeMajor$1, nodeMinor$1] = process.versions.node.split(".").map((v) => Number(v)); + function nop$1() {} + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike$7(object) { + return Blob$5 && object instanceof Blob$5 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); + } + function buildURL$2(url, queryParams) { + if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); + const stringified = stringify$2(queryParams); + if (stringified) url += "?" + stringified; + return url; + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!/^https?:/.test(url.origin || url.protocol)) throw new InvalidArgumentError$21("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + if (!url || typeof url !== "object") throw new InvalidArgumentError$21("Invalid URL: The URL argument must be a non-null object."); + if (!/^https?:/.test(url.origin || url.protocol)) throw new InvalidArgumentError$21("Invalid URL protocol: the URL must start with `http:` or `https:`."); + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) throw new InvalidArgumentError$21("Invalid URL: port must be a valid integer or a string representation of an integer."); + if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError$21("Invalid URL path: the path must be a string or null/undefined."); + if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError$21("Invalid URL pathname: the pathname must be a string or null/undefined."); + if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError$21("Invalid URL hostname: the hostname must be a string or null/undefined."); + if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError$21("Invalid URL origin: the origin must be a string or null/undefined."); + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; + let path$5 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin.endsWith("/")) origin = origin.substring(0, origin.length - 1); + if (path$5 && !path$5.startsWith("/")) path$5 = `/${path$5}`; + url = new URL(origin + path$5); + } + return url; + } + function parseOrigin$1(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError$21("invalid url"); + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx$1 = host.indexOf("]"); + assert$19(idx$1 !== -1); + return host.substring(1, idx$1); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) return null; + assert$19.strictEqual(typeof host, "string"); + const servername = getHostname(host); + if (net$2.isIP(servername)) return ""; + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) return 0; + else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike$7(body)) return body.size != null ? body.size : null; + else if (isBuffer(body)) return body.byteLength; + return null; + } + function isDestroyed(stream$2) { + return !stream$2 || !!(stream$2.destroyed || stream$2[kDestroyed$1]); + } + function isReadableAborted(stream$2) { + const state = stream$2 && stream$2._readableState; + return isDestroyed(stream$2) && state && !state.endEmitted; + } + function destroy(stream$2, err) { + if (stream$2 == null || !isStream(stream$2) || isDestroyed(stream$2)) return; + if (typeof stream$2.destroy === "function") { + if (Object.getPrototypeOf(stream$2).constructor === IncomingMessage) stream$2.socket = null; + stream$2.destroy(err); + } else if (err) process.nextTick((stream$3, err$1) => { + stream$3.emit("error", err$1); + }, stream$2, err); + if (stream$2.destroyed !== true) stream$2[kDestroyed$1] = true; + } + const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + /** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ + function headerNameToString(value) { + return headerNameLowerCasedRecord[value] || value.toLowerCase(); + } + function parseHeaders$1(headers, obj = {}) { + if (!Array.isArray(headers)) return headers; + for (let i$1 = 0; i$1 < headers.length; i$1 += 2) { + const key = headers[i$1].toString().toLowerCase(); + let val = obj[key]; + if (!val) if (Array.isArray(headers[i$1 + 1])) obj[key] = headers[i$1 + 1].map((x) => x.toString("utf8")); + else obj[key] = headers[i$1 + 1].toString("utf8"); + else { + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; + } + val.push(headers[i$1 + 1].toString("utf8")); + } + } + if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + return obj; + } + function parseRawHeaders(headers) { + const ret = []; + let hasContentLength = false; + let contentDispositionIdx = -1; + for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0].toString(); + const val = headers[n + 1].toString("utf8"); + if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { + ret.push(key, val); + hasContentLength = true; + } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = ret.push(key, val) - 1; + else ret.push(key, val); + } + if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + return ret; + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler, method, upgrade$1) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError$21("handler must be an object"); + if (typeof handler.onConnect !== "function") throw new InvalidArgumentError$21("invalid onConnect method"); + if (typeof handler.onError !== "function") throw new InvalidArgumentError$21("invalid onError method"); + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError$21("invalid onBodySent method"); + if (upgrade$1 || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError$21("invalid onUpgrade method"); + } else { + if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError$21("invalid onHeaders method"); + if (typeof handler.onData !== "function") throw new InvalidArgumentError$21("invalid onData method"); + if (typeof handler.onComplete !== "function") throw new InvalidArgumentError$21("invalid onComplete method"); + } + } + function isDisturbed$2(body) { + return !!(body && (stream$1.isDisturbed ? stream$1.isDisturbed(body) || body[kBodyUsed$2] : body[kBodyUsed$2] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || isReadableAborted(body))); + } + function isErrored$2(body) { + return !!(body && (stream$1.isErrored ? stream$1.isErrored(body) : /state: 'errored'/.test(nodeUtil.inspect(body)))); + } + function isReadable$1(body) { + return !!(body && (stream$1.isReadable ? stream$1.isReadable(body) : /state: 'readable'/.test(nodeUtil.inspect(body)))); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + async function* convertIterableToBuffer(iterable) { + for await (const chunk of iterable) yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk); + } + let ReadableStream$5; + function ReadableStreamFrom$3(iterable) { + if (!ReadableStream$5) ReadableStream$5 = __require("stream/web").ReadableStream; + if (ReadableStream$5.from) return ReadableStream$5.from(convertIterableToBuffer(iterable)); + let iterator; + return new ReadableStream$5({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + }); + else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + controller.enqueue(new Uint8Array(buf)); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + } + }, 0); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function throwIfAborted$1(signal) { + if (!signal) return; + if (typeof signal.throwIfAborted === "function") signal.throwIfAborted(); + else if (signal.aborted) { + const err = new Error("The operation was aborted"); + err.name = "AbortError"; + throw err; + } + } + function addAbortListener$2(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + const hasToWellFormed = !!String.prototype.toWellFormed; + /** + * @param {string} val + */ + function toUSVString$5(val) { + if (hasToWellFormed) return `${val}`.toWellFormed(); + else if (nodeUtil.toUSVString) return nodeUtil.toUSVString(val); + return `${val}`; + } + function parseRangeHeader$1(range) { + if (range == null || range === "") return { + start: 0, + end: null, + size: null + }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + const kEnumerableProperty$9 = Object.create(null); + kEnumerableProperty$9.enumerable = true; + module.exports = { + kEnumerableProperty: kEnumerableProperty$9, + nop: nop$1, + isDisturbed: isDisturbed$2, + isErrored: isErrored$2, + isReadable: isReadable$1, + toUSVString: toUSVString$5, + isReadableAborted, + isBlobLike: isBlobLike$7, + parseOrigin: parseOrigin$1, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + parseRawHeaders, + parseHeaders: parseHeaders$1, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom: ReadableStreamFrom$3, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL: buildURL$2, + throwIfAborted: throwIfAborted$1, + addAbortListener: addAbortListener$2, + parseRangeHeader: parseRangeHeader$1, + nodeMajor: nodeMajor$1, + nodeMinor: nodeMinor$1, + nodeHasAutoSelectFamily: nodeMajor$1 > 18 || nodeMajor$1 === 18 && nodeMinor$1 >= 13, + safeHTTPMethods: [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ] + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/timers.js +var require_timers = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/timers.js"(exports, module) { + let fastNow = Date.now(); + let fastNowTimeout; + const fastTimers = []; + function onTimeout() { + fastNow = Date.now(); + let len = fastTimers.length; + let idx = 0; + while (idx < len) { + const timer = fastTimers[idx]; + if (timer.state === 0) timer.state = fastNow + timer.delay; + else if (timer.state > 0 && fastNow >= timer.state) { + timer.state = -1; + timer.callback(timer.opaque); + } + if (timer.state === -1) { + timer.state = -2; + if (idx !== len - 1) fastTimers[idx] = fastTimers.pop(); + else fastTimers.pop(); + len -= 1; + } else idx += 1; + } + if (fastTimers.length > 0) refreshTimeout(); + } + function refreshTimeout() { + if (fastNowTimeout && fastNowTimeout.refresh) fastNowTimeout.refresh(); + else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTimeout, 1e3); + if (fastNowTimeout.unref) fastNowTimeout.unref(); + } + } + var Timeout = class { + constructor(callback, delay, opaque) { + this.callback = callback; + this.delay = delay; + this.opaque = opaque; + this.state = -2; + this.refresh(); + } + refresh() { + if (this.state === -2) { + fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); + } + this.state = 0; + } + clear() { + this.state = -1; + } + }; + module.exports = { + setTimeout(callback, delay, opaque) { + return delay < 1e3 ? setTimeout(callback, delay, opaque) : new Timeout(callback, delay, opaque); + }, + clearTimeout(timeout) { + if (timeout instanceof Timeout) timeout.clear(); + else clearTimeout(timeout); + } + }; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js +var require_sbmh = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js"(exports, module) { + /** + * Copyright Brian White. All rights reserved. + * + * @see https://github.com/mscdex/streamsearch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation + * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool + */ + const EventEmitter$2 = __require("node:events").EventEmitter; + const inherits$5 = __require("node:util").inherits; + function SBMH(needle) { + if (typeof needle === "string") needle = Buffer.from(needle); + if (!Buffer.isBuffer(needle)) throw new TypeError("The needle has to be a String or a Buffer."); + const needleLength = needle.length; + if (needleLength === 0) throw new Error("The needle cannot be an empty String/Buffer."); + if (needleLength > 256) throw new Error("The needle cannot have a length bigger than 256."); + this.maxMatches = Infinity; + this.matches = 0; + this._occ = new Array(256).fill(needleLength); + this._lookbehind_size = 0; + this._needle = needle; + this._bufpos = 0; + this._lookbehind = Buffer.alloc(needleLength); + for (var i$1 = 0; i$1 < needleLength - 1; ++i$1) this._occ[needle[i$1]] = needleLength - 1 - i$1; + } + inherits$5(SBMH, EventEmitter$2); + SBMH.prototype.reset = function() { + this._lookbehind_size = 0; + this.matches = 0; + this._bufpos = 0; + }; + SBMH.prototype.push = function(chunk, pos) { + if (!Buffer.isBuffer(chunk)) chunk = Buffer.from(chunk, "binary"); + const chlen = chunk.length; + this._bufpos = pos || 0; + let r; + while (r !== chlen && this.matches < this.maxMatches) r = this._sbmh_feed(chunk); + return r; + }; + SBMH.prototype._sbmh_feed = function(data) { + const len = data.length; + const needle = this._needle; + const needleLength = needle.length; + const lastNeedleChar = needle[needleLength - 1]; + let pos = -this._lookbehind_size; + let ch; + if (pos < 0) { + while (pos < 0 && pos <= len - needleLength) { + ch = this._sbmh_lookup_char(data, pos + needleLength - 1); + if (ch === lastNeedleChar && this._sbmh_memcmp(data, pos, needleLength - 1)) { + this._lookbehind_size = 0; + ++this.matches; + this.emit("info", true); + return this._bufpos = pos + needleLength; + } + pos += this._occ[ch]; + } + if (pos < 0) while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) ++pos; + if (pos >= 0) { + this.emit("info", false, this._lookbehind, 0, this._lookbehind_size); + this._lookbehind_size = 0; + } else { + const bytesToCutOff = this._lookbehind_size + pos; + if (bytesToCutOff > 0) this.emit("info", false, this._lookbehind, 0, bytesToCutOff); + this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, this._lookbehind_size - bytesToCutOff); + this._lookbehind_size -= bytesToCutOff; + data.copy(this._lookbehind, this._lookbehind_size); + this._lookbehind_size += len; + this._bufpos = len; + return len; + } + } + pos += (pos >= 0) * this._bufpos; + if (data.indexOf(needle, pos) !== -1) { + pos = data.indexOf(needle, pos); + ++this.matches; + if (pos > 0) this.emit("info", true, data, this._bufpos, pos); + else this.emit("info", true); + return this._bufpos = pos + needleLength; + } else pos = len - needleLength; + while (pos < len && (data[pos] !== needle[0] || Buffer.compare(data.subarray(pos, pos + len - pos), needle.subarray(0, len - pos)) !== 0)) ++pos; + if (pos < len) { + data.copy(this._lookbehind, 0, pos, pos + (len - pos)); + this._lookbehind_size = len - pos; + } + if (pos > 0) this.emit("info", false, data, this._bufpos, pos < len ? pos : len); + this._bufpos = len; + return len; + }; + SBMH.prototype._sbmh_lookup_char = function(data, pos) { + return pos < 0 ? this._lookbehind[this._lookbehind_size + pos] : data[pos]; + }; + SBMH.prototype._sbmh_memcmp = function(data, pos, len) { + for (var i$1 = 0; i$1 < len; ++i$1) if (this._sbmh_lookup_char(data, pos + i$1) !== this._needle[i$1]) return false; + return true; + }; + module.exports = SBMH; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js +var require_PartStream = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js"(exports, module) { + const inherits$4 = __require("node:util").inherits; + const ReadableStream$4 = __require("node:stream").Readable; + function PartStream$1(opts) { + ReadableStream$4.call(this, opts); + } + inherits$4(PartStream$1, ReadableStream$4); + PartStream$1.prototype._read = function(n) {}; + module.exports = PartStream$1; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js +var require_getLimit = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js"(exports, module) { + module.exports = function getLimit$3(limits, name, defaultLimit) { + if (!limits || limits[name] === void 0 || limits[name] === null) return defaultLimit; + if (typeof limits[name] !== "number" || isNaN(limits[name])) throw new TypeError("Limit " + name + " is not a valid number"); + return limits[name]; + }; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js +var require_HeaderParser = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js"(exports, module) { + const EventEmitter$1 = __require("node:events").EventEmitter; + const inherits$3 = __require("node:util").inherits; + const getLimit$2 = require_getLimit(); + const StreamSearch$1 = require_sbmh(); + const B_DCRLF = Buffer.from("\r\n\r\n"); + const RE_CRLF = /\r\n/g; + const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/; + function HeaderParser$1(cfg) { + EventEmitter$1.call(this); + cfg = cfg || {}; + const self = this; + this.nread = 0; + this.maxed = false; + this.npairs = 0; + this.maxHeaderPairs = getLimit$2(cfg, "maxHeaderPairs", 2e3); + this.maxHeaderSize = getLimit$2(cfg, "maxHeaderSize", 80 * 1024); + this.buffer = ""; + this.header = {}; + this.finished = false; + this.ss = new StreamSearch$1(B_DCRLF); + this.ss.on("info", function(isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start; + self.nread = self.maxHeaderSize; + self.maxed = true; + } else self.nread += end - start; + self.buffer += data.toString("binary", start, end); + } + if (isMatch) self._finish(); + }); + } + inherits$3(HeaderParser$1, EventEmitter$1); + HeaderParser$1.prototype.push = function(data) { + const r = this.ss.push(data); + if (this.finished) return r; + }; + HeaderParser$1.prototype.reset = function() { + this.finished = false; + this.buffer = ""; + this.header = {}; + this.ss.reset(); + }; + HeaderParser$1.prototype._finish = function() { + if (this.buffer) this._parseHeader(); + this.ss.matches = this.ss.maxMatches; + const header = this.header; + this.header = {}; + this.buffer = ""; + this.finished = true; + this.nread = this.npairs = 0; + this.maxed = false; + this.emit("header", header); + }; + HeaderParser$1.prototype._parseHeader = function() { + if (this.npairs === this.maxHeaderPairs) return; + const lines = this.buffer.split(RE_CRLF); + const len = lines.length; + let m, h; + for (var i$1 = 0; i$1 < len; ++i$1) { + if (lines[i$1].length === 0) continue; + if (lines[i$1][0] === " " || lines[i$1][0] === " ") { + if (h) { + this.header[h][this.header[h].length - 1] += lines[i$1]; + continue; + } + } + const posColon = lines[i$1].indexOf(":"); + if (posColon === -1 || posColon === 0) return; + m = RE_HDR.exec(lines[i$1]); + h = m[1].toLowerCase(); + this.header[h] = this.header[h] || []; + this.header[h].push(m[2] || ""); + if (++this.npairs === this.maxHeaderPairs) break; + } + }; + module.exports = HeaderParser$1; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js +var require_Dicer = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js"(exports, module) { + const WritableStream$1 = __require("node:stream").Writable; + const inherits$2 = __require("node:util").inherits; + const StreamSearch = require_sbmh(); + const PartStream = require_PartStream(); + const HeaderParser = require_HeaderParser(); + const DASH = 45; + const B_ONEDASH = Buffer.from("-"); + const B_CRLF = Buffer.from("\r\n"); + const EMPTY_FN = function() {}; + function Dicer$2(cfg) { + if (!(this instanceof Dicer$2)) return new Dicer$2(cfg); + WritableStream$1.call(this, cfg); + if (!cfg || !cfg.headerFirst && typeof cfg.boundary !== "string") throw new TypeError("Boundary required"); + if (typeof cfg.boundary === "string") this.setBoundary(cfg.boundary); + else this._bparser = void 0; + this._headerFirst = cfg.headerFirst; + this._dashes = 0; + this._parts = 0; + this._finished = false; + this._realFinish = false; + this._isPreamble = true; + this._justMatched = false; + this._firstWrite = true; + this._inHeader = true; + this._part = void 0; + this._cb = void 0; + this._ignoreData = false; + this._partOpts = { highWaterMark: cfg.partHwm }; + this._pause = false; + const self = this; + this._hparser = new HeaderParser(cfg); + this._hparser.on("header", function(header) { + self._inHeader = false; + self._part.emit("header", header); + }); + } + inherits$2(Dicer$2, WritableStream$1); + Dicer$2.prototype.emit = function(ev) { + if (ev === "finish" && !this._realFinish) { + if (!this._finished) { + const self = this; + process.nextTick(function() { + self.emit("error", new Error("Unexpected end of multipart data")); + if (self._part && !self._ignoreData) { + const type = self._isPreamble ? "Preamble" : "Part"; + self._part.emit("error", new Error(type + " terminated early due to unexpected end of multipart data")); + self._part.push(null); + process.nextTick(function() { + self._realFinish = true; + self.emit("finish"); + self._realFinish = false; + }); + return; + } + self._realFinish = true; + self.emit("finish"); + self._realFinish = false; + }); + } + } else WritableStream$1.prototype.emit.apply(this, arguments); + }; + Dicer$2.prototype._write = function(data, encoding, cb) { + if (!this._hparser && !this._bparser) return cb(); + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts); + if (this.listenerCount("preamble") !== 0) this.emit("preamble", this._part); + else this._ignore(); + } + const r = this._hparser.push(data); + if (!this._inHeader && r !== void 0 && r < data.length) data = data.slice(r); + else return cb(); + } + if (this._firstWrite) { + this._bparser.push(B_CRLF); + this._firstWrite = false; + } + this._bparser.push(data); + if (this._pause) this._cb = cb; + else cb(); + }; + Dicer$2.prototype.reset = function() { + this._part = void 0; + this._bparser = void 0; + this._hparser = void 0; + }; + Dicer$2.prototype.setBoundary = function(boundary) { + const self = this; + this._bparser = new StreamSearch("\r\n--" + boundary); + this._bparser.on("info", function(isMatch, data, start, end) { + self._oninfo(isMatch, data, start, end); + }); + }; + Dicer$2.prototype._ignore = function() { + if (this._part && !this._ignoreData) { + this._ignoreData = true; + this._part.on("error", EMPTY_FN); + this._part.resume(); + } + }; + Dicer$2.prototype._oninfo = function(isMatch, data, start, end) { + let buf; + const self = this; + let i$1 = 0; + let r; + let shouldWriteMore = true; + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && start + i$1 < end) if (data[start + i$1] === DASH) { + ++i$1; + ++this._dashes; + } else { + if (this._dashes) buf = B_ONEDASH; + this._dashes = 0; + break; + } + if (this._dashes === 2) { + if (start + i$1 < end && this.listenerCount("trailer") !== 0) this.emit("trailer", data.slice(start + i$1, end)); + this.reset(); + this._finished = true; + if (self._parts === 0) { + self._realFinish = true; + self.emit("finish"); + self._realFinish = false; + } + } + if (this._dashes) return; + } + if (this._justMatched) this._justMatched = false; + if (!this._part) { + this._part = new PartStream(this._partOpts); + this._part._read = function(n) { + self._unpause(); + }; + if (this._isPreamble && this.listenerCount("preamble") !== 0) this.emit("preamble", this._part); + else if (this._isPreamble !== true && this.listenerCount("part") !== 0) this.emit("part", this._part); + else this._ignore(); + if (!this._isPreamble) this._inHeader = true; + } + if (data && start < end && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) shouldWriteMore = this._part.push(buf); + shouldWriteMore = this._part.push(data.slice(start, end)); + if (!shouldWriteMore) this._pause = true; + } else if (!this._isPreamble && this._inHeader) { + if (buf) this._hparser.push(buf); + r = this._hparser.push(data.slice(start, end)); + if (!this._inHeader && r !== void 0 && r < end) this._oninfo(false, data, start + r, end); + } + } + if (isMatch) { + this._hparser.reset(); + if (this._isPreamble) this._isPreamble = false; + else if (start !== end) { + ++this._parts; + this._part.on("end", function() { + if (--self._parts === 0) if (self._finished) { + self._realFinish = true; + self.emit("finish"); + self._realFinish = false; + } else self._unpause(); + }); + } + this._part.push(null); + this._part = void 0; + this._ignoreData = false; + this._justMatched = true; + this._dashes = 0; + } + }; + Dicer$2.prototype._unpause = function() { + if (!this._pause) return; + this._pause = false; + if (this._cb) { + const cb = this._cb; + this._cb = void 0; + cb(); + } + }; + module.exports = Dicer$2; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js +var require_decodeText = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js"(exports, module) { + const utf8Decoder = new TextDecoder("utf-8"); + const textDecoders = new Map([["utf-8", utf8Decoder], ["utf8", utf8Decoder]]); + function getDecoder(charset) { + let lc; + while (true) switch (charset) { + case "utf-8": + case "utf8": return decoders.utf8; + case "latin1": + case "ascii": + case "us-ascii": + case "iso-8859-1": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "windows-1252": + case "iso_8859-1:1987": + case "cp1252": + case "x-cp1252": return decoders.latin1; + case "utf16le": + case "utf-16le": + case "ucs2": + case "ucs-2": return decoders.utf16le; + case "base64": return decoders.base64; + default: + if (lc === void 0) { + lc = true; + charset = charset.toLowerCase(); + continue; + } + return decoders.other.bind(charset); + } + } + const decoders = { + utf8: (data, sourceEncoding) => { + if (data.length === 0) return ""; + if (typeof data === "string") data = Buffer.from(data, sourceEncoding); + return data.utf8Slice(0, data.length); + }, + latin1: (data, sourceEncoding) => { + if (data.length === 0) return ""; + if (typeof data === "string") return data; + return data.latin1Slice(0, data.length); + }, + utf16le: (data, sourceEncoding) => { + if (data.length === 0) return ""; + if (typeof data === "string") data = Buffer.from(data, sourceEncoding); + return data.ucs2Slice(0, data.length); + }, + base64: (data, sourceEncoding) => { + if (data.length === 0) return ""; + if (typeof data === "string") data = Buffer.from(data, sourceEncoding); + return data.base64Slice(0, data.length); + }, + other: (data, sourceEncoding) => { + if (data.length === 0) return ""; + if (typeof data === "string") data = Buffer.from(data, sourceEncoding); + if (textDecoders.has(exports.toString())) try { + return textDecoders.get(exports).decode(data); + } catch {} + return typeof data === "string" ? data : data.toString(); + } + }; + function decodeText$3(text, sourceEncoding, destEncoding) { + if (text) return getDecoder(destEncoding)(text, sourceEncoding); + return text; + } + module.exports = decodeText$3; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js +var require_parseParams = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js"(exports, module) { + const decodeText$2 = require_decodeText(); + const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g; + const EncodedLookup = { + "%00": "\0", + "%01": "", + "%02": "", + "%03": "", + "%04": "", + "%05": "", + "%06": "", + "%07": "\x07", + "%08": "\b", + "%09": " ", + "%0a": "\n", + "%0A": "\n", + "%0b": "\v", + "%0B": "\v", + "%0c": "\f", + "%0C": "\f", + "%0d": "\r", + "%0D": "\r", + "%0e": "", + "%0E": "", + "%0f": "", + "%0F": "", + "%10": "", + "%11": "", + "%12": "", + "%13": "", + "%14": "", + "%15": "", + "%16": "", + "%17": "", + "%18": "", + "%19": "", + "%1a": "", + "%1A": "", + "%1b": "\x1B", + "%1B": "\x1B", + "%1c": "", + "%1C": "", + "%1d": "", + "%1D": "", + "%1e": "", + "%1E": "", + "%1f": "", + "%1F": "", + "%20": " ", + "%21": "!", + "%22": "\"", + "%23": "#", + "%24": "$", + "%25": "%", + "%26": "&", + "%27": "'", + "%28": "(", + "%29": ")", + "%2a": "*", + "%2A": "*", + "%2b": "+", + "%2B": "+", + "%2c": ",", + "%2C": ",", + "%2d": "-", + "%2D": "-", + "%2e": ".", + "%2E": ".", + "%2f": "/", + "%2F": "/", + "%30": "0", + "%31": "1", + "%32": "2", + "%33": "3", + "%34": "4", + "%35": "5", + "%36": "6", + "%37": "7", + "%38": "8", + "%39": "9", + "%3a": ":", + "%3A": ":", + "%3b": ";", + "%3B": ";", + "%3c": "<", + "%3C": "<", + "%3d": "=", + "%3D": "=", + "%3e": ">", + "%3E": ">", + "%3f": "?", + "%3F": "?", + "%40": "@", + "%41": "A", + "%42": "B", + "%43": "C", + "%44": "D", + "%45": "E", + "%46": "F", + "%47": "G", + "%48": "H", + "%49": "I", + "%4a": "J", + "%4A": "J", + "%4b": "K", + "%4B": "K", + "%4c": "L", + "%4C": "L", + "%4d": "M", + "%4D": "M", + "%4e": "N", + "%4E": "N", + "%4f": "O", + "%4F": "O", + "%50": "P", + "%51": "Q", + "%52": "R", + "%53": "S", + "%54": "T", + "%55": "U", + "%56": "V", + "%57": "W", + "%58": "X", + "%59": "Y", + "%5a": "Z", + "%5A": "Z", + "%5b": "[", + "%5B": "[", + "%5c": "\\", + "%5C": "\\", + "%5d": "]", + "%5D": "]", + "%5e": "^", + "%5E": "^", + "%5f": "_", + "%5F": "_", + "%60": "`", + "%61": "a", + "%62": "b", + "%63": "c", + "%64": "d", + "%65": "e", + "%66": "f", + "%67": "g", + "%68": "h", + "%69": "i", + "%6a": "j", + "%6A": "j", + "%6b": "k", + "%6B": "k", + "%6c": "l", + "%6C": "l", + "%6d": "m", + "%6D": "m", + "%6e": "n", + "%6E": "n", + "%6f": "o", + "%6F": "o", + "%70": "p", + "%71": "q", + "%72": "r", + "%73": "s", + "%74": "t", + "%75": "u", + "%76": "v", + "%77": "w", + "%78": "x", + "%79": "y", + "%7a": "z", + "%7A": "z", + "%7b": "{", + "%7B": "{", + "%7c": "|", + "%7C": "|", + "%7d": "}", + "%7D": "}", + "%7e": "~", + "%7E": "~", + "%7f": "", + "%7F": "", + "%80": "€", + "%81": "", + "%82": "‚", + "%83": "ƒ", + "%84": "„", + "%85": "…", + "%86": "†", + "%87": "‡", + "%88": "ˆ", + "%89": "‰", + "%8a": "Š", + "%8A": "Š", + "%8b": "‹", + "%8B": "‹", + "%8c": "Œ", + "%8C": "Œ", + "%8d": "", + "%8D": "", + "%8e": "Ž", + "%8E": "Ž", + "%8f": "", + "%8F": "", + "%90": "", + "%91": "‘", + "%92": "’", + "%93": "“", + "%94": "”", + "%95": "•", + "%96": "–", + "%97": "—", + "%98": "˜", + "%99": "™", + "%9a": "š", + "%9A": "š", + "%9b": "›", + "%9B": "›", + "%9c": "œ", + "%9C": "œ", + "%9d": "", + "%9D": "", + "%9e": "ž", + "%9E": "ž", + "%9f": "Ÿ", + "%9F": "Ÿ", + "%a0": "\xA0", + "%A0": "\xA0", + "%a1": "¡", + "%A1": "¡", + "%a2": "¢", + "%A2": "¢", + "%a3": "£", + "%A3": "£", + "%a4": "¤", + "%A4": "¤", + "%a5": "¥", + "%A5": "¥", + "%a6": "¦", + "%A6": "¦", + "%a7": "§", + "%A7": "§", + "%a8": "¨", + "%A8": "¨", + "%a9": "©", + "%A9": "©", + "%aa": "ª", + "%Aa": "ª", + "%aA": "ª", + "%AA": "ª", + "%ab": "«", + "%Ab": "«", + "%aB": "«", + "%AB": "«", + "%ac": "¬", + "%Ac": "¬", + "%aC": "¬", + "%AC": "¬", + "%ad": "­", + "%Ad": "­", + "%aD": "­", + "%AD": "­", + "%ae": "®", + "%Ae": "®", + "%aE": "®", + "%AE": "®", + "%af": "¯", + "%Af": "¯", + "%aF": "¯", + "%AF": "¯", + "%b0": "°", + "%B0": "°", + "%b1": "±", + "%B1": "±", + "%b2": "²", + "%B2": "²", + "%b3": "³", + "%B3": "³", + "%b4": "´", + "%B4": "´", + "%b5": "µ", + "%B5": "µ", + "%b6": "¶", + "%B6": "¶", + "%b7": "·", + "%B7": "·", + "%b8": "¸", + "%B8": "¸", + "%b9": "¹", + "%B9": "¹", + "%ba": "º", + "%Ba": "º", + "%bA": "º", + "%BA": "º", + "%bb": "»", + "%Bb": "»", + "%bB": "»", + "%BB": "»", + "%bc": "¼", + "%Bc": "¼", + "%bC": "¼", + "%BC": "¼", + "%bd": "½", + "%Bd": "½", + "%bD": "½", + "%BD": "½", + "%be": "¾", + "%Be": "¾", + "%bE": "¾", + "%BE": "¾", + "%bf": "¿", + "%Bf": "¿", + "%bF": "¿", + "%BF": "¿", + "%c0": "À", + "%C0": "À", + "%c1": "Á", + "%C1": "Á", + "%c2": "Â", + "%C2": "Â", + "%c3": "Ã", + "%C3": "Ã", + "%c4": "Ä", + "%C4": "Ä", + "%c5": "Å", + "%C5": "Å", + "%c6": "Æ", + "%C6": "Æ", + "%c7": "Ç", + "%C7": "Ç", + "%c8": "È", + "%C8": "È", + "%c9": "É", + "%C9": "É", + "%ca": "Ê", + "%Ca": "Ê", + "%cA": "Ê", + "%CA": "Ê", + "%cb": "Ë", + "%Cb": "Ë", + "%cB": "Ë", + "%CB": "Ë", + "%cc": "Ì", + "%Cc": "Ì", + "%cC": "Ì", + "%CC": "Ì", + "%cd": "Í", + "%Cd": "Í", + "%cD": "Í", + "%CD": "Í", + "%ce": "Î", + "%Ce": "Î", + "%cE": "Î", + "%CE": "Î", + "%cf": "Ï", + "%Cf": "Ï", + "%cF": "Ï", + "%CF": "Ï", + "%d0": "Ð", + "%D0": "Ð", + "%d1": "Ñ", + "%D1": "Ñ", + "%d2": "Ò", + "%D2": "Ò", + "%d3": "Ó", + "%D3": "Ó", + "%d4": "Ô", + "%D4": "Ô", + "%d5": "Õ", + "%D5": "Õ", + "%d6": "Ö", + "%D6": "Ö", + "%d7": "×", + "%D7": "×", + "%d8": "Ø", + "%D8": "Ø", + "%d9": "Ù", + "%D9": "Ù", + "%da": "Ú", + "%Da": "Ú", + "%dA": "Ú", + "%DA": "Ú", + "%db": "Û", + "%Db": "Û", + "%dB": "Û", + "%DB": "Û", + "%dc": "Ü", + "%Dc": "Ü", + "%dC": "Ü", + "%DC": "Ü", + "%dd": "Ý", + "%Dd": "Ý", + "%dD": "Ý", + "%DD": "Ý", + "%de": "Þ", + "%De": "Þ", + "%dE": "Þ", + "%DE": "Þ", + "%df": "ß", + "%Df": "ß", + "%dF": "ß", + "%DF": "ß", + "%e0": "à", + "%E0": "à", + "%e1": "á", + "%E1": "á", + "%e2": "â", + "%E2": "â", + "%e3": "ã", + "%E3": "ã", + "%e4": "ä", + "%E4": "ä", + "%e5": "å", + "%E5": "å", + "%e6": "æ", + "%E6": "æ", + "%e7": "ç", + "%E7": "ç", + "%e8": "è", + "%E8": "è", + "%e9": "é", + "%E9": "é", + "%ea": "ê", + "%Ea": "ê", + "%eA": "ê", + "%EA": "ê", + "%eb": "ë", + "%Eb": "ë", + "%eB": "ë", + "%EB": "ë", + "%ec": "ì", + "%Ec": "ì", + "%eC": "ì", + "%EC": "ì", + "%ed": "í", + "%Ed": "í", + "%eD": "í", + "%ED": "í", + "%ee": "î", + "%Ee": "î", + "%eE": "î", + "%EE": "î", + "%ef": "ï", + "%Ef": "ï", + "%eF": "ï", + "%EF": "ï", + "%f0": "ð", + "%F0": "ð", + "%f1": "ñ", + "%F1": "ñ", + "%f2": "ò", + "%F2": "ò", + "%f3": "ó", + "%F3": "ó", + "%f4": "ô", + "%F4": "ô", + "%f5": "õ", + "%F5": "õ", + "%f6": "ö", + "%F6": "ö", + "%f7": "÷", + "%F7": "÷", + "%f8": "ø", + "%F8": "ø", + "%f9": "ù", + "%F9": "ù", + "%fa": "ú", + "%Fa": "ú", + "%fA": "ú", + "%FA": "ú", + "%fb": "û", + "%Fb": "û", + "%fB": "û", + "%FB": "û", + "%fc": "ü", + "%Fc": "ü", + "%fC": "ü", + "%FC": "ü", + "%fd": "ý", + "%Fd": "ý", + "%fD": "ý", + "%FD": "ý", + "%fe": "þ", + "%Fe": "þ", + "%fE": "þ", + "%FE": "þ", + "%ff": "ÿ", + "%Ff": "ÿ", + "%fF": "ÿ", + "%FF": "ÿ" + }; + function encodedReplacer(match) { + return EncodedLookup[match]; + } + const STATE_KEY = 0; + const STATE_VALUE = 1; + const STATE_CHARSET = 2; + const STATE_LANG = 3; + function parseParams$2(str) { + const res = []; + let state = STATE_KEY; + let charset = ""; + let inquote = false; + let escaping = false; + let p = 0; + let tmp = ""; + const len = str.length; + for (var i$1 = 0; i$1 < len; ++i$1) { + const char = str[i$1]; + if (char === "\\" && inquote) if (escaping) escaping = false; + else { + escaping = true; + continue; + } + else if (char === "\"") if (!escaping) { + if (inquote) { + inquote = false; + state = STATE_KEY; + } else inquote = true; + continue; + } else escaping = false; + else { + if (escaping && inquote) tmp += "\\"; + escaping = false; + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG; + charset = tmp.substring(1); + } else state = STATE_VALUE; + tmp = ""; + continue; + } else if (state === STATE_KEY && (char === "*" || char === "=") && res.length) { + state = char === "*" ? STATE_CHARSET : STATE_VALUE; + res[p] = [tmp, void 0]; + tmp = ""; + continue; + } else if (!inquote && char === ";") { + state = STATE_KEY; + if (charset) { + if (tmp.length) tmp = decodeText$2(tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset); + charset = ""; + } else if (tmp.length) tmp = decodeText$2(tmp, "binary", "utf8"); + if (res[p] === void 0) res[p] = tmp; + else res[p][1] = tmp; + tmp = ""; + ++p; + continue; + } else if (!inquote && (char === " " || char === " ")) continue; + } + tmp += char; + } + if (charset && tmp.length) tmp = decodeText$2(tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset); + else if (tmp) tmp = decodeText$2(tmp, "binary", "utf8"); + if (res[p] === void 0) { + if (tmp) res[p] = tmp; + } else res[p][1] = tmp; + return res; + } + module.exports = parseParams$2; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js +var require_basename = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js"(exports, module) { + module.exports = function basename$1(path$5) { + if (typeof path$5 !== "string") return ""; + for (var i$1 = path$5.length - 1; i$1 >= 0; --i$1) switch (path$5.charCodeAt(i$1)) { + case 47: + case 92: + path$5 = path$5.slice(i$1 + 1); + return path$5 === ".." || path$5 === "." ? "" : path$5; + } + return path$5 === ".." || path$5 === "." ? "" : path$5; + }; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js +var require_multipart = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js"(exports, module) { + const { Readable: Readable$4 } = __require("node:stream"); + const { inherits: inherits$1 } = __require("node:util"); + const Dicer$1 = require_Dicer(); + const parseParams$1 = require_parseParams(); + const decodeText$1 = require_decodeText(); + const basename = require_basename(); + const getLimit$1 = require_getLimit(); + const RE_BOUNDARY = /^boundary$/i; + const RE_FIELD = /^form-data$/i; + const RE_CHARSET$1 = /^charset$/i; + const RE_FILENAME = /^filename$/i; + const RE_NAME = /^name$/i; + Multipart.detect = /^multipart\/form-data/i; + function Multipart(boy, cfg) { + let i$1; + let len; + const self = this; + let boundary; + const limits = cfg.limits; + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => contentType === "application/octet-stream" || fileName !== void 0); + const parsedConType = cfg.parsedConType || []; + const defCharset = cfg.defCharset || "utf8"; + const preservePath = cfg.preservePath; + const fileOpts = { highWaterMark: cfg.fileHwm }; + for (i$1 = 0, len = parsedConType.length; i$1 < len; ++i$1) if (Array.isArray(parsedConType[i$1]) && RE_BOUNDARY.test(parsedConType[i$1][0])) { + boundary = parsedConType[i$1][1]; + break; + } + function checkFinished() { + if (nends === 0 && finished$1 && !boy._done) { + finished$1 = false; + self.end(); + } + } + if (typeof boundary !== "string") throw new Error("Multipart: Boundary not found"); + const fieldSizeLimit = getLimit$1(limits, "fieldSize", 1 * 1024 * 1024); + const fileSizeLimit = getLimit$1(limits, "fileSize", Infinity); + const filesLimit = getLimit$1(limits, "files", Infinity); + const fieldsLimit = getLimit$1(limits, "fields", Infinity); + const partsLimit = getLimit$1(limits, "parts", Infinity); + const headerPairsLimit = getLimit$1(limits, "headerPairs", 2e3); + const headerSizeLimit = getLimit$1(limits, "headerSize", 80 * 1024); + let nfiles = 0; + let nfields = 0; + let nends = 0; + let curFile; + let curField; + let finished$1 = false; + this._needDrain = false; + this._pause = false; + this._cb = void 0; + this._nparts = 0; + this._boy = boy; + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + }; + this.parser = new Dicer$1(parserCfg); + this.parser.on("drain", function() { + self._needDrain = false; + if (self._cb && !self._pause) { + const cb = self._cb; + self._cb = void 0; + cb(); + } + }).on("part", function onPart(part) { + if (++self._nparts > partsLimit) { + self.parser.removeListener("part", onPart); + self.parser.on("part", skipPart); + boy.hitPartsLimit = true; + boy.emit("partsLimit"); + return skipPart(part); + } + if (curField) { + const field = curField; + field.emit("end"); + field.removeAllListeners("end"); + } + part.on("header", function(header) { + let contype; + let fieldname; + let parsed; + let charset; + let encoding; + let filename; + let nsize = 0; + if (header["content-type"]) { + parsed = parseParams$1(header["content-type"][0]); + if (parsed[0]) { + contype = parsed[0].toLowerCase(); + for (i$1 = 0, len = parsed.length; i$1 < len; ++i$1) if (RE_CHARSET$1.test(parsed[i$1][0])) { + charset = parsed[i$1][1].toLowerCase(); + break; + } + } + } + if (contype === void 0) contype = "text/plain"; + if (charset === void 0) charset = defCharset; + if (header["content-disposition"]) { + parsed = parseParams$1(header["content-disposition"][0]); + if (!RE_FIELD.test(parsed[0])) return skipPart(part); + for (i$1 = 0, len = parsed.length; i$1 < len; ++i$1) if (RE_NAME.test(parsed[i$1][0])) fieldname = parsed[i$1][1]; + else if (RE_FILENAME.test(parsed[i$1][0])) { + filename = parsed[i$1][1]; + if (!preservePath) filename = basename(filename); + } + } else return skipPart(part); + if (header["content-transfer-encoding"]) encoding = header["content-transfer-encoding"][0].toLowerCase(); + else encoding = "7bit"; + let onData, onEnd; + if (isPartAFile(fieldname, contype, filename)) { + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true; + boy.emit("filesLimit"); + } + return skipPart(part); + } + ++nfiles; + if (boy.listenerCount("file") === 0) { + self.parser._ignore(); + return; + } + ++nends; + const file = new FileStream(fileOpts); + curFile = file; + file.on("end", function() { + --nends; + self._pause = false; + checkFinished(); + if (self._cb && !self._needDrain) { + const cb = self._cb; + self._cb = void 0; + cb(); + } + }); + file._read = function(n) { + if (!self._pause) return; + self._pause = false; + if (self._cb && !self._needDrain) { + const cb = self._cb; + self._cb = void 0; + cb(); + } + }; + boy.emit("file", fieldname, file, filename, encoding, contype); + onData = function(data) { + if ((nsize += data.length) > fileSizeLimit) { + const extralen = fileSizeLimit - nsize + data.length; + if (extralen > 0) file.push(data.slice(0, extralen)); + file.truncated = true; + file.bytesRead = fileSizeLimit; + part.removeAllListeners("data"); + file.emit("limit"); + return; + } else if (!file.push(data)) self._pause = true; + file.bytesRead = nsize; + }; + onEnd = function() { + curFile = void 0; + file.push(null); + }; + } else { + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true; + boy.emit("fieldsLimit"); + } + return skipPart(part); + } + ++nfields; + ++nends; + let buffer = ""; + let truncated = false; + curField = part; + onData = function(data) { + if ((nsize += data.length) > fieldSizeLimit) { + const extralen = fieldSizeLimit - (nsize - data.length); + buffer += data.toString("binary", 0, extralen); + truncated = true; + part.removeAllListeners("data"); + } else buffer += data.toString("binary"); + }; + onEnd = function() { + curField = void 0; + if (buffer.length) buffer = decodeText$1(buffer, "binary", charset); + boy.emit("field", fieldname, buffer, false, truncated, encoding, contype); + --nends; + checkFinished(); + }; + } + part._readableState.sync = false; + part.on("data", onData); + part.on("end", onEnd); + }).on("error", function(err) { + if (curFile) curFile.emit("error", err); + }); + }).on("error", function(err) { + boy.emit("error", err); + }).on("finish", function() { + finished$1 = true; + checkFinished(); + }); + } + Multipart.prototype.write = function(chunk, cb) { + const r = this.parser.write(chunk); + if (r && !this._pause) cb(); + else { + this._needDrain = !r; + this._cb = cb; + } + }; + Multipart.prototype.end = function() { + const self = this; + if (self.parser.writable) self.parser.end(); + else if (!self._boy._done) process.nextTick(function() { + self._boy._done = true; + self._boy.emit("finish"); + }); + }; + function skipPart(part) { + part.resume(); + } + function FileStream(opts) { + Readable$4.call(this, opts); + this.bytesRead = 0; + this.truncated = false; + } + inherits$1(FileStream, Readable$4); + FileStream.prototype._read = function(n) {}; + module.exports = Multipart; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js +var require_Decoder = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js"(exports, module) { + const RE_PLUS = /\+/g; + const HEX = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]; + function Decoder$1() { + this.buffer = void 0; + } + Decoder$1.prototype.write = function(str) { + str = str.replace(RE_PLUS, " "); + let res = ""; + let i$1 = 0; + let p = 0; + const len = str.length; + for (; i$1 < len; ++i$1) if (this.buffer !== void 0) if (!HEX[str.charCodeAt(i$1)]) { + res += "%" + this.buffer; + this.buffer = void 0; + --i$1; + } else { + this.buffer += str[i$1]; + ++p; + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)); + this.buffer = void 0; + } + } + else if (str[i$1] === "%") { + if (i$1 > p) { + res += str.substring(p, i$1); + p = i$1; + } + this.buffer = ""; + ++p; + } + if (p < len && this.buffer === void 0) res += str.substring(p); + return res; + }; + Decoder$1.prototype.reset = function() { + this.buffer = void 0; + }; + module.exports = Decoder$1; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js +var require_urlencoded = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js"(exports, module) { + const Decoder = require_Decoder(); + const decodeText = require_decodeText(); + const getLimit = require_getLimit(); + const RE_CHARSET = /^charset$/i; + UrlEncoded.detect = /^application\/x-www-form-urlencoded/i; + function UrlEncoded(boy, cfg) { + const limits = cfg.limits; + const parsedConType = cfg.parsedConType; + this.boy = boy; + this.fieldSizeLimit = getLimit(limits, "fieldSize", 1 * 1024 * 1024); + this.fieldNameSizeLimit = getLimit(limits, "fieldNameSize", 100); + this.fieldsLimit = getLimit(limits, "fields", Infinity); + let charset; + for (var i$1 = 0, len = parsedConType.length; i$1 < len; ++i$1) if (Array.isArray(parsedConType[i$1]) && RE_CHARSET.test(parsedConType[i$1][0])) { + charset = parsedConType[i$1][1].toLowerCase(); + break; + } + if (charset === void 0) charset = cfg.defCharset || "utf8"; + this.decoder = new Decoder(); + this.charset = charset; + this._fields = 0; + this._state = "key"; + this._checkingBytes = true; + this._bytesKey = 0; + this._bytesVal = 0; + this._key = ""; + this._val = ""; + this._keyTrunc = false; + this._valTrunc = false; + this._hitLimit = false; + } + UrlEncoded.prototype.write = function(data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true; + this.boy.emit("fieldsLimit"); + } + return cb(); + } + let idxeq; + let idxamp; + let i$1; + let p = 0; + const len = data.length; + while (p < len) if (this._state === "key") { + idxeq = idxamp = void 0; + for (i$1 = p; i$1 < len; ++i$1) { + if (!this._checkingBytes) ++p; + if (data[i$1] === 61) { + idxeq = i$1; + break; + } else if (data[i$1] === 38) { + idxamp = i$1; + break; + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true; + break; + } else if (this._checkingBytes) ++this._bytesKey; + } + if (idxeq !== void 0) { + if (idxeq > p) this._key += this.decoder.write(data.toString("binary", p, idxeq)); + this._state = "val"; + this._hitLimit = false; + this._checkingBytes = true; + this._val = ""; + this._bytesVal = 0; + this._valTrunc = false; + this.decoder.reset(); + p = idxeq + 1; + } else if (idxamp !== void 0) { + ++this._fields; + let key; + const keyTrunc = this._keyTrunc; + if (idxamp > p) key = this._key += this.decoder.write(data.toString("binary", p, idxamp)); + else key = this._key; + this._hitLimit = false; + this._checkingBytes = true; + this._key = ""; + this._bytesKey = 0; + this._keyTrunc = false; + this.decoder.reset(); + if (key.length) this.boy.emit("field", decodeText(key, "binary", this.charset), "", keyTrunc, false); + p = idxamp + 1; + if (this._fields === this.fieldsLimit) return cb(); + } else if (this._hitLimit) { + if (i$1 > p) this._key += this.decoder.write(data.toString("binary", p, i$1)); + p = i$1; + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + this._checkingBytes = false; + this._keyTrunc = true; + } + } else { + if (p < len) this._key += this.decoder.write(data.toString("binary", p)); + p = len; + } + } else { + idxamp = void 0; + for (i$1 = p; i$1 < len; ++i$1) { + if (!this._checkingBytes) ++p; + if (data[i$1] === 38) { + idxamp = i$1; + break; + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true; + break; + } else if (this._checkingBytes) ++this._bytesVal; + } + if (idxamp !== void 0) { + ++this._fields; + if (idxamp > p) this._val += this.decoder.write(data.toString("binary", p, idxamp)); + this.boy.emit("field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); + this._state = "key"; + this._hitLimit = false; + this._checkingBytes = true; + this._key = ""; + this._bytesKey = 0; + this._keyTrunc = false; + this.decoder.reset(); + p = idxamp + 1; + if (this._fields === this.fieldsLimit) return cb(); + } else if (this._hitLimit) { + if (i$1 > p) this._val += this.decoder.write(data.toString("binary", p, i$1)); + p = i$1; + if (this._val === "" && this.fieldSizeLimit === 0 || (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + this._checkingBytes = false; + this._valTrunc = true; + } + } else { + if (p < len) this._val += this.decoder.write(data.toString("binary", p)); + p = len; + } + } + cb(); + }; + UrlEncoded.prototype.end = function() { + if (this.boy._done) return; + if (this._state === "key" && this._key.length > 0) this.boy.emit("field", decodeText(this._key, "binary", this.charset), "", this._keyTrunc, false); + else if (this._state === "val") this.boy.emit("field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); + this.boy._done = true; + this.boy.emit("finish"); + }; + module.exports = UrlEncoded; +} }); + +//#endregion +//#region node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js +var require_main = __commonJS({ "node_modules/.deno/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js"(exports, module) { + const WritableStream = __require("node:stream").Writable; + const { inherits } = __require("node:util"); + const Dicer = require_Dicer(); + const MultipartParser = require_multipart(); + const UrlencodedParser = require_urlencoded(); + const parseParams = require_parseParams(); + function Busboy$1(opts) { + if (!(this instanceof Busboy$1)) return new Busboy$1(opts); + if (typeof opts !== "object") throw new TypeError("Busboy expected an options-Object."); + if (typeof opts.headers !== "object") throw new TypeError("Busboy expected an options-Object with headers-attribute."); + if (typeof opts.headers["content-type"] !== "string") throw new TypeError("Missing Content-Type-header."); + const { headers,...streamOptions } = opts; + this.opts = { + autoDestroy: false, + ...streamOptions + }; + WritableStream.call(this, this.opts); + this._done = false; + this._parser = this.getParserByHeaders(headers); + this._finished = false; + } + inherits(Busboy$1, WritableStream); + Busboy$1.prototype.emit = function(ev) { + if (ev === "finish") { + if (!this._done) { + this._parser?.end(); + return; + } else if (this._finished) return; + this._finished = true; + } + WritableStream.prototype.emit.apply(this, arguments); + }; + Busboy$1.prototype.getParserByHeaders = function(headers) { + const parsed = parseParams(headers["content-type"]); + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + }; + if (MultipartParser.detect.test(parsed[0])) return new MultipartParser(this, cfg); + if (UrlencodedParser.detect.test(parsed[0])) return new UrlencodedParser(this, cfg); + throw new Error("Unsupported Content-Type."); + }; + Busboy$1.prototype._write = function(chunk, encoding, cb) { + this._parser.write(chunk, cb); + }; + module.exports = Busboy$1; + module.exports.default = Busboy$1; + module.exports.Busboy = Busboy$1; + module.exports.Dicer = Dicer; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/constants.js +var require_constants$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/constants.js"(exports, module) { + const { MessageChannel, receiveMessageOnPort } = __require("worker_threads"); + const corsSafeListedMethods = [ + "GET", + "HEAD", + "POST" + ]; + const corsSafeListedMethodsSet$1 = new Set(corsSafeListedMethods); + const nullBodyStatus$2 = [ + 101, + 204, + 205, + 304 + ]; + const redirectStatus = [ + 301, + 302, + 303, + 307, + 308 + ]; + const redirectStatusSet$3 = new Set(redirectStatus); + const badPorts = [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6697", + "10080" + ]; + const badPortsSet$1 = new Set(badPorts); + const referrerPolicy$1 = [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ]; + const referrerPolicySet = new Set(referrerPolicy$1); + const requestRedirect$1 = [ + "follow", + "manual", + "error" + ]; + const safeMethods = [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ]; + const safeMethodsSet$1 = new Set(safeMethods); + const requestMode$1 = [ + "navigate", + "same-origin", + "no-cors", + "cors" + ]; + const requestCredentials$1 = [ + "omit", + "same-origin", + "include" + ]; + const requestCache$1 = [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ]; + const requestBodyHeader$1 = [ + "content-encoding", + "content-language", + "content-location", + "content-type", + "content-length" + ]; + const requestDuplex$1 = ["half"]; + const forbiddenMethods = [ + "CONNECT", + "TRACE", + "TRACK" + ]; + const forbiddenMethodsSet$1 = new Set(forbiddenMethods); + const subresource = [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ]; + const subresourceSet$1 = new Set(subresource); + /** @type {globalThis['DOMException']} */ + const DOMException$6 = globalThis.DOMException ?? (() => { + try { + atob("~"); + } catch (err) { + return Object.getPrototypeOf(err).constructor; + } + })(); + let channel; + /** @type {globalThis['structuredClone']} */ + const structuredClone$1 = globalThis.structuredClone ?? function structuredClone$2(value, options = void 0) { + if (arguments.length === 0) throw new TypeError("missing argument"); + if (!channel) channel = new MessageChannel(); + channel.port1.unref(); + channel.port2.unref(); + channel.port1.postMessage(value, options?.transfer); + return receiveMessageOnPort(channel.port2).message; + }; + module.exports = { + DOMException: DOMException$6, + structuredClone: structuredClone$1, + subresource, + forbiddenMethods, + requestBodyHeader: requestBodyHeader$1, + referrerPolicy: referrerPolicy$1, + requestRedirect: requestRedirect$1, + requestMode: requestMode$1, + requestCredentials: requestCredentials$1, + requestCache: requestCache$1, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus: nullBodyStatus$2, + safeMethods, + badPorts, + requestDuplex: requestDuplex$1, + subresourceSet: subresourceSet$1, + badPortsSet: badPortsSet$1, + redirectStatusSet: redirectStatusSet$3, + corsSafeListedMethodsSet: corsSafeListedMethodsSet$1, + safeMethodsSet: safeMethodsSet$1, + forbiddenMethodsSet: forbiddenMethodsSet$1, + referrerPolicySet + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/global.js +var require_global$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/global.js"(exports, module) { + const globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin$4() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module.exports = { + getGlobalOrigin: getGlobalOrigin$4, + setGlobalOrigin + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/util.js +var require_util$5 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/util.js"(exports, module) { + const { redirectStatusSet: redirectStatusSet$2, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants$3(); + const { getGlobalOrigin: getGlobalOrigin$3 } = require_global$1(); + const { performance: performance$1 } = __require("perf_hooks"); + const { isBlobLike: isBlobLike$6, toUSVString: toUSVString$4, ReadableStreamFrom: ReadableStreamFrom$2 } = require_util$6(); + const assert$18 = __require("assert"); + const { isUint8Array: isUint8Array$1 } = __require("util/types"); + let supportedHashes = []; + /** @type {import('crypto')|undefined} */ + let crypto$2; + try { + crypto$2 = __require("crypto"); + const possibleRelevantHashes = [ + "sha256", + "sha384", + "sha512" + ]; + supportedHashes = crypto$2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch {} + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL$1(response, requestFragment) { + if (!redirectStatusSet$2.has(response.status)) return null; + let location = response.headersList.get("location"); + if (location !== null && isValidHeaderValue$1(location)) location = new URL(location, responseURL(response)); + if (location && !location.hash) location.hash = requestFragment; + return location; + } + /** @returns {URL} */ + function requestCurrentURL$1(request$1) { + return request$1.urlList[request$1.urlList.length - 1]; + } + function requestBadPort$1(request$1) { + const url = requestCurrentURL$1(request$1); + if (urlIsHttpHttpsScheme$2(url) && badPortsSet.has(url.port)) return "blocked"; + return "allowed"; + } + function isErrorLike$2(object) { + return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; + } + function isValidReasonPhrase$1(statusText) { + for (let i$1 = 0; i$1 < statusText.length; ++i$1) { + const c = statusText.charCodeAt(i$1); + if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; + } + return true; + } + /** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: return false; + default: return c >= 33 && c <= 126; + } + } + /** + * @param {string} characters + */ + function isValidHTTPToken$1(characters) { + if (characters.length === 0) return false; + for (let i$1 = 0; i$1 < characters.length; ++i$1) if (!isTokenCharCode(characters.charCodeAt(i$1))) return false; + return true; + } + /** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ + function isValidHeaderName$2(potentialValue) { + return isValidHTTPToken$1(potentialValue); + } + /** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ + function isValidHeaderValue$1(potentialValue) { + if (potentialValue.startsWith(" ") || potentialValue.startsWith(" ") || potentialValue.endsWith(" ") || potentialValue.endsWith(" ")) return false; + if (potentialValue.includes("\0") || potentialValue.includes("\r") || potentialValue.includes("\n")) return false; + return true; + } + function setRequestReferrerPolicyOnRedirect$1(request$1, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy") ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) for (let i$1 = policyHeader.length; i$1 !== 0; i$1--) { + const token = policyHeader[i$1 - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + if (policy !== "") request$1.referrerPolicy = policy; + } + function crossOriginResourcePolicyCheck$1() { + return "allowed"; + } + function corsCheck$1() { + return "success"; + } + function TAOCheck$1() { + return "success"; + } + function appendFetchMetadata$1(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header); + } + function appendRequestOriginHeader$1(request$1) { + let serializedOrigin = request$1.origin; + if (request$1.responseTainting === "cors" || request$1.mode === "websocket") { + if (serializedOrigin) request$1.headersList.append("origin", serializedOrigin); + } else if (request$1.method !== "GET" && request$1.method !== "HEAD") { + switch (request$1.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request$1.origin && urlHasHttpsScheme$1(request$1.origin) && !urlHasHttpsScheme$1(requestCurrentURL$1(request$1))) serializedOrigin = null; + break; + case "same-origin": + if (!sameOrigin$2(request$1, requestCurrentURL$1(request$1))) serializedOrigin = null; + break; + default: + } + if (serializedOrigin) request$1.headersList.append("origin", serializedOrigin); + } + } + function coarsenedSharedCurrentTime$1(crossOriginIsolatedCapability) { + return performance$1.now(); + } + function createOpaqueTimingInfo$1(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer$2() { + return { referrerPolicy: "strict-origin-when-cross-origin" }; + } + function clonePolicyContainer$1(policyContainer) { + return { referrerPolicy: policyContainer.referrerPolicy }; + } + function determineRequestsReferrer$1(request$1) { + const policy = request$1.referrerPolicy; + assert$18(policy); + let referrerSource = null; + if (request$1.referrer === "client") { + const globalOrigin$1 = getGlobalOrigin$3(); + if (!globalOrigin$1 || globalOrigin$1.origin === "null") return "no-referrer"; + referrerSource = new URL(globalOrigin$1); + } else if (request$1.referrer instanceof URL) referrerSource = request$1.referrer; + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; + const areSameOrigin = sameOrigin$2(request$1, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request$1.url); + switch (policy) { + case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); + case "unsafe-url": return referrerURL; + case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; + case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL$1(request$1); + if (sameOrigin$2(referrerURL, currentURL)) return referrerURL; + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; + return referrerOrigin; + } + case "strict-origin": + case "no-referrer-when-downgrade": + default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + } + } + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ + function stripURLForReferrer(url, originOnly) { + assert$18(url instanceof URL); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; + } + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) return false; + if (url.href === "about:blank" || url.href === "about:srcdoc") return true; + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; + return false; + } + } + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ + function bytesMatch$1(bytes, metadataList) { + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto$2 === void 0) return true; + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") return true; + if (parsedMetadata.length === 0) return true; + const strongest = getStrongestMetadata(parsedMetadata); + const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto$2.createHash(algorithm).update(bytes).digest("base64"); + if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); + else actualValue = actualValue.slice(0, -1); + if (compareBase64Mixed(actualValue, expectedValue)) return true; + } + return false; + } + const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ + function parseMetadata(metadata) { + /** @type {{ algo: string, hash: string }[]} */ + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) result.push(parsedToken.groups); + } + if (empty === true) return "no metadata"; + return result; + } + /** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") return algorithm; + for (let i$1 = 1; i$1 < metadataList.length; ++i$1) { + const metadata = metadataList[i$1]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") continue; + else if (metadata.algo[3] === "3") algorithm = "sha384"; + } + return algorithm; + } + function filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) return metadataList; + let pos = 0; + for (let i$1 = 0; i$1 < metadataList.length; ++i$1) if (metadataList[i$1].algo === algorithm) metadataList[pos++] = metadataList[i$1]; + metadataList.length = pos; + return metadataList; + } + /** + * Compares two base64 strings, allowing for base64url + * in the second string. + * + * @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ + function compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) return false; + for (let i$1 = 0; i$1 < actualValue.length; ++i$1) if (actualValue[i$1] !== expectedValue[i$1]) { + if (actualValue[i$1] === "+" && expectedValue[i$1] === "-" || actualValue[i$1] === "/" && expectedValue[i$1] === "_") continue; + return false; + } + return true; + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL$1(request$1) {} + /** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ + function sameOrigin$2(A, B) { + if (A.origin === B.origin && A.origin === "null") return true; + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; + return false; + } + function createDeferredPromise$3() { + let res; + let rej; + const promise = new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }); + return { + promise, + resolve: res, + reject: rej + }; + } + function isAborted$2(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled$2(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + const normalizeMethodRecord$1 = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + Object.setPrototypeOf(normalizeMethodRecord$1, null); + /** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ + function normalizeMethod$1(method) { + return normalizeMethodRecord$1[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString$1(value) { + const result = JSON.stringify(value); + if (result === void 0) throw new TypeError("Value is not JSON serializable"); + assert$18(typeof result === "string"); + return result; + } + const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {() => unknown[]} iterator + * @param {string} name name of the instance + * @param {'key'|'value'|'key+value'} kind + */ + function makeIterator$2(iterator, name, kind) { + const object = { + index: 0, + kind, + target: iterator + }; + const i$1 = { + next() { + if (Object.getPrototypeOf(this) !== i$1) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); + const { index, kind: kind$1, target } = object; + const values = target(); + const len = values.length; + if (index >= len) return { + value: void 0, + done: true + }; + const pair = values[index]; + object.index = index + 1; + return iteratorResult(pair, kind$1); + }, + [Symbol.toStringTag]: `${name} Iterator` + }; + Object.setPrototypeOf(i$1, esIteratorPrototype); + return Object.setPrototypeOf({}, i$1); + } + function iteratorResult(pair, kind) { + let result; + switch (kind) { + case "key": { + result = pair[0]; + break; + } + case "value": { + result = pair[1]; + break; + } + case "key+value": { + result = pair; + break; + } + } + return { + value: result, + done: false + }; + } + /** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ + async function fullyReadBody$2(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + const result = await readAllBytes$1(reader); + successSteps(result); + } catch (e) { + errorSteps(e); + } + } + /** @type {ReadableStream} */ + let ReadableStream$3 = globalThis.ReadableStream; + function isReadableStreamLike$1(stream$2) { + if (!ReadableStream$3) ReadableStream$3 = __require("stream/web").ReadableStream; + return stream$2 instanceof ReadableStream$3 || stream$2[Symbol.toStringTag] === "ReadableStream" && typeof stream$2.tee === "function"; + } + const MAXIMUM_ARGUMENT_LENGTH = 65535; + /** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {number[]|Uint8Array} input + */ + function isomorphicDecode$1(input) { + if (input.length < MAXIMUM_ARGUMENT_LENGTH) return String.fromCharCode(...input); + return input.reduce((previous, current) => previous + String.fromCharCode(current), ""); + } + /** + * @param {ReadableStreamController} controller + */ + function readableStreamClose$2(controller) { + try { + controller.close(); + } catch (err) { + if (!err.message.includes("Controller is already closed")) throw err; + } + } + /** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ + function isomorphicEncode$2(input) { + for (let i$1 = 0; i$1 < input.length; i$1++) assert$18(input.charCodeAt(i$1) <= 255); + return input; + } + /** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ + async function readAllBytes$1(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) return Buffer.concat(bytes, byteLength); + if (!isUint8Array$1(chunk)) throw new TypeError("Received non-Uint8Array chunk"); + bytes.push(chunk); + byteLength += chunk.length; + } + } + /** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ + function urlIsLocal$1(url) { + assert$18("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + /** + * @param {string|URL} url + */ + function urlHasHttpsScheme$1(url) { + if (typeof url === "string") return url.startsWith("https:"); + return url.protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ + function urlIsHttpHttpsScheme$2(url) { + assert$18("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + /** + * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0. + */ + const hasOwn$1 = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); + module.exports = { + isAborted: isAborted$2, + isCancelled: isCancelled$2, + createDeferredPromise: createDeferredPromise$3, + ReadableStreamFrom: ReadableStreamFrom$2, + toUSVString: toUSVString$4, + tryUpgradeRequestToAPotentiallyTrustworthyURL: tryUpgradeRequestToAPotentiallyTrustworthyURL$1, + coarsenedSharedCurrentTime: coarsenedSharedCurrentTime$1, + determineRequestsReferrer: determineRequestsReferrer$1, + makePolicyContainer: makePolicyContainer$2, + clonePolicyContainer: clonePolicyContainer$1, + appendFetchMetadata: appendFetchMetadata$1, + appendRequestOriginHeader: appendRequestOriginHeader$1, + TAOCheck: TAOCheck$1, + corsCheck: corsCheck$1, + crossOriginResourcePolicyCheck: crossOriginResourcePolicyCheck$1, + createOpaqueTimingInfo: createOpaqueTimingInfo$1, + setRequestReferrerPolicyOnRedirect: setRequestReferrerPolicyOnRedirect$1, + isValidHTTPToken: isValidHTTPToken$1, + requestBadPort: requestBadPort$1, + requestCurrentURL: requestCurrentURL$1, + responseURL, + responseLocationURL: responseLocationURL$1, + isBlobLike: isBlobLike$6, + isURLPotentiallyTrustworthy, + isValidReasonPhrase: isValidReasonPhrase$1, + sameOrigin: sameOrigin$2, + normalizeMethod: normalizeMethod$1, + serializeJavascriptValueToJSONString: serializeJavascriptValueToJSONString$1, + makeIterator: makeIterator$2, + isValidHeaderName: isValidHeaderName$2, + isValidHeaderValue: isValidHeaderValue$1, + hasOwn: hasOwn$1, + isErrorLike: isErrorLike$2, + fullyReadBody: fullyReadBody$2, + bytesMatch: bytesMatch$1, + isReadableStreamLike: isReadableStreamLike$1, + readableStreamClose: readableStreamClose$2, + isomorphicEncode: isomorphicEncode$2, + isomorphicDecode: isomorphicDecode$1, + urlIsLocal: urlIsLocal$1, + urlHasHttpsScheme: urlHasHttpsScheme$1, + urlIsHttpHttpsScheme: urlIsHttpHttpsScheme$2, + readAllBytes: readAllBytes$1, + normalizeMethodRecord: normalizeMethodRecord$1, + parseMetadata + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js +var require_symbols$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js"(exports, module) { + module.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kGuard: Symbol("guard"), + kRealm: Symbol("realm") + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js +var require_webidl = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js"(exports, module) { + const { types: types$4 } = __require("util"); + const { hasOwn, toUSVString: toUSVString$3 } = require_util$5(); + /** @type {import('../../types/webidl').Webidl} */ + const webidl$14 = {}; + webidl$14.converters = {}; + webidl$14.util = {}; + webidl$14.errors = {}; + webidl$14.errors.exception = function(message) { + return new TypeError(`${message.header}: ${message.message}`); + }; + webidl$14.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; + return webidl$14.errors.exception({ + header: context.prefix, + message + }); + }; + webidl$14.errors.invalidArgument = function(context) { + return webidl$14.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl$14.brandCheck = function(V, I, opts = void 0) { + if (opts?.strict !== false && !(V instanceof I)) throw new TypeError("Illegal invocation"); + else return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag]; + }; + webidl$14.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) throw webidl$14.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + ...ctx + }); + }; + webidl$14.illegalConstructor = function() { + throw webidl$14.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl$14.util.Type = function(V) { + switch (typeof V) { + case "undefined": return "Undefined"; + case "boolean": return "Boolean"; + case "string": return "String"; + case "symbol": return "Symbol"; + case "number": return "Number"; + case "bigint": return "BigInt"; + case "function": + case "object": { + if (V === null) return "Null"; + return "Object"; + } + } + }; + webidl$14.util.ConvertToInt = function(V, bitLength, signedness, opts = {}) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") lowerBound = 0; + else lowerBound = Math.pow(-2, 53) + 1; + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) x = 0; + if (opts.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl$14.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${V} to an integer.` + }); + x = webidl$14.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) throw webidl$14.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + return x; + } + if (!Number.isNaN(x) && opts.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) x = Math.floor(x); + else x = Math.ceil(x); + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; + x = webidl$14.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); + return x; + }; + webidl$14.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) return -1 * r; + return r; + }; + webidl$14.sequenceConverter = function(converter) { + return (V) => { + if (webidl$14.util.Type(V) !== "Object") throw webidl$14.errors.exception({ + header: "Sequence", + message: `Value of type ${webidl$14.util.Type(V)} is not an Object.` + }); + /** @type {Generator} */ + const method = V?.[Symbol.iterator]?.(); + const seq = []; + if (method === void 0 || typeof method.next !== "function") throw webidl$14.errors.exception({ + header: "Sequence", + message: "Object is not an iterator." + }); + while (true) { + const { done, value } = method.next(); + if (done) break; + seq.push(converter(value)); + } + return seq; + }; + }; + webidl$14.recordConverter = function(keyConverter, valueConverter) { + return (O) => { + if (webidl$14.util.Type(O) !== "Object") throw webidl$14.errors.exception({ + header: "Record", + message: `Value of type ${webidl$14.util.Type(O)} is not an Object.` + }); + const result = {}; + if (!types$4.isProxy(O)) { + const keys$1 = Object.keys(O); + for (const key of keys$1) { + const typedKey = keyConverter(key); + const typedValue = valueConverter(O[key]); + result[typedKey] = typedValue; + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) { + const desc = Reflect.getOwnPropertyDescriptor(O, key); + if (desc?.enumerable) { + const typedKey = keyConverter(key); + const typedValue = valueConverter(O[key]); + result[typedKey] = typedValue; + } + } + return result; + }; + }; + webidl$14.interfaceConverter = function(i$1) { + return (V, opts = {}) => { + if (opts.strict !== false && !(V instanceof i$1)) throw webidl$14.errors.exception({ + header: i$1.name, + message: `Expected ${V} to be an instance of ${i$1.name}.` + }); + return V; + }; + }; + webidl$14.dictionaryConverter = function(converters) { + return (dictionary) => { + const type = webidl$14.util.Type(dictionary); + const dict = {}; + if (type === "Null" || type === "Undefined") return dict; + else if (type !== "Object") throw webidl$14.errors.exception({ + header: "Dictionary", + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (!hasOwn(dictionary, key)) throw webidl$14.errors.exception({ + header: "Dictionary", + message: `Missing required key "${key}".` + }); + } + let value = dictionary[key]; + const hasDefault = hasOwn(options, "defaultValue"); + if (hasDefault && value !== null) value = value ?? defaultValue; + if (required || hasDefault || value !== void 0) { + value = converter(value); + if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl$14.errors.exception({ + header: "Dictionary", + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + dict[key] = value; + } + } + return dict; + }; + }; + webidl$14.nullableConverter = function(converter) { + return (V) => { + if (V === null) return V; + return converter(V); + }; + }; + webidl$14.converters.DOMString = function(V, opts = {}) { + if (V === null && opts.legacyNullToEmptyString) return ""; + if (typeof V === "symbol") throw new TypeError("Could not convert argument of type symbol to string."); + return String(V); + }; + webidl$14.converters.ByteString = function(V) { + const x = webidl$14.converters.DOMString(V); + for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); + return x; + }; + webidl$14.converters.USVString = toUSVString$3; + webidl$14.converters.boolean = function(V) { + const x = Boolean(V); + return x; + }; + webidl$14.converters.any = function(V) { + return V; + }; + webidl$14.converters["long long"] = function(V) { + const x = webidl$14.util.ConvertToInt(V, 64, "signed"); + return x; + }; + webidl$14.converters["unsigned long long"] = function(V) { + const x = webidl$14.util.ConvertToInt(V, 64, "unsigned"); + return x; + }; + webidl$14.converters["unsigned long"] = function(V) { + const x = webidl$14.util.ConvertToInt(V, 32, "unsigned"); + return x; + }; + webidl$14.converters["unsigned short"] = function(V, opts) { + const x = webidl$14.util.ConvertToInt(V, 16, "unsigned", opts); + return x; + }; + webidl$14.converters.ArrayBuffer = function(V, opts = {}) { + if (webidl$14.util.Type(V) !== "Object" || !types$4.isAnyArrayBuffer(V)) throw webidl$14.errors.conversionFailed({ + prefix: `${V}`, + argument: `${V}`, + types: ["ArrayBuffer"] + }); + if (opts.allowShared === false && types$4.isSharedArrayBuffer(V)) throw webidl$14.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + return V; + }; + webidl$14.converters.TypedArray = function(V, T, opts = {}) { + if (webidl$14.util.Type(V) !== "Object" || !types$4.isTypedArray(V) || V.constructor.name !== T.name) throw webidl$14.errors.conversionFailed({ + prefix: `${T.name}`, + argument: `${V}`, + types: [T.name] + }); + if (opts.allowShared === false && types$4.isSharedArrayBuffer(V.buffer)) throw webidl$14.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + return V; + }; + webidl$14.converters.DataView = function(V, opts = {}) { + if (webidl$14.util.Type(V) !== "Object" || !types$4.isDataView(V)) throw webidl$14.errors.exception({ + header: "DataView", + message: "Object is not a DataView." + }); + if (opts.allowShared === false && types$4.isSharedArrayBuffer(V.buffer)) throw webidl$14.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + return V; + }; + webidl$14.converters.BufferSource = function(V, opts = {}) { + if (types$4.isAnyArrayBuffer(V)) return webidl$14.converters.ArrayBuffer(V, opts); + if (types$4.isTypedArray(V)) return webidl$14.converters.TypedArray(V, V.constructor); + if (types$4.isDataView(V)) return webidl$14.converters.DataView(V, opts); + throw new TypeError(`Could not convert ${V} to a BufferSource.`); + }; + webidl$14.converters["sequence"] = webidl$14.sequenceConverter(webidl$14.converters.ByteString); + webidl$14.converters["sequence>"] = webidl$14.sequenceConverter(webidl$14.converters["sequence"]); + webidl$14.converters["record"] = webidl$14.recordConverter(webidl$14.converters.ByteString, webidl$14.converters.ByteString); + module.exports = { webidl: webidl$14 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js +var require_dataURL = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js"(exports, module) { + const assert$17 = __require("assert"); + const { atob: atob$1 } = __require("buffer"); + const { isomorphicDecode } = require_util$5(); + const encoder$1 = new TextEncoder(); + /** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ + const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/; + const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/; + /** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ + const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/; + /** @param {URL} dataURL */ + function dataURLProcessor$1(dataURL) { + assert$17(dataURL.protocol === "data:"); + let input = URLSerializer$4(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast$1(",", input, position); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) return "failure"; + position.position++; + const encodedBody = input.slice(mimeTypeLength + 1); + let body = stringPercentDecode(encodedBody); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + const stringBody = isomorphicDecode(body); + body = forgivingBase64(stringBody); + if (body === "failure") return "failure"; + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; + let mimeTypeRecord = parseMIMEType$3(mimeType); + if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType$3("text/plain;charset=US-ASCII"); + return { + mimeType: mimeTypeRecord, + body + }; + } + /** + * @param {URL} url + * @param {boolean} excludeFragment + */ + function URLSerializer$4(url, excludeFragment = false) { + if (!excludeFragment) return url.href; + const href = url.href; + const hashLength = url.hash.length; + return hashLength === 0 ? href : href.substring(0, href.length - hashLength); + } + /** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + /** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePointsFast$1(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + /** @param {string} input */ + function stringPercentDecode(input) { + const bytes = encoder$1.encode(input); + return percentDecode(bytes); + } + /** @param {Uint8Array} input */ + function percentDecode(input) { + /** @type {number[]} */ + const output = []; + for (let i$1 = 0; i$1 < input.length; i$1++) { + const byte = input[i$1]; + if (byte !== 37) output.push(byte); + else if (byte === 37 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i$1 + 1], input[i$1 + 2]))) output.push(37); + else { + const nextTwoBytes = String.fromCharCode(input[i$1 + 1], input[i$1 + 2]); + const bytePoint = Number.parseInt(nextTwoBytes, 16); + output.push(bytePoint); + i$1 += 2; + } + } + return Uint8Array.from(output); + } + /** @param {string} input */ + function parseMIMEType$3(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast$1("/", input, position); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; + if (position.position > input.length) return "failure"; + position.position++; + let subtype = collectASequenceOfCodePointsFast$1(";", input, position); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + parameters: new Map(), + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + (char) => HTTP_WHITESPACE_REGEX.test(char), + input, + position +); + let parameterName = collectASequenceOfCodePoints((char) => char !== ";" && char !== "=", input, position); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") continue; + position.position++; + } + if (position.position > input.length) break; + let parameterValue = null; + if (input[position.position] === "\"") { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast$1(";", input, position); + } else { + parameterValue = collectASequenceOfCodePointsFast$1(";", input, position); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) continue; + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); + } + return mimeType; + } + /** @param {string} data */ + function forgivingBase64(data) { + data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, ""); + if (data.length % 4 === 0) data = data.replace(/=?=$/, ""); + if (data.length % 4 === 1) return "failure"; + if (/[^+/0-9A-Za-z]/.test(data)) return "failure"; + const binary = atob$1(data); + const bytes = new Uint8Array(binary.length); + for (let byte = 0; byte < binary.length; byte++) bytes[byte] = binary.charCodeAt(byte); + return bytes; + } + /** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert$17(input[position.position] === "\""); + position.position++; + while (true) { + value += collectASequenceOfCodePoints((char) => char !== "\"" && char !== "\\", input, position); + if (position.position >= input.length) break; + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert$17(quoteOrBackslash === "\""); + break; + } + } + if (extractValue) return value; + return input.slice(positionStart, position.position); + } + /** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ + function serializeAMimeType$4(mimeType) { + assert$17(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = "\"" + value; + value += "\""; + } + serialization += value; + } + return serialization; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} char + */ + function isHTTPWhiteSpace(char) { + return char === "\r" || char === "\n" || char === " " || char === " "; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + */ + function removeHTTPWhitespace(str, leading = true, trailing = true) { + let lead = 0; + let trail = str.length - 1; + if (leading) for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++); + if (trailing) for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--); + return str.slice(lead, trail + 1); + } + /** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {string} char + */ + function isASCIIWhitespace(char) { + return char === "\r" || char === "\n" || char === " " || char === "\f" || char === " "; + } + /** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + */ + function removeASCIIWhitespace(str, leading = true, trailing = true) { + let lead = 0; + let trail = str.length - 1; + if (leading) for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++); + if (trailing) for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--); + return str.slice(lead, trail + 1); + } + module.exports = { + dataURLProcessor: dataURLProcessor$1, + URLSerializer: URLSerializer$4, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast: collectASequenceOfCodePointsFast$1, + stringPercentDecode, + parseMIMEType: parseMIMEType$3, + collectAnHTTPQuotedString, + serializeAMimeType: serializeAMimeType$4 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/file.js +var require_file = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/file.js"(exports, module) { + const { Blob: Blob$4, File: NativeFile$2 } = __require("buffer"); + const { types: types$3 } = __require("util"); + const { kState: kState$9 } = require_symbols$3(); + const { isBlobLike: isBlobLike$5 } = require_util$5(); + const { webidl: webidl$13 } = require_webidl(); + const { parseMIMEType: parseMIMEType$2, serializeAMimeType: serializeAMimeType$3 } = require_dataURL(); + const { kEnumerableProperty: kEnumerableProperty$8 } = require_util$6(); + const encoder = new TextEncoder(); + var File$2 = class File$2 extends Blob$4 { + constructor(fileBits, fileName, options = {}) { + webidl$13.argumentLengthCheck(arguments, 2, { header: "File constructor" }); + fileBits = webidl$13.converters["sequence"](fileBits); + fileName = webidl$13.converters.USVString(fileName); + options = webidl$13.converters.FilePropertyBag(options); + const n = fileName; + let t$1 = options.type; + let d; + substep: { + if (t$1) { + t$1 = parseMIMEType$2(t$1); + if (t$1 === "failure") { + t$1 = ""; + break substep; + } + t$1 = serializeAMimeType$3(t$1).toLowerCase(); + } + d = options.lastModified; + } + super(processBlobParts(fileBits, options), { type: t$1 }); + this[kState$9] = { + name: n, + lastModified: d, + type: t$1 + }; + } + get name() { + webidl$13.brandCheck(this, File$2); + return this[kState$9].name; + } + get lastModified() { + webidl$13.brandCheck(this, File$2); + return this[kState$9].lastModified; + } + get type() { + webidl$13.brandCheck(this, File$2); + return this[kState$9].type; + } + }; + var FileLike$1 = class FileLike$1 { + constructor(blobLike, fileName, options = {}) { + const n = fileName; + const t$1 = options.type; + const d = options.lastModified ?? Date.now(); + this[kState$9] = { + blobLike, + name: n, + type: t$1, + lastModified: d + }; + } + stream(...args) { + webidl$13.brandCheck(this, FileLike$1); + return this[kState$9].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl$13.brandCheck(this, FileLike$1); + return this[kState$9].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl$13.brandCheck(this, FileLike$1); + return this[kState$9].blobLike.slice(...args); + } + text(...args) { + webidl$13.brandCheck(this, FileLike$1); + return this[kState$9].blobLike.text(...args); + } + get size() { + webidl$13.brandCheck(this, FileLike$1); + return this[kState$9].blobLike.size; + } + get type() { + webidl$13.brandCheck(this, FileLike$1); + return this[kState$9].blobLike.type; + } + get name() { + webidl$13.brandCheck(this, FileLike$1); + return this[kState$9].name; + } + get lastModified() { + webidl$13.brandCheck(this, FileLike$1); + return this[kState$9].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + Object.defineProperties(File$2.prototype, { + [Symbol.toStringTag]: { + value: "File", + configurable: true + }, + name: kEnumerableProperty$8, + lastModified: kEnumerableProperty$8 + }); + webidl$13.converters.Blob = webidl$13.interfaceConverter(Blob$4); + webidl$13.converters.BlobPart = function(V, opts) { + if (webidl$13.util.Type(V) === "Object") { + if (isBlobLike$5(V)) return webidl$13.converters.Blob(V, { strict: false }); + if (ArrayBuffer.isView(V) || types$3.isAnyArrayBuffer(V)) return webidl$13.converters.BufferSource(V, opts); + } + return webidl$13.converters.USVString(V, opts); + }; + webidl$13.converters["sequence"] = webidl$13.sequenceConverter(webidl$13.converters.BlobPart); + webidl$13.converters.FilePropertyBag = webidl$13.dictionaryConverter([ + { + key: "lastModified", + converter: webidl$13.converters["long long"], + get defaultValue() { + return Date.now(); + } + }, + { + key: "type", + converter: webidl$13.converters.DOMString, + defaultValue: "" + }, + { + key: "endings", + converter: (value) => { + value = webidl$13.converters.DOMString(value); + value = value.toLowerCase(); + if (value !== "native") value = "transparent"; + return value; + }, + defaultValue: "transparent" + } + ]); + /** + * @see https://www.w3.org/TR/FileAPI/#process-blob-parts + * @param {(NodeJS.TypedArray|Blob|string)[]} parts + * @param {{ type: string, endings: string }} options + */ + function processBlobParts(parts, options) { + /** @type {NodeJS.TypedArray[]} */ + const bytes = []; + for (const element of parts) if (typeof element === "string") { + let s = element; + if (options.endings === "native") s = convertLineEndingsNative(s); + bytes.push(encoder.encode(s)); + } else if (types$3.isAnyArrayBuffer(element) || types$3.isTypedArray(element)) if (!element.buffer) bytes.push(new Uint8Array(element)); + else bytes.push(new Uint8Array(element.buffer, element.byteOffset, element.byteLength)); + else if (isBlobLike$5(element)) bytes.push(element); + return bytes; + } + /** + * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native + * @param {string} s + */ + function convertLineEndingsNative(s) { + let nativeLineEnding = "\n"; + if (process.platform === "win32") nativeLineEnding = "\r\n"; + return s.replace(/\r?\n/g, nativeLineEnding); + } + function isFileLike$1(object) { + return NativeFile$2 && object instanceof NativeFile$2 || object instanceof File$2 || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + } + module.exports = { + File: File$2, + FileLike: FileLike$1, + isFileLike: isFileLike$1 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js +var require_formdata = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js"(exports, module) { + const { isBlobLike: isBlobLike$4, toUSVString: toUSVString$2, makeIterator: makeIterator$1 } = require_util$5(); + const { kState: kState$8 } = require_symbols$3(); + const { File: UndiciFile$1, FileLike, isFileLike } = require_file(); + const { webidl: webidl$12 } = require_webidl(); + const { Blob: Blob$3, File: NativeFile$1 } = __require("buffer"); + /** @type {globalThis['File']} */ + const File$1 = NativeFile$1 ?? UndiciFile$1; + var FormData$2 = class FormData$2 { + constructor(form) { + if (form !== void 0) throw webidl$12.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + this[kState$8] = []; + } + append(name, value, filename = void 0) { + webidl$12.brandCheck(this, FormData$2); + webidl$12.argumentLengthCheck(arguments, 2, { header: "FormData.append" }); + if (arguments.length === 3 && !isBlobLike$4(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl$12.converters.USVString(name); + value = isBlobLike$4(value) ? webidl$12.converters.Blob(value, { strict: false }) : webidl$12.converters.USVString(value); + filename = arguments.length === 3 ? webidl$12.converters.USVString(filename) : void 0; + const entry = makeEntry(name, value, filename); + this[kState$8].push(entry); + } + delete(name) { + webidl$12.brandCheck(this, FormData$2); + webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.delete" }); + name = webidl$12.converters.USVString(name); + this[kState$8] = this[kState$8].filter((entry) => entry.name !== name); + } + get(name) { + webidl$12.brandCheck(this, FormData$2); + webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.get" }); + name = webidl$12.converters.USVString(name); + const idx = this[kState$8].findIndex((entry) => entry.name === name); + if (idx === -1) return null; + return this[kState$8][idx].value; + } + getAll(name) { + webidl$12.brandCheck(this, FormData$2); + webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.getAll" }); + name = webidl$12.converters.USVString(name); + return this[kState$8].filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl$12.brandCheck(this, FormData$2); + webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.has" }); + name = webidl$12.converters.USVString(name); + return this[kState$8].findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl$12.brandCheck(this, FormData$2); + webidl$12.argumentLengthCheck(arguments, 2, { header: "FormData.set" }); + if (arguments.length === 3 && !isBlobLike$4(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl$12.converters.USVString(name); + value = isBlobLike$4(value) ? webidl$12.converters.Blob(value, { strict: false }) : webidl$12.converters.USVString(value); + filename = arguments.length === 3 ? toUSVString$2(filename) : void 0; + const entry = makeEntry(name, value, filename); + const idx = this[kState$8].findIndex((entry$1) => entry$1.name === name); + if (idx !== -1) this[kState$8] = [ + ...this[kState$8].slice(0, idx), + entry, + ...this[kState$8].slice(idx + 1).filter((entry$1) => entry$1.name !== name) + ]; + else this[kState$8].push(entry); + } + entries() { + webidl$12.brandCheck(this, FormData$2); + return makeIterator$1(() => this[kState$8].map((pair) => [pair.name, pair.value]), "FormData", "key+value"); + } + keys() { + webidl$12.brandCheck(this, FormData$2); + return makeIterator$1(() => this[kState$8].map((pair) => [pair.name, pair.value]), "FormData", "key"); + } + values() { + webidl$12.brandCheck(this, FormData$2); + return makeIterator$1(() => this[kState$8].map((pair) => [pair.name, pair.value]), "FormData", "value"); + } + /** + * @param {(value: string, key: string, self: FormData) => void} callbackFn + * @param {unknown} thisArg + */ + forEach(callbackFn, thisArg = globalThis) { + webidl$12.brandCheck(this, FormData$2); + webidl$12.argumentLengthCheck(arguments, 1, { header: "FormData.forEach" }); + if (typeof callbackFn !== "function") throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'."); + for (const [key, value] of this) callbackFn.apply(thisArg, [ + value, + key, + this + ]); + } + }; + FormData$2.prototype[Symbol.iterator] = FormData$2.prototype.entries; + Object.defineProperties(FormData$2.prototype, { [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } }); + /** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ + function makeEntry(name, value, filename) { + name = Buffer.from(name).toString("utf8"); + if (typeof value === "string") value = Buffer.from(value).toString("utf8"); + else { + if (!isFileLike(value)) value = value instanceof Blob$3 ? new File$1([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + if (filename !== void 0) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = NativeFile$1 && value instanceof NativeFile$1 || value instanceof UndiciFile$1 ? new File$1([value], filename, options) : new FileLike(value, filename, options); + } + } + return { + name, + value + }; + } + module.exports = { FormData: FormData$2 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/body.js +var require_body = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/body.js"(exports, module) { + const Busboy = require_main(); + const util$16 = require_util$6(); + const { ReadableStreamFrom: ReadableStreamFrom$1, isBlobLike: isBlobLike$3, isReadableStreamLike, readableStreamClose: readableStreamClose$1, createDeferredPromise: createDeferredPromise$2, fullyReadBody: fullyReadBody$1 } = require_util$5(); + const { FormData: FormData$1 } = require_formdata(); + const { kState: kState$7 } = require_symbols$3(); + const { webidl: webidl$11 } = require_webidl(); + const { DOMException: DOMException$5, structuredClone } = require_constants$3(); + const { Blob: Blob$2, File: NativeFile } = __require("buffer"); + const { kBodyUsed: kBodyUsed$1 } = require_symbols$4(); + const assert$16 = __require("assert"); + const { isErrored: isErrored$1 } = require_util$6(); + const { isUint8Array, isArrayBuffer } = __require("util/types"); + const { File: UndiciFile } = require_file(); + const { parseMIMEType: parseMIMEType$1, serializeAMimeType: serializeAMimeType$2 } = require_dataURL(); + let random; + try { + const crypto$4 = __require("node:crypto"); + random = (max) => crypto$4.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + let ReadableStream$2 = globalThis.ReadableStream; + /** @type {globalThis['File']} */ + const File = NativeFile ?? UndiciFile; + const textEncoder$1 = new TextEncoder(); + const textDecoder = new TextDecoder(); + function extractBody$3(object, keepalive = false) { + if (!ReadableStream$2) ReadableStream$2 = __require("stream/web").ReadableStream; + let stream$2 = null; + if (object instanceof ReadableStream$2) stream$2 = object; + else if (isBlobLike$3(object)) stream$2 = object.stream(); + else stream$2 = new ReadableStream$2({ + async pull(controller) { + controller.enqueue(typeof source === "string" ? textEncoder$1.encode(source) : source); + queueMicrotask(() => readableStreamClose$1(controller)); + }, + start() {}, + type: void 0 + }); + assert$16(isReadableStreamLike(stream$2)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) source = new Uint8Array(object.slice()); + else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + else if (util$16.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r\nContent-Disposition: form-data`; + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) if (typeof value === "string") { + const chunk$1 = textEncoder$1.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); + blobParts.push(chunk$1); + length += chunk$1.byteLength; + } else { + const chunk$1 = textEncoder$1.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); + blobParts.push(chunk$1, value, rn); + if (typeof value.size === "number") length += chunk$1.byteLength + value.size + rn.byteLength; + else hasUnknownSizeValue = true; + } + const chunk = textEncoder$1.encode(`--${boundary}--`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) length = null; + source = object; + action = async function* () { + for (const part of blobParts) if (part.stream) yield* part.stream(); + else yield part; + }; + type = "multipart/form-data; boundary=" + boundary; + } else if (isBlobLike$3(object)) { + source = object; + length = object.size; + if (object.type) type = object.type; + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) throw new TypeError("keepalive"); + if (util$16.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); + stream$2 = object instanceof ReadableStream$2 ? object : ReadableStreamFrom$1(object); + } + if (typeof source === "string" || util$16.isBuffer(source)) length = Buffer.byteLength(source); + if (action != null) { + let iterator; + stream$2 = new ReadableStream$2({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + }); + else if (!isErrored$1(stream$2)) controller.enqueue(new Uint8Array(value)); + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: void 0 + }); + } + const body = { + stream: stream$2, + source, + length + }; + return [body, type]; + } + function safelyExtractBody$1(object, keepalive = false) { + if (!ReadableStream$2) + // istanbul ignore next + ReadableStream$2 = __require("stream/web").ReadableStream; + if (object instanceof ReadableStream$2) { + // istanbul ignore next + assert$16(!util$16.isDisturbed(object), "The body has already been consumed."); + // istanbul ignore next + assert$16(!object.locked, "The stream is locked."); + } + return extractBody$3(object, keepalive); + } + function cloneBody$2(body) { + const [out1, out2] = body.stream.tee(); + const out2Clone = structuredClone(out2, { transfer: [out2] }); + const [, finalClone] = out2Clone.tee(); + body.stream = out1; + return { + stream: finalClone, + length: body.length, + source: body.source + }; + } + async function* consumeBody(body) { + if (body) if (isUint8Array(body)) yield body; + else { + const stream$2 = body.stream; + if (util$16.isDisturbed(stream$2)) throw new TypeError("The body has already been consumed."); + if (stream$2.locked) throw new TypeError("The stream is locked."); + stream$2[kBodyUsed$1] = true; + yield* stream$2; + } + } + function throwIfAborted(state) { + if (state.aborted) throw new DOMException$5("The operation was aborted.", "AbortError"); + } + function bodyMixinMethods(instance) { + const methods = { + blob() { + return specConsumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === "failure") mimeType = ""; + else if (mimeType) mimeType = serializeAMimeType$2(mimeType); + return new Blob$2([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return specConsumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return specConsumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return specConsumeBody(this, parseJSONFromBytes, instance); + }, + async formData() { + webidl$11.brandCheck(this, instance); + throwIfAborted(this[kState$7]); + const contentType = this.headers.get("Content-Type"); + if (/multipart\/form-data/.test(contentType)) { + const headers = {}; + for (const [key, value] of this.headers) headers[key.toLowerCase()] = value; + const responseFormData = new FormData$1(); + let busboy; + try { + busboy = new Busboy({ + headers, + preservePath: true + }); + } catch (err) { + throw new DOMException$5(`${err}`, "AbortError"); + } + busboy.on("field", (name, value) => { + responseFormData.append(name, value); + }); + busboy.on("file", (name, value, filename, encoding, mimeType) => { + const chunks = []; + if (encoding === "base64" || encoding.toLowerCase() === "base64") { + let base64chunk = ""; + value.on("data", (chunk) => { + base64chunk += chunk.toString().replace(/[\r\n]/gm, ""); + const end = base64chunk.length - base64chunk.length % 4; + chunks.push(Buffer.from(base64chunk.slice(0, end), "base64")); + base64chunk = base64chunk.slice(end); + }); + value.on("end", () => { + chunks.push(Buffer.from(base64chunk, "base64")); + responseFormData.append(name, new File(chunks, filename, { type: mimeType })); + }); + } else { + value.on("data", (chunk) => { + chunks.push(chunk); + }); + value.on("end", () => { + responseFormData.append(name, new File(chunks, filename, { type: mimeType })); + }); + } + }); + const busboyResolve = new Promise((resolve, reject) => { + busboy.on("finish", resolve); + busboy.on("error", (err) => reject(new TypeError(err))); + }); + if (this.body !== null) for await (const chunk of consumeBody(this[kState$7].body)) busboy.write(chunk); + busboy.end(); + await busboyResolve; + return responseFormData; + } else if (/application\/x-www-form-urlencoded/.test(contentType)) { + let entries; + try { + let text = ""; + const streamingDecoder = new TextDecoder("utf-8", { ignoreBOM: true }); + for await (const chunk of consumeBody(this[kState$7].body)) { + if (!isUint8Array(chunk)) throw new TypeError("Expected Uint8Array chunk"); + text += streamingDecoder.decode(chunk, { stream: true }); + } + text += streamingDecoder.decode(); + entries = new URLSearchParams(text); + } catch (err) { + // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. + throw Object.assign(new TypeError(), { cause: err }); + } + const formData = new FormData$1(); + for (const [name, value] of entries) formData.append(name, value); + return formData; + } else { + await Promise.resolve(); + throwIfAborted(this[kState$7]); + throw webidl$11.errors.exception({ + header: `${instance.name}.formData`, + message: "Could not parse content as FormData." + }); + } + } + }; + return methods; + } + function mixinBody$2(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ + async function specConsumeBody(object, convertBytesToJSValue, instance) { + webidl$11.brandCheck(object, instance); + throwIfAborted(object[kState$7]); + if (bodyUnusable(object[kState$7].body)) throw new TypeError("Body is unusable"); + const promise = createDeferredPromise$2(); + const errorSteps = (error$1) => promise.reject(error$1); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState$7].body == null) { + successSteps(new Uint8Array()); + return promise.promise; + } + await fullyReadBody$1(object[kState$7].body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(body) { + return body != null && (body.stream.locked || util$16.isDisturbed(body.stream)); + } + /** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) return ""; + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) buffer = buffer.subarray(3); + const output = textDecoder.decode(buffer); + return output; + } + /** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} object + */ + function bodyMimeType(object) { + const { headersList } = object[kState$7]; + const contentType = headersList.get("content-type"); + if (contentType === null) return "failure"; + return parseMIMEType$1(contentType); + } + module.exports = { + extractBody: extractBody$3, + safelyExtractBody: safelyExtractBody$1, + cloneBody: cloneBody$2, + mixinBody: mixinBody$2 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/request.js +var require_request$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/request.js"(exports, module) { + const { InvalidArgumentError: InvalidArgumentError$20, NotSupportedError: NotSupportedError$1 } = require_errors(); + const assert$15 = __require("assert"); + const { kHTTP2BuildRequest: kHTTP2BuildRequest$1, kHTTP2CopyHeaders: kHTTP2CopyHeaders$1, kHTTP1BuildRequest: kHTTP1BuildRequest$1 } = require_symbols$4(); + const util$15 = require_util$6(); + /** + * Verifies that the given val is a valid HTTP token + * per the rules defined in RFC 7230 + * See https://tools.ietf.org/html/rfc7230#section-3.2.6 + */ + const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; + /** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ + const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + const invalidPathRegex = /[^\u0021-\u00ff]/; + const kHandler = Symbol("handler"); + const channels$3 = {}; + let extractBody$2; + try { + const diagnosticsChannel$2 = __require("diagnostics_channel"); + channels$3.create = diagnosticsChannel$2.channel("undici:request:create"); + channels$3.bodySent = diagnosticsChannel$2.channel("undici:request:bodySent"); + channels$3.headers = diagnosticsChannel$2.channel("undici:request:headers"); + channels$3.trailers = diagnosticsChannel$2.channel("undici:request:trailers"); + channels$3.error = diagnosticsChannel$2.channel("undici:request:error"); + } catch { + channels$3.create = { hasSubscribers: false }; + channels$3.bodySent = { hasSubscribers: false }; + channels$3.headers = { hasSubscribers: false }; + channels$3.trailers = { hasSubscribers: false }; + channels$3.error = { hasSubscribers: false }; + } + var Request$4 = class Request$4 { + constructor(origin, { path: path$5, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue }, handler) { + if (typeof path$5 !== "string") throw new InvalidArgumentError$20("path must be a string"); + else if (path$5[0] !== "/" && !(path$5.startsWith("http://") || path$5.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$20("path must be an absolute URL or start with a slash"); + else if (invalidPathRegex.exec(path$5) !== null) throw new InvalidArgumentError$20("invalid request path"); + if (typeof method !== "string") throw new InvalidArgumentError$20("method must be a string"); + else if (tokenRegExp.exec(method) === null) throw new InvalidArgumentError$20("invalid request method"); + if (upgrade$1 && typeof upgrade$1 !== "string") throw new InvalidArgumentError$20("upgrade must be a string"); + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$20("invalid headersTimeout"); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$20("invalid bodyTimeout"); + if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError$20("invalid reset"); + if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError$20("invalid expectContinue"); + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) this.body = null; + else if (util$15.isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + util$15.destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) this.abort(err); + else this.error = err; + }; + this.body.on("error", this.errorHandler); + } else if (util$15.isBuffer(body)) this.body = body.byteLength ? body : null; + else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; + else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; + else if (util$15.isFormDataLike(body) || util$15.isIterable(body) || util$15.isBlobLike(body)) this.body = body; + else throw new InvalidArgumentError$20("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + this.completed = false; + this.aborted = false; + this.upgrade = upgrade$1 || null; + this.path = query ? util$15.buildURL(path$5, query) : path$5; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = ""; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) throw new InvalidArgumentError$20("headers array must be even"); + for (let i$1 = 0; i$1 < headers.length; i$1 += 2) processHeader(this, headers[i$1], headers[i$1 + 1]); + } else if (headers && typeof headers === "object") { + const keys = Object.keys(headers); + for (let i$1 = 0; i$1 < keys.length; i$1++) { + const key = keys[i$1]; + processHeader(this, key, headers[key]); + } + } else if (headers != null) throw new InvalidArgumentError$20("headers must be an object or an array"); + if (util$15.isFormDataLike(this.body)) { + if (util$15.nodeMajor < 16 || util$15.nodeMajor === 16 && util$15.nodeMinor < 8) throw new InvalidArgumentError$20("Form-Data bodies are only supported in node v16.8 and newer."); + if (!extractBody$2) extractBody$2 = require_body().extractBody; + const [bodyStream, contentType] = extractBody$2(body); + if (this.contentType == null) { + this.contentType = contentType; + this.headers += `content-type: ${contentType}\r\n`; + } + this.body = bodyStream.stream; + this.contentLength = bodyStream.length; + } else if (util$15.isBlobLike(body) && this.contentType == null && body.type) { + this.contentType = body.type; + this.headers += `content-type: ${body.type}\r\n`; + } + util$15.validateHandler(handler, method, upgrade$1); + this.servername = util$15.getServerName(this.host); + this[kHandler] = handler; + if (channels$3.create.hasSubscribers) channels$3.create.publish({ request: this }); + } + onBodySent(chunk) { + if (this[kHandler].onBodySent) try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + onRequestSent() { + if (channels$3.bodySent.hasSubscribers) channels$3.bodySent.publish({ request: this }); + if (this[kHandler].onRequestSent) try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + onConnect(abort$1) { + assert$15(!this.aborted); + assert$15(!this.completed); + if (this.error) abort$1(this.error); + else { + this.abort = abort$1; + return this[kHandler].onConnect(abort$1); + } + } + onHeaders(statusCode, headers, resume$1, statusText) { + assert$15(!this.aborted); + assert$15(!this.completed); + if (channels$3.headers.hasSubscribers) channels$3.headers.publish({ + request: this, + response: { + statusCode, + headers, + statusText + } + }); + try { + return this[kHandler].onHeaders(statusCode, headers, resume$1, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + assert$15(!this.aborted); + assert$15(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert$15(!this.aborted); + assert$15(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert$15(!this.aborted); + this.completed = true; + if (channels$3.trailers.hasSubscribers) channels$3.trailers.publish({ + request: this, + trailers + }); + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error$1) { + this.onFinally(); + if (channels$3.error.hasSubscribers) channels$3.error.publish({ + request: this, + error: error$1 + }); + if (this.aborted) return; + this.aborted = true; + return this[kHandler].onError(error$1); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + static [kHTTP1BuildRequest$1](origin, opts, handler) { + return new Request$4(origin, opts, handler); + } + static [kHTTP2BuildRequest$1](origin, opts, handler) { + const headers = opts.headers; + opts = { + ...opts, + headers: null + }; + const request$1 = new Request$4(origin, opts, handler); + request$1.headers = {}; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) throw new InvalidArgumentError$20("headers array must be even"); + for (let i$1 = 0; i$1 < headers.length; i$1 += 2) processHeader(request$1, headers[i$1], headers[i$1 + 1], true); + } else if (headers && typeof headers === "object") { + const keys = Object.keys(headers); + for (let i$1 = 0; i$1 < keys.length; i$1++) { + const key = keys[i$1]; + processHeader(request$1, key, headers[key], true); + } + } else if (headers != null) throw new InvalidArgumentError$20("headers must be an object or an array"); + return request$1; + } + static [kHTTP2CopyHeaders$1](raw) { + const rawHeaders = raw.split("\r\n"); + const headers = {}; + for (const header of rawHeaders) { + const [key, value] = header.split(": "); + if (value == null || value.length === 0) continue; + if (headers[key]) headers[key] += `,${value}`; + else headers[key] = value; + } + return headers; + } + }; + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") throw new InvalidArgumentError$20(`invalid ${key} header`); + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) throw new InvalidArgumentError$20(`invalid ${key} header`); + return skipAppend ? val : `${key}: ${val}\r\n`; + } + function processHeader(request$1, key, val, skipAppend = false) { + if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError$20(`invalid ${key} header`); + else if (val === void 0) return; + if (request$1.host === null && key.length === 4 && key.toLowerCase() === "host") { + if (headerCharRegex.exec(val) !== null) throw new InvalidArgumentError$20(`invalid ${key} header`); + request$1.host = val; + } else if (request$1.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { + request$1.contentLength = parseInt(val, 10); + if (!Number.isFinite(request$1.contentLength)) throw new InvalidArgumentError$20("invalid content-length header"); + } else if (request$1.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { + request$1.contentType = val; + if (skipAppend) request$1.headers[key] = processHeaderValue(key, val, skipAppend); + else request$1.headers += processHeaderValue(key, val); + } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") throw new InvalidArgumentError$20("invalid transfer-encoding header"); + else if (key.length === 10 && key.toLowerCase() === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError$20("invalid connection header"); + else if (value === "close") request$1.reset = true; + } else if (key.length === 10 && key.toLowerCase() === "keep-alive") throw new InvalidArgumentError$20("invalid keep-alive header"); + else if (key.length === 7 && key.toLowerCase() === "upgrade") throw new InvalidArgumentError$20("invalid upgrade header"); + else if (key.length === 6 && key.toLowerCase() === "expect") throw new NotSupportedError$1("expect header not supported"); + else if (tokenRegExp.exec(key) === null) throw new InvalidArgumentError$20("invalid header key"); + else if (Array.isArray(val)) for (let i$1 = 0; i$1 < val.length; i$1++) if (skipAppend) if (request$1.headers[key]) request$1.headers[key] += `,${processHeaderValue(key, val[i$1], skipAppend)}`; + else request$1.headers[key] = processHeaderValue(key, val[i$1], skipAppend); + else request$1.headers += processHeaderValue(key, val[i$1]); + else if (skipAppend) request$1.headers[key] = processHeaderValue(key, val, skipAppend); + else request$1.headers += processHeaderValue(key, val); + } + module.exports = Request$4; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher.js +var require_dispatcher = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher.js"(exports, module) { + const EventEmitter = __require("events"); + var Dispatcher$3 = class extends EventEmitter { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + }; + module.exports = Dispatcher$3; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js +var require_dispatcher_base = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js"(exports, module) { + const Dispatcher$2 = require_dispatcher(); + const { ClientDestroyedError: ClientDestroyedError$1, ClientClosedError, InvalidArgumentError: InvalidArgumentError$19 } = require_errors(); + const { kDestroy: kDestroy$4, kClose: kClose$6, kDispatch: kDispatch$3, kInterceptors: kInterceptors$5 } = require_symbols$4(); + const kDestroyed = Symbol("destroyed"); + const kClosed = Symbol("closed"); + const kOnDestroyed = Symbol("onDestroyed"); + const kOnClosed = Symbol("onClosed"); + const kInterceptedDispatch = Symbol("Intercepted Dispatch"); + var DispatcherBase$4 = class extends Dispatcher$2 { + constructor() { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors$5]; + } + set interceptors(newInterceptors) { + if (newInterceptors) for (let i$1 = newInterceptors.length - 1; i$1 >= 0; i$1--) { + const interceptor = this[kInterceptors$5][i$1]; + if (typeof interceptor !== "function") throw new InvalidArgumentError$19("interceptor must be an function"); + } + this[kInterceptors$5] = newInterceptors; + } + close(callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError$19("invalid callback"); + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError$1(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) this[kOnClosed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i$1 = 0; i$1 < callbacks.length; i$1++) callbacks[i$1](null, null); + }; + this[kClose$6]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) return new Promise((resolve, reject) => { + this.destroy(err, (err$1, data) => { + return err$1 ? reject(err$1) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError$19("invalid callback"); + if (this[kDestroyed]) { + if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + if (!err) err = new ClientDestroyedError$1(); + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i$1 = 0; i$1 < callbacks.length; i$1++) callbacks[i$1](null, null); + }; + this[kDestroy$4](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + [kInterceptedDispatch](opts, handler) { + if (!this[kInterceptors$5] || this[kInterceptors$5].length === 0) { + this[kInterceptedDispatch] = this[kDispatch$3]; + return this[kDispatch$3](opts, handler); + } + let dispatch = this[kDispatch$3].bind(this); + for (let i$1 = this[kInterceptors$5].length - 1; i$1 >= 0; i$1--) dispatch = this[kInterceptors$5][i$1](dispatch); + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError$19("handler must be an object"); + try { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError$19("opts must be an object."); + if (this[kDestroyed] || this[kOnDestroyed]) throw new ClientDestroyedError$1(); + if (this[kClosed]) throw new ClientClosedError(); + return this[kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") throw new InvalidArgumentError$19("invalid onError method"); + handler.onError(err); + return false; + } + } + }; + module.exports = DispatcherBase$4; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/connect.js +var require_connect = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/core/connect.js"(exports, module) { + const net$1 = __require("net"); + const assert$14 = __require("assert"); + const util$14 = require_util$6(); + const { InvalidArgumentError: InvalidArgumentError$18, ConnectTimeoutError } = require_errors(); + let tls; + let SessionCache; + if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) return; + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; + else SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = new Map(); + } + get(sessionKey) { + return this._sessionCache.get(sessionKey); + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); + } + }; + function buildConnector$4({ allowH2, maxCachedSessions, socketPath, timeout,...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError$18("maxCachedSessions must be a positive integer or zero"); + const options = { + path: socketPath, + ...opts + }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect$2({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) tls = __require("tls"); + servername = servername || options.servername || util$14.getServerName(host) || null; + const sessionKey = servername || hostname; + const session = sessionCache.get(sessionKey) || null; + assert$14(sessionKey); + socket = tls.connect({ + highWaterMark: 16384, + ...options, + servername, + session, + localAddress, + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + port: port || 443, + host: hostname + }); + socket.on("session", function(session$1) { + sessionCache.set(sessionKey, session$1); + }); + } else { + assert$14(!httpSocket, "httpSocket can only be sent on TLS update"); + socket = net$1.connect({ + highWaterMark: 64 * 1024, + ...options, + localAddress, + port: port || 80, + host: hostname + }); + } + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + cancelTimeout(); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + cancelTimeout(); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + function setupTimeout(onConnectTimeout$1, timeout) { + if (!timeout) return () => {}; + let s1 = null; + let s2 = null; + const timeoutId = setTimeout(() => { + s1 = setImmediate(() => { + if (process.platform === "win32") s2 = setImmediate(() => onConnectTimeout$1()); + else onConnectTimeout$1(); + }); + }, timeout); + return () => { + clearTimeout(timeoutId); + clearImmediate(s1); + clearImmediate(s2); + }; + } + function onConnectTimeout(socket) { + util$14.destroy(socket, new ConnectTimeoutError()); + } + module.exports = buildConnector$4; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js +var require_utils = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") res[key] = value; + }); + return res; + } + exports.enumToMap = enumToMap; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js +var require_constants$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; + const utils_1$1 = require_utils(); + var ERROR; + (function(ERROR$1) { + ERROR$1[ERROR$1["OK"] = 0] = "OK"; + ERROR$1[ERROR$1["INTERNAL"] = 1] = "INTERNAL"; + ERROR$1[ERROR$1["STRICT"] = 2] = "STRICT"; + ERROR$1[ERROR$1["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR$1[ERROR$1["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR$1[ERROR$1["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR$1[ERROR$1["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR$1[ERROR$1["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR$1[ERROR$1["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR$1[ERROR$1["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR$1[ERROR$1["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR$1[ERROR$1["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR$1[ERROR$1["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR$1[ERROR$1["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR$1[ERROR$1["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR$1[ERROR$1["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR$1[ERROR$1["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR$1[ERROR$1["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR$1[ERROR$1["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR$1[ERROR$1["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR$1[ERROR$1["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR$1[ERROR$1["PAUSED"] = 21] = "PAUSED"; + ERROR$1[ERROR$1["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR$1[ERROR$1["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR$1[ERROR$1["USER"] = 24] = "USER"; + })(ERROR = exports.ERROR || (exports.ERROR = {})); + var TYPE; + (function(TYPE$1) { + TYPE$1[TYPE$1["BOTH"] = 0] = "BOTH"; + TYPE$1[TYPE$1["REQUEST"] = 1] = "REQUEST"; + TYPE$1[TYPE$1["RESPONSE"] = 2] = "RESPONSE"; + })(TYPE = exports.TYPE || (exports.TYPE = {})); + var FLAGS; + (function(FLAGS$1) { + FLAGS$1[FLAGS$1["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS$1[FLAGS$1["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS$1[FLAGS$1["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS$1[FLAGS$1["CHUNKED"] = 8] = "CHUNKED"; + FLAGS$1[FLAGS$1["UPGRADE"] = 16] = "UPGRADE"; + FLAGS$1[FLAGS$1["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS$1[FLAGS$1["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS$1[FLAGS$1["TRAILING"] = 128] = "TRAILING"; + FLAGS$1[FLAGS$1["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(FLAGS = exports.FLAGS || (exports.FLAGS = {})); + var LENIENT_FLAGS; + (function(LENIENT_FLAGS$1) { + LENIENT_FLAGS$1[LENIENT_FLAGS$1["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS$1[LENIENT_FLAGS$1["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS$1[LENIENT_FLAGS$1["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS$1) { + METHODS$1[METHODS$1["DELETE"] = 0] = "DELETE"; + METHODS$1[METHODS$1["GET"] = 1] = "GET"; + METHODS$1[METHODS$1["HEAD"] = 2] = "HEAD"; + METHODS$1[METHODS$1["POST"] = 3] = "POST"; + METHODS$1[METHODS$1["PUT"] = 4] = "PUT"; + METHODS$1[METHODS$1["CONNECT"] = 5] = "CONNECT"; + METHODS$1[METHODS$1["OPTIONS"] = 6] = "OPTIONS"; + METHODS$1[METHODS$1["TRACE"] = 7] = "TRACE"; + METHODS$1[METHODS$1["COPY"] = 8] = "COPY"; + METHODS$1[METHODS$1["LOCK"] = 9] = "LOCK"; + METHODS$1[METHODS$1["MKCOL"] = 10] = "MKCOL"; + METHODS$1[METHODS$1["MOVE"] = 11] = "MOVE"; + METHODS$1[METHODS$1["PROPFIND"] = 12] = "PROPFIND"; + METHODS$1[METHODS$1["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS$1[METHODS$1["SEARCH"] = 14] = "SEARCH"; + METHODS$1[METHODS$1["UNLOCK"] = 15] = "UNLOCK"; + METHODS$1[METHODS$1["BIND"] = 16] = "BIND"; + METHODS$1[METHODS$1["REBIND"] = 17] = "REBIND"; + METHODS$1[METHODS$1["UNBIND"] = 18] = "UNBIND"; + METHODS$1[METHODS$1["ACL"] = 19] = "ACL"; + METHODS$1[METHODS$1["REPORT"] = 20] = "REPORT"; + METHODS$1[METHODS$1["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS$1[METHODS$1["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS$1[METHODS$1["MERGE"] = 23] = "MERGE"; + METHODS$1[METHODS$1["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS$1[METHODS$1["NOTIFY"] = 25] = "NOTIFY"; + METHODS$1[METHODS$1["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS$1[METHODS$1["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS$1[METHODS$1["PATCH"] = 28] = "PATCH"; + METHODS$1[METHODS$1["PURGE"] = 29] = "PURGE"; + METHODS$1[METHODS$1["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS$1[METHODS$1["LINK"] = 31] = "LINK"; + METHODS$1[METHODS$1["UNLINK"] = 32] = "UNLINK"; + METHODS$1[METHODS$1["SOURCE"] = 33] = "SOURCE"; + METHODS$1[METHODS$1["PRI"] = 34] = "PRI"; + METHODS$1[METHODS$1["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS$1[METHODS$1["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS$1[METHODS$1["SETUP"] = 37] = "SETUP"; + METHODS$1[METHODS$1["PLAY"] = 38] = "PLAY"; + METHODS$1[METHODS$1["PAUSE"] = 39] = "PAUSE"; + METHODS$1[METHODS$1["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS$1[METHODS$1["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS$1[METHODS$1["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS$1[METHODS$1["REDIRECT"] = 43] = "REDIRECT"; + METHODS$1[METHODS$1["RECORD"] = 44] = "RECORD"; + METHODS$1[METHODS$1["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports.METHODS || (exports.METHODS = {})); + exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + METHODS.SOURCE + ]; + exports.METHODS_ICE = [METHODS.SOURCE]; + exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + METHODS.GET, + METHODS.POST + ]; + exports.METHOD_MAP = utils_1$1.enumToMap(METHODS); + exports.H_METHOD_MAP = {}; + Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + }); + var FINISH; + (function(FINISH$1) { + FINISH$1[FINISH$1["SAFE"] = 0] = "SAFE"; + FINISH$1[FINISH$1["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH$1[FINISH$1["UNSAFE"] = 2] = "UNSAFE"; + })(FINISH = exports.FINISH || (exports.FINISH = {})); + exports.ALPHA = []; + for (let i$1 = "A".charCodeAt(0); i$1 <= "Z".charCodeAt(0); i$1++) { + exports.ALPHA.push(String.fromCharCode(i$1)); + exports.ALPHA.push(String.fromCharCode(i$1 + 32)); + } + exports.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); + exports.MARK = [ + "-", + "_", + ".", + "!", + "~", + "*", + "'", + "(", + ")" + ]; + exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ + "%", + ";", + ":", + "&", + "=", + "+", + "$", + "," + ]); + exports.STRICT_URL_CHAR = [ + "!", + "\"", + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports.ALPHANUM); + exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i$1 = 128; i$1 <= 255; i$1++) exports.URL_CHAR.push(i$1); + exports.HEX = exports.NUM.concat([ + "a", + "b", + "c", + "d", + "e", + "f", + "A", + "B", + "C", + "D", + "E", + "F" + ]); + exports.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports.ALPHANUM); + exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); + exports.HEADER_CHARS = [" "]; + for (let i$1 = 32; i$1 <= 255; i$1++) if (i$1 !== 127) exports.HEADER_CHARS.push(i$1); + exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); + exports.MAJOR = exports.NUM_MAP; + exports.MINOR = exports.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE$1) { + HEADER_STATE$1[HEADER_STATE$1["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE$1[HEADER_STATE$1["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE$1[HEADER_STATE$1["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE$1[HEADER_STATE$1["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE$1[HEADER_STATE$1["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE$1[HEADER_STATE$1["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE$1[HEADER_STATE$1["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE$1[HEADER_STATE$1["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE$1[HEADER_STATE$1["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); + exports.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js +var require_RedirectHandler = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js"(exports, module) { + const util$13 = require_util$6(); + const { kBodyUsed } = require_symbols$4(); + const assert$13 = __require("assert"); + const { InvalidArgumentError: InvalidArgumentError$17 } = require_errors(); + const EE$1 = __require("events"); + const redirectableStatusCodes = [ + 300, + 301, + 302, + 303, + 307, + 308 + ]; + const kBody$1 = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody$1] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$13(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody$1]; + } + }; + var RedirectHandler$2 = class { + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError$17("maxRedirections must be a positive number"); + util$13.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { + ...opts, + maxRedirections: 0 + }; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + if (util$13.isStream(this.opts.body)) { + if (util$13.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { + assert$13(false); + }); + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE$1.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); + else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util$13.isIterable(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); + } + onConnect(abort$1) { + this.abort = abort$1; + this.handler.onConnect(abort$1, { history: this.history }); + } + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + onError(error$1) { + this.handler.onError(error$1); + } + onHeaders(statusCode, headers, resume$1, statusText) { + this.location = this.history.length >= this.maxRedirections || util$13.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); + if (!this.location) return this.handler.onHeaders(statusCode, headers, resume$1, statusText); + const { origin, pathname, search } = util$13.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path$5 = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path$5; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) {} else return this.handler.onData(chunk); + } + onComplete(trailers) { + if (this.location) { + this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else this.handler.onComplete(trailers); + } + onBodySent(chunk) { + if (this.handler.onBodySent) this.handler.onBodySent(chunk); + } + }; + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) return null; + for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (headers[i$1].toString().toLowerCase() === "location") return headers[i$1 + 1]; + } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) return util$13.headerNameToString(header) === "host"; + if (removeContent && util$13.headerNameToString(header).startsWith("content-")) return true; + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util$13.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (!shouldRemoveHeader(headers[i$1], removeContent, unknownOrigin)) ret.push(headers[i$1], headers[i$1 + 1]); + } else if (headers && typeof headers === "object") { + for (const key of Object.keys(headers)) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); + } else assert$13(headers == null, "headers must be an object or an array"); + return ret; + } + module.exports = RedirectHandler$2; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js +var require_redirectInterceptor = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js"(exports, module) { + const RedirectHandler$1 = require_RedirectHandler(); + function createRedirectInterceptor$3({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) return dispatch(opts, handler); + const redirectHandler = new RedirectHandler$1(dispatch, maxRedirections, opts, handler); + opts = { + ...opts, + maxRedirections: 0 + }; + return dispatch(opts, redirectHandler); + }; + }; + } + module.exports = createRedirectInterceptor$3; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) { + module.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2Fzb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AcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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AAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpg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AQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNg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MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) { + module.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBc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RQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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C0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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DYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEG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FBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAg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RU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/client.js +var require_client = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/client.js"(exports, module) { + const assert$12 = __require("assert"); + const net = __require("net"); + const http$1 = __require("http"); + const { pipeline: pipeline$2 } = __require("stream"); + const util$12 = require_util$6(); + const timers = require_timers(); + const Request$3 = require_request$1(); + const DispatcherBase$3 = require_dispatcher_base(); + const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, InvalidArgumentError: InvalidArgumentError$16, RequestAbortedError: RequestAbortedError$8, HeadersTimeoutError, HeadersOverflowError, SocketError: SocketError$2, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError, ClientDestroyedError } = require_errors(); + const buildConnector$3 = require_connect(); + const { kUrl: kUrl$3, kReset, kServerName, kClient: kClient$1, kBusy: kBusy$1, kParser, kConnect, kBlocking, kResuming, kRunning: kRunning$3, kPending: kPending$2, kSize: kSize$4, kWriting, kQueue: kQueue$1, kConnected: kConnected$5, kConnecting, kNeedDrain: kNeedDrain$3, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError: kError$2, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections: kMaxRedirections$1, kMaxRequests, kCounter, kClose: kClose$5, kDestroy: kDestroy$3, kDispatch: kDispatch$2, kInterceptors: kInterceptors$4, kLocalAddress, kMaxResponseSize, kHTTPConnVersion, kHost, kHTTP2Session, kHTTP2SessionState, kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require_symbols$4(); + /** @type {import('http2')} */ + let http2; + try { + http2 = __require("http2"); + } catch { + http2 = { constants: {} }; + } + const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; + let h2ExperimentalWarned = false; + const FastBuffer = Buffer[Symbol.species]; + const kClosedResolve$1 = Symbol("kClosedResolve"); + const channels$2 = {}; + try { + const diagnosticsChannel$2 = __require("diagnostics_channel"); + channels$2.sendHeaders = diagnosticsChannel$2.channel("undici:client:sendHeaders"); + channels$2.beforeConnect = diagnosticsChannel$2.channel("undici:client:beforeConnect"); + channels$2.connectError = diagnosticsChannel$2.channel("undici:client:connectError"); + channels$2.connected = diagnosticsChannel$2.channel("undici:client:connected"); + } catch { + channels$2.sendHeaders = { hasSubscribers: false }; + channels$2.beforeConnect = { hasSubscribers: false }; + channels$2.connectError = { hasSubscribers: false }; + channels$2.connected = { hasSubscribers: false }; + } + /** + * @type {import('../types/client').default} + */ + var Client$4 = class extends DispatcherBase$3 { + /** + * + * @param {string|URL} url + * @param {import('../types/client').Client.Options} options + */ + constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls: tls$2, strictContentLength, maxCachedSessions, maxRedirections, connect: connect$2, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, maxConcurrentStreams } = {}) { + super(); + if (keepAlive !== void 0) throw new InvalidArgumentError$16("unsupported keepAlive, use pipelining=0 instead"); + if (socketTimeout !== void 0) throw new InvalidArgumentError$16("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + if (requestTimeout !== void 0) throw new InvalidArgumentError$16("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + if (idleTimeout !== void 0) throw new InvalidArgumentError$16("unsupported idleTimeout, use keepAliveTimeout instead"); + if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError$16("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new InvalidArgumentError$16("invalid maxHeaderSize"); + if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError$16("invalid socketPath"); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError$16("invalid connectTimeout"); + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError$16("invalid keepAliveTimeout"); + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError$16("invalid keepAliveMaxTimeout"); + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError$16("invalid keepAliveTimeoutThreshold"); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError$16("headersTimeout must be a positive integer or zero"); + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError$16("bodyTimeout must be a positive integer or zero"); + if (connect$2 != null && typeof connect$2 !== "function" && typeof connect$2 !== "object") throw new InvalidArgumentError$16("connect must be a function or an object"); + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError$16("maxRedirections must be a positive number"); + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError$16("maxRequestsPerClient must be a positive number"); + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError$16("localAddress must be valid string IP address"); + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError$16("maxResponseSize must be a positive number"); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError$16("autoSelectFamilyAttemptTimeout must be a positive number"); + if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError$16("allowH2 must be a valid boolean value"); + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError$16("maxConcurrentStreams must be a possitive integer, greater than 0"); + if (typeof connect$2 !== "function") connect$2 = buildConnector$3({ + ...tls$2, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...util$12.nodeHasAutoSelectFamily && autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect$2 + }); + this[kInterceptors$4] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor$2({ maxRedirections })]; + this[kUrl$3] = util$12.parseOrigin(url); + this[kConnector] = connect$2; + this[kSocket] = null; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http$1.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain$3] = 0; + this[kHostHeader] = `host: ${this[kUrl$3].hostname}${this[kUrl$3].port ? `:${this[kUrl$3].port}` : ""}\r\n`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections$1] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve$1] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kHTTPConnVersion] = "h1"; + this[kHTTP2Session] = null; + this[kHTTP2SessionState] = !allowH2 ? null : { + openStreams: 0, + maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 + }; + this[kHost] = `${this[kUrl$3].hostname}${this[kUrl$3].port ? `:${this[kUrl$3].port}` : ""}`; + this[kQueue$1] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + resume(this, true); + } + get [kPending$2]() { + return this[kQueue$1].length - this[kPendingIdx]; + } + get [kRunning$3]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize$4]() { + return this[kQueue$1].length - this[kRunningIdx]; + } + get [kConnected$5]() { + return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed; + } + get [kBusy$1]() { + const socket = this[kSocket]; + return socket && (socket[kReset] || socket[kWriting] || socket[kBlocking]) || this[kSize$4] >= (this[kPipelining] || 1) || this[kPending$2] > 0; + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect$1(this); + this.once("connect", cb); + } + [kDispatch$2](opts, handler) { + const origin = opts.origin || this[kUrl$3].origin; + const request$1 = this[kHTTPConnVersion] === "h2" ? Request$3[kHTTP2BuildRequest](origin, opts, handler) : Request$3[kHTTP1BuildRequest](origin, opts, handler); + this[kQueue$1].push(request$1); + if (this[kResuming]) {} else if (util$12.bodyLength(request$1.body) == null && util$12.isIterable(request$1.body)) { + this[kResuming] = 1; + process.nextTick(resume, this); + } else resume(this, true); + if (this[kResuming] && this[kNeedDrain$3] !== 2 && this[kBusy$1]) this[kNeedDrain$3] = 2; + return this[kNeedDrain$3] < 2; + } + async [kClose$5]() { + return new Promise((resolve) => { + if (!this[kSize$4]) resolve(null); + else this[kClosedResolve$1] = resolve; + }); + } + async [kDestroy$3](err) { + return new Promise((resolve) => { + const requests = this[kQueue$1].splice(this[kPendingIdx]); + for (let i$1 = 0; i$1 < requests.length; i$1++) { + const request$1 = requests[i$1]; + errorRequest(this, request$1, err); + } + const callback = () => { + if (this[kClosedResolve$1]) { + this[kClosedResolve$1](); + this[kClosedResolve$1] = null; + } + resolve(); + }; + if (this[kHTTP2Session] != null) { + util$12.destroy(this[kHTTP2Session], err); + this[kHTTP2Session] = null; + this[kHTTP2SessionState] = null; + } + if (!this[kSocket]) queueMicrotask(callback); + else util$12.destroy(this[kSocket].on("close", callback), err); + resume(this); + }); + } + }; + function onHttp2SessionError(err) { + assert$12(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError$2] = err; + onError(this[kClient$1], err); + } + function onHttp2FrameError(type, code, id) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + if (id === 0) { + this[kSocket][kError$2] = err; + onError(this[kClient$1], err); + } + } + function onHttp2SessionEnd() { + util$12.destroy(this, new SocketError$2("other side closed")); + util$12.destroy(this[kSocket], new SocketError$2("other side closed")); + } + function onHTTP2GoAway(code) { + const client = this[kClient$1]; + const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`); + client[kSocket] = null; + client[kHTTP2Session] = null; + if (client.destroyed) { + assert$12(this[kPending$2] === 0); + const requests = client[kQueue$1].splice(client[kRunningIdx]); + for (let i$1 = 0; i$1 < requests.length; i$1++) { + const request$1 = requests[i$1]; + errorRequest(this, request$1, err); + } + } else if (client[kRunning$3] > 0) { + const request$1 = client[kQueue$1][client[kRunningIdx]]; + client[kQueue$1][client[kRunningIdx]++] = null; + errorRequest(client, request$1, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert$12(client[kRunning$3] === 0); + client.emit("disconnect", client[kUrl$3], [client], err); + resume(client); + } + const constants = require_constants$2(); + const createRedirectInterceptor$2 = require_redirectInterceptor(); + const EMPTY_BUF = Buffer.alloc(0); + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = await WebAssembly.compile(Buffer.from(require_llhttp_simd_wasm(), "base64")); + } catch (e) { + /* istanbul ignore next */ + mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require_llhttp_wasm(), "base64")); + } + return await WebAssembly.instantiate(mod, { env: { + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0; + }, + wasm_on_status: (p, at, len) => { + assert$12.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert$12.strictEqual(currentParser.ptr, p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert$12.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert$12.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade$1, shouldKeepAlive) => { + assert$12.strictEqual(currentParser.ptr, p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade$1), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert$12.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert$12.strictEqual(currentParser.ptr, p); + return currentParser.onMessageComplete() || 0; + } + } }); + } + let llhttpInstance = null; + let llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + let currentParser = null; + let currentBufferRef = null; + let currentBufferSize = 0; + let currentBufferPtr = null; + const TIMEOUT_HEADERS = 1; + const TIMEOUT_BODY = 2; + const TIMEOUT_IDLE = 3; + var Parser = class { + constructor(client, socket, { exports: exports$1 }) { + assert$12(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports$1; + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(value, type) { + this.timeoutType = type; + if (value !== this.timeoutValue) { + timers.clearTimeout(this.timeout); + if (value) { + this.timeout = timers.setTimeout(onParserTimeout, value, this); + // istanbul ignore else: only for jest + if (this.timeout.unref) this.timeout.unref(); + } else this.timeout = null; + this.timeoutValue = value; + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + } + resume() { + if (this.socket.destroyed || !this.paused) return; + assert$12(this.ptr != null); + assert$12(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert$12(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) break; + this.execute(chunk); + } + } + execute(data) { + assert$12(this.ptr != null); + assert$12(currentParser == null); + assert$12(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) llhttp.free(currentBufferPtr); + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); + else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util$12.destroy(socket, err); + } + } + destroy() { + assert$12(this.ptr != null); + assert$12(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request$1 = client[kQueue$1][client[kRunningIdx]]; + if (!request$1) return -1; + } + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) this.headers.push(buf); + else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + this.trackHeader(buf.length); + } + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + const key = this.headers[len - 2]; + if (key.length === 10 && key.toString().toLowerCase() === "keep-alive") this.keepAlive += buf.toString(); + else if (key.length === 10 && key.toString().toLowerCase() === "connection") this.connection += buf.toString(); + else if (key.length === 14 && key.toString().toLowerCase() === "content-length") this.contentLength += buf.toString(); + this.trackHeader(buf.length); + } + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) util$12.destroy(this.socket, new HeadersOverflowError()); + } + onUpgrade(head) { + const { upgrade: upgrade$1, client, socket, headers, statusCode } = this; + assert$12(upgrade$1); + const request$1 = client[kQueue$1][client[kRunningIdx]]; + assert$12(request$1); + assert$12(!socket.destroyed); + assert$12(socket === client[kSocket]); + assert$12(!this.paused); + assert$12(request$1.upgrade || request$1.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + assert$12(this.headers.length % 2 === 0); + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient$1] = null; + socket[kError$2] = null; + socket.removeListener("error", onSocketError$1).removeListener("readable", onSocketReadable).removeListener("end", onSocketEnd).removeListener("close", onSocketClose$1); + client[kSocket] = null; + client[kQueue$1][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl$3], [client], new InformationalError("upgrade")); + try { + request$1.onUpgrade(statusCode, headers, socket); + } catch (err) { + util$12.destroy(socket, err); + } + resume(client); + } + onHeadersComplete(statusCode, upgrade$1, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request$1 = client[kQueue$1][client[kRunningIdx]]; + /* istanbul ignore next: difficult to make a test case for */ + if (!request$1) return -1; + assert$12(!this.upgrade); + assert$12(this.statusCode < 200); + if (statusCode === 100) { + util$12.destroy(socket, new SocketError$2("bad response", util$12.getSocketInfo(socket))); + return -1; + } + if (upgrade$1 && !request$1.upgrade) { + util$12.destroy(socket, new SocketError$2("bad upgrade", util$12.getSocketInfo(socket))); + return -1; + } + assert$12.strictEqual(this.timeoutType, TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || request$1.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request$1.bodyTimeout != null ? request$1.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + if (request$1.method === "CONNECT") { + assert$12(client[kRunning$3] === 1); + this.upgrade = true; + return 2; + } + if (upgrade$1) { + assert$12(client[kRunning$3] === 1); + this.upgrade = true; + return 2; + } + assert$12(this.headers.length % 2 === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util$12.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]); + if (timeout <= 0) socket[kReset] = true; + else client[kKeepAliveTimeoutValue] = timeout; + } else client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } else socket[kReset] = true; + const pause = request$1.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request$1.aborted) return -1; + if (request$1.method === "HEAD") return 1; + if (statusCode < 200) return 1; + if (socket[kBlocking]) { + socket[kBlocking] = false; + resume(client); + } + return pause ? constants.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) return -1; + const request$1 = client[kQueue$1][client[kRunningIdx]]; + assert$12(request$1); + assert$12.strictEqual(this.timeoutType, TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + assert$12(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util$12.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request$1.onData(buf) === false) return constants.ERROR.PAUSED; + } + onMessageComplete() { + const { client, socket, statusCode, upgrade: upgrade$1, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; + if (upgrade$1) return; + const request$1 = client[kQueue$1][client[kRunningIdx]]; + assert$12(request$1); + assert$12(statusCode >= 100); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + assert$12(this.headers.length % 2 === 0); + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) return; + /* istanbul ignore next: should be handled by llhttp? */ + if (request$1.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util$12.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request$1.onComplete(headers); + client[kQueue$1][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert$12.strictEqual(client[kRunning$3], 0); + util$12.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util$12.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning$3] === 0) { + util$12.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (client[kPipelining] === 1) setImmediate(resume, client); + else resume(client); + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client } = parser; + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning$3] > 1) { + assert$12(!parser.paused, "cannot be paused while waiting for headers"); + util$12.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!parser.paused) util$12.destroy(socket, new BodyTimeoutError()); + } else if (timeoutType === TIMEOUT_IDLE) { + assert$12(client[kRunning$3] === 0 && client[kKeepAliveTimeoutValue]); + util$12.destroy(socket, new InformationalError("socket idle timeout")); + } + } + function onSocketReadable() { + const { [kParser]: parser } = this; + if (parser) parser.readMore(); + } + function onSocketError$1(err) { + const { [kClient$1]: client, [kParser]: parser } = this; + assert$12(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + if (client[kHTTPConnVersion] !== "h2") { + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + } + this[kError$2] = err; + onError(this[kClient$1], err); + } + function onError(client, err) { + if (client[kRunning$3] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert$12(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue$1].splice(client[kRunningIdx]); + for (let i$1 = 0; i$1 < requests.length; i$1++) { + const request$1 = requests[i$1]; + errorRequest(client, request$1, err); + } + assert$12(client[kSize$4] === 0); + } + } + function onSocketEnd() { + const { [kParser]: parser, [kClient$1]: client } = this; + if (client[kHTTPConnVersion] !== "h2") { + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + } + util$12.destroy(this, new SocketError$2("other side closed", util$12.getSocketInfo(this))); + } + function onSocketClose$1() { + const { [kClient$1]: client, [kParser]: parser } = this; + if (client[kHTTPConnVersion] === "h1" && parser) { + if (!this[kError$2] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError$2] || new SocketError$2("closed", util$12.getSocketInfo(this)); + client[kSocket] = null; + if (client.destroyed) { + assert$12(client[kPending$2] === 0); + const requests = client[kQueue$1].splice(client[kRunningIdx]); + for (let i$1 = 0; i$1 < requests.length; i$1++) { + const request$1 = requests[i$1]; + errorRequest(client, request$1, err); + } + } else if (client[kRunning$3] > 0 && err.code !== "UND_ERR_INFO") { + const request$1 = client[kQueue$1][client[kRunningIdx]]; + client[kQueue$1][client[kRunningIdx]++] = null; + errorRequest(client, request$1, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert$12(client[kRunning$3] === 0); + client.emit("disconnect", client[kUrl$3], [client], err); + resume(client); + } + async function connect$1(client) { + assert$12(!client[kConnecting]); + assert$12(!client[kSocket]); + let { host, hostname, protocol, port } = client[kUrl$3]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert$12(idx !== -1); + const ip = hostname.substring(1, idx); + assert$12(net.isIP(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels$2.beforeConnect.hasSubscribers) channels$2.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket$1) => { + if (err) reject(err); + else resolve(socket$1); + }); + }); + if (client.destroyed) { + util$12.destroy(socket.on("error", () => {}), new ClientDestroyedError()); + return; + } + client[kConnecting] = false; + assert$12(socket); + const isH2 = socket.alpnProtocol === "h2"; + if (isH2) { + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); + } + const session = http2.connect(client[kUrl$3], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams + }); + client[kHTTPConnVersion] = "h2"; + session[kClient$1] = client; + session[kSocket] = socket; + session.on("error", onHttp2SessionError); + session.on("frameError", onHttp2FrameError); + session.on("end", onHttp2SessionEnd); + session.on("goaway", onHTTP2GoAway); + session.on("close", onSocketClose$1); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + } else { + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + } + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient$1] = client; + socket[kError$2] = null; + socket.on("error", onSocketError$1).on("readable", onSocketReadable).on("end", onSocketEnd).on("close", onSocketClose$1); + client[kSocket] = socket; + if (channels$2.connected.hasSubscribers) channels$2.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + client.emit("connect", client[kUrl$3], [client]); + } catch (err) { + if (client.destroyed) return; + client[kConnecting] = false; + if (channels$2.connectError.hasSubscribers) channels$2.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert$12(client[kRunning$3] === 0); + while (client[kPending$2] > 0 && client[kQueue$1][client[kPendingIdx]].servername === client[kServerName]) { + const request$1 = client[kQueue$1][client[kPendingIdx]++]; + errorRequest(client, request$1, err); + } + } else onError(client, err); + client.emit("connectionError", client[kUrl$3], [client], err); + } + resume(client); + } + function emitDrain(client) { + client[kNeedDrain$3] = 0; + client.emit("drain", client[kUrl$3], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) return; + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue$1].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert$12(client[kPending$2] === 0); + return; + } + if (client[kClosedResolve$1] && !client[kSize$4]) { + client[kClosedResolve$1](); + client[kClosedResolve$1] = null; + return; + } + const socket = client[kSocket]; + if (socket && !socket.destroyed && socket.alpnProtocol !== "h2") { + if (client[kSize$4] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize$4] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_IDLE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE); + } else if (client[kRunning$3] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request$2 = client[kQueue$1][client[kRunningIdx]]; + const headersTimeout = request$2.headersTimeout != null ? request$2.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + if (client[kBusy$1]) client[kNeedDrain$3] = 2; + else if (client[kNeedDrain$3] === 2) { + if (sync) { + client[kNeedDrain$3] = 1; + process.nextTick(emitDrain, client); + } else emitDrain(client); + continue; + } + if (client[kPending$2] === 0) return; + if (client[kRunning$3] >= (client[kPipelining] || 1)) return; + const request$1 = client[kQueue$1][client[kPendingIdx]]; + if (client[kUrl$3].protocol === "https:" && client[kServerName] !== request$1.servername) { + if (client[kRunning$3] > 0) return; + client[kServerName] = request$1.servername; + if (socket && socket.servername !== request$1.servername) { + util$12.destroy(socket, new InformationalError("servername changed")); + return; + } + } + if (client[kConnecting]) return; + if (!socket && !client[kHTTP2Session]) { + connect$1(client); + return; + } + if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) return; + if (client[kRunning$3] > 0 && !request$1.idempotent) return; + if (client[kRunning$3] > 0 && (request$1.upgrade || request$1.method === "CONNECT")) return; + if (client[kRunning$3] > 0 && util$12.bodyLength(request$1.body) !== 0 && (util$12.isStream(request$1.body) || util$12.isAsyncIterable(request$1.body))) return; + if (!request$1.aborted && write(client, request$1)) client[kPendingIdx]++; + else client[kQueue$1].splice(client[kPendingIdx], 1); + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function write(client, request$1) { + if (client[kHTTPConnVersion] === "h2") { + writeH2(client, client[kHTTP2Session], request$1); + return; + } + const { body, method, path: path$5, host, upgrade: upgrade$1, headers, blocking, reset } = request$1; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") body.read(0); + const bodyLength$1 = util$12.bodyLength(body); + let contentLength = bodyLength$1; + if (contentLength === null) contentLength = request$1.contentLength; + if (contentLength === 0 && !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request$1.contentLength !== null && request$1.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request$1, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + try { + request$1.onConnect((err) => { + if (request$1.aborted || request$1.completed) return; + errorRequest(client, request$1, err || new RequestAbortedError$8()); + util$12.destroy(socket, new InformationalError("aborted")); + }); + } catch (err) { + errorRequest(client, request$1, err); + } + if (request$1.aborted) return false; + if (method === "HEAD") socket[kReset] = true; + if (upgrade$1 || method === "CONNECT") socket[kReset] = true; + if (reset != null) socket[kReset] = reset; + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) socket[kReset] = true; + if (blocking) socket[kBlocking] = true; + let header = `${method} ${path$5} HTTP/1.1\r\n`; + if (typeof host === "string") header += `host: ${host}\r\n`; + else header += client[kHostHeader]; + if (upgrade$1) header += `connection: upgrade\r\nupgrade: ${upgrade$1}\r\n`; + else if (client[kPipelining] && !socket[kReset]) header += "connection: keep-alive\r\n"; + else header += "connection: close\r\n"; + if (headers) header += headers; + if (channels$2.sendHeaders.hasSubscribers) channels$2.sendHeaders.publish({ + request: request$1, + headers: header, + socket + }); + /* istanbul ignore else: assertion */ + if (!body || bodyLength$1 === 0) { + if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else { + assert$12(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r\n`, "latin1"); + } + request$1.onRequestSent(); + } else if (util$12.isBuffer(body)) { + assert$12(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(body); + socket.uncork(); + request$1.onBodySent(body); + request$1.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + } else if (util$12.isBlobLike(body)) if (typeof body.stream === "function") writeIterable({ + body: body.stream(), + client, + request: request$1, + socket, + contentLength, + header, + expectsPayload + }); + else writeBlob({ + body, + client, + request: request$1, + socket, + contentLength, + header, + expectsPayload + }); + else if (util$12.isStream(body)) writeStream({ + body, + client, + request: request$1, + socket, + contentLength, + header, + expectsPayload + }); + else if (util$12.isIterable(body)) writeIterable({ + body, + client, + request: request$1, + socket, + contentLength, + header, + expectsPayload + }); + else assert$12(false); + return true; + } + function writeH2(client, session, request$1) { + const { body, method, path: path$5, host, upgrade: upgrade$1, expectContinue, signal, headers: reqHeaders } = request$1; + let headers; + if (typeof reqHeaders === "string") headers = Request$3[kHTTP2CopyHeaders](reqHeaders.trim()); + else headers = reqHeaders; + if (upgrade$1) { + errorRequest(client, request$1, new Error("Upgrade not supported for H2")); + return false; + } + try { + request$1.onConnect((err) => { + if (request$1.aborted || request$1.completed) return; + errorRequest(client, request$1, err || new RequestAbortedError$8()); + }); + } catch (err) { + errorRequest(client, request$1, err); + } + if (request$1.aborted) return false; + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream$2; + const h2State = client[kHTTP2SessionState]; + headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]; + headers[HTTP2_HEADER_METHOD] = method; + if (method === "CONNECT") { + session.ref(); + stream$2 = session.request(headers, { + endStream: false, + signal + }); + if (stream$2.id && !stream$2.pending) { + request$1.onUpgrade(null, null, stream$2); + ++h2State.openStreams; + } else stream$2.once("ready", () => { + request$1.onUpgrade(null, null, stream$2); + ++h2State.openStreams; + }); + stream$2.once("close", () => { + h2State.openStreams -= 1; + if (h2State.openStreams === 0) session.unref(); + }); + return true; + } + headers[HTTP2_HEADER_PATH] = path$5; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") body.read(0); + let contentLength = util$12.bodyLength(body); + if (contentLength == null) contentLength = request$1.contentLength; + if (contentLength === 0 || !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request$1.contentLength != null && request$1.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request$1, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert$12(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD"; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream$2 = session.request(headers, { + endStream: shouldEndStream, + signal + }); + stream$2.once("continue", writeBodyH2); + } else { + stream$2 = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++h2State.openStreams; + stream$2.once("response", (headers$1) => { + const { [HTTP2_HEADER_STATUS]: statusCode,...realHeaders } = headers$1; + if (request$1.onHeaders(Number(statusCode), realHeaders, stream$2.resume.bind(stream$2), "") === false) stream$2.pause(); + }); + stream$2.once("end", () => { + request$1.onComplete([]); + }); + stream$2.on("data", (chunk) => { + if (request$1.onData(chunk) === false) stream$2.pause(); + }); + stream$2.once("close", () => { + h2State.openStreams -= 1; + if (h2State.openStreams === 0) session.unref(); + }); + stream$2.once("error", function(err) { + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1; + util$12.destroy(stream$2, err); + } + }); + stream$2.once("frameError", (type, code) => { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + errorRequest(client, request$1, err); + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1; + util$12.destroy(stream$2, err); + } + }); + return true; + function writeBodyH2() { + /* istanbul ignore else: assertion */ + if (!body) request$1.onRequestSent(); + else if (util$12.isBuffer(body)) { + assert$12(contentLength === body.byteLength, "buffer body must have content length"); + stream$2.cork(); + stream$2.write(body); + stream$2.uncork(); + stream$2.end(); + request$1.onBodySent(body); + request$1.onRequestSent(); + } else if (util$12.isBlobLike(body)) if (typeof body.stream === "function") writeIterable({ + client, + request: request$1, + contentLength, + h2stream: stream$2, + expectsPayload, + body: body.stream(), + socket: client[kSocket], + header: "" + }); + else writeBlob({ + body, + client, + request: request$1, + contentLength, + expectsPayload, + h2stream: stream$2, + header: "", + socket: client[kSocket] + }); + else if (util$12.isStream(body)) writeStream({ + body, + client, + request: request$1, + contentLength, + expectsPayload, + socket: client[kSocket], + h2stream: stream$2, + header: "" + }); + else if (util$12.isIterable(body)) writeIterable({ + body, + client, + request: request$1, + contentLength, + expectsPayload, + header: "", + h2stream: stream$2, + socket: client[kSocket] + }); + else assert$12(false); + } + } + function writeStream({ h2stream, body, client, request: request$1, socket, contentLength, header, expectsPayload }) { + assert$12(contentLength !== 0 || client[kRunning$3] === 0, "stream body cannot be pipelined"); + if (client[kHTTPConnVersion] === "h2") { + const pipe = pipeline$2(body, h2stream, (err) => { + if (err) { + util$12.destroy(body, err); + util$12.destroy(h2stream, err); + } else request$1.onRequestSent(); + }); + pipe.on("data", onPipeData); + pipe.once("end", () => { + pipe.removeListener("data", onPipeData); + util$12.destroy(pipe); + }); + function onPipeData(chunk) { + request$1.onBodySent(chunk); + } + return; + } + let finished$1 = false; + const writer = new AsyncWriter({ + socket, + request: request$1, + contentLength, + client, + expectsPayload, + header + }); + const onData = function(chunk) { + if (finished$1) return; + try { + if (!writer.write(chunk) && this.pause) this.pause(); + } catch (err) { + util$12.destroy(this, err); + } + }; + const onDrain = function() { + if (finished$1) return; + if (body.resume) body.resume(); + }; + const onAbort = function() { + if (finished$1) return; + const err = new RequestAbortedError$8(); + queueMicrotask(() => onFinished(err)); + }; + const onFinished = function(err) { + if (finished$1) return; + finished$1 = true; + assert$12(socket.destroyed || socket[kWriting] && client[kRunning$3] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); + if (!err) try { + writer.end(); + } catch (er) { + err = er; + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util$12.destroy(body, err); + else util$12.destroy(body); + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onAbort); + if (body.resume) body.resume(); + socket.on("drain", onDrain).on("error", onFinished); + } + async function writeBlob({ h2stream, body, client, request: request$1, socket, contentLength, header, expectsPayload }) { + assert$12(contentLength === body.size, "blob body must have content length"); + const isH2 = client[kHTTPConnVersion] === "h2"; + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + if (isH2) { + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + } else { + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(buffer); + socket.uncork(); + } + request$1.onBodySent(buffer); + request$1.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + resume(client); + } catch (err) { + util$12.destroy(isH2 ? h2stream : socket, err); + } + } + async function writeIterable({ h2stream, body, client, request: request$1, socket, contentLength, header, expectsPayload }) { + assert$12(contentLength !== 0 || client[kRunning$3] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$12(callback === null); + if (socket[kError$2]) reject(socket[kError$2]); + else callback = resolve; + }); + if (client[kHTTPConnVersion] === "h2") { + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError$2]) throw socket[kError$2]; + const res = h2stream.write(chunk); + request$1.onBodySent(chunk); + if (!res) await waitForDrain(); + } + } catch (err) { + h2stream.destroy(err); + } finally { + request$1.onRequestSent(); + h2stream.end(); + h2stream.off("close", onDrain).off("drain", onDrain); + } + return; + } + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ + socket, + request: request$1, + contentLength, + client, + expectsPayload, + header + }); + try { + for await (const chunk of body) { + if (socket[kError$2]) throw socket[kError$2]; + if (!writer.write(chunk)) await waitForDrain(); + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ socket, request: request$1, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request$1; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request: request$1, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError$2]) throw socket[kError$2]; + if (socket.destroyed) return false; + const len = Buffer.byteLength(chunk); + if (!len) return true; + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload) socket[kReset] = true; + if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); + else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + } + if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request$1.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + } + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request$1 } = this; + request$1.onRequestSent(); + socket[kWriting] = false; + if (socket[kError$2]) throw socket[kError$2]; + if (socket.destroyed) return; + if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else socket.write(`${header}\r\n`, "latin1"); + else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); + if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + else process.emitWarning(new RequestContentLengthMismatchError()); + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + resume(client); + } + destroy(err) { + const { socket, client } = this; + socket[kWriting] = false; + if (err) { + assert$12(client[kRunning$3] <= 1, "pipeline should only contain this request"); + util$12.destroy(socket, err); + } + } + }; + function errorRequest(client, request$1, err) { + try { + request$1.onError(err); + assert$12(request$1.aborted); + } catch (err$1) { + client.emit("error", err$1); + } + } + module.exports = Client$4; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js +var require_fixed_queue = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js"(exports, module) { + const kSize$3 = 2048; + const kMask = kSize$3 - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize$3); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module.exports = class FixedQueue$1 { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) this.tail = tail.next; + return next; + } + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-stats.js +var require_pool_stats = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-stats.js"(exports, module) { + const { kFree: kFree$1, kConnected: kConnected$4, kPending: kPending$1, kQueued: kQueued$1, kRunning: kRunning$2, kSize: kSize$2 } = require_symbols$4(); + const kPool = Symbol("pool"); + var PoolStats$1 = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected$4]; + } + get free() { + return this[kPool][kFree$1]; + } + get pending() { + return this[kPool][kPending$1]; + } + get queued() { + return this[kPool][kQueued$1]; + } + get running() { + return this[kPool][kRunning$2]; + } + get size() { + return this[kPool][kSize$2]; + } + }; + module.exports = PoolStats$1; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-base.js +var require_pool_base = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool-base.js"(exports, module) { + const DispatcherBase$2 = require_dispatcher_base(); + const FixedQueue = require_fixed_queue(); + const { kConnected: kConnected$3, kSize: kSize$1, kRunning: kRunning$1, kPending, kQueued, kBusy, kFree, kUrl: kUrl$2, kClose: kClose$4, kDestroy: kDestroy$2, kDispatch: kDispatch$1 } = require_symbols$4(); + const PoolStats = require_pool_stats(); + const kClients$4 = Symbol("clients"); + const kNeedDrain$2 = Symbol("needDrain"); + const kQueue = Symbol("queue"); + const kClosedResolve = Symbol("closed resolve"); + const kOnDrain$1 = Symbol("onDrain"); + const kOnConnect$1 = Symbol("onConnect"); + const kOnDisconnect$1 = Symbol("onDisconnect"); + const kOnConnectionError$1 = Symbol("onConnectionError"); + const kGetDispatcher$2 = Symbol("get dispatcher"); + const kAddClient$2 = Symbol("add client"); + const kRemoveClient$1 = Symbol("remove client"); + const kStats = Symbol("stats"); + var PoolBase$2 = class extends DispatcherBase$2 { + constructor() { + super(); + this[kQueue] = new FixedQueue(); + this[kClients$4] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain$1] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) break; + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain$2] = needDrain; + if (!this[kNeedDrain$2] && pool[kNeedDrain$2]) { + pool[kNeedDrain$2] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) Promise.all(pool[kClients$4].map((c) => c.close())).then(pool[kClosedResolve]); + }; + this[kOnConnect$1] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect$1] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError$1] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain$2]; + } + get [kConnected$3]() { + return this[kClients$4].filter((client) => client[kConnected$3]).length; + } + get [kFree]() { + return this[kClients$4].filter((client) => client[kConnected$3] && !client[kNeedDrain$2]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients$4]) ret += pending; + return ret; + } + get [kRunning$1]() { + let ret = 0; + for (const { [kRunning$1]: running } of this[kClients$4]) ret += running; + return ret; + } + get [kSize$1]() { + let ret = this[kQueued]; + for (const { [kSize$1]: size } of this[kClients$4]) ret += size; + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose$4]() { + if (this[kQueue].isEmpty()) return Promise.all(this[kClients$4].map((c) => c.close())); + else return new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + async [kDestroy$2](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) break; + item.handler.onError(err); + } + return Promise.all(this[kClients$4].map((c) => c.destroy(err))); + } + [kDispatch$1](opts, handler) { + const dispatcher = this[kGetDispatcher$2](); + if (!dispatcher) { + this[kNeedDrain$2] = true; + this[kQueue].push({ + opts, + handler + }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain$2] = true; + this[kNeedDrain$2] = !this[kGetDispatcher$2](); + } + return !this[kNeedDrain$2]; + } + [kAddClient$2](client) { + client.on("drain", this[kOnDrain$1]).on("connect", this[kOnConnect$1]).on("disconnect", this[kOnDisconnect$1]).on("connectionError", this[kOnConnectionError$1]); + this[kClients$4].push(client); + if (this[kNeedDrain$2]) process.nextTick(() => { + if (this[kNeedDrain$2]) this[kOnDrain$1](client[kUrl$2], [this, client]); + }); + return this; + } + [kRemoveClient$1](client) { + client.close(() => { + const idx = this[kClients$4].indexOf(client); + if (idx !== -1) this[kClients$4].splice(idx, 1); + }); + this[kNeedDrain$2] = this[kClients$4].some((dispatcher) => !dispatcher[kNeedDrain$2] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module.exports = { + PoolBase: PoolBase$2, + kClients: kClients$4, + kNeedDrain: kNeedDrain$2, + kAddClient: kAddClient$2, + kRemoveClient: kRemoveClient$1, + kGetDispatcher: kGetDispatcher$2 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool.js +var require_pool = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/pool.js"(exports, module) { + const { PoolBase: PoolBase$1, kClients: kClients$3, kNeedDrain: kNeedDrain$1, kAddClient: kAddClient$1, kGetDispatcher: kGetDispatcher$1 } = require_pool_base(); + const Client$3 = require_client(); + const { InvalidArgumentError: InvalidArgumentError$15 } = require_errors(); + const util$11 = require_util$6(); + const { kUrl: kUrl$1, kInterceptors: kInterceptors$3 } = require_symbols$4(); + const buildConnector$2 = require_connect(); + const kOptions$3 = Symbol("options"); + const kConnections = Symbol("connections"); + const kFactory$3 = Symbol("factory"); + function defaultFactory$3(origin, opts) { + return new Client$3(origin, opts); + } + var Pool$5 = class extends PoolBase$1 { + constructor(origin, { connections, factory = defaultFactory$3, connect: connect$2, connectTimeout, tls: tls$2, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2,...options } = {}) { + super(); + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError$15("invalid connections"); + if (typeof factory !== "function") throw new InvalidArgumentError$15("factory must be a function."); + if (connect$2 != null && typeof connect$2 !== "function" && typeof connect$2 !== "object") throw new InvalidArgumentError$15("connect must be a function or an object"); + if (typeof connect$2 !== "function") connect$2 = buildConnector$2({ + ...tls$2, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...util$11.nodeHasAutoSelectFamily && autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect$2 + }); + this[kInterceptors$3] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl$1] = util$11.parseOrigin(origin); + this[kOptions$3] = { + ...util$11.deepClone(options), + connect: connect$2, + allowH2 + }; + this[kOptions$3].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory$3] = factory; + this.on("connectionError", (origin$1, targets, error$1) => { + for (const target of targets) { + const idx = this[kClients$3].indexOf(target); + if (idx !== -1) this[kClients$3].splice(idx, 1); + } + }); + } + [kGetDispatcher$1]() { + let dispatcher = this[kClients$3].find((dispatcher$1) => !dispatcher$1[kNeedDrain$1]); + if (dispatcher) return dispatcher; + if (!this[kConnections] || this[kClients$3].length < this[kConnections]) { + dispatcher = this[kFactory$3](this[kUrl$1], this[kOptions$3]); + this[kAddClient$1](dispatcher); + } + return dispatcher; + } + }; + module.exports = Pool$5; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/balanced-pool.js +var require_balanced_pool = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/balanced-pool.js"(exports, module) { + const { BalancedPoolMissingUpstreamError, InvalidArgumentError: InvalidArgumentError$14 } = require_errors(); + const { PoolBase, kClients: kClients$2, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); + const Pool$4 = require_pool(); + const { kUrl, kInterceptors: kInterceptors$2 } = require_symbols$4(); + const { parseOrigin } = require_util$6(); + const kFactory$2 = Symbol("factory"); + const kOptions$2 = Symbol("options"); + const kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + const kCurrentWeight = Symbol("kCurrentWeight"); + const kIndex = Symbol("kIndex"); + const kWeight = Symbol("kWeight"); + const kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + const kErrorPenalty = Symbol("kErrorPenalty"); + function getGreatestCommonDivisor(a, b) { + if (b === 0) return a; + return getGreatestCommonDivisor(b, a % b); + } + function defaultFactory$2(origin, opts) { + return new Pool$4(origin, opts); + } + var BalancedPool$1 = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory$2,...opts } = {}) { + super(); + this[kOptions$2] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions$2].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions$2].errorPenalty || 15; + if (!Array.isArray(upstreams)) upstreams = [upstreams]; + if (typeof factory !== "function") throw new InvalidArgumentError$14("factory must be a function."); + this[kInterceptors$2] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[kFactory$2] = factory; + for (const upstream of upstreams) this.addUpstream(upstream); + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients$2].find((pool$1) => pool$1[kUrl].origin === upstreamOrigin && pool$1.closed !== true && pool$1.destroyed !== true)) return this; + const pool = this[kFactory$2](upstreamOrigin, Object.assign({}, this[kOptions$2])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients$2]) client[kWeight] = this[kMaxWeightPerServer]; + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + this[kGreatestCommonDivisor] = this[kClients$2].map((p) => p[kWeight]).reduce(getGreatestCommonDivisor, 0); + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients$2].find((pool$1) => pool$1[kUrl].origin === upstreamOrigin && pool$1.closed !== true && pool$1.destroyed !== true); + if (pool) this[kRemoveClient](pool); + return this; + } + get upstreams() { + return this[kClients$2].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients$2].length === 0) throw new BalancedPoolMissingUpstreamError(); + const dispatcher = this[kClients$2].find((dispatcher$1) => !dispatcher$1[kNeedDrain] && dispatcher$1.closed !== true && dispatcher$1.destroyed !== true); + if (!dispatcher) return; + const allClientsBusy = this[kClients$2].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true); + if (allClientsBusy) return; + let counter = 0; + let maxWeightIndex = this[kClients$2].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients$2].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients$2].length; + const pool = this[kClients$2][this[kIndex]]; + if (pool[kWeight] > this[kClients$2][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; + } + this[kCurrentWeight] = this[kClients$2][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients$2][maxWeightIndex]; + } + }; + module.exports = BalancedPool$1; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js +var require_dispatcher_weakref = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js"(exports, module) { + /* istanbul ignore file: only for Node 12 */ + const { kConnected: kConnected$2, kSize } = require_symbols$4(); + var CompatWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value[kConnected$2] === 0 && this.value[kSize] === 0 ? void 0 : this.value; + } + }; + var CompatFinalizer = class { + constructor(finalizer) { + this.finalizer = finalizer; + } + register(dispatcher, key) { + if (dispatcher.on) dispatcher.on("disconnect", () => { + if (dispatcher[kConnected$2] === 0 && dispatcher[kSize] === 0) this.finalizer(key); + }); + } + }; + module.exports = function() { + if (process.env.NODE_V8_COVERAGE) return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + }; + return { + WeakRef: global.WeakRef || CompatWeakRef, + FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer + }; + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/agent.js +var require_agent = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/agent.js"(exports, module) { + const { InvalidArgumentError: InvalidArgumentError$13 } = require_errors(); + const { kClients: kClients$1, kRunning, kClose: kClose$3, kDestroy: kDestroy$1, kDispatch, kInterceptors: kInterceptors$1 } = require_symbols$4(); + const DispatcherBase$1 = require_dispatcher_base(); + const Pool$3 = require_pool(); + const Client$2 = require_client(); + const util$10 = require_util$6(); + const createRedirectInterceptor$1 = require_redirectInterceptor(); + const { WeakRef: WeakRef$1, FinalizationRegistry: FinalizationRegistry$1 } = require_dispatcher_weakref()(); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kMaxRedirections = Symbol("maxRedirections"); + const kOnDrain = Symbol("onDrain"); + const kFactory$1 = Symbol("factory"); + const kFinalizer = Symbol("finalizer"); + const kOptions$1 = Symbol("options"); + function defaultFactory$1(origin, opts) { + return opts && opts.connections === 1 ? new Client$2(origin, opts) : new Pool$3(origin, opts); + } + var Agent$4 = class extends DispatcherBase$1 { + constructor({ factory = defaultFactory$1, maxRedirections = 0, connect: connect$2,...options } = {}) { + super(); + if (typeof factory !== "function") throw new InvalidArgumentError$13("factory must be a function."); + if (connect$2 != null && typeof connect$2 !== "function" && typeof connect$2 !== "object") throw new InvalidArgumentError$13("connect must be a function or an object"); + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new InvalidArgumentError$13("maxRedirections must be a positive number"); + if (connect$2 && typeof connect$2 !== "function") connect$2 = { ...connect$2 }; + this[kInterceptors$1] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor$1({ maxRedirections })]; + this[kOptions$1] = { + ...util$10.deepClone(options), + connect: connect$2 + }; + this[kOptions$1].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory$1] = factory; + this[kClients$1] = new Map(); + this[kFinalizer] = new FinalizationRegistry$1( + /* istanbul ignore next: gc is undeterministic */ + (key) => { + const ref = this[kClients$1].get(key); + if (ref !== void 0 && ref.deref() === void 0) this[kClients$1].delete(key); + } +); + const agent = this; + this[kOnDrain] = (origin, targets) => { + agent.emit("drain", origin, [agent, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + agent.emit("connect", origin, [agent, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + agent.emit("disconnect", origin, [agent, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + agent.emit("connectionError", origin, [agent, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const ref of this[kClients$1].values()) { + const client = ref.deref(); + /* istanbul ignore next: gc is undeterministic */ + if (client) ret += client[kRunning]; + } + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); + else throw new InvalidArgumentError$13("opts.origin must be a non-empty string or URL."); + const ref = this[kClients$1].get(key); + let dispatcher = ref ? ref.deref() : null; + if (!dispatcher) { + dispatcher = this[kFactory$1](opts.origin, this[kOptions$1]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients$1].set(key, new WeakRef$1(dispatcher)); + this[kFinalizer].register(dispatcher, key); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose$3]() { + const closePromises = []; + for (const ref of this[kClients$1].values()) { + const client = ref.deref(); + /* istanbul ignore else: gc is undeterministic */ + if (client) closePromises.push(client.close()); + } + await Promise.all(closePromises); + } + async [kDestroy$1](err) { + const destroyPromises = []; + for (const ref of this[kClients$1].values()) { + const client = ref.deref(); + /* istanbul ignore else: gc is undeterministic */ + if (client) destroyPromises.push(client.destroy(err)); + } + await Promise.all(destroyPromises); + } + }; + module.exports = Agent$4; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/readable.js +var require_readable = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/readable.js"(exports, module) { + const assert$11 = __require("assert"); + const { Readable: Readable$3 } = __require("stream"); + const { RequestAbortedError: RequestAbortedError$7, NotSupportedError, InvalidArgumentError: InvalidArgumentError$12 } = require_errors(); + const util$9 = require_util$6(); + const { ReadableStreamFrom, toUSVString: toUSVString$1 } = require_util$6(); + let Blob$1; + const kConsume = Symbol("kConsume"); + const kReading = Symbol("kReading"); + const kBody = Symbol("kBody"); + const kAbort = Symbol("abort"); + const kContentType = Symbol("kContentType"); + const noop = () => {}; + module.exports = class BodyReadable extends Readable$3 { + constructor({ resume: resume$1, abort: abort$1, contentType = "", highWaterMark = 64 * 1024 }) { + super({ + autoDestroy: true, + read: resume$1, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort$1; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kReading] = false; + } + destroy(err) { + if (this.destroyed) return this; + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError$7(); + if (err) this[kAbort](); + return super.destroy(err); + } + emit(ev, ...args) { + if (ev === "data") this._readableState.dataEmitted = true; + else if (ev === "error") this._readableState.errorEmitted = true; + return super.emit(ev, ...args); + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") this[kReading] = true; + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === "data" || ev === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null && this.readableLength === 0) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + return super.push(chunk); + } + async text() { + return consume(this, "text"); + } + async json() { + return consume(this, "json"); + } + async blob() { + return consume(this, "blob"); + } + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + async formData() { + throw new NotSupportedError(); + } + get bodyUsed() { + return util$9.isDisturbed(this); + } + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert$11(this[kBody].locked); + } + } + return this[kBody]; + } + dump(opts) { + let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144; + const signal = opts && opts.signal; + if (signal) try { + if (typeof signal !== "object" || !("aborted" in signal)) throw new InvalidArgumentError$12("signal must be an AbortSignal"); + util$9.throwIfAborted(signal); + } catch (err) { + return Promise.reject(err); + } + if (this.closed) return Promise.resolve(null); + return new Promise((resolve, reject) => { + const signalListenerCleanup = signal ? util$9.addAbortListener(signal, () => { + this.destroy(); + }) : noop; + this.on("close", function() { + signalListenerCleanup(); + if (signal && signal.aborted) reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" })); + else resolve(null); + }).on("error", noop).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) this.destroy(); + }).resume(); + }); + } + }; + function isLocked(self) { + return self[kBody] && self[kBody].locked === true || self[kConsume]; + } + function isUnusable(self) { + return util$9.isDisturbed(self) || isLocked(self); + } + async function consume(stream$2, type) { + if (isUnusable(stream$2)) throw new TypeError("unusable"); + assert$11(!stream$2[kConsume]); + return new Promise((resolve, reject) => { + stream$2[kConsume] = { + type, + stream: stream$2, + resolve, + reject, + length: 0, + body: [] + }; + stream$2.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError$7()); + }); + process.nextTick(consumeStart, stream$2[kConsume]); + }); + } + function consumeStart(consume$1) { + if (consume$1.body === null) return; + const { _readableState: state } = consume$1.stream; + for (const chunk of state.buffer) consumePush(consume$1, chunk); + if (state.endEmitted) consumeEnd(this[kConsume]); + else consume$1.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + consume$1.stream.resume(); + while (consume$1.stream.read() != null); + } + function consumeEnd(consume$1) { + const { type, body, resolve, stream: stream$2, length } = consume$1; + try { + if (type === "text") resolve(toUSVString$1(Buffer.concat(body))); + else if (type === "json") resolve(JSON.parse(Buffer.concat(body))); + else if (type === "arrayBuffer") { + const dst = new Uint8Array(length); + let pos = 0; + for (const buf of body) { + dst.set(buf, pos); + pos += buf.byteLength; + } + resolve(dst.buffer); + } else if (type === "blob") { + if (!Blob$1) Blob$1 = __require("buffer").Blob; + resolve(new Blob$1(body, { type: stream$2[kContentType] })); + } + consumeFinish(consume$1); + } catch (err) { + stream$2.destroy(err); + } + } + function consumePush(consume$1, chunk) { + consume$1.length += chunk.length; + consume$1.body.push(chunk); + } + function consumeFinish(consume$1, err) { + if (consume$1.body === null) return; + if (err) consume$1.reject(err); + else consume$1.resolve(); + consume$1.type = null; + consume$1.stream = null; + consume$1.resolve = null; + consume$1.reject = null; + consume$1.length = 0; + consume$1.body = null; + } +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/util.js +var require_util$4 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/util.js"(exports, module) { + const assert$10 = __require("assert"); + const { ResponseStatusCodeError } = require_errors(); + const { toUSVString } = require_util$6(); + async function getResolveErrorBodyCallback$2({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert$10(body); + let chunks = []; + let limit = 0; + for await (const chunk of body) { + chunks.push(chunk); + limit += chunk.length; + if (limit > 128 * 1024) { + chunks = null; + break; + } + } + if (statusCode === 204 || !contentType || !chunks) { + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); + return; + } + try { + if (contentType.startsWith("application/json")) { + const payload = JSON.parse(toUSVString(Buffer.concat(chunks))); + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); + return; + } + if (contentType.startsWith("text/")) { + const payload = toUSVString(Buffer.concat(chunks)); + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); + return; + } + } catch (err) {} + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); + } + module.exports = { getResolveErrorBodyCallback: getResolveErrorBodyCallback$2 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js"(exports, module) { + const { addAbortListener: addAbortListener$1 } = require_util$6(); + const { RequestAbortedError: RequestAbortedError$6 } = require_errors(); + const kListener = Symbol("kListener"); + const kSignal$1 = Symbol("kSignal"); + function abort(self) { + if (self.abort) self.abort(); + else self.onError(new RequestAbortedError$6()); + } + function addSignal$5(self, signal) { + self[kSignal$1] = null; + self[kListener] = null; + if (!signal) return; + if (signal.aborted) { + abort(self); + return; + } + self[kSignal$1] = signal; + self[kListener] = () => { + abort(self); + }; + addAbortListener$1(self[kSignal$1], self[kListener]); + } + function removeSignal$5(self) { + if (!self[kSignal$1]) return; + if ("removeEventListener" in self[kSignal$1]) self[kSignal$1].removeEventListener("abort", self[kListener]); + else self[kSignal$1].removeListener("abort", self[kListener]); + self[kSignal$1] = null; + self[kListener] = null; + } + module.exports = { + addSignal: addSignal$5, + removeSignal: removeSignal$5 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-request.js +var require_api_request = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-request.js"(exports, module) { + const Readable$2 = require_readable(); + const { InvalidArgumentError: InvalidArgumentError$11, RequestAbortedError: RequestAbortedError$5 } = require_errors(); + const util$8 = require_util$6(); + const { getResolveErrorBodyCallback: getResolveErrorBodyCallback$1 } = require_util$4(); + const { AsyncResource: AsyncResource$4 } = __require("async_hooks"); + const { addSignal: addSignal$4, removeSignal: removeSignal$4 } = require_abort_signal(); + var RequestHandler = class extends AsyncResource$4 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError$11("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError$11("invalid callback"); + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError$11("invalid highWaterMark"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$11("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError$11("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$11("invalid onInfo callback"); + super("UNDICI_REQUEST"); + } catch (err) { + if (util$8.isStream(body)) util$8.destroy(body.on("error", util$8.nop), err); + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + if (util$8.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + addSignal$4(this, signal); + } + onConnect(abort$1, context) { + if (!this.callback) throw new RequestAbortedError$5(); + this.abort = abort$1; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { + const { callback, opaque, abort: abort$1, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util$8.parseRawHeaders(rawHeaders) : util$8.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + const parsedHeaders = responseHeaders === "raw" ? util$8.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const body = new Readable$2({ + resume: resume$1, + abort: abort$1, + contentType, + highWaterMark + }); + this.callback = null; + this.res = body; + if (callback !== null) if (this.throwOnError && statusCode >= 400) this.runInAsyncScope(getResolveErrorBodyCallback$1, null, { + callback, + body, + contentType, + statusCode, + statusMessage, + headers + }); + else this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body, + context + }); + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + removeSignal$4(this); + util$8.parseHeaders(trailers, this.trailers); + res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + removeSignal$4(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util$8.destroy(res, err); + }); + } + if (body) { + this.body = null; + util$8.destroy(body, err); + } + } + }; + function request(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts && opts.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = request; + module.exports.RequestHandler = RequestHandler; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-stream.js +var require_api_stream = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-stream.js"(exports, module) { + const { finished, PassThrough: PassThrough$1 } = __require("stream"); + const { InvalidArgumentError: InvalidArgumentError$10, InvalidReturnValueError: InvalidReturnValueError$1, RequestAbortedError: RequestAbortedError$4 } = require_errors(); + const util$7 = require_util$6(); + const { getResolveErrorBodyCallback } = require_util$4(); + const { AsyncResource: AsyncResource$3 } = __require("async_hooks"); + const { addSignal: addSignal$3, removeSignal: removeSignal$3 } = require_abort_signal(); + var StreamHandler = class extends AsyncResource$3 { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError$10("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError$10("invalid callback"); + if (typeof factory !== "function") throw new InvalidArgumentError$10("invalid factory"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$10("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError$10("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$10("invalid onInfo callback"); + super("UNDICI_STREAM"); + } catch (err) { + if (util$7.isStream(body)) util$7.destroy(body.on("error", util$7.nop), err); + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError || false; + if (util$7.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + addSignal$3(this, signal); + } + onConnect(abort$1, context) { + if (!this.callback) throw new RequestAbortedError$4(); + this.abort = abort$1; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util$7.parseRawHeaders(rawHeaders) : util$7.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const parsedHeaders = responseHeaders === "raw" ? util$7.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + res = new PassThrough$1(); + this.callback = null; + this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + } else { + if (factory === null) return; + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError$1("expected Writable"); + finished(res, { readable: false }, (err) => { + const { callback: callback$1, res: res$1, opaque: opaque$1, trailers, abort: abort$1 } = this; + this.res = null; + if (err || !res$1.readable) util$7.destroy(res$1, err); + this.callback = null; + this.runInAsyncScope(callback$1, null, err || null, { + opaque: opaque$1, + trailers + }); + if (err) abort$1(); + }); + } + res.on("drain", resume$1); + this.res = res; + const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState && res._writableState.needDrain; + return needDrain !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal$3(this); + if (!res) return; + this.trailers = util$7.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal$3(this); + this.factory = null; + if (res) { + this.res = null; + util$7.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (body) { + this.body = null; + util$7.destroy(body, err); + } + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts && opts.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = stream; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js"(exports, module) { + const { Readable: Readable$1, Duplex, PassThrough } = __require("stream"); + const { InvalidArgumentError: InvalidArgumentError$9, InvalidReturnValueError, RequestAbortedError: RequestAbortedError$3 } = require_errors(); + const util$6 = require_util$6(); + const { AsyncResource: AsyncResource$2 } = __require("async_hooks"); + const { addSignal: addSignal$2, removeSignal: removeSignal$2 } = require_abort_signal(); + const assert$9 = __require("assert"); + const kResume = Symbol("resume"); + var PipelineRequest = class extends Readable$1 { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume$1 } = this; + if (resume$1) { + this[kResume] = null; + resume$1(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable$1 { + constructor(resume$1) { + super({ autoDestroy: true }); + this[kResume] = resume$1; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError$3(); + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource$2 { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError$9("invalid opts"); + if (typeof handler !== "function") throw new InvalidArgumentError$9("invalid handler"); + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$9("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError$9("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError$9("invalid onInfo callback"); + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", util$6.nop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body && body.resume) body.resume(); + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); + else req[kResume] = callback; + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort: abort$1 } = this; + if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError$3(); + if (abort$1 && err) abort$1(); + util$6.destroy(body, err); + util$6.destroy(req, err); + util$6.destroy(res, err); + removeSignal$2(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal$2(this, signal); + } + onConnect(abort$1, context) { + const { ret, res } = this; + assert$9(!res, "pipeline cannot be retried"); + if (ret.destroyed) throw new RequestAbortedError$3(); + this.abort = abort$1; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume$1) { + const { opaque, handler, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util$6.parseRawHeaders(rawHeaders) : util$6.parseHeaders(rawHeaders); + this.onInfo({ + statusCode, + headers + }); + } + return; + } + this.res = new PipelineResponse(resume$1); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util$6.parseRawHeaders(rawHeaders) : util$6.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", util$6.nop); + throw err; + } + if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); + body.on("data", (chunk) => { + const { ret, body: body$1 } = this; + if (!ret.push(chunk) && body$1.pause) body$1.pause(); + }).on("error", (err) => { + const { ret } = this; + util$6.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) util$6.destroy(ret, new RequestAbortedError$3()); + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util$6.destroy(ret, err); + } + }; + function pipeline$1(opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler); + this.dispatch({ + ...opts, + body: pipelineHandler.req + }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough().destroy(err); + } + } + module.exports = pipeline$1; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js"(exports, module) { + const { InvalidArgumentError: InvalidArgumentError$8, RequestAbortedError: RequestAbortedError$2, SocketError: SocketError$1 } = require_errors(); + const { AsyncResource: AsyncResource$1 } = __require("async_hooks"); + const util$5 = require_util$6(); + const { addSignal: addSignal$1, removeSignal: removeSignal$1 } = require_abort_signal(); + const assert$8 = __require("assert"); + var UpgradeHandler = class extends AsyncResource$1 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError$8("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError$8("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$8("signal must be an EventEmitter or EventTarget"); + super("UNDICI_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal$1(this, signal); + } + onConnect(abort$1, context) { + if (!this.callback) throw new RequestAbortedError$2(); + this.abort = abort$1; + this.context = null; + } + onHeaders() { + throw new SocketError$1("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + assert$8.strictEqual(statusCode, 101); + removeSignal$1(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util$5.parseRawHeaders(rawHeaders) : util$5.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal$1(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts && opts.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = upgrade; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-connect.js +var require_api_connect = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/api-connect.js"(exports, module) { + const { AsyncResource } = __require("async_hooks"); + const { InvalidArgumentError: InvalidArgumentError$7, RequestAbortedError: RequestAbortedError$1, SocketError } = require_errors(); + const util$4 = require_util$6(); + const { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError$7("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError$7("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError$7("signal must be an EventEmitter or EventTarget"); + super("UNDICI_CONNECT"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + addSignal(this, signal); + } + onConnect(abort$1, context) { + if (!this.callback) throw new RequestAbortedError$1(); + this.abort = abort$1; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) headers = this.responseHeaders === "raw" ? util$4.parseRawHeaders(rawHeaders) : util$4.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function connect(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const connectHandler = new ConnectHandler(opts, callback); + this.dispatch({ + ...opts, + method: "CONNECT" + }, connectHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts && opts.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = connect; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/index.js +var require_api = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/api/index.js"(exports, module) { + module.exports.request = require_api_request(); + module.exports.stream = require_api_stream(); + module.exports.pipeline = require_api_pipeline(); + module.exports.upgrade = require_api_upgrade(); + module.exports.connect = require_api_connect(); +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js"(exports, module) { + const { UndiciError: UndiciError$1 } = require_errors(); + var MockNotMatchedError$1 = class MockNotMatchedError$1 extends UndiciError$1 { + constructor(message) { + super(message); + Error.captureStackTrace(this, MockNotMatchedError$1); + this.name = "MockNotMatchedError"; + this.message = message || "The request does not match any registered mock dispatches"; + this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; + } + }; + module.exports = { MockNotMatchedError: MockNotMatchedError$1 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) { + module.exports = { + kAgent: Symbol("agent"), + kOptions: Symbol("options"), + kFactory: Symbol("factory"), + kDispatches: Symbol("dispatches"), + kDispatchKey: Symbol("dispatch key"), + kDefaultHeaders: Symbol("default headers"), + kDefaultTrailers: Symbol("default trailers"), + kContentLength: Symbol("content length"), + kMockAgent: Symbol("mock agent"), + kMockAgentSet: Symbol("mock agent set"), + kMockAgentGet: Symbol("mock agent get"), + kMockDispatch: Symbol("mock dispatch"), + kClose: Symbol("close"), + kOriginalClose: Symbol("original agent close"), + kOrigin: Symbol("origin"), + kIsMockActive: Symbol("is mock active"), + kNetConnect: Symbol("net connect"), + kGetNetConnect: Symbol("get net connect"), + kConnected: Symbol("connected") + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js"(exports, module) { + const { MockNotMatchedError } = require_mock_errors(); + const { kDispatches: kDispatches$4, kMockAgent: kMockAgent$2, kOriginalDispatch: kOriginalDispatch$2, kOrigin: kOrigin$2, kGetNetConnect: kGetNetConnect$1 } = require_mock_symbols(); + const { buildURL: buildURL$1, nop } = require_util$6(); + const { STATUS_CODES: STATUS_CODES$1 } = __require("http"); + const { types: { isPromise } } = __require("util"); + function matchValue$1(match, value) { + if (typeof match === "string") return match === value; + if (match instanceof RegExp) return match.test(value); + if (typeof match === "function") return match(value) === true; + return false; + } + function lowerCaseEntries(headers) { + return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + })); + } + /** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ + function getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for (let i$1 = 0; i$1 < headers.length; i$1 += 2) if (headers[i$1].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i$1 + 1]; + return void 0; + } else if (typeof headers.get === "function") return headers.get(key); + else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } + /** @param {string[]} headers */ + function buildHeadersFromArray(headers) { + const clone = headers.slice(); + const entries = []; + for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); + return Object.fromEntries(entries); + } + function matchHeaders(mockDispatch$1, headers) { + if (typeof mockDispatch$1.headers === "function") { + if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); + return mockDispatch$1.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch$1.headers === "undefined") return true; + if (typeof headers !== "object" || typeof mockDispatch$1.headers !== "object") return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch$1.headers)) { + const headerValue = getHeaderByName(headers, matchHeaderName); + if (!matchValue$1(matchHeaderValue, headerValue)) return false; + } + return true; + } + function safeUrl(path$5) { + if (typeof path$5 !== "string") return path$5; + const pathSegments = path$5.split("?"); + if (pathSegments.length !== 2) return path$5; + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch$1, { path: path$5, method, body, headers }) { + const pathMatch = matchValue$1(mockDispatch$1.path, path$5); + const methodMatch = matchValue$1(mockDispatch$1.method, method); + const bodyMatch = typeof mockDispatch$1.body !== "undefined" ? matchValue$1(mockDispatch$1.body, body) : true; + const headersMatch = matchHeaders(mockDispatch$1, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; + } + function getResponseData$1(data) { + if (Buffer.isBuffer(data)) return data; + else if (typeof data === "object") return JSON.stringify(data); + else return data.toString(); + } + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? buildURL$1(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$5 }) => matchValue$1(safeUrl(path$5), resolvedPath)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$1(method, key.method)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue$1(body, key.body) : true); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`); + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch$1) => matchHeaders(mockDispatch$1, key.headers)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}'`); + return matchedMockDispatches[0]; + } + function addMockDispatch$1(mockDispatches, key, data) { + const baseData = { + timesInvoked: 0, + times: 1, + persist: false, + consumed: false + }; + const replyData = typeof data === "function" ? { callback: data } : { ...data }; + const newMockDispatch = { + ...baseData, + ...key, + pending: true, + data: { + error: null, + ...replyData + } + }; + mockDispatches.push(newMockDispatch); + return newMockDispatch; + } + function deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch) => { + if (!dispatch.consumed) return false; + return matchKey(dispatch, key); + }); + if (index !== -1) mockDispatches.splice(index, 1); + } + function buildKey$1(opts) { + const { path: path$5, method, body, headers, query } = opts; + return { + path: path$5, + method, + body, + headers, + query + }; + } + function generateKeyValues(data) { + return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ + ...keyValuePairs, + Buffer.from(`${key}`), + Array.isArray(value) ? value.map((x) => Buffer.from(`${x}`)) : Buffer.from(`${value}`) + ], []); + } + /** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ + function getStatusText(statusCode) { + return STATUS_CODES$1[statusCode] || "unknown"; + } + async function getResponse(body) { + const buffers = []; + for await (const data of body) buffers.push(data); + return Buffer.concat(buffers).toString("utf8"); + } + /** + * Mock dispatch function used to simulate undici dispatches + */ + function mockDispatch(opts, handler) { + const key = buildKey$1(opts); + const mockDispatch$1 = getMockDispatch(this[kDispatches$4], key); + mockDispatch$1.timesInvoked++; + if (mockDispatch$1.data.callback) mockDispatch$1.data = { + ...mockDispatch$1.data, + ...mockDispatch$1.data.callback(opts) + }; + const { data: { statusCode, data, headers, trailers, error: error$1 }, delay, persist } = mockDispatch$1; + const { timesInvoked, times } = mockDispatch$1; + mockDispatch$1.consumed = !persist && timesInvoked >= times; + mockDispatch$1.pending = timesInvoked < times; + if (error$1 !== null) { + deleteMockDispatch(this[kDispatches$4], key); + handler.onError(error$1); + return true; + } + if (typeof delay === "number" && delay > 0) setTimeout(() => { + handleReply(this[kDispatches$4]); + }, delay); + else handleReply(this[kDispatches$4]); + function handleReply(mockDispatches, _data = data) { + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ + ...opts, + headers: optsHeaders + }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); + return; + } + const responseData = getResponseData$1(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler.abort = nop; + handler.onHeaders(statusCode, responseHeaders, resume$1, getStatusText(statusCode)); + handler.onData(Buffer.from(responseData)); + handler.onComplete(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume$1() {} + return true; + } + function buildMockDispatch$2() { + const agent = this[kMockAgent$2]; + const origin = this[kOrigin$2]; + const originalDispatch = this[kOriginalDispatch$2]; + return function dispatch(opts, handler) { + if (agent.isMockActive) try { + mockDispatch.call(this, opts, handler); + } catch (error$1) { + if (error$1 instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect$1](); + if (netConnect === false) throw new MockNotMatchedError(`${error$1.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); + else throw new MockNotMatchedError(`${error$1.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error$1; + } + else originalDispatch.call(this, opts, handler); + }; + } + function checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) return true; + else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue$1(matcher, url.host))) return true; + return false; + } + function buildMockOptions$1(opts) { + if (opts) { + const { agent,...mockOptions } = opts; + return mockOptions; + } + } + module.exports = { + getResponseData: getResponseData$1, + getMockDispatch, + addMockDispatch: addMockDispatch$1, + deleteMockDispatch, + buildKey: buildKey$1, + generateKeyValues, + matchValue: matchValue$1, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch: buildMockDispatch$2, + checkNetConnect, + buildMockOptions: buildMockOptions$1, + getHeaderByName + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) { + const { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); + const { kDispatches: kDispatches$3, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require_mock_symbols(); + const { InvalidArgumentError: InvalidArgumentError$6 } = require_errors(); + const { buildURL } = require_util$6(); + /** + * Defines the scope API for an interceptor reply + */ + var MockScope = class { + constructor(mockDispatch$1) { + this[kMockDispatch] = mockDispatch$1; + } + /** + * Delay a reply by a set amount in ms. + */ + delay(waitInMs) { + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError$6("waitInMs must be a valid integer > 0"); + this[kMockDispatch].delay = waitInMs; + return this; + } + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[kMockDispatch].persist = true; + return this; + } + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times(repeatTimes) { + if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError$6("repeatTimes must be a valid integer > 0"); + this[kMockDispatch].times = repeatTimes; + return this; + } + }; + /** + * Defines an interceptor for a Mock + */ + var MockInterceptor$2 = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") throw new InvalidArgumentError$6("opts must be an object"); + if (typeof opts.path === "undefined") throw new InvalidArgumentError$6("opts.path must be defined"); + if (typeof opts.method === "undefined") opts.method = "GET"; + if (typeof opts.path === "string") if (opts.query) opts.path = buildURL(opts.path, opts.query); + else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); + this[kDispatchKey] = buildKey(opts); + this[kDispatches$3] = mockDispatches; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + createMockScopeDispatchData(statusCode, data, responseOptions = {}) { + const responseData = getResponseData(data); + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + const headers = { + ...this[kDefaultHeaders], + ...contentLength, + ...responseOptions.headers + }; + const trailers = { + ...this[kDefaultTrailers], + ...responseOptions.trailers + }; + return { + statusCode, + data, + headers, + trailers + }; + } + validateReplyParameters(statusCode, data, responseOptions) { + if (typeof statusCode === "undefined") throw new InvalidArgumentError$6("statusCode must be defined"); + if (typeof data === "undefined") throw new InvalidArgumentError$6("data must be defined"); + if (typeof responseOptions !== "object") throw new InvalidArgumentError$6("responseOptions must be an object"); + } + /** + * Mock an undici request with a defined reply. + */ + reply(replyData) { + if (typeof replyData === "function") { + const wrappedDefaultsCallback = (opts) => { + const resolvedData = replyData(opts); + if (typeof resolvedData !== "object") throw new InvalidArgumentError$6("reply options callback must return an object"); + const { statusCode: statusCode$1, data: data$1 = "", responseOptions: responseOptions$1 = {} } = resolvedData; + this.validateReplyParameters(statusCode$1, data$1, responseOptions$1); + return { ...this.createMockScopeDispatchData(statusCode$1, data$1, responseOptions$1) }; + }; + const newMockDispatch$1 = addMockDispatch(this[kDispatches$3], this[kDispatchKey], wrappedDefaultsCallback); + return new MockScope(newMockDispatch$1); + } + const [statusCode, data = "", responseOptions = {}] = [...arguments]; + this.validateReplyParameters(statusCode, data, responseOptions); + const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions); + const newMockDispatch = addMockDispatch(this[kDispatches$3], this[kDispatchKey], dispatchData); + return new MockScope(newMockDispatch); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error$1) { + if (typeof error$1 === "undefined") throw new InvalidArgumentError$6("error must be defined"); + const newMockDispatch = addMockDispatch(this[kDispatches$3], this[kDispatchKey], { error: error$1 }); + return new MockScope(newMockDispatch); + } + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders(headers) { + if (typeof headers === "undefined") throw new InvalidArgumentError$6("headers must be defined"); + this[kDefaultHeaders] = headers; + return this; + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") throw new InvalidArgumentError$6("trailers must be defined"); + this[kDefaultTrailers] = trailers; + return this; + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module.exports.MockInterceptor = MockInterceptor$2; + module.exports.MockScope = MockScope; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js +var require_mock_client = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js"(exports, module) { + const { promisify: promisify$1 } = __require("util"); + const Client$1 = require_client(); + const { buildMockDispatch: buildMockDispatch$1 } = require_mock_utils(); + const { kDispatches: kDispatches$2, kMockAgent: kMockAgent$1, kClose: kClose$2, kOriginalClose: kOriginalClose$1, kOrigin: kOrigin$1, kOriginalDispatch: kOriginalDispatch$1, kConnected: kConnected$1 } = require_mock_symbols(); + const { MockInterceptor: MockInterceptor$1 } = require_mock_interceptor(); + const Symbols$1 = require_symbols$4(); + const { InvalidArgumentError: InvalidArgumentError$5 } = require_errors(); + /** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ + var MockClient$2 = class extends Client$1 { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$5("Argument opts.agent must implement Agent"); + this[kMockAgent$1] = opts.agent; + this[kOrigin$1] = origin; + this[kDispatches$2] = []; + this[kConnected$1] = 1; + this[kOriginalDispatch$1] = this.dispatch; + this[kOriginalClose$1] = this.close.bind(this); + this.dispatch = buildMockDispatch$1.call(this); + this.close = this[kClose$2]; + } + get [Symbols$1.kConnected]() { + return this[kConnected$1]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor$1(opts, this[kDispatches$2]); + } + async [kClose$2]() { + await promisify$1(this[kOriginalClose$1])(); + this[kConnected$1] = 0; + this[kMockAgent$1][Symbols$1.kClients].delete(this[kOrigin$1]); + } + }; + module.exports = MockClient$2; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js"(exports, module) { + const { promisify } = __require("util"); + const Pool$2 = require_pool(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches: kDispatches$1, kMockAgent, kClose: kClose$1, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError: InvalidArgumentError$4 } = require_errors(); + /** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ + var MockPool$2 = class extends Pool$2 { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$4("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches$1] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose$1]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches$1]); + } + async [kClose$1]() { + await promisify(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockPool$2; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js +var require_pluralizer = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js"(exports, module) { + const singulars = { + pronoun: "it", + is: "is", + was: "was", + this: "this" + }; + const plurals = { + pronoun: "they", + is: "are", + was: "were", + this: "these" + }; + module.exports = class Pluralizer$1 { + constructor(singular, plural) { + this.singular = singular; + this.plural = plural; + } + pluralize(count) { + const one = count === 1; + const keys = one ? singulars : plurals; + const noun = one ? this.singular : this.plural; + return { + ...keys, + count, + noun + }; + } + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) { + const { Transform } = __require("stream"); + const { Console } = __require("console"); + /** + * Gets the output of `console.table(…)` as a string. + */ + module.exports = class PendingInterceptorsFormatter$1 { + constructor({ disableColors } = {}) { + this.transform = new Transform({ transform(chunk, _enc, cb) { + cb(null, chunk); + } }); + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { colors: !disableColors && !process.env.CI } + }); + } + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$5, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path$5, + "Status code": statusCode, + Persistent: persist ? "✅" : "❌", + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js"(exports, module) { + const { kClients } = require_symbols$4(); + const Agent$3 = require_agent(); + const { kAgent: kAgent$1, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require_mock_symbols(); + const MockClient$1 = require_mock_client(); + const MockPool$1 = require_mock_pool(); + const { matchValue, buildMockOptions } = require_mock_utils(); + const { InvalidArgumentError: InvalidArgumentError$3, UndiciError } = require_errors(); + const Dispatcher$1 = require_dispatcher(); + const Pluralizer = require_pluralizer(); + const PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var FakeWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value; + } + }; + var MockAgent$1 = class extends Dispatcher$1 { + constructor(opts) { + super(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + if (opts && opts.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError$3("Argument opts.agent must implement Agent"); + const agent = opts && opts.agent ? opts.agent : new Agent$3(opts); + this[kAgent$1] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = buildMockOptions(opts); + } + get(origin) { + let dispatcher = this[kMockAgentGet](origin); + if (!dispatcher) { + dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + this.get(opts.origin); + return this[kAgent$1].dispatch(opts, handler); + } + async close() { + await this[kAgent$1].close(); + this[kClients].clear(); + } + deactivate() { + this[kIsMockActive] = false; + } + activate() { + this[kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); + else this[kNetConnect] = [matcher]; + else if (typeof matcher === "undefined") this[kNetConnect] = true; + else throw new InvalidArgumentError$3("Unsupported matcher. Must be one of String|Function|RegExp."); + } + disableNetConnect() { + this[kNetConnect] = false; + } + get isMockActive() { + return this[kIsMockActive]; + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, new FakeWeakRef(dispatcher)); + } + [kFactory](origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]); + return this[kOptions] && this[kOptions].connections === 1 ? new MockClient$1(origin, mockOptions) : new MockPool$1(origin, mockOptions); + } + [kMockAgentGet](origin) { + const ref = this[kClients].get(origin); + if (ref) return ref.deref(); + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { + const nonExplicitDispatcher = nonExplicitRef.deref(); + if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; + return dispatcher; + } + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope.deref()[kDispatches].map((dispatch) => ({ + ...dispatch, + origin + }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) return; + const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()); + } + }; + module.exports = MockAgent$1; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/proxy-agent.js +var require_proxy_agent = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/proxy-agent.js"(exports, module) { + const { kProxy, kClose, kDestroy, kInterceptors } = require_symbols$4(); + const { URL: URL$1 } = __require("url"); + const Agent$2 = require_agent(); + const Pool$1 = require_pool(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError: InvalidArgumentError$2, RequestAbortedError } = require_errors(); + const buildConnector$1 = require_connect(); + const kAgent = Symbol("proxy agent"); + const kClient = Symbol("proxy client"); + const kProxyHeaders = Symbol("proxy headers"); + const kRequestTls = Symbol("request tls settings"); + const kProxyTls = Symbol("proxy tls settings"); + const kConnectEndpoint = Symbol("connect endpoint function"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function buildProxyOptions(opts) { + if (typeof opts === "string") opts = { uri: opts }; + if (!opts || !opts.uri) throw new InvalidArgumentError$2("Proxy opts.uri is mandatory"); + return { + uri: opts.uri, + protocol: opts.protocol || "https" + }; + } + function defaultFactory(origin, opts) { + return new Pool$1(origin, opts); + } + var ProxyAgent$1 = class extends DispatcherBase { + constructor(opts) { + super(opts); + this[kProxy] = buildProxyOptions(opts); + this[kAgent] = new Agent$2(opts); + this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + if (typeof opts === "string") opts = { uri: opts }; + if (!opts || !opts.uri) throw new InvalidArgumentError$2("Proxy opts.uri is mandatory"); + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") throw new InvalidArgumentError$2("Proxy opts.clientFactory must be a function."); + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + const resolvedUrl = new URL$1(opts.uri); + const { origin, port, host, username, password } = resolvedUrl; + if (opts.auth && opts.token) throw new InvalidArgumentError$2("opts.auth cannot be used in combination with opts.token"); + else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; + else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + const connect$2 = buildConnector$1({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector$1({ ...opts.requestTls }); + this[kClient] = clientFactory(resolvedUrl, { connect: connect$2 }); + this[kAgent] = new Agent$2({ + ...opts, + connect: async (opts$1, callback) => { + let requestedHost = opts$1.host; + if (!opts$1.port) requestedHost += `:${defaultProtocolPort(opts$1.protocol)}`; + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedHost, + signal: opts$1.signal, + headers: { + ...this[kProxyHeaders], + host + } + }); + if (statusCode !== 200) { + socket.on("error", () => {}).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts$1.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) servername = this[kRequestTls].servername; + else servername = opts$1.servername; + this[kConnectEndpoint]({ + ...opts$1, + servername, + httpSocket: socket + }, callback); + } catch (err) { + callback(err); + } + } + }); + } + dispatch(opts, handler) { + const { host } = new URL$1(opts.origin); + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + return this[kAgent].dispatch({ + ...opts, + headers: { + ...headers, + host + } + }, handler); + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + /** + * @param {string[] | Record} headers + * @returns {Record} + */ + function buildHeaders(headers) { + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {}; + for (let i$1 = 0; i$1 < headers.length; i$1 += 2) headersPair[headers[i$1]] = headers[i$1 + 1]; + return headersPair; + } + return headers; + } + /** + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons + */ + function throwIfProxyAuthIsSent(headers) { + const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); + if (existProxyAuth) throw new InvalidArgumentError$2("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + module.exports = ProxyAgent$1; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js +var require_RetryHandler = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js"(exports, module) { + const assert$7 = __require("assert"); + const { kRetryHandlerDefaultRetry } = require_symbols$4(); + const { RequestRetryError } = require_errors(); + const { isDisturbed: isDisturbed$1, parseHeaders, parseRangeHeader } = require_util$6(); + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + const diff$1 = new Date(retryAfter).getTime() - current; + return diff$1; + } + var RetryHandler$1 = class RetryHandler$1 { + constructor(opts, handlers) { + const { retryOptions,...dispatchOpts } = opts; + const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; + this.dispatch = handlers.dispatch; + this.handler = handlers.handler; + this.opts = dispatchOpts; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? RetryHandler$1[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + timeout: minTimeout ?? 500, + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + methods: methods ?? [ + "GET", + "HEAD", + "OPTIONS", + "PUT", + "DELETE", + "TRACE" + ], + statusCodes: statusCodes ?? [ + 500, + 502, + 503, + 504, + 429 + ], + errorCodes: errorCodes ?? [ + "ECONNRESET", + "ECONNREFUSED", + "ENOTFOUND", + "ENETDOWN", + "ENETUNREACH", + "EHOSTDOWN", + "EHOSTUNREACH", + "EPIPE" + ] + }; + this.retryCount = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) this.abort(reason); + else this.reason = reason; + }); + } + onRequestSent() { + if (this.handler.onRequestSent) this.handler.onRequestSent(); + } + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); + } + onConnect(abort$1) { + if (this.aborted) abort$1(this.reason); + else this.abort = abort$1; + } + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { maxRetries, timeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; + let { counter, currentTimeout } = state; + currentTimeout = currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout; + if (code && code !== "UND_ERR_REQ_RETRY" && code !== "UND_ERR_SOCKET" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers != null && headers["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout); + state.currentTimeout = retryTimeout; + setTimeout(() => cb(null), retryTimeout); + } + onHeaders(statusCode, rawHeaders, resume$1, statusMessage) { + const headers = parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) { + this.abort(new RequestRetryError("Request failed", statusCode, { + headers, + count: this.retryCount + })); + return false; + } + if (this.resume != null) { + this.resume = null; + if (statusCode !== 206) return true; + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + this.abort(new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + count: this.retryCount + })); + return false; + } + if (this.etag != null && this.etag !== headers.etag) { + this.abort(new RequestRetryError("ETag mismatch", statusCode, { + headers, + count: this.retryCount + })); + return false; + } + const { start, size, end = size } = contentRange; + assert$7(this.start === start, "content-range mismatch"); + assert$7(this.end == null || this.end === end, "content-range mismatch"); + this.resume = resume$1; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume$1, statusMessage); + const { start, size, end = size } = range; + assert$7(start != null && Number.isFinite(start) && this.start !== start, "content-range mismatch"); + assert$7(Number.isFinite(start)); + assert$7(end != null && Number.isFinite(end) && this.end !== end, "invalid content-length"); + this.start = start; + this.end = end; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) : null; + } + assert$7(Number.isFinite(this.start)); + assert$7(this.end == null || Number.isFinite(this.end), "invalid content-length"); + this.resume = resume$1; + this.etag = headers.etag != null ? headers.etag : null; + return this.handler.onHeaders(statusCode, rawHeaders, resume$1, statusMessage); + } + const err = new RequestRetryError("Request failed", statusCode, { + headers, + count: this.retryCount + }); + this.abort(err); + return false; + } + onData(chunk) { + this.start += chunk.length; + return this.handler.onData(chunk); + } + onComplete(rawTrailers) { + this.retryCount = 0; + return this.handler.onComplete(rawTrailers); + } + onError(err) { + if (this.aborted || isDisturbed$1(this.opts.body)) return this.handler.onError(err); + this.retryOpts.retry(err, { + state: { + counter: this.retryCount++, + currentTimeout: this.retryAfter + }, + opts: { + retryOptions: this.retryOpts, + ...this.opts + } + }, onRetry.bind(this)); + function onRetry(err$1) { + if (err$1 != null || this.aborted || isDisturbed$1(this.opts.body)) return this.handler.onError(err$1); + if (this.start !== 0) this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + range: `bytes=${this.start}-${this.end ?? ""}` + } + }; + try { + this.dispatch(this.opts, this); + } catch (err$2) { + this.handler.onError(err$2); + } + } + } + }; + module.exports = RetryHandler$1; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/global.js +var require_global = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/global.js"(exports, module) { + const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); + const { InvalidArgumentError: InvalidArgumentError$1 } = require_errors(); + const Agent$1 = require_agent(); + if (getGlobalDispatcher$5() === void 0) setGlobalDispatcher$1(new Agent$1()); + function setGlobalDispatcher$1(agent) { + if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError$1("Argument agent must implement Agent"); + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); + } + function getGlobalDispatcher$5() { + return globalThis[globalDispatcher]; + } + module.exports = { + setGlobalDispatcher: setGlobalDispatcher$1, + getGlobalDispatcher: getGlobalDispatcher$5 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js +var require_DecoratorHandler = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js"(exports, module) { + module.exports = class DecoratorHandler$1 { + constructor(handler) { + this.handler = handler; + } + onConnect(...args) { + return this.handler.onConnect(...args); + } + onError(...args) { + return this.handler.onError(...args); + } + onUpgrade(...args) { + return this.handler.onUpgrade(...args); + } + onHeaders(...args) { + return this.handler.onHeaders(...args); + } + onData(...args) { + return this.handler.onData(...args); + } + onComplete(...args) { + return this.handler.onComplete(...args); + } + onBodySent(...args) { + return this.handler.onBodySent(...args); + } + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/headers.js +var require_headers = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/headers.js"(exports, module) { + const { kHeadersList: kHeadersList$5, kConstruct: kConstruct$4 } = require_symbols$4(); + const { kGuard: kGuard$4 } = require_symbols$3(); + const { kEnumerableProperty: kEnumerableProperty$7 } = require_util$6(); + const { makeIterator, isValidHeaderName: isValidHeaderName$1, isValidHeaderValue } = require_util$5(); + const util$3 = __require("util"); + const { webidl: webidl$10 } = require_webidl(); + const assert$6 = __require("assert"); + const kHeadersMap = Symbol("headers map"); + const kHeadersSortedMap = Symbol("headers map sorted"); + /** + * @param {number} code + */ + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ + function headerValueNormalize(potentialValue) { + let i$1 = 0; + let j = potentialValue.length; + while (j > i$1 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i$1 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i$1))) ++i$1; + return i$1 === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i$1, j); + } + function fill$1(headers, object) { + if (Array.isArray(object)) for (let i$1 = 0; i$1 < object.length; ++i$1) { + const header = object[i$1]; + if (header.length !== 2) throw webidl$10.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` + }); + appendHeader(headers, header[0], header[1]); + } + else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i$1 = 0; i$1 < keys.length; ++i$1) appendHeader(headers, keys[i$1], object[keys[i$1]]); + } else throw webidl$10.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl$10.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + if (headers[kGuard$4] === "immutable") throw new TypeError("immutable"); + else if (headers[kGuard$4] === "request-no-cors") {} + return headers[kHeadersList$5].append(name, value); + } + var HeadersList$2 = class HeadersList$2 { + /** @type {[string, string][]|null} */ + cookies = null; + constructor(init) { + if (init instanceof HeadersList$2) { + this[kHeadersMap] = new Map(init[kHeadersMap]); + this[kHeadersSortedMap] = init[kHeadersSortedMap]; + this.cookies = init.cookies === null ? null : [...init.cookies]; + } else { + this[kHeadersMap] = new Map(init); + this[kHeadersSortedMap] = null; + } + } + contains(name) { + name = name.toLowerCase(); + return this[kHeadersMap].has(name); + } + clear() { + this[kHeadersMap].clear(); + this[kHeadersSortedMap] = null; + this.cookies = null; + } + append(name, value) { + this[kHeadersSortedMap] = null; + const lowercaseName = name.toLowerCase(); + const exists$1 = this[kHeadersMap].get(lowercaseName); + if (exists$1) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this[kHeadersMap].set(lowercaseName, { + name: exists$1.name, + value: `${exists$1.value}${delimiter}${value}` + }); + } else this[kHeadersMap].set(lowercaseName, { + name, + value + }); + if (lowercaseName === "set-cookie") { + this.cookies ??= []; + this.cookies.push(value); + } + } + set(name, value) { + this[kHeadersSortedMap] = null; + const lowercaseName = name.toLowerCase(); + if (lowercaseName === "set-cookie") this.cookies = [value]; + this[kHeadersMap].set(lowercaseName, { + name, + value + }); + } + delete(name) { + this[kHeadersSortedMap] = null; + name = name.toLowerCase(); + if (name === "set-cookie") this.cookies = null; + this[kHeadersMap].delete(name); + } + get(name) { + const value = this[kHeadersMap].get(name.toLowerCase()); + return value === void 0 ? null : value.value; + } + *[Symbol.iterator]() { + for (const [name, { value }] of this[kHeadersMap]) yield [name, value]; + } + get entries() { + const headers = {}; + if (this[kHeadersMap].size) for (const { name, value } of this[kHeadersMap].values()) headers[name] = value; + return headers; + } + }; + var Headers$6 = class Headers$6 { + constructor(init = void 0) { + if (init === kConstruct$4) return; + this[kHeadersList$5] = new HeadersList$2(); + this[kGuard$4] = "none"; + if (init !== void 0) { + init = webidl$10.converters.HeadersInit(init); + fill$1(this, init); + } + } + append(name, value) { + webidl$10.brandCheck(this, Headers$6); + webidl$10.argumentLengthCheck(arguments, 2, { header: "Headers.append" }); + name = webidl$10.converters.ByteString(name); + value = webidl$10.converters.ByteString(value); + return appendHeader(this, name, value); + } + delete(name) { + webidl$10.brandCheck(this, Headers$6); + webidl$10.argumentLengthCheck(arguments, 1, { header: "Headers.delete" }); + name = webidl$10.converters.ByteString(name); + if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + if (this[kGuard$4] === "immutable") throw new TypeError("immutable"); + else if (this[kGuard$4] === "request-no-cors") {} + if (!this[kHeadersList$5].contains(name)) return; + this[kHeadersList$5].delete(name); + } + get(name) { + webidl$10.brandCheck(this, Headers$6); + webidl$10.argumentLengthCheck(arguments, 1, { header: "Headers.get" }); + name = webidl$10.converters.ByteString(name); + if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ + prefix: "Headers.get", + value: name, + type: "header name" + }); + return this[kHeadersList$5].get(name); + } + has(name) { + webidl$10.brandCheck(this, Headers$6); + webidl$10.argumentLengthCheck(arguments, 1, { header: "Headers.has" }); + name = webidl$10.converters.ByteString(name); + if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ + prefix: "Headers.has", + value: name, + type: "header name" + }); + return this[kHeadersList$5].contains(name); + } + set(name, value) { + webidl$10.brandCheck(this, Headers$6); + webidl$10.argumentLengthCheck(arguments, 2, { header: "Headers.set" }); + name = webidl$10.converters.ByteString(name); + value = webidl$10.converters.ByteString(value); + value = headerValueNormalize(value); + if (!isValidHeaderName$1(name)) throw webidl$10.errors.invalidArgument({ + prefix: "Headers.set", + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl$10.errors.invalidArgument({ + prefix: "Headers.set", + value, + type: "header value" + }); + if (this[kGuard$4] === "immutable") throw new TypeError("immutable"); + else if (this[kGuard$4] === "request-no-cors") {} + this[kHeadersList$5].set(name, value); + } + getSetCookie() { + webidl$10.brandCheck(this, Headers$6); + const list = this[kHeadersList$5].cookies; + if (list) return [...list]; + return []; + } + get [kHeadersSortedMap]() { + if (this[kHeadersList$5][kHeadersSortedMap]) return this[kHeadersList$5][kHeadersSortedMap]; + const headers = []; + const names = [...this[kHeadersList$5]].sort((a, b) => a[0] < b[0] ? -1 : 1); + const cookies = this[kHeadersList$5].cookies; + for (let i$1 = 0; i$1 < names.length; ++i$1) { + const [name, value] = names[i$1]; + if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); + else { + assert$6(value !== null); + headers.push([name, value]); + } + } + this[kHeadersList$5][kHeadersSortedMap] = headers; + return headers; + } + keys() { + webidl$10.brandCheck(this, Headers$6); + if (this[kGuard$4] === "immutable") { + const value = this[kHeadersSortedMap]; + return makeIterator(() => value, "Headers", "key"); + } + return makeIterator(() => [...this[kHeadersSortedMap].values()], "Headers", "key"); + } + values() { + webidl$10.brandCheck(this, Headers$6); + if (this[kGuard$4] === "immutable") { + const value = this[kHeadersSortedMap]; + return makeIterator(() => value, "Headers", "value"); + } + return makeIterator(() => [...this[kHeadersSortedMap].values()], "Headers", "value"); + } + entries() { + webidl$10.brandCheck(this, Headers$6); + if (this[kGuard$4] === "immutable") { + const value = this[kHeadersSortedMap]; + return makeIterator(() => value, "Headers", "key+value"); + } + return makeIterator(() => [...this[kHeadersSortedMap].values()], "Headers", "key+value"); + } + /** + * @param {(value: string, key: string, self: Headers) => void} callbackFn + * @param {unknown} thisArg + */ + forEach(callbackFn, thisArg = globalThis) { + webidl$10.brandCheck(this, Headers$6); + webidl$10.argumentLengthCheck(arguments, 1, { header: "Headers.forEach" }); + if (typeof callbackFn !== "function") throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'."); + for (const [key, value] of this) callbackFn.apply(thisArg, [ + value, + key, + this + ]); + } + [Symbol.for("nodejs.util.inspect.custom")]() { + webidl$10.brandCheck(this, Headers$6); + return this[kHeadersList$5]; + } + }; + Headers$6.prototype[Symbol.iterator] = Headers$6.prototype.entries; + Object.defineProperties(Headers$6.prototype, { + append: kEnumerableProperty$7, + delete: kEnumerableProperty$7, + get: kEnumerableProperty$7, + has: kEnumerableProperty$7, + set: kEnumerableProperty$7, + getSetCookie: kEnumerableProperty$7, + keys: kEnumerableProperty$7, + values: kEnumerableProperty$7, + entries: kEnumerableProperty$7, + forEach: kEnumerableProperty$7, + [Symbol.iterator]: { enumerable: false }, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true + }, + [util$3.inspect.custom]: { enumerable: false } + }); + webidl$10.converters.HeadersInit = function(V) { + if (webidl$10.util.Type(V) === "Object") { + if (V[Symbol.iterator]) return webidl$10.converters["sequence>"](V); + return webidl$10.converters["record"](V); + } + throw webidl$10.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + }; + module.exports = { + fill: fill$1, + Headers: Headers$6, + HeadersList: HeadersList$2 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/response.js +var require_response = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/response.js"(exports, module) { + const { Headers: Headers$5, HeadersList: HeadersList$1, fill } = require_headers(); + const { extractBody: extractBody$1, cloneBody: cloneBody$1, mixinBody: mixinBody$1 } = require_body(); + const util$2 = require_util$6(); + const { kEnumerableProperty: kEnumerableProperty$6 } = util$2; + const { isValidReasonPhrase, isCancelled: isCancelled$1, isAborted: isAborted$1, isBlobLike: isBlobLike$2, serializeJavascriptValueToJSONString, isErrorLike: isErrorLike$1, isomorphicEncode: isomorphicEncode$1 } = require_util$5(); + const { redirectStatusSet: redirectStatusSet$1, nullBodyStatus: nullBodyStatus$1, DOMException: DOMException$4 } = require_constants$3(); + const { kState: kState$6, kHeaders: kHeaders$3, kGuard: kGuard$3, kRealm: kRealm$3 } = require_symbols$3(); + const { webidl: webidl$9 } = require_webidl(); + const { FormData } = require_formdata(); + const { getGlobalOrigin: getGlobalOrigin$2 } = require_global$1(); + const { URLSerializer: URLSerializer$3 } = require_dataURL(); + const { kHeadersList: kHeadersList$4, kConstruct: kConstruct$3 } = require_symbols$4(); + const assert$5 = __require("assert"); + const { types: types$2 } = __require("util"); + const ReadableStream$1 = globalThis.ReadableStream || __require("stream/web").ReadableStream; + const textEncoder = new TextEncoder("utf-8"); + var Response$2 = class Response$2 { + static error() { + const relevantRealm = { settingsObject: {} }; + const responseObject = new Response$2(); + responseObject[kState$6] = makeNetworkError$1(); + responseObject[kRealm$3] = relevantRealm; + responseObject[kHeaders$3][kHeadersList$4] = responseObject[kState$6].headersList; + responseObject[kHeaders$3][kGuard$3] = "immutable"; + responseObject[kHeaders$3][kRealm$3] = relevantRealm; + return responseObject; + } + static json(data, init = {}) { + webidl$9.argumentLengthCheck(arguments, 1, { header: "Response.json" }); + if (init !== null) init = webidl$9.converters.ResponseInit(init); + const bytes = textEncoder.encode(serializeJavascriptValueToJSONString(data)); + const body = extractBody$1(bytes); + const relevantRealm = { settingsObject: {} }; + const responseObject = new Response$2(); + responseObject[kRealm$3] = relevantRealm; + responseObject[kHeaders$3][kGuard$3] = "response"; + responseObject[kHeaders$3][kRealm$3] = relevantRealm; + initializeResponse(responseObject, init, { + body: body[0], + type: "application/json" + }); + return responseObject; + } + static redirect(url, status = 302) { + const relevantRealm = { settingsObject: {} }; + webidl$9.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); + url = webidl$9.converters.USVString(url); + status = webidl$9.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url, getGlobalOrigin$2()); + } catch (err) { + throw Object.assign(new TypeError("Failed to parse URL from " + url), { cause: err }); + } + if (!redirectStatusSet$1.has(status)) throw new RangeError("Invalid status code " + status); + const responseObject = new Response$2(); + responseObject[kRealm$3] = relevantRealm; + responseObject[kHeaders$3][kGuard$3] = "immutable"; + responseObject[kHeaders$3][kRealm$3] = relevantRealm; + responseObject[kState$6].status = status; + const value = isomorphicEncode$1(URLSerializer$3(parsedURL)); + responseObject[kState$6].headersList.append("location", value); + return responseObject; + } + constructor(body = null, init = {}) { + if (body !== null) body = webidl$9.converters.BodyInit(body); + init = webidl$9.converters.ResponseInit(init); + this[kRealm$3] = { settingsObject: {} }; + this[kState$6] = makeResponse$1({}); + this[kHeaders$3] = new Headers$5(kConstruct$3); + this[kHeaders$3][kGuard$3] = "response"; + this[kHeaders$3][kHeadersList$4] = this[kState$6].headersList; + this[kHeaders$3][kRealm$3] = this[kRealm$3]; + let bodyWithType = null; + if (body != null) { + const [extractedBody, type] = extractBody$1(body); + bodyWithType = { + body: extractedBody, + type + }; + } + initializeResponse(this, init, bodyWithType); + } + get type() { + webidl$9.brandCheck(this, Response$2); + return this[kState$6].type; + } + get url() { + webidl$9.brandCheck(this, Response$2); + const urlList = this[kState$6].urlList; + const url = urlList[urlList.length - 1] ?? null; + if (url === null) return ""; + return URLSerializer$3(url, true); + } + get redirected() { + webidl$9.brandCheck(this, Response$2); + return this[kState$6].urlList.length > 1; + } + get status() { + webidl$9.brandCheck(this, Response$2); + return this[kState$6].status; + } + get ok() { + webidl$9.brandCheck(this, Response$2); + return this[kState$6].status >= 200 && this[kState$6].status <= 299; + } + get statusText() { + webidl$9.brandCheck(this, Response$2); + return this[kState$6].statusText; + } + get headers() { + webidl$9.brandCheck(this, Response$2); + return this[kHeaders$3]; + } + get body() { + webidl$9.brandCheck(this, Response$2); + return this[kState$6].body ? this[kState$6].body.stream : null; + } + get bodyUsed() { + webidl$9.brandCheck(this, Response$2); + return !!this[kState$6].body && util$2.isDisturbed(this[kState$6].body.stream); + } + clone() { + webidl$9.brandCheck(this, Response$2); + if (this.bodyUsed || this.body && this.body.locked) throw webidl$9.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); + const clonedResponse = cloneResponse$1(this[kState$6]); + const clonedResponseObject = new Response$2(); + clonedResponseObject[kState$6] = clonedResponse; + clonedResponseObject[kRealm$3] = this[kRealm$3]; + clonedResponseObject[kHeaders$3][kHeadersList$4] = clonedResponse.headersList; + clonedResponseObject[kHeaders$3][kGuard$3] = this[kHeaders$3][kGuard$3]; + clonedResponseObject[kHeaders$3][kRealm$3] = this[kHeaders$3][kRealm$3]; + return clonedResponseObject; + } + }; + mixinBody$1(Response$2); + Object.defineProperties(Response$2.prototype, { + type: kEnumerableProperty$6, + url: kEnumerableProperty$6, + status: kEnumerableProperty$6, + ok: kEnumerableProperty$6, + redirected: kEnumerableProperty$6, + statusText: kEnumerableProperty$6, + headers: kEnumerableProperty$6, + clone: kEnumerableProperty$6, + body: kEnumerableProperty$6, + bodyUsed: kEnumerableProperty$6, + [Symbol.toStringTag]: { + value: "Response", + configurable: true + } + }); + Object.defineProperties(Response$2, { + json: kEnumerableProperty$6, + redirect: kEnumerableProperty$6, + error: kEnumerableProperty$6 + }); + function cloneResponse$1(response) { + if (response.internalResponse) return filterResponse$1(cloneResponse$1(response.internalResponse), response.type); + const newResponse = makeResponse$1({ + ...response, + body: null + }); + if (response.body != null) newResponse.body = cloneBody$1(response.body); + return newResponse; + } + function makeResponse$1(init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init, + headersList: init.headersList ? new HeadersList$1(init.headersList) : new HeadersList$1(), + urlList: init.urlList ? [...init.urlList] : [] + }; + } + function makeNetworkError$1(reason) { + const isError = isErrorLike$1(reason); + return makeResponse$1({ + type: "error", + status: 0, + error: isError ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === "AbortError" + }); + } + function makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get(target, p) { + return p in state ? state[p] : target[p]; + }, + set(target, p, value) { + assert$5(!(p in state)); + target[p] = value; + return true; + } + }); + } + function filterResponse$1(response, type) { + if (type === "basic") return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + else if (type === "cors") return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + else if (type === "opaque") return makeFilteredResponse(response, { + type: "opaque", + urlList: Object.freeze([]), + status: 0, + statusText: "", + body: null + }); + else if (type === "opaqueredirect") return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + else assert$5(false); + } + function makeAppropriateNetworkError$1(fetchParams, err = null) { + assert$5(isCancelled$1(fetchParams)); + return isAborted$1(fetchParams) ? makeNetworkError$1(Object.assign(new DOMException$4("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError$1(Object.assign(new DOMException$4("Request was cancelled."), { cause: err })); + } + function initializeResponse(response, init, body) { + if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); + if ("statusText" in init && init.statusText != null) { + if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); + } + if ("status" in init && init.status != null) response[kState$6].status = init.status; + if ("statusText" in init && init.statusText != null) response[kState$6].statusText = init.statusText; + if ("headers" in init && init.headers != null) fill(response[kHeaders$3], init.headers); + if (body) { + if (nullBodyStatus$1.includes(response.status)) throw webidl$9.errors.exception({ + header: "Response constructor", + message: "Invalid response status code " + response.status + }); + response[kState$6].body = body.body; + if (body.type != null && !response[kState$6].headersList.contains("Content-Type")) response[kState$6].headersList.append("content-type", body.type); + } + } + webidl$9.converters.ReadableStream = webidl$9.interfaceConverter(ReadableStream$1); + webidl$9.converters.FormData = webidl$9.interfaceConverter(FormData); + webidl$9.converters.URLSearchParams = webidl$9.interfaceConverter(URLSearchParams); + webidl$9.converters.XMLHttpRequestBodyInit = function(V) { + if (typeof V === "string") return webidl$9.converters.USVString(V); + if (isBlobLike$2(V)) return webidl$9.converters.Blob(V, { strict: false }); + if (types$2.isArrayBuffer(V) || types$2.isTypedArray(V) || types$2.isDataView(V)) return webidl$9.converters.BufferSource(V); + if (util$2.isFormDataLike(V)) return webidl$9.converters.FormData(V, { strict: false }); + if (V instanceof URLSearchParams) return webidl$9.converters.URLSearchParams(V); + return webidl$9.converters.DOMString(V); + }; + webidl$9.converters.BodyInit = function(V) { + if (V instanceof ReadableStream$1) return webidl$9.converters.ReadableStream(V); + if (V?.[Symbol.asyncIterator]) return V; + return webidl$9.converters.XMLHttpRequestBodyInit(V); + }; + webidl$9.converters.ResponseInit = webidl$9.dictionaryConverter([ + { + key: "status", + converter: webidl$9.converters["unsigned short"], + defaultValue: 200 + }, + { + key: "statusText", + converter: webidl$9.converters.ByteString, + defaultValue: "" + }, + { + key: "headers", + converter: webidl$9.converters.HeadersInit + } + ]); + module.exports = { + makeNetworkError: makeNetworkError$1, + makeResponse: makeResponse$1, + makeAppropriateNetworkError: makeAppropriateNetworkError$1, + filterResponse: filterResponse$1, + Response: Response$2, + cloneResponse: cloneResponse$1 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/request.js +var require_request = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/request.js"(exports, module) { + const { extractBody, mixinBody, cloneBody } = require_body(); + const { Headers: Headers$4, fill: fillHeaders, HeadersList } = require_headers(); + const { FinalizationRegistry } = require_dispatcher_weakref()(); + const util$1 = require_util$6(); + const { isValidHTTPToken, sameOrigin: sameOrigin$1, normalizeMethod, makePolicyContainer: makePolicyContainer$1, normalizeMethodRecord } = require_util$5(); + const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants$3(); + const { kEnumerableProperty: kEnumerableProperty$5 } = util$1; + const { kHeaders: kHeaders$2, kSignal, kState: kState$5, kGuard: kGuard$2, kRealm: kRealm$2 } = require_symbols$3(); + const { webidl: webidl$8 } = require_webidl(); + const { getGlobalOrigin: getGlobalOrigin$1 } = require_global$1(); + const { URLSerializer: URLSerializer$2 } = require_dataURL(); + const { kHeadersList: kHeadersList$3, kConstruct: kConstruct$2 } = require_symbols$4(); + const assert$4 = __require("assert"); + const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("events"); + let TransformStream$1 = globalThis.TransformStream; + const kAbortController = Symbol("abortController"); + const requestFinalizer = new FinalizationRegistry(({ signal, abort: abort$1 }) => { + signal.removeEventListener("abort", abort$1); + }); + var Request$2 = class Request$2 { + constructor(input, init = {}) { + if (input === kConstruct$2) return; + webidl$8.argumentLengthCheck(arguments, 1, { header: "Request constructor" }); + input = webidl$8.converters.RequestInfo(input); + init = webidl$8.converters.RequestInit(init); + this[kRealm$2] = { settingsObject: { + baseUrl: getGlobalOrigin$1(), + get origin() { + return this.baseUrl?.origin; + }, + policyContainer: makePolicyContainer$1() + } }; + let request$1 = null; + let fallbackMode = null; + const baseUrl = this[kRealm$2].settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { cause: err }); + } + if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); + request$1 = makeRequest$2({ urlList: [parsedURL] }); + fallbackMode = "cors"; + } else { + assert$4(input instanceof Request$2); + request$1 = input[kState$5]; + signal = input[kSignal]; + } + const origin = this[kRealm$2].settingsObject.origin; + let window = "client"; + if (request$1.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin$1(request$1.window, origin)) window = request$1.window; + if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); + if ("window" in init) window = "no-window"; + request$1 = makeRequest$2({ + method: request$1.method, + headersList: request$1.headersList, + unsafeRequest: request$1.unsafeRequest, + client: this[kRealm$2].settingsObject, + window, + priority: request$1.priority, + origin: request$1.origin, + referrer: request$1.referrer, + referrerPolicy: request$1.referrerPolicy, + mode: request$1.mode, + credentials: request$1.credentials, + cache: request$1.cache, + redirect: request$1.redirect, + integrity: request$1.integrity, + keepalive: request$1.keepalive, + reloadNavigation: request$1.reloadNavigation, + historyNavigation: request$1.historyNavigation, + urlList: [...request$1.urlList] + }); + const initHasKey = Object.keys(init).length !== 0; + if (initHasKey) { + if (request$1.mode === "navigate") request$1.mode = "same-origin"; + request$1.reloadNavigation = false; + request$1.historyNavigation = false; + request$1.origin = "client"; + request$1.referrer = "client"; + request$1.referrerPolicy = ""; + request$1.url = request$1.urlList[request$1.urlList.length - 1]; + request$1.urlList = [request$1.url]; + } + if (init.referrer !== void 0) { + const referrer = init.referrer; + if (referrer === "") request$1.referrer = "no-referrer"; + else { + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); + } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin$1(parsedReferrer, this[kRealm$2].settingsObject.baseUrl)) request$1.referrer = "client"; + else request$1.referrer = parsedReferrer; + } + } + if (init.referrerPolicy !== void 0) request$1.referrerPolicy = init.referrerPolicy; + let mode; + if (init.mode !== void 0) mode = init.mode; + else mode = fallbackMode; + if (mode === "navigate") throw webidl$8.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + if (mode != null) request$1.mode = mode; + if (init.credentials !== void 0) request$1.credentials = init.credentials; + if (init.cache !== void 0) request$1.cache = init.cache; + if (request$1.cache === "only-if-cached" && request$1.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + if (init.redirect !== void 0) request$1.redirect = init.redirect; + if (init.integrity != null) request$1.integrity = String(init.integrity); + if (init.keepalive !== void 0) request$1.keepalive = Boolean(init.keepalive); + if (init.method !== void 0) { + let method = init.method; + if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); + if (forbiddenMethodsSet.has(method.toUpperCase())) throw new TypeError(`'${method}' HTTP method is unsupported.`); + method = normalizeMethodRecord[method] ?? normalizeMethod(method); + request$1.method = method; + } + if (init.signal !== void 0) signal = init.signal; + this[kState$5] = request$1; + const ac = new AbortController(); + this[kSignal] = ac.signal; + this[kSignal][kRealm$2] = this[kRealm$2]; + if (signal != null) { + if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); + if (signal.aborted) ac.abort(signal.reason); + else { + this[kAbortController] = ac; + const acRef = new WeakRef(ac); + const abort$1 = function() { + const ac$1 = acRef.deref(); + if (ac$1 !== void 0) ac$1.abort(this.reason); + }; + try { + if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(100, signal); + else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) setMaxListeners(100, signal); + } catch {} + util$1.addAbortListener(signal, abort$1); + requestFinalizer.register(ac, { + signal, + abort: abort$1 + }); + } + } + this[kHeaders$2] = new Headers$4(kConstruct$2); + this[kHeaders$2][kHeadersList$3] = request$1.headersList; + this[kHeaders$2][kGuard$2] = "request"; + this[kHeaders$2][kRealm$2] = this[kRealm$2]; + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request$1.method)) throw new TypeError(`'${request$1.method} is unsupported in no-cors mode.`); + this[kHeaders$2][kGuard$2] = "request-no-cors"; + } + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = this[kHeaders$2][kHeadersList$3]; + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { + for (const [key, val] of headers) headersList.append(key, val); + headersList.cookies = headers.cookies; + } else fillHeaders(this[kHeaders$2], headers); + } + const inputBody = input instanceof Request$2 ? input[kState$5].body : null; + if ((init.body != null || inputBody != null) && (request$1.method === "GET" || request$1.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); + let initBody = null; + if (init.body != null) { + const [extractedBody, contentType] = extractBody(init.body, request$1.keepalive); + initBody = extractedBody; + if (contentType && !this[kHeaders$2][kHeadersList$3].contains("content-type")) this[kHeaders$2].append("content-type", contentType); + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); + if (request$1.mode !== "same-origin" && request$1.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); + request$1.useCORSPreflightFlag = true; + } + let finalBody = inputOrInitBody; + if (initBody == null && inputBody != null) { + if (util$1.isDisturbed(inputBody.stream) || inputBody.stream.locked) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); + if (!TransformStream$1) TransformStream$1 = __require("stream/web").TransformStream; + const identityTransform = new TransformStream$1(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; + } + this[kState$5].body = finalBody; + } + get method() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].method; + } + get url() { + webidl$8.brandCheck(this, Request$2); + return URLSerializer$2(this[kState$5].url); + } + get headers() { + webidl$8.brandCheck(this, Request$2); + return this[kHeaders$2]; + } + get destination() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].destination; + } + get referrer() { + webidl$8.brandCheck(this, Request$2); + if (this[kState$5].referrer === "no-referrer") return ""; + if (this[kState$5].referrer === "client") return "about:client"; + return this[kState$5].referrer.toString(); + } + get referrerPolicy() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].referrerPolicy; + } + get mode() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].mode; + } + get credentials() { + return this[kState$5].credentials; + } + get cache() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].cache; + } + get redirect() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].redirect; + } + get integrity() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].integrity; + } + get keepalive() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].keepalive; + } + get isReloadNavigation() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].reloadNavigation; + } + get isHistoryNavigation() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].historyNavigation; + } + get signal() { + webidl$8.brandCheck(this, Request$2); + return this[kSignal]; + } + get body() { + webidl$8.brandCheck(this, Request$2); + return this[kState$5].body ? this[kState$5].body.stream : null; + } + get bodyUsed() { + webidl$8.brandCheck(this, Request$2); + return !!this[kState$5].body && util$1.isDisturbed(this[kState$5].body.stream); + } + get duplex() { + webidl$8.brandCheck(this, Request$2); + return "half"; + } + clone() { + webidl$8.brandCheck(this, Request$2); + if (this.bodyUsed || this.body?.locked) throw new TypeError("unusable"); + const clonedRequest = cloneRequest(this[kState$5]); + const clonedRequestObject = new Request$2(kConstruct$2); + clonedRequestObject[kState$5] = clonedRequest; + clonedRequestObject[kRealm$2] = this[kRealm$2]; + clonedRequestObject[kHeaders$2] = new Headers$4(kConstruct$2); + clonedRequestObject[kHeaders$2][kHeadersList$3] = clonedRequest.headersList; + clonedRequestObject[kHeaders$2][kGuard$2] = this[kHeaders$2][kGuard$2]; + clonedRequestObject[kHeaders$2][kRealm$2] = this[kHeaders$2][kRealm$2]; + const ac = new AbortController(); + if (this.signal.aborted) ac.abort(this.signal.reason); + else util$1.addAbortListener(this.signal, () => { + ac.abort(this.signal.reason); + }); + clonedRequestObject[kSignal] = ac.signal; + return clonedRequestObject; + } + }; + mixinBody(Request$2); + function makeRequest$2(init) { + const request$1 = { + method: "GET", + localURLsOnly: false, + unsafeRequest: false, + body: null, + client: null, + reservedClient: null, + replacesClientId: "", + window: "client", + keepalive: false, + serviceWorkers: "all", + initiator: "", + destination: "", + priority: null, + origin: "client", + policyContainer: "client", + referrer: "client", + referrerPolicy: "", + mode: "no-cors", + useCORSPreflightFlag: false, + credentials: "same-origin", + useCredentials: false, + cache: "default", + redirect: "follow", + integrity: "", + cryptoGraphicsNonceMetadata: "", + parserMetadata: "", + reloadNavigation: false, + historyNavigation: false, + userActivation: false, + taintedOrigin: false, + redirectCount: 0, + responseTainting: "basic", + preventNoCacheCacheControlHeaderModification: false, + done: false, + timingAllowFailed: false, + ...init, + headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() + }; + request$1.url = request$1.urlList[0]; + return request$1; + } + function cloneRequest(request$1) { + const newRequest = makeRequest$2({ + ...request$1, + body: null + }); + if (request$1.body != null) newRequest.body = cloneBody(request$1.body); + return newRequest; + } + Object.defineProperties(Request$2.prototype, { + method: kEnumerableProperty$5, + url: kEnumerableProperty$5, + headers: kEnumerableProperty$5, + redirect: kEnumerableProperty$5, + clone: kEnumerableProperty$5, + signal: kEnumerableProperty$5, + duplex: kEnumerableProperty$5, + destination: kEnumerableProperty$5, + body: kEnumerableProperty$5, + bodyUsed: kEnumerableProperty$5, + isHistoryNavigation: kEnumerableProperty$5, + isReloadNavigation: kEnumerableProperty$5, + keepalive: kEnumerableProperty$5, + integrity: kEnumerableProperty$5, + cache: kEnumerableProperty$5, + credentials: kEnumerableProperty$5, + attribute: kEnumerableProperty$5, + referrerPolicy: kEnumerableProperty$5, + referrer: kEnumerableProperty$5, + mode: kEnumerableProperty$5, + [Symbol.toStringTag]: { + value: "Request", + configurable: true + } + }); + webidl$8.converters.Request = webidl$8.interfaceConverter(Request$2); + webidl$8.converters.RequestInfo = function(V) { + if (typeof V === "string") return webidl$8.converters.USVString(V); + if (V instanceof Request$2) return webidl$8.converters.Request(V); + return webidl$8.converters.USVString(V); + }; + webidl$8.converters.AbortSignal = webidl$8.interfaceConverter(AbortSignal); + webidl$8.converters.RequestInit = webidl$8.dictionaryConverter([ + { + key: "method", + converter: webidl$8.converters.ByteString + }, + { + key: "headers", + converter: webidl$8.converters.HeadersInit + }, + { + key: "body", + converter: webidl$8.nullableConverter(webidl$8.converters.BodyInit) + }, + { + key: "referrer", + converter: webidl$8.converters.USVString + }, + { + key: "referrerPolicy", + converter: webidl$8.converters.DOMString, + allowedValues: referrerPolicy + }, + { + key: "mode", + converter: webidl$8.converters.DOMString, + allowedValues: requestMode + }, + { + key: "credentials", + converter: webidl$8.converters.DOMString, + allowedValues: requestCredentials + }, + { + key: "cache", + converter: webidl$8.converters.DOMString, + allowedValues: requestCache + }, + { + key: "redirect", + converter: webidl$8.converters.DOMString, + allowedValues: requestRedirect + }, + { + key: "integrity", + converter: webidl$8.converters.DOMString + }, + { + key: "keepalive", + converter: webidl$8.converters.boolean + }, + { + key: "signal", + converter: webidl$8.nullableConverter((signal) => webidl$8.converters.AbortSignal(signal, { strict: false })) + }, + { + key: "window", + converter: webidl$8.converters.any + }, + { + key: "duplex", + converter: webidl$8.converters.DOMString, + allowedValues: requestDuplex + } + ]); + module.exports = { + Request: Request$2, + makeRequest: makeRequest$2 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/index.js +var require_fetch = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fetch/index.js"(exports, module) { + const { Response: Response$1, makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse } = require_response(); + const { Headers: Headers$3 } = require_headers(); + const { Request: Request$1, makeRequest: makeRequest$1 } = require_request(); + const zlib = __require("zlib"); + const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise: createDeferredPromise$1, isBlobLike: isBlobLike$1, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme: urlIsHttpHttpsScheme$1, urlHasHttpsScheme } = require_util$5(); + const { kState: kState$4, kHeaders: kHeaders$1, kGuard: kGuard$1, kRealm: kRealm$1 } = require_symbols$3(); + const assert$3 = __require("assert"); + const { safelyExtractBody } = require_body(); + const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet, DOMException: DOMException$3 } = require_constants$3(); + const { kHeadersList: kHeadersList$2 } = require_symbols$4(); + const EE = __require("events"); + const { Readable, pipeline } = __require("stream"); + const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require_util$6(); + const { dataURLProcessor, serializeAMimeType: serializeAMimeType$1 } = require_dataURL(); + const { TransformStream } = __require("stream/web"); + const { getGlobalDispatcher: getGlobalDispatcher$4 } = require_global(); + const { webidl: webidl$7 } = require_webidl(); + const { STATUS_CODES } = __require("http"); + const GET_OR_HEAD = ["GET", "HEAD"]; + /** @type {import('buffer').resolveObjectURL} */ + let resolveObjectURL; + let ReadableStream = globalThis.ReadableStream; + var Fetch = class extends EE { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + this.setMaxListeners(21); + } + terminate(reason) { + if (this.state !== "ongoing") return; + this.state = "terminated"; + this.connection?.destroy(reason); + this.emit("terminated", reason); + } + abort(error$1) { + if (this.state !== "ongoing") return; + this.state = "aborted"; + if (!error$1) error$1 = new DOMException$3("The operation was aborted.", "AbortError"); + this.serializedAbortReason = error$1; + this.connection?.destroy(error$1); + this.emit("terminated", error$1); + } + }; + function fetch(input, init = {}) { + webidl$7.argumentLengthCheck(arguments, 1, { header: "globalThis.fetch" }); + const p = createDeferredPromise$1(); + let requestObject; + try { + requestObject = new Request$1(input, init); + } catch (e) { + p.reject(e); + return p.promise; + } + const request$1 = requestObject[kState$4]; + if (requestObject.signal.aborted) { + abortFetch(p, request$1, null, requestObject.signal.reason); + return p.promise; + } + const globalObject = request$1.client.globalObject; + if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request$1.serviceWorkers = "none"; + let responseObject = null; + const relevantRealm = null; + let locallyAborted = false; + let controller = null; + addAbortListener(requestObject.signal, () => { + locallyAborted = true; + assert$3(controller != null); + controller.abort(requestObject.signal.reason); + abortFetch(p, request$1, responseObject, requestObject.signal.reason); + }); + const handleFetchDone = (response) => finalizeAndReportTiming(response, "fetch"); + const processResponse = (response) => { + if (locallyAborted) return Promise.resolve(); + if (response.aborted) { + abortFetch(p, request$1, responseObject, controller.serializedAbortReason); + return Promise.resolve(); + } + if (response.type === "error") { + p.reject(Object.assign(new TypeError("fetch failed"), { cause: response.error })); + return Promise.resolve(); + } + responseObject = new Response$1(); + responseObject[kState$4] = response; + responseObject[kRealm$1] = relevantRealm; + responseObject[kHeaders$1][kHeadersList$2] = response.headersList; + responseObject[kHeaders$1][kGuard$1] = "immutable"; + responseObject[kHeaders$1][kRealm$1] = relevantRealm; + p.resolve(responseObject); + }; + controller = fetching$2({ + request: request$1, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: init.dispatcher ?? getGlobalDispatcher$4() + }); + return p.promise; + } + function finalizeAndReportTiming(response, initiatorType = "other") { + if (response.type === "error" && response.aborted) return; + if (!response.urlList?.length) return; + const originalURL = response.urlList[0]; + let timingInfo = response.timingInfo; + let cacheState = response.cacheState; + if (!urlIsHttpHttpsScheme$1(originalURL)) return; + if (timingInfo === null) return; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); + cacheState = ""; + } + timingInfo.endTime = coarsenedSharedCurrentTime(); + response.timingInfo = timingInfo; + markResourceTiming(timingInfo, originalURL, initiatorType, globalThis, cacheState); + } + function markResourceTiming(timingInfo, originalURL, initiatorType, globalThis$1, cacheState) { + if (nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 2) performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis$1, cacheState); + } + function abortFetch(p, request$1, responseObject, error$1) { + if (!error$1) error$1 = new DOMException$3("The operation was aborted.", "AbortError"); + p.reject(error$1); + if (request$1.body != null && isReadable(request$1.body?.stream)) request$1.body.stream.cancel(error$1).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + if (responseObject == null) return; + const response = responseObject[kState$4]; + if (response.body != null && isReadable(response.body?.stream)) response.body.stream.cancel(error$1).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + } + function fetching$2({ request: request$1, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher }) { + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request$1.client != null) { + taskDestination = request$1.client.globalObject; + crossOriginIsolatedCapability = request$1.client.crossOriginIsolatedCapability; + } + const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); + const timingInfo = createOpaqueTimingInfo({ startTime: currenTime }); + const fetchParams = { + controller: new Fetch(dispatcher), + request: request$1, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + }; + assert$3(!request$1.body || request$1.body.stream); + if (request$1.window === "client") request$1.window = request$1.client?.globalObject?.constructor?.name === "Window" ? request$1.client : "no-window"; + if (request$1.origin === "client") request$1.origin = request$1.client?.origin; + if (request$1.policyContainer === "client") if (request$1.client != null) request$1.policyContainer = clonePolicyContainer(request$1.client.policyContainer); + else request$1.policyContainer = makePolicyContainer(); + if (!request$1.headersList.contains("accept")) { + const value = "*/*"; + request$1.headersList.append("accept", value); + } + if (!request$1.headersList.contains("accept-language")) request$1.headersList.append("accept-language", "*"); + if (request$1.priority === null) {} + if (subresourceSet.has(request$1.destination)) {} + mainFetch(fetchParams).catch((err) => { + fetchParams.controller.terminate(err); + }); + return fetchParams.controller; + } + async function mainFetch(fetchParams, recursive = false) { + const request$1 = fetchParams.request; + let response = null; + if (request$1.localURLsOnly && !urlIsLocal(requestCurrentURL(request$1))) response = makeNetworkError("local URLs only"); + tryUpgradeRequestToAPotentiallyTrustworthyURL(request$1); + if (requestBadPort(request$1) === "blocked") response = makeNetworkError("bad port"); + if (request$1.referrerPolicy === "") request$1.referrerPolicy = request$1.policyContainer.referrerPolicy; + if (request$1.referrer !== "no-referrer") request$1.referrer = determineRequestsReferrer(request$1); + if (response === null) response = await (async () => { + const currentURL = requestCurrentURL(request$1); + if (sameOrigin(currentURL, request$1.url) && request$1.responseTainting === "basic" || currentURL.protocol === "data:" || request$1.mode === "navigate" || request$1.mode === "websocket") { + request$1.responseTainting = "basic"; + return await schemeFetch(fetchParams); + } + if (request$1.mode === "same-origin") return makeNetworkError("request mode cannot be \"same-origin\""); + if (request$1.mode === "no-cors") { + if (request$1.redirect !== "follow") return makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); + request$1.responseTainting = "opaque"; + return await schemeFetch(fetchParams); + } + if (!urlIsHttpHttpsScheme$1(requestCurrentURL(request$1))) return makeNetworkError("URL scheme must be a HTTP(S) scheme"); + request$1.responseTainting = "cors"; + return await httpFetch(fetchParams); + })(); + if (recursive) return response; + if (response.status !== 0 && !response.internalResponse) { + if (request$1.responseTainting === "cors") {} + if (request$1.responseTainting === "basic") response = filterResponse(response, "basic"); + else if (request$1.responseTainting === "cors") response = filterResponse(response, "cors"); + else if (request$1.responseTainting === "opaque") response = filterResponse(response, "opaque"); + else assert$3(false); + } + let internalResponse = response.status === 0 ? response : response.internalResponse; + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request$1.urlList); + if (!request$1.timingAllowFailed) response.timingAllowPassed = true; + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request$1.headers.contains("range")) response = internalResponse = makeNetworkError(); + if (response.status !== 0 && (request$1.method === "HEAD" || request$1.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; + } + if (request$1.integrity) { + const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + if (request$1.responseTainting === "opaque" || response.body == null) { + processBodyError(response.error); + return; + } + const processBody = (bytes) => { + if (!bytesMatch(bytes, request$1.integrity)) { + processBodyError("integrity mismatch"); + return; + } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + await fullyReadBody(response.body, processBody, processBodyError); + } else fetchFinale(fetchParams, response); + } + function schemeFetch(fetchParams) { + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); + const { request: request$1 } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request$1); + switch (scheme) { + case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); + case "blob:": { + if (!resolveObjectURL) resolveObjectURL = __require("buffer").resolveObjectURL; + const blobURLEntry = requestCurrentURL(request$1); + if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); + const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()); + if (request$1.method !== "GET" || !isBlobLike$1(blobURLEntryObject)) return Promise.resolve(makeNetworkError("invalid method")); + const bodyWithType = safelyExtractBody(blobURLEntryObject); + const body = bodyWithType[0]; + const length = isomorphicEncode(`${body.length}`); + const type = bodyWithType[1] ?? ""; + const response = makeResponse({ + statusText: "OK", + headersList: [["content-length", { + name: "Content-Length", + value: length + }], ["content-type", { + name: "Content-Type", + value: type + }]] + }); + response.body = body; + return Promise.resolve(response); + } + case "data:": { + const currentURL = requestCurrentURL(request$1); + const dataURLStruct = dataURLProcessor(currentURL); + if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + const mimeType = serializeAMimeType$1(dataURLStruct.mimeType); + return Promise.resolve(makeResponse({ + statusText: "OK", + headersList: [["content-type", { + name: "Content-Type", + value: mimeType + }]], + body: safelyExtractBody(dataURLStruct.body)[0] + })); + } + case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); + case "http:": + case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + default: return Promise.resolve(makeNetworkError("unknown scheme")); + } + } + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); + } + function fetchFinale(fetchParams, response) { + if (response.type === "error") { + response.urlList = [fetchParams.request.urlList[0]]; + response.timingInfo = createOpaqueTimingInfo({ startTime: fetchParams.timingInfo.startTime }); + } + const processResponseEndOfBody = () => { + fetchParams.request.done = true; + if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + }; + if (fetchParams.processResponse != null) queueMicrotask(() => fetchParams.processResponse(response)); + if (response.body == null) processResponseEndOfBody(); + else { + const identityTransformAlgorithm = (chunk, controller) => { + controller.enqueue(chunk); + }; + const transformStream = new TransformStream({ + start() {}, + transform: identityTransformAlgorithm, + flush: processResponseEndOfBody + }, { size() { + return 1; + } }, { size() { + return 1; + } }); + response.body = { stream: response.body.stream.pipeThrough(transformStream) }; + } + if (fetchParams.processResponseConsumeBody != null) { + const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes); + const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure); + if (response.body == null) queueMicrotask(() => processBody(null)); + else return fullyReadBody(response.body, processBody, processBodyError); + return Promise.resolve(); + } + } + async function httpFetch(fetchParams) { + const request$1 = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request$1.serviceWorkers === "all") {} + if (response === null) { + if (request$1.redirect === "follow") request$1.serviceWorkers = "none"; + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); + if (request$1.responseTainting === "cors" && corsCheck(request$1, response) === "failure") return makeNetworkError("cors failure"); + if (TAOCheck(request$1, response) === "failure") request$1.timingAllowFailed = true; + } + if ((request$1.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request$1.origin, request$1.client, request$1.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); + if (redirectStatusSet.has(actualResponse.status)) { + if (request$1.redirect !== "manual") fetchParams.controller.connection.destroy(); + if (request$1.redirect === "error") response = makeNetworkError("unexpected redirect"); + else if (request$1.redirect === "manual") response = actualResponse; + else if (request$1.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); + else assert$3(false); + } + response.timingInfo = timingInfo; + return response; + } + function httpRedirectFetch(fetchParams, response) { + const request$1 = fetchParams.request; + const actualResponse = response.internalResponse ? response.internalResponse : response; + let locationURL; + try { + locationURL = responseLocationURL(actualResponse, requestCurrentURL(request$1).hash); + if (locationURL == null) return response; + } catch (err) { + return Promise.resolve(makeNetworkError(err)); + } + if (!urlIsHttpHttpsScheme$1(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + if (request$1.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); + request$1.redirectCount += 1; + if (request$1.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request$1, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); + if (request$1.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); + if (actualResponse.status !== 303 && request$1.body != null && request$1.body.source == null) return Promise.resolve(makeNetworkError()); + if ([301, 302].includes(actualResponse.status) && request$1.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request$1.method)) { + request$1.method = "GET"; + request$1.body = null; + for (const headerName of requestBodyHeader) request$1.headersList.delete(headerName); + } + if (!sameOrigin(requestCurrentURL(request$1), locationURL)) { + request$1.headersList.delete("authorization"); + request$1.headersList.delete("proxy-authorization", true); + request$1.headersList.delete("cookie"); + request$1.headersList.delete("host"); + } + if (request$1.body != null) { + assert$3(request$1.body.source != null); + request$1.body = safelyExtractBody(request$1.body.source)[0]; + } + const timingInfo = fetchParams.timingInfo; + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; + request$1.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request$1, actualResponse); + return mainFetch(fetchParams, true); + } + async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + const request$1 = fetchParams.request; + let httpFetchParams = null; + let httpRequest = null; + let response = null; + const httpCache = null; + const revalidatingFlag = false; + if (request$1.window === "no-window" && request$1.redirect === "error") { + httpFetchParams = fetchParams; + httpRequest = request$1; + } else { + httpRequest = makeRequest$1(request$1); + httpFetchParams = { ...fetchParams }; + httpFetchParams.request = httpRequest; + } + const includeCredentials = request$1.credentials === "include" || request$1.credentials === "same-origin" && request$1.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; + let contentLengthHeaderValue = null; + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; + if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue); + if (contentLength != null && httpRequest.keepalive) {} + if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href)); + appendRequestOriginHeader(httpRequest); + appendFetchMetadata(httpRequest); + if (!httpRequest.headersList.contains("user-agent")) httpRequest.headersList.append("user-agent", typeof esbuildDetection === "undefined" ? "undici" : "node"); + if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since") || httpRequest.headersList.contains("if-none-match") || httpRequest.headersList.contains("if-unmodified-since") || httpRequest.headersList.contains("if-match") || httpRequest.headersList.contains("if-range"))) httpRequest.cache = "no-store"; + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control")) httpRequest.headersList.append("cache-control", "max-age=0"); + if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { + if (!httpRequest.headersList.contains("pragma")) httpRequest.headersList.append("pragma", "no-cache"); + if (!httpRequest.headersList.contains("cache-control")) httpRequest.headersList.append("cache-control", "no-cache"); + } + if (httpRequest.headersList.contains("range")) httpRequest.headersList.append("accept-encoding", "identity"); + if (!httpRequest.headersList.contains("accept-encoding")) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate"); + else httpRequest.headersList.append("accept-encoding", "gzip, deflate"); + httpRequest.headersList.delete("host"); + if (includeCredentials) {} + if (httpCache == null) httpRequest.cache = "no-store"; + if (httpRequest.mode !== "no-store" && httpRequest.mode !== "reload") {} + if (response == null) { + if (httpRequest.mode === "only-if-cached") return makeNetworkError("only if cached"); + const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); + if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} + if (revalidatingFlag && forwardResponse.status === 304) {} + if (response == null) response = forwardResponse; + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range")) response.rangeRequested = true; + response.requestIncludesCredentials = includeCredentials; + if (response.status === 407) { + if (request$1.window === "no-window") return makeNetworkError(); + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + return makeNetworkError("proxy authentication required"); + } + if (response.status === 421 && !isNewConnectionFetch && (request$1.body == null || request$1.body.source != null)) { + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); + } + if (isAuthenticationFetch) {} + return response; + } + async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + assert$3(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy(err) { + if (!this.destroyed) { + this.destroyed = true; + this.abort?.(err ?? new DOMException$3("The operation was aborted.", "AbortError")); + } + } + }; + const request$1 = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + const httpCache = null; + if (httpCache == null) request$1.cache = "no-store"; + const newConnection = forceNewConnection ? "yes" : "no"; + if (request$1.mode === "websocket") {} + let requestBody = null; + if (request$1.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); + else if (request$1.body != null) { + const processBodyChunk = async function* (bytes) { + if (isCancelled(fetchParams)) return; + yield bytes; + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + }; + const processEndOfBody = () => { + if (isCancelled(fetchParams)) return; + if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); + }; + const processBodyError = (e) => { + if (isCancelled(fetchParams)) return; + if (e.name === "AbortError") fetchParams.controller.abort(); + else fetchParams.controller.terminate(e); + }; + requestBody = async function* () { + try { + for await (const bytes of request$1.body.stream) yield* processBodyChunk(bytes); + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + }(); + } + try { + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + if (socket) response = makeResponse({ + status, + statusText, + headersList, + socket + }); + else { + const iterator = body[Symbol.asyncIterator](); + fetchParams.controller.next = () => iterator.next(); + response = makeResponse({ + status, + statusText, + headersList + }); + } + } catch (err) { + if (err.name === "AbortError") { + fetchParams.controller.connection.destroy(); + return makeAppropriateNetworkError(fetchParams, err); + } + return makeNetworkError(err); + } + const pullAlgorithm = () => { + fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + fetchParams.controller.abort(reason); + }; + if (!ReadableStream) ReadableStream = __require("stream/web").ReadableStream; + const stream$2 = new ReadableStream({ + async start(controller) { + fetchParams.controller.controller = controller; + }, + async pull(controller) { + await pullAlgorithm(controller); + }, + async cancel(reason) { + await cancelAlgorithm(reason); + } + }, { + highWaterMark: 0, + size() { + return 1; + } + }); + response.body = { stream: stream$2 }; + fetchParams.controller.on("terminated", onAborted); + fetchParams.controller.resume = async () => { + while (true) { + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + if (isAborted(fetchParams)) break; + bytes = done ? void 0 : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; + else { + bytes = err; + isFailure = true; + } + } + if (bytes === void 0) { + readableStreamClose(fetchParams.controller.controller); + finalizeResponse(fetchParams, response); + return; + } + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + fetchParams.controller.controller.enqueue(new Uint8Array(bytes)); + if (isErrored(stream$2)) { + fetchParams.controller.terminate(); + return; + } + if (!fetchParams.controller.controller.desiredSize) return; + } + }; + function onAborted(reason) { + if (isAborted(fetchParams)) { + response.aborted = true; + if (isReadable(stream$2)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else if (isReadable(stream$2)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); + fetchParams.controller.connection.destroy(); + } + return response; + async function dispatch({ body }) { + const url = requestCurrentURL(request$1); + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher; + return new Promise((resolve, reject) => agent.dispatch({ + path: url.pathname + url.search, + origin: url.origin, + method: request$1.method, + body: fetchParams.controller.dispatcher.isMockActive ? request$1.body && (request$1.body.source || request$1.body.stream) : body, + headers: request$1.headersList.entries, + maxRedirections: 0, + upgrade: request$1.mode === "websocket" ? "websocket" : void 0 + }, { + body: null, + abort: null, + onConnect(abort$1) { + const { connection } = fetchParams.controller; + if (connection.destroyed) abort$1(new DOMException$3("The operation was aborted.", "AbortError")); + else { + fetchParams.controller.on("terminated", abort$1); + this.abort = connection.abort = abort$1; + } + }, + onHeaders(status, headersList, resume$1, statusText) { + if (status < 200) return; + let codings = []; + let location = ""; + const headers = new Headers$3(); + if (Array.isArray(headersList)) for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); + if (key.toLowerCase() === "content-encoding") codings = val.toLowerCase().split(",").map((x) => x.trim()); + else if (key.toLowerCase() === "location") location = val; + headers[kHeadersList$2].append(key, val); + } + else { + const keys = Object.keys(headersList); + for (const key of keys) { + const val = headersList[key]; + if (key.toLowerCase() === "content-encoding") codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); + else if (key.toLowerCase() === "location") location = val; + headers[kHeadersList$2].append(key, val); + } + } + this.body = new Readable({ read: resume$1 }); + const decoders$1 = []; + const willFollow = request$1.redirect === "follow" && location && redirectStatusSet.has(status); + if (request$1.method !== "HEAD" && request$1.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) for (const coding of codings) if (coding === "x-gzip" || coding === "gzip") decoders$1.push(zlib.createGunzip({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "deflate") decoders$1.push(zlib.createInflate()); + else if (coding === "br") decoders$1.push(zlib.createBrotliDecompress()); + else { + decoders$1.length = 0; + break; + } + resolve({ + status, + statusText, + headersList: headers[kHeadersList$2], + body: decoders$1.length ? pipeline(this.body, ...decoders$1, () => {}) : this.body.on("error", () => {}) + }); + return true; + }, + onData(chunk) { + if (fetchParams.controller.dump) return; + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + return this.body.push(bytes); + }, + onComplete() { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError(error$1) { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + this.body?.destroy(error$1); + fetchParams.controller.terminate(error$1); + reject(error$1); + }, + onUpgrade(status, headersList, socket) { + if (status !== 101) return; + const headers = new Headers$3(); + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList$2].append(key, val); + } + resolve({ + status, + statusText: STATUS_CODES[status], + headersList: headers[kHeadersList$2], + socket + }); + return true; + } + })); + } + } + module.exports = { + fetch, + Fetch, + fetching: fetching$2, + finalizeAndReportTiming + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js +var require_symbols$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js"(exports, module) { + module.exports = { + kState: Symbol("FileReader state"), + kResult: Symbol("FileReader result"), + kError: Symbol("FileReader error"), + kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), + kEvents: Symbol("FileReader events"), + kAborted: Symbol("FileReader aborted") + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js +var require_progressevent = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js"(exports, module) { + const { webidl: webidl$6 } = require_webidl(); + const kState$3 = Symbol("ProgressEvent state"); + /** + * @see https://xhr.spec.whatwg.org/#progressevent + */ + var ProgressEvent$1 = class ProgressEvent$1 extends Event { + constructor(type, eventInitDict = {}) { + type = webidl$6.converters.DOMString(type); + eventInitDict = webidl$6.converters.ProgressEventInit(eventInitDict ?? {}); + super(type, eventInitDict); + this[kState$3] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + }; + } + get lengthComputable() { + webidl$6.brandCheck(this, ProgressEvent$1); + return this[kState$3].lengthComputable; + } + get loaded() { + webidl$6.brandCheck(this, ProgressEvent$1); + return this[kState$3].loaded; + } + get total() { + webidl$6.brandCheck(this, ProgressEvent$1); + return this[kState$3].total; + } + }; + webidl$6.converters.ProgressEventInit = webidl$6.dictionaryConverter([ + { + key: "lengthComputable", + converter: webidl$6.converters.boolean, + defaultValue: false + }, + { + key: "loaded", + converter: webidl$6.converters["unsigned long long"], + defaultValue: 0 + }, + { + key: "total", + converter: webidl$6.converters["unsigned long long"], + defaultValue: 0 + }, + { + key: "bubbles", + converter: webidl$6.converters.boolean, + defaultValue: false + }, + { + key: "cancelable", + converter: webidl$6.converters.boolean, + defaultValue: false + }, + { + key: "composed", + converter: webidl$6.converters.boolean, + defaultValue: false + } + ]); + module.exports = { ProgressEvent: ProgressEvent$1 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js +var require_encoding = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js"(exports, module) { + /** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ + function getEncoding$1(label) { + if (!label) return "failure"; + switch (label.trim().toLowerCase()) { + case "unicode-1-1-utf-8": + case "unicode11utf8": + case "unicode20utf8": + case "utf-8": + case "utf8": + case "x-unicode20utf8": return "UTF-8"; + case "866": + case "cp866": + case "csibm866": + case "ibm866": return "IBM866"; + case "csisolatin2": + case "iso-8859-2": + case "iso-ir-101": + case "iso8859-2": + case "iso88592": + case "iso_8859-2": + case "iso_8859-2:1987": + case "l2": + case "latin2": return "ISO-8859-2"; + case "csisolatin3": + case "iso-8859-3": + case "iso-ir-109": + case "iso8859-3": + case "iso88593": + case "iso_8859-3": + case "iso_8859-3:1988": + case "l3": + case "latin3": return "ISO-8859-3"; + case "csisolatin4": + case "iso-8859-4": + case "iso-ir-110": + case "iso8859-4": + case "iso88594": + case "iso_8859-4": + case "iso_8859-4:1988": + case "l4": + case "latin4": return "ISO-8859-4"; + case "csisolatincyrillic": + case "cyrillic": + case "iso-8859-5": + case "iso-ir-144": + case "iso8859-5": + case "iso88595": + case "iso_8859-5": + case "iso_8859-5:1988": return "ISO-8859-5"; + case "arabic": + case "asmo-708": + case "csiso88596e": + case "csiso88596i": + case "csisolatinarabic": + case "ecma-114": + case "iso-8859-6": + case "iso-8859-6-e": + case "iso-8859-6-i": + case "iso-ir-127": + case "iso8859-6": + case "iso88596": + case "iso_8859-6": + case "iso_8859-6:1987": return "ISO-8859-6"; + case "csisolatingreek": + case "ecma-118": + case "elot_928": + case "greek": + case "greek8": + case "iso-8859-7": + case "iso-ir-126": + case "iso8859-7": + case "iso88597": + case "iso_8859-7": + case "iso_8859-7:1987": + case "sun_eu_greek": return "ISO-8859-7"; + case "csiso88598e": + case "csisolatinhebrew": + case "hebrew": + case "iso-8859-8": + case "iso-8859-8-e": + case "iso-ir-138": + case "iso8859-8": + case "iso88598": + case "iso_8859-8": + case "iso_8859-8:1988": + case "visual": return "ISO-8859-8"; + case "csiso88598i": + case "iso-8859-8-i": + case "logical": return "ISO-8859-8-I"; + case "csisolatin6": + case "iso-8859-10": + case "iso-ir-157": + case "iso8859-10": + case "iso885910": + case "l6": + case "latin6": return "ISO-8859-10"; + case "iso-8859-13": + case "iso8859-13": + case "iso885913": return "ISO-8859-13"; + case "iso-8859-14": + case "iso8859-14": + case "iso885914": return "ISO-8859-14"; + case "csisolatin9": + case "iso-8859-15": + case "iso8859-15": + case "iso885915": + case "iso_8859-15": + case "l9": return "ISO-8859-15"; + case "iso-8859-16": return "ISO-8859-16"; + case "cskoi8r": + case "koi": + case "koi8": + case "koi8-r": + case "koi8_r": return "KOI8-R"; + case "koi8-ru": + case "koi8-u": return "KOI8-U"; + case "csmacintosh": + case "mac": + case "macintosh": + case "x-mac-roman": return "macintosh"; + case "iso-8859-11": + case "iso8859-11": + case "iso885911": + case "tis-620": + case "windows-874": return "windows-874"; + case "cp1250": + case "windows-1250": + case "x-cp1250": return "windows-1250"; + case "cp1251": + case "windows-1251": + case "x-cp1251": return "windows-1251"; + case "ansi_x3.4-1968": + case "ascii": + case "cp1252": + case "cp819": + case "csisolatin1": + case "ibm819": + case "iso-8859-1": + case "iso-ir-100": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "iso_8859-1:1987": + case "l1": + case "latin1": + case "us-ascii": + case "windows-1252": + case "x-cp1252": return "windows-1252"; + case "cp1253": + case "windows-1253": + case "x-cp1253": return "windows-1253"; + case "cp1254": + case "csisolatin5": + case "iso-8859-9": + case "iso-ir-148": + case "iso8859-9": + case "iso88599": + case "iso_8859-9": + case "iso_8859-9:1989": + case "l5": + case "latin5": + case "windows-1254": + case "x-cp1254": return "windows-1254"; + case "cp1255": + case "windows-1255": + case "x-cp1255": return "windows-1255"; + case "cp1256": + case "windows-1256": + case "x-cp1256": return "windows-1256"; + case "cp1257": + case "windows-1257": + case "x-cp1257": return "windows-1257"; + case "cp1258": + case "windows-1258": + case "x-cp1258": return "windows-1258"; + case "x-mac-cyrillic": + case "x-mac-ukrainian": return "x-mac-cyrillic"; + case "chinese": + case "csgb2312": + case "csiso58gb231280": + case "gb2312": + case "gb_2312": + case "gb_2312-80": + case "gbk": + case "iso-ir-58": + case "x-gbk": return "GBK"; + case "gb18030": return "gb18030"; + case "big5": + case "big5-hkscs": + case "cn-big5": + case "csbig5": + case "x-x-big5": return "Big5"; + case "cseucpkdfmtjapanese": + case "euc-jp": + case "x-euc-jp": return "EUC-JP"; + case "csiso2022jp": + case "iso-2022-jp": return "ISO-2022-JP"; + case "csshiftjis": + case "ms932": + case "ms_kanji": + case "shift-jis": + case "shift_jis": + case "sjis": + case "windows-31j": + case "x-sjis": return "Shift_JIS"; + case "cseuckr": + case "csksc56011987": + case "euc-kr": + case "iso-ir-149": + case "korean": + case "ks_c_5601-1987": + case "ks_c_5601-1989": + case "ksc5601": + case "ksc_5601": + case "windows-949": return "EUC-KR"; + case "csiso2022kr": + case "hz-gb-2312": + case "iso-2022-cn": + case "iso-2022-cn-ext": + case "iso-2022-kr": + case "replacement": return "replacement"; + case "unicodefffe": + case "utf-16be": return "UTF-16BE"; + case "csunicode": + case "iso-10646-ucs-2": + case "ucs-2": + case "unicode": + case "unicodefeff": + case "utf-16": + case "utf-16le": return "UTF-16LE"; + case "x-user-defined": return "x-user-defined"; + default: return "failure"; + } + } + module.exports = { getEncoding: getEncoding$1 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/util.js +var require_util$3 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/util.js"(exports, module) { + const { kState: kState$2, kError: kError$1, kResult: kResult$1, kAborted: kAborted$1, kLastProgressEventFired } = require_symbols$2(); + const { ProgressEvent } = require_progressevent(); + const { getEncoding } = require_encoding(); + const { DOMException: DOMException$2 } = require_constants$3(); + const { serializeAMimeType, parseMIMEType } = require_dataURL(); + const { types: types$1 } = __require("util"); + const { StringDecoder } = __require("string_decoder"); + const { btoa } = __require("buffer"); + /** @type {PropertyDescriptor} */ + const staticPropertyDescriptors$3 = { + enumerable: true, + writable: false, + configurable: false + }; + /** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ + function readOperation$1(fr, blob, type, encodingName) { + if (fr[kState$2] === "loading") throw new DOMException$2("Invalid state", "InvalidStateError"); + fr[kState$2] = "loading"; + fr[kResult$1] = null; + fr[kError$1] = null; + /** @type {import('stream/web').ReadableStream} */ + const stream$2 = blob.stream(); + const reader = stream$2.getReader(); + /** @type {Uint8Array[]} */ + const bytes = []; + let chunkPromise = reader.read(); + let isFirstChunk = true; + (async () => { + while (!fr[kAborted$1]) try { + const { done, value } = await chunkPromise; + if (isFirstChunk && !fr[kAborted$1]) queueMicrotask(() => { + fireAProgressEvent$1("loadstart", fr); + }); + isFirstChunk = false; + if (!done && types$1.isUint8Array(value)) { + bytes.push(value); + if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted$1]) { + fr[kLastProgressEventFired] = Date.now(); + queueMicrotask(() => { + fireAProgressEvent$1("progress", fr); + }); + } + chunkPromise = reader.read(); + } else if (done) { + queueMicrotask(() => { + fr[kState$2] = "done"; + try { + const result = packageData(bytes, type, blob.type, encodingName); + if (fr[kAborted$1]) return; + fr[kResult$1] = result; + fireAProgressEvent$1("load", fr); + } catch (error$1) { + fr[kError$1] = error$1; + fireAProgressEvent$1("error", fr); + } + if (fr[kState$2] !== "loading") fireAProgressEvent$1("loadend", fr); + }); + break; + } + } catch (error$1) { + if (fr[kAborted$1]) return; + queueMicrotask(() => { + fr[kState$2] = "done"; + fr[kError$1] = error$1; + fireAProgressEvent$1("error", fr); + if (fr[kState$2] !== "loading") fireAProgressEvent$1("loadend", fr); + }); + break; + } + })(); + } + /** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ + function fireAProgressEvent$1(e, reader) { + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }); + reader.dispatchEvent(event); + } + /** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { + case "DataURL": { + let dataURL = "data:"; + const parsed = parseMIMEType(mimeType || "application/octet-stream"); + if (parsed !== "failure") dataURL += serializeAMimeType(parsed); + dataURL += ";base64,"; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) dataURL += btoa(decoder.write(chunk)); + dataURL += btoa(decoder.end()); + return dataURL; + } + case "Text": { + let encoding = "failure"; + if (encodingName) encoding = getEncoding(encodingName); + if (encoding === "failure" && mimeType) { + const type$1 = parseMIMEType(mimeType); + if (type$1 !== "failure") encoding = getEncoding(type$1.parameters.get("charset")); + } + if (encoding === "failure") encoding = "UTF-8"; + return decode(bytes, encoding); + } + case "ArrayBuffer": { + const sequence = combineByteSequences(bytes); + return sequence.buffer; + } + case "BinaryString": { + let binaryString = ""; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) binaryString += decoder.write(chunk); + binaryString += decoder.end(); + return binaryString; + } + } + } + /** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ + function decode(ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue); + const BOMEncoding = BOMSniffing(bytes); + let slice = 0; + if (BOMEncoding !== null) { + encoding = BOMEncoding; + slice = BOMEncoding === "UTF-8" ? 3 : 2; + } + const sliced = bytes.slice(slice); + return new TextDecoder(encoding).decode(sliced); + } + /** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ + function BOMSniffing(ioQueue) { + const [a, b, c] = ioQueue; + if (a === 239 && b === 187 && c === 191) return "UTF-8"; + else if (a === 254 && b === 255) return "UTF-16BE"; + else if (a === 255 && b === 254) return "UTF-16LE"; + return null; + } + /** + * @param {Uint8Array[]} sequences + */ + function combineByteSequences(sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength; + }, 0); + let offset = 0; + return sequences.reduce((a, b) => { + a.set(b, offset); + offset += b.byteLength; + return a; + }, new Uint8Array(size)); + } + module.exports = { + staticPropertyDescriptors: staticPropertyDescriptors$3, + readOperation: readOperation$1, + fireAProgressEvent: fireAProgressEvent$1 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js +var require_filereader = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js"(exports, module) { + const { staticPropertyDescriptors: staticPropertyDescriptors$2, readOperation, fireAProgressEvent } = require_util$3(); + const { kState: kState$1, kError, kResult, kEvents, kAborted } = require_symbols$2(); + const { webidl: webidl$5 } = require_webidl(); + const { kEnumerableProperty: kEnumerableProperty$4 } = require_util$6(); + var FileReader = class FileReader extends EventTarget { + constructor() { + super(); + this[kState$1] = "empty"; + this[kResult] = null; + this[kError] = null; + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null + }; + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer(blob) { + webidl$5.brandCheck(this, FileReader); + webidl$5.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsArrayBuffer" }); + blob = webidl$5.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "ArrayBuffer"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString(blob) { + webidl$5.brandCheck(this, FileReader); + webidl$5.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsBinaryString" }); + blob = webidl$5.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "BinaryString"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText(blob, encoding = void 0) { + webidl$5.brandCheck(this, FileReader); + webidl$5.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsText" }); + blob = webidl$5.converters.Blob(blob, { strict: false }); + if (encoding !== void 0) encoding = webidl$5.converters.DOMString(encoding); + readOperation(this, blob, "Text", encoding); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL(blob) { + webidl$5.brandCheck(this, FileReader); + webidl$5.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsDataURL" }); + blob = webidl$5.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "DataURL"); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort() { + if (this[kState$1] === "empty" || this[kState$1] === "done") { + this[kResult] = null; + return; + } + if (this[kState$1] === "loading") { + this[kState$1] = "done"; + this[kResult] = null; + } + this[kAborted] = true; + fireAProgressEvent("abort", this); + if (this[kState$1] !== "loading") fireAProgressEvent("loadend", this); + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState() { + webidl$5.brandCheck(this, FileReader); + switch (this[kState$1]) { + case "empty": return this.EMPTY; + case "loading": return this.LOADING; + case "done": return this.DONE; + } + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result() { + webidl$5.brandCheck(this, FileReader); + return this[kResult]; + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error() { + webidl$5.brandCheck(this, FileReader); + return this[kError]; + } + get onloadend() { + webidl$5.brandCheck(this, FileReader); + return this[kEvents].loadend; + } + set onloadend(fn) { + webidl$5.brandCheck(this, FileReader); + if (this[kEvents].loadend) this.removeEventListener("loadend", this[kEvents].loadend); + if (typeof fn === "function") { + this[kEvents].loadend = fn; + this.addEventListener("loadend", fn); + } else this[kEvents].loadend = null; + } + get onerror() { + webidl$5.brandCheck(this, FileReader); + return this[kEvents].error; + } + set onerror(fn) { + webidl$5.brandCheck(this, FileReader); + if (this[kEvents].error) this.removeEventListener("error", this[kEvents].error); + if (typeof fn === "function") { + this[kEvents].error = fn; + this.addEventListener("error", fn); + } else this[kEvents].error = null; + } + get onloadstart() { + webidl$5.brandCheck(this, FileReader); + return this[kEvents].loadstart; + } + set onloadstart(fn) { + webidl$5.brandCheck(this, FileReader); + if (this[kEvents].loadstart) this.removeEventListener("loadstart", this[kEvents].loadstart); + if (typeof fn === "function") { + this[kEvents].loadstart = fn; + this.addEventListener("loadstart", fn); + } else this[kEvents].loadstart = null; + } + get onprogress() { + webidl$5.brandCheck(this, FileReader); + return this[kEvents].progress; + } + set onprogress(fn) { + webidl$5.brandCheck(this, FileReader); + if (this[kEvents].progress) this.removeEventListener("progress", this[kEvents].progress); + if (typeof fn === "function") { + this[kEvents].progress = fn; + this.addEventListener("progress", fn); + } else this[kEvents].progress = null; + } + get onload() { + webidl$5.brandCheck(this, FileReader); + return this[kEvents].load; + } + set onload(fn) { + webidl$5.brandCheck(this, FileReader); + if (this[kEvents].load) this.removeEventListener("load", this[kEvents].load); + if (typeof fn === "function") { + this[kEvents].load = fn; + this.addEventListener("load", fn); + } else this[kEvents].load = null; + } + get onabort() { + webidl$5.brandCheck(this, FileReader); + return this[kEvents].abort; + } + set onabort(fn) { + webidl$5.brandCheck(this, FileReader); + if (this[kEvents].abort) this.removeEventListener("abort", this[kEvents].abort); + if (typeof fn === "function") { + this[kEvents].abort = fn; + this.addEventListener("abort", fn); + } else this[kEvents].abort = null; + } + }; + FileReader.EMPTY = FileReader.prototype.EMPTY = 0; + FileReader.LOADING = FileReader.prototype.LOADING = 1; + FileReader.DONE = FileReader.prototype.DONE = 2; + Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors$2, + LOADING: staticPropertyDescriptors$2, + DONE: staticPropertyDescriptors$2, + readAsArrayBuffer: kEnumerableProperty$4, + readAsBinaryString: kEnumerableProperty$4, + readAsText: kEnumerableProperty$4, + readAsDataURL: kEnumerableProperty$4, + abort: kEnumerableProperty$4, + readyState: kEnumerableProperty$4, + result: kEnumerableProperty$4, + error: kEnumerableProperty$4, + onloadstart: kEnumerableProperty$4, + onprogress: kEnumerableProperty$4, + onload: kEnumerableProperty$4, + onabort: kEnumerableProperty$4, + onerror: kEnumerableProperty$4, + onloadend: kEnumerableProperty$4, + [Symbol.toStringTag]: { + value: "FileReader", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors$2, + LOADING: staticPropertyDescriptors$2, + DONE: staticPropertyDescriptors$2 + }); + module.exports = { FileReader }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/symbols.js +var require_symbols$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/symbols.js"(exports, module) { + module.exports = { kConstruct: require_symbols$4().kConstruct }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/util.js +var require_util$2 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/util.js"(exports, module) { + const assert$2 = __require("assert"); + const { URLSerializer: URLSerializer$1 } = require_dataURL(); + const { isValidHeaderName } = require_util$5(); + /** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ + function urlEquals$1(A, B, excludeFragment = false) { + const serializedA = URLSerializer$1(A, excludeFragment); + const serializedB = URLSerializer$1(B, excludeFragment); + return serializedA === serializedB; + } + /** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ + function fieldValues(header) { + assert$2(header !== null); + const values = []; + for (let value of header.split(",")) { + value = value.trim(); + if (!value.length) continue; + else if (!isValidHeaderName(value)) continue; + values.push(value); + } + return values; + } + module.exports = { + urlEquals: urlEquals$1, + fieldValues + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cache.js +var require_cache = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cache.js"(exports, module) { + const { kConstruct: kConstruct$1 } = require_symbols$1(); + const { urlEquals, fieldValues: getFieldValues } = require_util$2(); + const { kEnumerableProperty: kEnumerableProperty$3, isDisturbed } = require_util$6(); + const { kHeadersList: kHeadersList$1 } = require_symbols$4(); + const { webidl: webidl$4 } = require_webidl(); + const { Response, cloneResponse } = require_response(); + const { Request } = require_request(); + const { kState, kHeaders, kGuard, kRealm } = require_symbols$3(); + const { fetching: fetching$1 } = require_fetch(); + const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util$5(); + const assert$1 = __require("assert"); + const { getGlobalDispatcher: getGlobalDispatcher$3 } = require_global(); + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ + var Cache$1 = class Cache$1 { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList; + constructor() { + if (arguments[0] !== kConstruct$1) webidl$4.illegalConstructor(); + this.#relevantRequestResponseList = arguments[1]; + } + async match(request$1, options = {}) { + webidl$4.brandCheck(this, Cache$1); + webidl$4.argumentLengthCheck(arguments, 1, { header: "Cache.match" }); + request$1 = webidl$4.converters.RequestInfo(request$1); + options = webidl$4.converters.CacheQueryOptions(options); + const p = await this.matchAll(request$1, options); + if (p.length === 0) return; + return p[0]; + } + async matchAll(request$1 = void 0, options = {}) { + webidl$4.brandCheck(this, Cache$1); + if (request$1 !== void 0) request$1 = webidl$4.converters.RequestInfo(request$1); + options = webidl$4.converters.CacheQueryOptions(options); + let r = null; + if (request$1 !== void 0) { + if (request$1 instanceof Request) { + r = request$1[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request$1 === "string") r = new Request(request$1)[kState]; + } + const responses = []; + if (request$1 === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) responses.push(requestResponse[1]); + } + const responseList = []; + for (const response of responses) { + const responseObject = new Response(response.body?.source ?? null); + const body = responseObject[kState].body; + responseObject[kState] = response; + responseObject[kState].body = body; + responseObject[kHeaders][kHeadersList$1] = response.headersList; + responseObject[kHeaders][kGuard] = "immutable"; + responseList.push(responseObject); + } + return Object.freeze(responseList); + } + async add(request$1) { + webidl$4.brandCheck(this, Cache$1); + webidl$4.argumentLengthCheck(arguments, 1, { header: "Cache.add" }); + request$1 = webidl$4.converters.RequestInfo(request$1); + const requests = [request$1]; + const responseArrayPromise = this.addAll(requests); + return await responseArrayPromise; + } + async addAll(requests) { + webidl$4.brandCheck(this, Cache$1); + webidl$4.argumentLengthCheck(arguments, 1, { header: "Cache.addAll" }); + requests = webidl$4.converters["sequence"](requests); + const responsePromises = []; + const requestList = []; + for (const request$1 of requests) { + if (typeof request$1 === "string") continue; + const r = request$1[kState]; + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl$4.errors.exception({ + header: "Cache.addAll", + message: "Expected http/s scheme when method is not GET." + }); + } + /** @type {ReturnType[]} */ + const fetchControllers = []; + for (const request$1 of requests) { + const r = new Request(request$1)[kState]; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl$4.errors.exception({ + header: "Cache.addAll", + message: "Expected http/s scheme." + }); + r.initiator = "fetch"; + r.destination = "subresource"; + requestList.push(r); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching$1({ + request: r, + dispatcher: getGlobalDispatcher$3(), + processResponse(response) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl$4.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + else if (response.headersList.contains("vary")) { + const fieldValues$1 = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues$1) if (fieldValue === "*") { + responsePromise.reject(webidl$4.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) controller.abort(); + return; + } + } + }, + processResponseEndOfBody(response) { + if (response.aborted) { + responsePromise.reject(new DOMException("aborted", "AbortError")); + return; + } + responsePromise.resolve(response); + } + })); + responsePromises.push(responsePromise.promise); + } + const p = Promise.all(responsePromises); + const responses = await p; + const operations = []; + let index = 0; + for (const response of responses) { + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: requestList[index], + response + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(void 0); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async put(request$1, response) { + webidl$4.brandCheck(this, Cache$1); + webidl$4.argumentLengthCheck(arguments, 2, { header: "Cache.put" }); + request$1 = webidl$4.converters.RequestInfo(request$1); + response = webidl$4.converters.Response(response); + let innerRequest = null; + if (request$1 instanceof Request) innerRequest = request$1[kState]; + else innerRequest = new Request(request$1)[kState]; + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl$4.errors.exception({ + header: "Cache.put", + message: "Expected an http/s scheme when method is not GET" + }); + const innerResponse = response[kState]; + if (innerResponse.status === 206) throw webidl$4.errors.exception({ + header: "Cache.put", + message: "Got 206 status" + }); + if (innerResponse.headersList.contains("vary")) { + const fieldValues$1 = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues$1) if (fieldValue === "*") throw webidl$4.errors.exception({ + header: "Cache.put", + message: "Got * vary field value" + }); + } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl$4.errors.exception({ + header: "Cache.put", + message: "Response body is locked or disturbed" + }); + const clonedResponse = cloneResponse(innerResponse); + const bodyReadPromise = createDeferredPromise(); + if (innerResponse.body != null) { + const stream$2 = innerResponse.body.stream; + const reader = stream$2.getReader(); + readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject); + } else bodyReadPromise.resolve(void 0); + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: innerRequest, + response: clonedResponse + }; + operations.push(operation); + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) clonedResponse.body.source = bytes; + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async delete(request$1, options = {}) { + webidl$4.brandCheck(this, Cache$1); + webidl$4.argumentLengthCheck(arguments, 1, { header: "Cache.delete" }); + request$1 = webidl$4.converters.RequestInfo(request$1); + options = webidl$4.converters.CacheQueryOptions(options); + /** + * @type {Request} + */ + let r = null; + if (request$1 instanceof Request) { + r = request$1[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return false; + } else { + assert$1(typeof request$1 === "string"); + r = new Request(request$1)[kState]; + } + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "delete", + request: r, + options + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {readonly Request[]} + */ + async keys(request$1 = void 0, options = {}) { + webidl$4.brandCheck(this, Cache$1); + if (request$1 !== void 0) request$1 = webidl$4.converters.RequestInfo(request$1); + options = webidl$4.converters.CacheQueryOptions(options); + let r = null; + if (request$1 !== void 0) { + if (request$1 instanceof Request) { + r = request$1[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request$1 === "string") r = new Request(request$1)[kState]; + } + const promise = createDeferredPromise(); + const requests = []; + if (request$1 === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) requests.push(requestResponse[0]); + } + queueMicrotask(() => { + const requestList = []; + for (const request$2 of requests) { + const requestObject = new Request("https://a"); + requestObject[kState] = request$2; + requestObject[kHeaders][kHeadersList$1] = request$2.headersList; + requestObject[kHeaders][kGuard] = "immutable"; + requestObject[kRealm] = request$2.client; + requestList.push(requestObject); + } + promise.resolve(Object.freeze(requestList)); + }); + return promise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations(operations) { + const cache = this.#relevantRequestResponseList; + const backupCache = [...cache]; + const addedItems = []; + const resultList = []; + try { + for (const operation of operations) { + if (operation.type !== "delete" && operation.type !== "put") throw webidl$4.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "operation type does not match \"delete\" or \"put\"" + }); + if (operation.type === "delete" && operation.response != null) throw webidl$4.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); + let requestResponses; + if (operation.type === "delete") { + requestResponses = this.#queryCache(operation.request, operation.options); + if (requestResponses.length === 0) return []; + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$1(idx !== -1); + cache.splice(idx, 1); + } + } else if (operation.type === "put") { + if (operation.response == null) throw webidl$4.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); + const r = operation.request; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl$4.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + if (r.method !== "GET") throw webidl$4.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + if (operation.options != null) throw webidl$4.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); + requestResponses = this.#queryCache(operation.request); + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$1(idx !== -1); + cache.splice(idx, 1); + } + cache.push([operation.request, operation.response]); + addedItems.push([operation.request, operation.response]); + } + resultList.push([operation.request, operation.response]); + } + return resultList; + } catch (e) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); + } + return resultList; + } + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem(requestQuery, request$1, response = null, options) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request$1.url); + if (options?.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) return false; + if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; + const fieldValues$1 = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues$1) { + if (fieldValue === "*") return false; + const requestValue = request$1.headersList.get(fieldValue); + const queryValue = requestQuery.headersList.get(fieldValue); + if (requestValue !== queryValue) return false; + } + return true; + } + }; + Object.defineProperties(Cache$1.prototype, { + [Symbol.toStringTag]: { + value: "Cache", + configurable: true + }, + match: kEnumerableProperty$3, + matchAll: kEnumerableProperty$3, + add: kEnumerableProperty$3, + addAll: kEnumerableProperty$3, + put: kEnumerableProperty$3, + delete: kEnumerableProperty$3, + keys: kEnumerableProperty$3 + }); + const cacheQueryOptionConverters = [ + { + key: "ignoreSearch", + converter: webidl$4.converters.boolean, + defaultValue: false + }, + { + key: "ignoreMethod", + converter: webidl$4.converters.boolean, + defaultValue: false + }, + { + key: "ignoreVary", + converter: webidl$4.converters.boolean, + defaultValue: false + } + ]; + webidl$4.converters.CacheQueryOptions = webidl$4.dictionaryConverter(cacheQueryOptionConverters); + webidl$4.converters.MultiCacheQueryOptions = webidl$4.dictionaryConverter([...cacheQueryOptionConverters, { + key: "cacheName", + converter: webidl$4.converters.DOMString + }]); + webidl$4.converters.Response = webidl$4.interfaceConverter(Response); + webidl$4.converters["sequence"] = webidl$4.sequenceConverter(webidl$4.converters.RequestInfo); + module.exports = { Cache: Cache$1 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js +var require_cachestorage = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js"(exports, module) { + const { kConstruct } = require_symbols$1(); + const { Cache } = require_cache(); + const { webidl: webidl$3 } = require_webidl(); + const { kEnumerableProperty: kEnumerableProperty$2 } = require_util$6(); + var CacheStorage = class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl$3.brandCheck(this, CacheStorage); + webidl$3.argumentLengthCheck(arguments, 1, { header: "CacheStorage.has" }); + cacheName = webidl$3.converters.DOMString(cacheName); + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl$3.brandCheck(this, CacheStorage); + webidl$3.argumentLengthCheck(arguments, 1, { header: "CacheStorage.open" }); + cacheName = webidl$3.converters.DOMString(cacheName); + if (this.#caches.has(cacheName)) { + const cache$1 = this.#caches.get(cacheName); + return new Cache(kConstruct, cache$1); + } + const cache = []; + this.#caches.set(cacheName, cache); + return new Cache(kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete(cacheName) { + webidl$3.brandCheck(this, CacheStorage); + webidl$3.argumentLengthCheck(arguments, 1, { header: "CacheStorage.delete" }); + cacheName = webidl$3.converters.DOMString(cacheName); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {string[]} + */ + async keys() { + webidl$3.brandCheck(this, CacheStorage); + const keys = this.#caches.keys(); + return [...keys]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty$2, + has: kEnumerableProperty$2, + open: kEnumerableProperty$2, + delete: kEnumerableProperty$2, + keys: kEnumerableProperty$2 + }); + module.exports = { CacheStorage }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/constants.js +var require_constants$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/constants.js"(exports, module) { + const maxAttributeValueSize$1 = 1024; + const maxNameValuePairSize$1 = 4096; + module.exports = { + maxAttributeValueSize: maxAttributeValueSize$1, + maxNameValuePairSize: maxNameValuePairSize$1 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/util.js +var require_util$1 = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/util.js"(exports, module) { + /** + * @param {string} value + * @returns {boolean} + */ + function isCTLExcludingHtab$1(value) { + if (value.length === 0) return false; + for (const char of value) { + const code = char.charCodeAt(0); + if (code >= 0 || code <= 8 || code >= 10 || code <= 31 || code === 127) return false; + } + } + /** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ + function validateCookieName(name) { + for (const char of name) { + const code = char.charCodeAt(0); + if (code <= 32 || code > 127 || char === "(" || char === ")" || char === ">" || char === "<" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === "\"" || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}") throw new Error("Invalid cookie name"); + } + } + /** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ + function validateCookieValue(value) { + for (const char of value) { + const code = char.charCodeAt(0); + if (code < 33 || code === 34 || code === 44 || code === 59 || code === 92 || code > 126) throw new Error("Invalid header value"); + } + } + /** + * path-value = + * @param {string} path + */ + function validateCookiePath(path$5) { + for (const char of path$5) { + const code = char.charCodeAt(0); + if (code < 33 || char === ";") throw new Error("Invalid cookie path"); + } + } + /** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ + function validateCookieDomain(domain) { + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); + } + /** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] + + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ + function toIMFDate(date) { + if (typeof date === "number") date = new Date(date); + const days = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + const months = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + const dayName = days[date.getUTCDay()]; + const day = date.getUTCDate().toString().padStart(2, "0"); + const month = months[date.getUTCMonth()]; + const year = date.getUTCFullYear(); + const hour = date.getUTCHours().toString().padStart(2, "0"); + const minute = date.getUTCMinutes().toString().padStart(2, "0"); + const second = date.getUTCSeconds().toString().padStart(2, "0"); + return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`; + } + /** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) throw new Error("Invalid cookie max-age"); + } + /** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ + function stringify$1(cookie) { + if (cookie.name.length === 0) return null; + validateCookieName(cookie.name); + validateCookieValue(cookie.value); + const out = [`${cookie.name}=${cookie.value}`]; + if (cookie.name.startsWith("__Secure-")) cookie.secure = true; + if (cookie.name.startsWith("__Host-")) { + cookie.secure = true; + cookie.domain = null; + cookie.path = "/"; + } + if (cookie.secure) out.push("Secure"); + if (cookie.httpOnly) out.push("HttpOnly"); + if (typeof cookie.maxAge === "number") { + validateCookieMaxAge(cookie.maxAge); + out.push(`Max-Age=${cookie.maxAge}`); + } + if (cookie.domain) { + validateCookieDomain(cookie.domain); + out.push(`Domain=${cookie.domain}`); + } + if (cookie.path) { + validateCookiePath(cookie.path); + out.push(`Path=${cookie.path}`); + } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); + if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); + for (const part of cookie.unparsed) { + if (!part.includes("=")) throw new Error("Invalid unparsed"); + const [key, ...value] = part.split("="); + out.push(`${key.trim()}=${value.join("=")}`); + } + return out.join("; "); + } + module.exports = { + isCTLExcludingHtab: isCTLExcludingHtab$1, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify: stringify$1 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/parse.js +var require_parse = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/parse.js"(exports, module) { + const { maxNameValuePairSize, maxAttributeValueSize } = require_constants$1(); + const { isCTLExcludingHtab } = require_util$1(); + const { collectASequenceOfCodePointsFast } = require_dataURL(); + const assert = __require("assert"); + /** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ + function parseSetCookie$1(header) { + if (isCTLExcludingHtab(header)) return null; + let nameValuePair = ""; + let unparsedAttributes = ""; + let name = ""; + let value = ""; + if (header.includes(";")) { + const position = { position: 0 }; + nameValuePair = collectASequenceOfCodePointsFast(";", header, position); + unparsedAttributes = header.slice(position.position); + } else nameValuePair = header; + if (!nameValuePair.includes("=")) value = nameValuePair; + else { + const position = { position: 0 }; + name = collectASequenceOfCodePointsFast("=", nameValuePair, position); + value = nameValuePair.slice(position.position + 1); + } + name = name.trim(); + value = value.trim(); + if (name.length + value.length > maxNameValuePairSize) return null; + return { + name, + value, + ...parseUnparsedAttributes(unparsedAttributes) + }; + } + /** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) return cookieAttributeList; + assert(unparsedAttributes[0] === ";"); + unparsedAttributes = unparsedAttributes.slice(1); + let cookieAv = ""; + if (unparsedAttributes.includes(";")) { + cookieAv = collectASequenceOfCodePointsFast(";", unparsedAttributes, { position: 0 }); + unparsedAttributes = unparsedAttributes.slice(cookieAv.length); + } else { + cookieAv = unparsedAttributes; + unparsedAttributes = ""; + } + let attributeName = ""; + let attributeValue = ""; + if (cookieAv.includes("=")) { + const position = { position: 0 }; + attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position); + attributeValue = cookieAv.slice(position.position + 1); + } else attributeName = cookieAv; + attributeName = attributeName.trim(); + attributeValue = attributeValue.trim(); + if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + const attributeNameLowercase = attributeName.toLowerCase(); + if (attributeNameLowercase === "expires") { + const expiryTime = new Date(attributeValue); + cookieAttributeList.expires = expiryTime; + } else if (attributeNameLowercase === "max-age") { + const charCode = attributeValue.charCodeAt(0); + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + const deltaSeconds = Number(attributeValue); + cookieAttributeList.maxAge = deltaSeconds; + } else if (attributeNameLowercase === "domain") { + let cookieDomain = attributeValue; + if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); + cookieDomain = cookieDomain.toLowerCase(); + cookieAttributeList.domain = cookieDomain; + } else if (attributeNameLowercase === "path") { + let cookiePath = ""; + if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; + else cookiePath = attributeValue; + cookieAttributeList.path = cookiePath; + } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; + else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; + else if (attributeNameLowercase === "samesite") { + let enforcement = "Default"; + const attributeValueLowercase = attributeValue.toLowerCase(); + if (attributeValueLowercase.includes("none")) enforcement = "None"; + if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; + if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; + cookieAttributeList.sameSite = enforcement; + } else { + cookieAttributeList.unparsed ??= []; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); + } + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + module.exports = { + parseSetCookie: parseSetCookie$1, + parseUnparsedAttributes + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/index.js +var require_cookies = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/cookies/index.js"(exports, module) { + const { parseSetCookie } = require_parse(); + const { stringify } = require_util$1(); + const { webidl: webidl$2 } = require_webidl(); + const { Headers: Headers$2 } = require_headers(); + /** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ + /** + * @param {Headers} headers + * @returns {Record} + */ + function getCookies(headers) { + webidl$2.argumentLengthCheck(arguments, 1, { header: "getCookies" }); + webidl$2.brandCheck(headers, Headers$2, { strict: false }); + const cookie = headers.get("cookie"); + const out = {}; + if (!cookie) return out; + for (const piece of cookie.split(";")) { + const [name, ...value] = piece.split("="); + out[name.trim()] = value.join("="); + } + return out; + } + /** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ + function deleteCookie(headers, name, attributes) { + webidl$2.argumentLengthCheck(arguments, 2, { header: "deleteCookie" }); + webidl$2.brandCheck(headers, Headers$2, { strict: false }); + name = webidl$2.converters.DOMString(name); + attributes = webidl$2.converters.DeleteCookieAttributes(attributes); + setCookie(headers, { + name, + value: "", + expires: new Date(0), + ...attributes + }); + } + /** + * @param {Headers} headers + * @returns {Cookie[]} + */ + function getSetCookies(headers) { + webidl$2.argumentLengthCheck(arguments, 1, { header: "getSetCookies" }); + webidl$2.brandCheck(headers, Headers$2, { strict: false }); + const cookies = headers.getSetCookie(); + if (!cookies) return []; + return cookies.map((pair) => parseSetCookie(pair)); + } + /** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ + function setCookie(headers, cookie) { + webidl$2.argumentLengthCheck(arguments, 2, { header: "setCookie" }); + webidl$2.brandCheck(headers, Headers$2, { strict: false }); + cookie = webidl$2.converters.Cookie(cookie); + const str = stringify(cookie); + if (str) headers.append("Set-Cookie", stringify(cookie)); + } + webidl$2.converters.DeleteCookieAttributes = webidl$2.dictionaryConverter([{ + converter: webidl$2.nullableConverter(webidl$2.converters.DOMString), + key: "path", + defaultValue: null + }, { + converter: webidl$2.nullableConverter(webidl$2.converters.DOMString), + key: "domain", + defaultValue: null + }]); + webidl$2.converters.Cookie = webidl$2.dictionaryConverter([ + { + converter: webidl$2.converters.DOMString, + key: "name" + }, + { + converter: webidl$2.converters.DOMString, + key: "value" + }, + { + converter: webidl$2.nullableConverter((value) => { + if (typeof value === "number") return webidl$2.converters["unsigned long long"](value); + return new Date(value); + }), + key: "expires", + defaultValue: null + }, + { + converter: webidl$2.nullableConverter(webidl$2.converters["long long"]), + key: "maxAge", + defaultValue: null + }, + { + converter: webidl$2.nullableConverter(webidl$2.converters.DOMString), + key: "domain", + defaultValue: null + }, + { + converter: webidl$2.nullableConverter(webidl$2.converters.DOMString), + key: "path", + defaultValue: null + }, + { + converter: webidl$2.nullableConverter(webidl$2.converters.boolean), + key: "secure", + defaultValue: null + }, + { + converter: webidl$2.nullableConverter(webidl$2.converters.boolean), + key: "httpOnly", + defaultValue: null + }, + { + converter: webidl$2.converters.USVString, + key: "sameSite", + allowedValues: [ + "Strict", + "Lax", + "None" + ] + }, + { + converter: webidl$2.sequenceConverter(webidl$2.converters.DOMString), + key: "unparsed", + defaultValue: [] + } + ]); + module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/constants.js +var require_constants = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/constants.js"(exports, module) { + const uid$1 = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + /** @type {PropertyDescriptor} */ + const staticPropertyDescriptors$1 = { + enumerable: true, + writable: false, + configurable: false + }; + const states$4 = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }; + const opcodes$3 = { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }; + const maxUnsigned16Bit$1 = 2 ** 16 - 1; + const parserStates$1 = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }; + const emptyBuffer$2 = Buffer.allocUnsafe(0); + module.exports = { + uid: uid$1, + staticPropertyDescriptors: staticPropertyDescriptors$1, + states: states$4, + opcodes: opcodes$3, + maxUnsigned16Bit: maxUnsigned16Bit$1, + parserStates: parserStates$1, + emptyBuffer: emptyBuffer$2 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js +var require_symbols = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js"(exports, module) { + module.exports = { + kWebSocketURL: Symbol("url"), + kReadyState: Symbol("ready state"), + kController: Symbol("controller"), + kResponse: Symbol("response"), + kBinaryType: Symbol("binary type"), + kSentClose: Symbol("sent close"), + kReceivedClose: Symbol("received close"), + kByteParser: Symbol("byte parser") + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/events.js +var require_events = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/events.js"(exports, module) { + const { webidl: webidl$1 } = require_webidl(); + const { kEnumerableProperty: kEnumerableProperty$1 } = require_util$6(); + const { MessagePort } = __require("worker_threads"); + /** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ + var MessageEvent$1 = class MessageEvent$1 extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + webidl$1.argumentLengthCheck(arguments, 1, { header: "MessageEvent constructor" }); + type = webidl$1.converters.DOMString(type); + eventInitDict = webidl$1.converters.MessageEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + } + get data() { + webidl$1.brandCheck(this, MessageEvent$1); + return this.#eventInit.data; + } + get origin() { + webidl$1.brandCheck(this, MessageEvent$1); + return this.#eventInit.origin; + } + get lastEventId() { + webidl$1.brandCheck(this, MessageEvent$1); + return this.#eventInit.lastEventId; + } + get source() { + webidl$1.brandCheck(this, MessageEvent$1); + return this.#eventInit.source; + } + get ports() { + webidl$1.brandCheck(this, MessageEvent$1); + if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); + return this.#eventInit.ports; + } + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + webidl$1.brandCheck(this, MessageEvent$1); + webidl$1.argumentLengthCheck(arguments, 1, { header: "MessageEvent.initMessageEvent" }); + return new MessageEvent$1(type, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports + }); + } + }; + /** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ + var CloseEvent$1 = class CloseEvent$1 extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + webidl$1.argumentLengthCheck(arguments, 1, { header: "CloseEvent constructor" }); + type = webidl$1.converters.DOMString(type); + eventInitDict = webidl$1.converters.CloseEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + } + get wasClean() { + webidl$1.brandCheck(this, CloseEvent$1); + return this.#eventInit.wasClean; + } + get code() { + webidl$1.brandCheck(this, CloseEvent$1); + return this.#eventInit.code; + } + get reason() { + webidl$1.brandCheck(this, CloseEvent$1); + return this.#eventInit.reason; + } + }; + var ErrorEvent$1 = class ErrorEvent$1 extends Event { + #eventInit; + constructor(type, eventInitDict) { + webidl$1.argumentLengthCheck(arguments, 1, { header: "ErrorEvent constructor" }); + super(type, eventInitDict); + type = webidl$1.converters.DOMString(type); + eventInitDict = webidl$1.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; + } + get message() { + webidl$1.brandCheck(this, ErrorEvent$1); + return this.#eventInit.message; + } + get filename() { + webidl$1.brandCheck(this, ErrorEvent$1); + return this.#eventInit.filename; + } + get lineno() { + webidl$1.brandCheck(this, ErrorEvent$1); + return this.#eventInit.lineno; + } + get colno() { + webidl$1.brandCheck(this, ErrorEvent$1); + return this.#eventInit.colno; + } + get error() { + webidl$1.brandCheck(this, ErrorEvent$1); + return this.#eventInit.error; + } + }; + Object.defineProperties(MessageEvent$1.prototype, { + [Symbol.toStringTag]: { + value: "MessageEvent", + configurable: true + }, + data: kEnumerableProperty$1, + origin: kEnumerableProperty$1, + lastEventId: kEnumerableProperty$1, + source: kEnumerableProperty$1, + ports: kEnumerableProperty$1, + initMessageEvent: kEnumerableProperty$1 + }); + Object.defineProperties(CloseEvent$1.prototype, { + [Symbol.toStringTag]: { + value: "CloseEvent", + configurable: true + }, + reason: kEnumerableProperty$1, + code: kEnumerableProperty$1, + wasClean: kEnumerableProperty$1 + }); + Object.defineProperties(ErrorEvent$1.prototype, { + [Symbol.toStringTag]: { + value: "ErrorEvent", + configurable: true + }, + message: kEnumerableProperty$1, + filename: kEnumerableProperty$1, + lineno: kEnumerableProperty$1, + colno: kEnumerableProperty$1, + error: kEnumerableProperty$1 + }); + webidl$1.converters.MessagePort = webidl$1.interfaceConverter(MessagePort); + webidl$1.converters["sequence"] = webidl$1.sequenceConverter(webidl$1.converters.MessagePort); + const eventInit = [ + { + key: "bubbles", + converter: webidl$1.converters.boolean, + defaultValue: false + }, + { + key: "cancelable", + converter: webidl$1.converters.boolean, + defaultValue: false + }, + { + key: "composed", + converter: webidl$1.converters.boolean, + defaultValue: false + } + ]; + webidl$1.converters.MessageEventInit = webidl$1.dictionaryConverter([ + ...eventInit, + { + key: "data", + converter: webidl$1.converters.any, + defaultValue: null + }, + { + key: "origin", + converter: webidl$1.converters.USVString, + defaultValue: "" + }, + { + key: "lastEventId", + converter: webidl$1.converters.DOMString, + defaultValue: "" + }, + { + key: "source", + converter: webidl$1.nullableConverter(webidl$1.converters.MessagePort), + defaultValue: null + }, + { + key: "ports", + converter: webidl$1.converters["sequence"], + get defaultValue() { + return []; + } + } + ]); + webidl$1.converters.CloseEventInit = webidl$1.dictionaryConverter([ + ...eventInit, + { + key: "wasClean", + converter: webidl$1.converters.boolean, + defaultValue: false + }, + { + key: "code", + converter: webidl$1.converters["unsigned short"], + defaultValue: 0 + }, + { + key: "reason", + converter: webidl$1.converters.USVString, + defaultValue: "" + } + ]); + webidl$1.converters.ErrorEventInit = webidl$1.dictionaryConverter([ + ...eventInit, + { + key: "message", + converter: webidl$1.converters.DOMString, + defaultValue: "" + }, + { + key: "filename", + converter: webidl$1.converters.USVString, + defaultValue: "" + }, + { + key: "lineno", + converter: webidl$1.converters["unsigned long"], + defaultValue: 0 + }, + { + key: "colno", + converter: webidl$1.converters["unsigned long"], + defaultValue: 0 + }, + { + key: "error", + converter: webidl$1.converters.any + } + ]); + module.exports = { + MessageEvent: MessageEvent$1, + CloseEvent: CloseEvent$1, + ErrorEvent: ErrorEvent$1 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/util.js +var require_util = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/util.js"(exports, module) { + const { kReadyState: kReadyState$3, kController: kController$1, kResponse: kResponse$2, kBinaryType: kBinaryType$1, kWebSocketURL: kWebSocketURL$1 } = require_symbols(); + const { states: states$3, opcodes: opcodes$2 } = require_constants(); + const { MessageEvent, ErrorEvent } = require_events(); + /** + * @param {import('./websocket').WebSocket} ws + */ + function isEstablished$1(ws) { + return ws[kReadyState$3] === states$3.OPEN; + } + /** + * @param {import('./websocket').WebSocket} ws + */ + function isClosing$1(ws) { + return ws[kReadyState$3] === states$3.CLOSING; + } + /** + * @param {import('./websocket').WebSocket} ws + */ + function isClosed(ws) { + return ws[kReadyState$3] === states$3.CLOSED; + } + /** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {EventInit | undefined} eventInitDict + */ + function fireEvent$2(e, target, eventConstructor = Event, eventInitDict) { + const event = new eventConstructor(e, eventInitDict); + target.dispatchEvent(event); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ + function websocketMessageReceived$1(ws, type, data) { + if (ws[kReadyState$3] !== states$3.OPEN) return; + let dataForEvent; + if (type === opcodes$2.TEXT) try { + dataForEvent = new TextDecoder("utf-8", { fatal: true }).decode(data); + } catch { + failWebsocketConnection$3(ws, "Received invalid UTF-8 in text frame."); + return; + } + else if (type === opcodes$2.BINARY) if (ws[kBinaryType$1] === "blob") dataForEvent = new Blob([data]); + else dataForEvent = new Uint8Array(data).buffer; + fireEvent$2("message", ws, MessageEvent, { + origin: ws[kWebSocketURL$1].origin, + data: dataForEvent + }); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ + function isValidSubprotocol$1(protocol) { + if (protocol.length === 0) return false; + for (const char of protocol) { + const code = char.charCodeAt(0); + if (code < 33 || code > 126 || char === "(" || char === ")" || char === "<" || char === ">" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === "\"" || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}" || code === 32 || code === 9) return false; + } + return true; + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ + function isValidStatusCode$1(code) { + if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; + return code >= 3e3 && code <= 4999; + } + /** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ + function failWebsocketConnection$3(ws, reason) { + const { [kController$1]: controller, [kResponse$2]: response } = ws; + controller.abort(); + if (response?.socket && !response.socket.destroyed) response.socket.destroy(); + if (reason) fireEvent$2("error", ws, ErrorEvent, { error: new Error(reason) }); + } + module.exports = { + isEstablished: isEstablished$1, + isClosing: isClosing$1, + isClosed, + fireEvent: fireEvent$2, + isValidSubprotocol: isValidSubprotocol$1, + isValidStatusCode: isValidStatusCode$1, + failWebsocketConnection: failWebsocketConnection$3, + websocketMessageReceived: websocketMessageReceived$1 + }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/connection.js +var require_connection = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/connection.js"(exports, module) { + const diagnosticsChannel$1 = __require("diagnostics_channel"); + const { uid, states: states$2 } = require_constants(); + const { kReadyState: kReadyState$2, kSentClose: kSentClose$2, kByteParser: kByteParser$1, kReceivedClose: kReceivedClose$1 } = require_symbols(); + const { fireEvent: fireEvent$1, failWebsocketConnection: failWebsocketConnection$2 } = require_util(); + const { CloseEvent } = require_events(); + const { makeRequest } = require_request(); + const { fetching } = require_fetch(); + const { Headers: Headers$1 } = require_headers(); + const { getGlobalDispatcher: getGlobalDispatcher$2 } = require_global(); + const { kHeadersList } = require_symbols$4(); + const channels$1 = {}; + channels$1.open = diagnosticsChannel$1.channel("undici:websocket:open"); + channels$1.close = diagnosticsChannel$1.channel("undici:websocket:close"); + channels$1.socketError = diagnosticsChannel$1.channel("undici:websocket:socket_error"); + /** @type {import('crypto')} */ + let crypto$1; + try { + crypto$1 = __require("crypto"); + } catch {} + /** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any) => void} onEstablish + * @param {Partial} options + */ + function establishWebSocketConnection$1(url, protocols, ws, onEstablish, options) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request$1 = makeRequest({ + urlList: [requestURL], + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error" + }); + if (options.headers) { + const headersList = new Headers$1(options.headers)[kHeadersList]; + request$1.headersList = headersList; + } + const keyValue = crypto$1.randomBytes(16).toString("base64"); + request$1.headersList.append("sec-websocket-key", keyValue); + request$1.headersList.append("sec-websocket-version", "13"); + for (const protocol of protocols) request$1.headersList.append("sec-websocket-protocol", protocol); + const permessageDeflate = ""; + const controller = fetching({ + request: request$1, + useParallelQueue: true, + dispatcher: options.dispatcher ?? getGlobalDispatcher$2(), + processResponse(response) { + if (response.type === "error" || response.status !== 101) { + failWebsocketConnection$2(ws, "Received network error or non-101 status code."); + return; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection$2(ws, "Server did not respond with sent protocols."); + return; + } + if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { + failWebsocketConnection$2(ws, "Server did not set Upgrade header to \"websocket\"."); + return; + } + if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { + failWebsocketConnection$2(ws, "Server did not set Connection header to \"upgrade\"."); + return; + } + const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); + const digest = crypto$1.createHash("sha1").update(keyValue + uid).digest("base64"); + if (secWSAccept !== digest) { + failWebsocketConnection$2(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); + return; + } + const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); + if (secExtension !== null && secExtension !== permessageDeflate) { + failWebsocketConnection$2(ws, "Received different permessage-deflate than the one set."); + return; + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null && secProtocol !== request$1.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection$2(ws, "Protocol was not set in the opening handshake."); + return; + } + response.socket.on("data", onSocketData); + response.socket.on("close", onSocketClose); + response.socket.on("error", onSocketError); + if (channels$1.open.hasSubscribers) channels$1.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }); + onEstablish(response); + } + }); + return controller; + } + /** + * @param {Buffer} chunk + */ + function onSocketData(chunk) { + if (!this.ws[kByteParser$1].write(chunk)) this.pause(); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + function onSocketClose() { + const { ws } = this; + const wasClean = ws[kSentClose$2] && ws[kReceivedClose$1]; + let code = 1005; + let reason = ""; + const result = ws[kByteParser$1].closingInfo; + if (result) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[kSentClose$2]) code = 1006; + ws[kReadyState$2] = states$2.CLOSED; + fireEvent$1("close", ws, CloseEvent, { + wasClean, + code, + reason + }); + if (channels$1.close.hasSubscribers) channels$1.close.publish({ + websocket: ws, + code, + reason + }); + } + function onSocketError(error$1) { + const { ws } = this; + ws[kReadyState$2] = states$2.CLOSING; + if (channels$1.socketError.hasSubscribers) channels$1.socketError.publish(error$1); + this.destroy(); + } + module.exports = { establishWebSocketConnection: establishWebSocketConnection$1 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/frame.js +var require_frame = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/frame.js"(exports, module) { + const { maxUnsigned16Bit } = require_constants(); + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("crypto"); + } catch {} + var WebsocketFrameSend$2 = class { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + this.maskKey = crypto.randomBytes(4); + } + createFrame(opcode) { + const bodyLength$1 = this.frameData?.byteLength ?? 0; + /** @type {number} */ + let payloadLength = bodyLength$1; + let offset = 6; + if (bodyLength$1 > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength$1 > 125) { + offset += 2; + payloadLength = 126; + } + const buffer = Buffer.allocUnsafe(bodyLength$1 + offset); + buffer[0] = buffer[1] = 0; + buffer[0] |= 128; + buffer[0] = (buffer[0] & 240) + opcode; + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = this.maskKey[0]; + buffer[offset - 3] = this.maskKey[1]; + buffer[offset - 2] = this.maskKey[2]; + buffer[offset - 1] = this.maskKey[3]; + buffer[1] = payloadLength; + if (payloadLength === 126) buffer.writeUInt16BE(bodyLength$1, 2); + else if (payloadLength === 127) { + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength$1, 4, 6); + } + buffer[1] |= 128; + for (let i$1 = 0; i$1 < bodyLength$1; i$1++) buffer[offset + i$1] = this.frameData[i$1] ^ this.maskKey[i$1 % 4]; + return buffer; + } + }; + module.exports = { WebsocketFrameSend: WebsocketFrameSend$2 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js +var require_receiver = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js"(exports, module) { + const { Writable } = __require("stream"); + const diagnosticsChannel = __require("diagnostics_channel"); + const { parserStates, opcodes: opcodes$1, states: states$1, emptyBuffer: emptyBuffer$1 } = require_constants(); + const { kReadyState: kReadyState$1, kSentClose: kSentClose$1, kResponse: kResponse$1, kReceivedClose } = require_symbols(); + const { isValidStatusCode, failWebsocketConnection: failWebsocketConnection$1, websocketMessageReceived } = require_util(); + const { WebsocketFrameSend: WebsocketFrameSend$1 } = require_frame(); + const channels = {}; + channels.ping = diagnosticsChannel.channel("undici:websocket:ping"); + channels.pong = diagnosticsChannel.channel("undici:websocket:pong"); + var ByteParser$1 = class extends Writable { + #buffers = []; + #byteOffset = 0; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + constructor(ws) { + super(); + this.ws = ws; + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.run(callback); + } + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run(callback) { + while (true) { + if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.fin = (buffer[0] & 128) !== 0; + this.#info.opcode = buffer[0] & 15; + this.#info.originalOpcode ??= this.#info.opcode; + this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes$1.CONTINUATION; + if (this.#info.fragmented && this.#info.opcode !== opcodes$1.BINARY && this.#info.opcode !== opcodes$1.TEXT) { + failWebsocketConnection$1(this.ws, "Invalid frame type was fragmented."); + return; + } + const payloadLength = buffer[1] & 127; + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; + else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; + if (this.#info.fragmented && payloadLength > 125) { + failWebsocketConnection$1(this.ws, "Fragmented frame exceeded 125 bytes."); + return; + } else if ((this.#info.opcode === opcodes$1.PING || this.#info.opcode === opcodes$1.PONG || this.#info.opcode === opcodes$1.CLOSE) && payloadLength > 125) { + failWebsocketConnection$1(this.ws, "Payload length for control frame exceeded 125 bytes."); + return; + } else if (this.#info.opcode === opcodes$1.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection$1(this.ws, "Received close frame with a 1-byte body."); + return; + } + const body = this.consume(payloadLength); + this.#info.closeInfo = this.parseCloseBody(false, body); + if (!this.ws[kSentClose$1]) { + const body$1 = Buffer.allocUnsafe(2); + body$1.writeUInt16BE(this.#info.closeInfo.code, 0); + const closeFrame = new WebsocketFrameSend$1(body$1); + this.ws[kResponse$1].socket.write(closeFrame.createFrame(opcodes$1.CLOSE), (err) => { + if (!err) this.ws[kSentClose$1] = true; + }); + } + this.ws[kReadyState$1] = states$1.CLOSING; + this.ws[kReceivedClose] = true; + this.end(); + return; + } else if (this.#info.opcode === opcodes$1.PING) { + const body = this.consume(payloadLength); + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend$1(body); + this.ws[kResponse$1].socket.write(frame.createFrame(opcodes$1.PONG)); + if (channels.ping.hasSubscribers) channels.ping.publish({ payload: body }); + } + this.#state = parserStates.INFO; + if (this.#byteOffset > 0) continue; + else { + callback(); + return; + } + } else if (this.#info.opcode === opcodes$1.PONG) { + const body = this.consume(payloadLength); + if (channels.pong.hasSubscribers) channels.pong.publish({ payload: body }); + if (this.#byteOffset > 0) continue; + else { + callback(); + return; + } + } + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) return callback(); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + if (upper > 2 ** 31 - 1) { + failWebsocketConnection$1(this.ws, "Received payload length > 2^31 bytes."); + return; + } + const lower = buffer.readUInt32BE(4); + this.#info.payloadLength = (upper << 8) + lower; + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) return callback(); + else if (this.#byteOffset >= this.#info.payloadLength) { + const body = this.consume(this.#info.payloadLength); + this.#fragments.push(body); + if (!this.#info.fragmented || this.#info.fin && this.#info.opcode === opcodes$1.CONTINUATION) { + const fullMessage = Buffer.concat(this.#fragments); + websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage); + this.#info = {}; + this.#fragments.length = 0; + } + this.#state = parserStates.INFO; + } + } + if (this.#byteOffset > 0) continue; + else { + callback(); + break; + } + } + } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer|null} + */ + consume(n) { + if (n > this.#byteOffset) return null; + else if (n === 0) return emptyBuffer$1; + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length; + return this.#buffers.shift(); + } + const buffer = Buffer.allocUnsafe(n); + let offset = 0; + while (offset !== n) { + const next = this.#buffers[0]; + const { length } = next; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset); + this.#buffers[0] = next.subarray(n - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += next.length; + } + } + this.#byteOffset -= n; + return buffer; + } + parseCloseBody(onlyCode, data) { + /** @type {number|undefined} */ + let code; + if (data.length >= 2) code = data.readUInt16BE(0); + if (onlyCode) { + if (!isValidStatusCode(code)) return null; + return { code }; + } + /** @type {Buffer} */ + let reason = data.subarray(2); + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); + if (code !== void 0 && !isValidStatusCode(code)) return null; + try { + reason = new TextDecoder("utf-8", { fatal: true }).decode(reason); + } catch { + return null; + } + return { + code, + reason + }; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module.exports = { ByteParser: ByteParser$1 }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js +var require_websocket = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js"(exports, module) { + const { webidl } = require_webidl(); + const { DOMException: DOMException$1 } = require_constants$3(); + const { URLSerializer } = require_dataURL(); + const { getGlobalOrigin } = require_global$1(); + const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require_constants(); + const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols(); + const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = require_util(); + const { establishWebSocketConnection } = require_connection(); + const { WebsocketFrameSend } = require_frame(); + const { ByteParser } = require_receiver(); + const { kEnumerableProperty, isBlobLike } = require_util$6(); + const { getGlobalDispatcher: getGlobalDispatcher$1 } = require_global(); + const { types } = __require("util"); + let experimentalWarned = false; + var WebSocket = class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url, protocols = []) { + super(); + webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("WebSockets are experimental, expect them to change at any time.", { code: "UNDICI-WS" }); + } + const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); + url = webidl.converters.USVString(url); + protocols = options.protocols; + const baseURL = getGlobalOrigin(); + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + throw new DOMException$1(e, "SyntaxError"); + } + if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; + else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException$1(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); + if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new DOMException$1("Got fragment", "SyntaxError"); + if (typeof protocols === "string") protocols = [protocols]; + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException$1("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException$1("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + this[kWebSocketURL] = new URL(urlRecord.href); + this[kController] = establishWebSocketConnection(urlRecord, protocols, this, (response) => this.#onConnectionEstablished(response), options); + this[kReadyState] = WebSocket.CONNECTING; + this[kBinaryType] = "blob"; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close(code = void 0, reason = void 0) { + webidl.brandCheck(this, WebSocket); + if (code !== void 0) code = webidl.converters["unsigned short"](code, { clamp: true }); + if (reason !== void 0) reason = webidl.converters.USVString(reason); + if (code !== void 0) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException$1("invalid code", "InvalidAccessError"); + } + let reasonByteLength = 0; + if (reason !== void 0) { + reasonByteLength = Buffer.byteLength(reason); + if (reasonByteLength > 123) throw new DOMException$1(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); + } + if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) {} else if (!isEstablished(this)) { + failWebsocketConnection(this, "Connection was closed before it was established."); + this[kReadyState] = WebSocket.CLOSING; + } else if (!isClosing(this)) { + const frame = new WebsocketFrameSend(); + if (code !== void 0 && reason === void 0) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== void 0 && reason !== void 0) { + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else frame.frameData = emptyBuffer; + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket; + socket.write(frame.createFrame(opcodes.CLOSE), (err) => { + if (!err) this[kSentClose] = true; + }); + this[kReadyState] = states.CLOSING; + } else this[kReadyState] = WebSocket.CLOSING; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, WebSocket); + webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket.send" }); + data = webidl.converters.WebSocketSendData(data); + if (this[kReadyState] === WebSocket.CONNECTING) throw new DOMException$1("Sent before connected.", "InvalidStateError"); + if (!isEstablished(this) || isClosing(this)) return; + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket; + if (typeof data === "string") { + const value = Buffer.from(data); + const frame = new WebsocketFrameSend(value); + const buffer = frame.createFrame(opcodes.TEXT); + this.#bufferedAmount += value.byteLength; + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength; + }); + } else if (types.isArrayBuffer(data)) { + const value = Buffer.from(data); + const frame = new WebsocketFrameSend(value); + const buffer = frame.createFrame(opcodes.BINARY); + this.#bufferedAmount += value.byteLength; + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength; + }); + } else if (ArrayBuffer.isView(data)) { + const ab = Buffer.from(data, data.byteOffset, data.byteLength); + const frame = new WebsocketFrameSend(ab); + const buffer = frame.createFrame(opcodes.BINARY); + this.#bufferedAmount += ab.byteLength; + socket.write(buffer, () => { + this.#bufferedAmount -= ab.byteLength; + }); + } else if (isBlobLike(data)) { + const frame = new WebsocketFrameSend(); + data.arrayBuffer().then((ab) => { + const value = Buffer.from(ab); + frame.frameData = value; + const buffer = frame.createFrame(opcodes.BINARY); + this.#bufferedAmount += value.byteLength; + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength; + }); + }); + } + } + get readyState() { + webidl.brandCheck(this, WebSocket); + return this[kReadyState]; + } + get bufferedAmount() { + webidl.brandCheck(this, WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, WebSocket); + return URLSerializer(this[kWebSocketURL]); + } + get extensions() { + webidl.brandCheck(this, WebSocket); + return this.#extensions; + } + get protocol() { + webidl.brandCheck(this, WebSocket); + return this.#protocol; + } + get onopen() { + webidl.brandCheck(this, WebSocket); + return this.#events.open; + } + set onopen(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onerror() { + webidl.brandCheck(this, WebSocket); + return this.#events.error; + } + set onerror(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + get onclose() { + webidl.brandCheck(this, WebSocket); + return this.#events.close; + } + set onclose(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.close) this.removeEventListener("close", this.#events.close); + if (typeof fn === "function") { + this.#events.close = fn; + this.addEventListener("close", fn); + } else this.#events.close = null; + } + get onmessage() { + webidl.brandCheck(this, WebSocket); + return this.#events.message; + } + set onmessage(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get binaryType() { + webidl.brandCheck(this, WebSocket); + return this[kBinaryType]; + } + set binaryType(type) { + webidl.brandCheck(this, WebSocket); + if (type !== "blob" && type !== "arraybuffer") this[kBinaryType] = "blob"; + else this[kBinaryType] = type; + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response) { + this[kResponse] = response; + const parser = new ByteParser(this); + parser.on("drain", function onParserDrain() { + this.ws[kResponse].socket.resume(); + }); + response.socket.ws = this; + this[kByteParser] = parser; + this[kReadyState] = states.OPEN; + const extensions = response.headersList.get("sec-websocket-extensions"); + if (extensions !== null) this.#extensions = extensions; + const protocol = response.headersList.get("sec-websocket-protocol"); + if (protocol !== null) this.#protocol = protocol; + fireEvent("open", this); + } + }; + WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; + WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; + WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; + WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocket", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors + }); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.DOMString); + webidl.converters["DOMString or sequence"] = function(V) { + if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) return webidl.converters["sequence"](V); + return webidl.converters.DOMString(V); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + get defaultValue() { + return []; + } + }, + { + key: "dispatcher", + converter: (V) => V, + get defaultValue() { + return getGlobalDispatcher$1(); + } + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { + if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) return webidl.converters.WebSocketInit(V); + return { protocols: webidl.converters["DOMString or sequence"](V) }; + }; + webidl.converters.WebSocketSendData = function(V) { + if (webidl.util.Type(V) === "Object") { + if (isBlobLike(V)) return webidl.converters.Blob(V, { strict: false }); + if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) return webidl.converters.BufferSource(V); + } + return webidl.converters.USVString(V); + }; + module.exports = { WebSocket }; +} }); + +//#endregion +//#region node_modules/.deno/undici@5.29.0/node_modules/undici/index.js +var require_undici = __commonJS({ "node_modules/.deno/undici@5.29.0/node_modules/undici/index.js"(exports, module) { + const Client = require_client(); + const Dispatcher = require_dispatcher(); + const errors = require_errors(); + const Pool = require_pool(); + const BalancedPool = require_balanced_pool(); + const Agent = require_agent(); + const util = require_util$6(); + const { InvalidArgumentError } = errors; + const api = require_api(); + const buildConnector = require_connect(); + const MockClient = require_mock_client(); + const MockAgent = require_mock_agent(); + const MockPool = require_mock_pool(); + const mockErrors = require_mock_errors(); + const ProxyAgent = require_proxy_agent(); + const RetryHandler = require_RetryHandler(); + const { getGlobalDispatcher, setGlobalDispatcher } = require_global(); + const DecoratorHandler = require_DecoratorHandler(); + const RedirectHandler = require_RedirectHandler(); + const createRedirectInterceptor = require_redirectInterceptor(); + let hasCrypto; + try { + __require("crypto"); + hasCrypto = true; + } catch { + hasCrypto = false; + } + Object.assign(Dispatcher.prototype, api); + module.exports.Dispatcher = Dispatcher; + module.exports.Client = Client; + module.exports.Pool = Pool; + module.exports.BalancedPool = BalancedPool; + module.exports.Agent = Agent; + module.exports.ProxyAgent = ProxyAgent; + module.exports.RetryHandler = RetryHandler; + module.exports.DecoratorHandler = DecoratorHandler; + module.exports.RedirectHandler = RedirectHandler; + module.exports.createRedirectInterceptor = createRedirectInterceptor; + module.exports.buildConnector = buildConnector; + module.exports.errors = errors; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); + if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (opts && opts.path != null) { + if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); + let path$5 = opts.path; + if (!opts.path.startsWith("/")) path$5 = `/${path$5}`; + url = new URL(util.parseOrigin(url).origin + path$5); + } else { + if (!opts) opts = typeof url === "object" ? url : {}; + url = util.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; + } + module.exports.setGlobalDispatcher = setGlobalDispatcher; + module.exports.getGlobalDispatcher = getGlobalDispatcher; + if (util.nodeMajor > 16 || util.nodeMajor === 16 && util.nodeMinor >= 8) { + let fetchImpl = null; + module.exports.fetch = async function fetch$1(resource) { + if (!fetchImpl) fetchImpl = require_fetch().fetch; + try { + return await fetchImpl(...arguments); + } catch (err) { + if (typeof err === "object") Error.captureStackTrace(err, this); + throw err; + } + }; + module.exports.Headers = require_headers().Headers; + module.exports.Response = require_response().Response; + module.exports.Request = require_request().Request; + module.exports.FormData = require_formdata().FormData; + module.exports.File = require_file().File; + module.exports.FileReader = require_filereader().FileReader; + const { setGlobalOrigin: setGlobalOrigin$1, getGlobalOrigin: getGlobalOrigin$5 } = require_global$1(); + module.exports.setGlobalOrigin = setGlobalOrigin$1; + module.exports.getGlobalOrigin = getGlobalOrigin$5; + const { CacheStorage: CacheStorage$1 } = require_cachestorage(); + const { kConstruct: kConstruct$5 } = require_symbols$1(); + module.exports.caches = new CacheStorage$1(kConstruct$5); + } + if (util.nodeMajor >= 16) { + const { deleteCookie: deleteCookie$1, getCookies: getCookies$1, getSetCookies: getSetCookies$1, setCookie: setCookie$1 } = require_cookies(); + module.exports.deleteCookie = deleteCookie$1; + module.exports.getCookies = getCookies$1; + module.exports.getSetCookies = getSetCookies$1; + module.exports.setCookie = setCookie$1; + const { parseMIMEType: parseMIMEType$4, serializeAMimeType: serializeAMimeType$5 } = require_dataURL(); + module.exports.parseMIMEType = parseMIMEType$4; + module.exports.serializeAMimeType = serializeAMimeType$5; + } + if (util.nodeMajor >= 18 && hasCrypto) { + const { WebSocket: WebSocket$1 } = require_websocket(); + module.exports.WebSocket = WebSocket$1; + } + module.exports.request = makeDispatcher(api.request); + module.exports.stream = makeDispatcher(api.stream); + module.exports.pipeline = makeDispatcher(api.pipeline); + module.exports.connect = makeDispatcher(api.connect); + module.exports.upgrade = makeDispatcher(api.upgrade); + module.exports.MockClient = MockClient; + module.exports.MockPool = MockPool; + module.exports.MockAgent = MockAgent; + module.exports.mockErrors = mockErrors; +} }); + +//#endregion +//#region node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js +var require_lib = __commonJS({ "node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js"(exports) { + var __createBinding$7 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault$7 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$7 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$7(result, mod, k); + } + __setModuleDefault$7(result, mod); + return result; + }; + var __awaiter$9 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; + const http = __importStar$7(__require("http")); + const https = __importStar$7(__require("https")); + const pm = __importStar$7(require_proxy()); + const tunnel = __importStar$7(require_tunnel()); + const undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes$1) { + HttpCodes$1[HttpCodes$1["OK"] = 200] = "OK"; + HttpCodes$1[HttpCodes$1["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes$1[HttpCodes$1["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes$1[HttpCodes$1["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes$1[HttpCodes$1["SeeOther"] = 303] = "SeeOther"; + HttpCodes$1[HttpCodes$1["NotModified"] = 304] = "NotModified"; + HttpCodes$1[HttpCodes$1["UseProxy"] = 305] = "UseProxy"; + HttpCodes$1[HttpCodes$1["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes$1[HttpCodes$1["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes$1[HttpCodes$1["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes$1[HttpCodes$1["BadRequest"] = 400] = "BadRequest"; + HttpCodes$1[HttpCodes$1["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes$1[HttpCodes$1["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes$1[HttpCodes$1["Forbidden"] = 403] = "Forbidden"; + HttpCodes$1[HttpCodes$1["NotFound"] = 404] = "NotFound"; + HttpCodes$1[HttpCodes$1["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes$1[HttpCodes$1["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes$1[HttpCodes$1["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes$1[HttpCodes$1["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes$1[HttpCodes$1["Conflict"] = 409] = "Conflict"; + HttpCodes$1[HttpCodes$1["Gone"] = 410] = "Gone"; + HttpCodes$1[HttpCodes$1["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes$1[HttpCodes$1["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes$1[HttpCodes$1["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes$1[HttpCodes$1["BadGateway"] = 502] = "BadGateway"; + HttpCodes$1[HttpCodes$1["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes$1[HttpCodes$1["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers$7) { + Headers$7["Accept"] = "accept"; + Headers$7["ContentType"] = "content-type"; + })(Headers || (exports.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes$1) { + MediaTypes$1["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports.MediaTypes = MediaTypes = {})); + /** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports.getProxyUrl = getProxyUrl; + const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + const RetryableHttpVerbs = [ + "OPTIONS", + "GET", + "DELETE", + "HEAD" + ]; + const ExponentialBackoffCeiling = 10; + const ExponentialBackoffTimeSlice = 5; + var HttpClientError = class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } + }; + exports.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter$9(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter$9(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter$9(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter$9(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports.isHttps = isHttps; + var HttpClient = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) this._ignoreSslError = requestOptions.ignoreSslError; + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) this._allowRedirects = requestOptions.allowRedirects; + if (requestOptions.allowRedirectDowngrade != null) this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + if (requestOptions.maxRedirects != null) this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + if (requestOptions.keepAlive != null) this._keepAlive = requestOptions.keepAlive; + if (requestOptions.allowRetries != null) this._allowRetries = requestOptions.allowRetries; + if (requestOptions.maxRetries != null) this._maxRetries = requestOptions.maxRetries; + } + } + options(requestUrl, additionalHeaders) { + return __awaiter$9(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter$9(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter$9(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter$9(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter$9(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter$9(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter$9(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream$2, additionalHeaders) { + return __awaiter$9(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream$2, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter$9(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter$9(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter$9(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter$9(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter$9(this, void 0, void 0, function* () { + if (this._disposed) throw new Error("Client has already been disposed."); + const parsedUrl = new URL(requestUrl); + let info$1 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info$1, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + if (authenticationHandler) return authenticationHandler.handleAuthentication(this, info$1, data); + else return response; + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) break; + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) if (header.toLowerCase() === "authorization") delete headers[header]; + } + info$1 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info$1, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) return response; + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) this._agent.destroy(); + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info$1, data) { + return __awaiter$9(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) reject(err); + else if (!res) reject(new Error("Unknown error")); + else resolve(res); + } + this.requestRawWithCallback(info$1, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info$1, data, onResult) { + if (typeof data === "string") { + if (!info$1.options.headers) info$1.options.headers = {}; + info$1.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info$1.httpModule.request(info$1.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) socket.end(); + handleResult(new Error(`Request timeout: ${info$1.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") req.write(data, "utf8"); + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else req.end(); + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) return; + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info$1 = {}; + info$1.parsedUrl = requestUrl; + const usingSsl = info$1.parsedUrl.protocol === "https:"; + info$1.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info$1.options = {}; + info$1.options.host = info$1.parsedUrl.hostname; + info$1.options.port = info$1.parsedUrl.port ? parseInt(info$1.parsedUrl.port) : defaultPort; + info$1.options.path = (info$1.parsedUrl.pathname || "") + (info$1.parsedUrl.search || ""); + info$1.options.method = method; + info$1.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) info$1.options.headers["user-agent"] = this.userAgent; + info$1.options.agent = this._getAgent(info$1.parsedUrl); + if (this.handlers) for (const handler of this.handlers) handler.prepareRequest(info$1.options); + return info$1; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) agent = this._proxyAgent; + if (!useProxy) agent = this._agent; + if (agent) return agent; + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }), { + host: proxyUrl.hostname, + port: proxyUrl.port + }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + else tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { + keepAlive: this._keepAlive, + maxSockets + }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) proxyAgent = this._proxyAgentDispatcher; + if (proxyAgent) return proxyAgent; + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ + uri: proxyUrl.href, + pipelining: !this._keepAlive ? 0 : 1 + }, (proxyUrl.username || proxyUrl.password) && { token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { rejectUnauthorized: false }); + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter$9(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve) => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter$9(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter$9(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) resolve(response); + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) return a; + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) obj = JSON.parse(contents, dateTimeDeserializer); + else obj = JSON.parse(contents); + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) {} + if (statusCode > 299) { + let msg; + if (obj && obj.message) msg = obj.message; + else if (contents && contents.length > 0) msg = contents; + else msg = `Failed request: (${statusCode})`; + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else resolve(response); + })); + }); + } + }; + exports.HttpClient = HttpClient; + const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); +} }); + +//#endregion +//#region node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js +var require_auth = __commonJS({ "node_modules/.deno/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js"(exports) { + var __awaiter$8 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) throw Error("The request has no headers"); + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter$8(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + prepareRequest(options) { + if (!options.headers) throw Error("The request has no headers"); + options.headers["Authorization"] = `Bearer ${this.token}`; + } + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter$8(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + prepareRequest(options) { + if (!options.headers) throw Error("The request has no headers"); + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter$8(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +} }); + +//#endregion +//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js"(exports) { + var __awaiter$7 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.OidcClient = void 0; + const http_client_1 = require_lib(); + const auth_1 = require_auth(); + const core_1 = require_core(); + var OidcClient = class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + return runtimeUrl; + } + static getCall(id_token_url) { + var _a$1; + return __awaiter$7(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error$1) => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error$1.statusCode}\n + Error Message: ${error$1.message}`); + }); + const id_token = (_a$1 = res.result) === null || _a$1 === void 0 ? void 0 : _a$1.value; + if (!id_token) throw new Error("Response json body do not have ID Token field"); + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter$7(this, void 0, void 0, function* () { + try { + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error$1) { + throw new Error(`Error message: ${error$1.message}`); + } + }); + } + }; + exports.OidcClient = OidcClient; +} }); + +//#endregion +//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js +var require_summary = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js"(exports) { + var __awaiter$6 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; + const os_1$1 = __require("os"); + const fs_1 = __require("fs"); + const { access, appendFile, writeFile } = fs_1.promises; + exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter$6(this, void 0, void 0, function* () { + if (this._filePath) return this._filePath; + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a$1) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) return `<${tag}${htmlAttrs}>`; + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter$6(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter$6(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1$1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") return this.wrap("td", cell); + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src$1, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ + src: src$1, + alt + }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + const _summary = new Summary(); + /** + * @deprecated use `core.summary` + */ + exports.markdownSummary = _summary; + exports.summary = _summary; +} }); + +//#endregion +//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js +var require_path_utils = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js"(exports) { + var __createBinding$6 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault$6 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$6 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$6(result, mod, k); + } + __setModuleDefault$6(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; + const path$4 = __importStar$6(__require("path")); + /** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports.toPosixPath = toPosixPath; + /** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports.toWin32Path = toWin32Path; + /** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path$4.sep); + } + exports.toPlatformPath = toPlatformPath; +} }); + +//#endregion +//#region node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js +var require_io_util = __commonJS({ "node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js"(exports) { + var __createBinding$5 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m[k]; + } + }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault$5 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$5 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$5(result, mod, k); + } + __setModuleDefault$5(result, mod); + return result; + }; + var __awaiter$5 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; + const fs = __importStar$5(__require("fs")); + const path$3 = __importStar$5(__require("path")); + _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; + exports.IS_WINDOWS = process.platform === "win32"; + exports.UV_FS_O_EXLOCK = 268435456; + exports.READONLY = fs.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter$5(this, void 0, void 0, function* () { + try { + yield exports.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") return false; + throw err; + } + return true; + }); + } + exports.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter$5(this, void 0, void 0, function* () { + const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports.isDirectory = isDirectory; + /** + * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: + * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). + */ + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) throw new Error("isRooted() parameter \"p\" cannot be empty"); + if (exports.IS_WINDOWS) return p.startsWith("\\") || /^[A-Z]:/i.test(p); + return p.startsWith("/"); + } + exports.isRooted = isRooted; + /** + * Best effort attempt to determine whether a file exists and is executable. + * @param filePath file path to check + * @param extensions additional file extensions to try + * @return if file exists and is executable, returns the file path. otherwise empty string. + */ + function tryGetExecutablePath(filePath, extensions) { + return __awaiter$5(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + const upperExt = path$3.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + try { + const directory = path$3.dirname(filePath); + const upperName = path$3.basename(filePath).toUpperCase(); + for (const actualName of yield exports.readdir(directory)) if (upperName === actualName.toUpperCase()) { + filePath = path$3.join(directory, actualName); + break; + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + } + return ""; + }); + } + exports.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a$1; + return (_a$1 = process.env["COMSPEC"]) !== null && _a$1 !== void 0 ? _a$1 : `cmd.exe`; + } + exports.getCmdPath = getCmdPath; +} }); + +//#endregion +//#region node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js +var require_io = __commonJS({ "node_modules/.deno/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js"(exports) { + var __createBinding$4 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m[k]; + } + }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault$4 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$4 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$4(result, mod, k); + } + __setModuleDefault$4(result, mod); + return result; + }; + var __awaiter$4 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; + const assert_1 = __require("assert"); + const path$2 = __importStar$4(__require("path")); + const ioUtil$1 = __importStar$4(require_io_util()); + /** + * Copies a file or folder. + * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js + * + * @param source source path + * @param dest destination path + * @param options optional. See CopyOptions. + */ + function cp(source, dest, options = {}) { + return __awaiter$4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil$1.exists(dest)) ? yield ioUtil$1.stat(dest) : null; + if (destStat && destStat.isFile() && !force) return; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path$2.join(dest, path$2.basename(source)) : dest; + if (!(yield ioUtil$1.exists(source))) throw new Error(`no such file or directory: ${source}`); + const sourceStat = yield ioUtil$1.stat(source); + if (sourceStat.isDirectory()) if (!recursive) throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + else yield cpDirRecursive(source, newDest, 0, force); + else { + if (path$2.relative(source, newDest) === "") throw new Error(`'${newDest}' and '${source}' are the same file`); + yield copyFile(source, newDest, force); + } + }); + } + exports.cp = cp; + /** + * Moves a path. + * + * @param source source path + * @param dest destination path + * @param options optional. See MoveOptions. + */ + function mv(source, dest, options = {}) { + return __awaiter$4(this, void 0, void 0, function* () { + if (yield ioUtil$1.exists(dest)) { + let destExists = true; + if (yield ioUtil$1.isDirectory(dest)) { + dest = path$2.join(dest, path$2.basename(source)); + destExists = yield ioUtil$1.exists(dest); + } + if (destExists) if (options.force == null || options.force) yield rmRF(dest); + else throw new Error("Destination already exists"); + } + yield mkdirP(path$2.dirname(dest)); + yield ioUtil$1.rename(source, dest); + }); + } + exports.mv = mv; + /** + * Remove a path recursively with force + * + * @param inputPath path to remove + */ + function rmRF(inputPath) { + return __awaiter$4(this, void 0, void 0, function* () { + if (ioUtil$1.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) throw new Error("File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows"); + } + try { + yield ioUtil$1.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports.rmRF = rmRF; + /** + * Make a directory. Creates the full path with folders in between + * Will throw if it fails + * + * @param fsPath path to create + * @returns Promise + */ + function mkdirP(fsPath) { + return __awaiter$4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil$1.mkdir(fsPath, { recursive: true }); + }); + } + exports.mkdirP = mkdirP; + /** + * Returns path of a tool had the tool actually been invoked. Resolves via paths. + * If you check and the tool does not exist, it will throw. + * + * @param tool name of the tool + * @param check whether to check if tool exists + * @returns Promise path to tool + */ + function which(tool, check) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + if (check) { + const result = yield which(tool, false); + if (!result) if (ioUtil$1.IS_WINDOWS) throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + else throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) return matches[0]; + return ""; + }); + } + exports.which = which; + /** + * Returns a list of all occurrences of the given tool on the system path. + * + * @returns Promise the paths of the tool + */ + function findInPath(tool) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + const extensions = []; + if (ioUtil$1.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path$2.delimiter)) if (extension) extensions.push(extension); + } + if (ioUtil$1.isRooted(tool)) { + const filePath = yield ioUtil$1.tryGetExecutablePath(tool, extensions); + if (filePath) return [filePath]; + return []; + } + if (tool.includes(path$2.sep)) return []; + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path$2.delimiter)) if (p) directories.push(p); + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil$1.tryGetExecutablePath(path$2.join(directory, tool), extensions); + if (filePath) matches.push(filePath); + } + return matches; + }); + } + exports.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { + force, + recursive, + copySourceDirectory + }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter$4(this, void 0, void 0, function* () { + if (currentDepth >= 255) return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil$1.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil$1.lstat(srcFile); + if (srcFileStat.isDirectory()) yield cpDirRecursive(srcFile, destFile, currentDepth, force); + else yield copyFile(srcFile, destFile, force); + } + yield ioUtil$1.chmod(destDir, (yield ioUtil$1.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter$4(this, void 0, void 0, function* () { + if ((yield ioUtil$1.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil$1.lstat(destFile); + yield ioUtil$1.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil$1.chmod(destFile, "0666"); + yield ioUtil$1.unlink(destFile); + } + } + const symlinkFull = yield ioUtil$1.readlink(srcFile); + yield ioUtil$1.symlink(symlinkFull, destFile, ioUtil$1.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil$1.exists(destFile)) || force) yield ioUtil$1.copyFile(srcFile, destFile); + }); + } +} }); + +//#endregion +//#region node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner = __commonJS({ "node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js"(exports) { + var __createBinding$3 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m[k]; + } + }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$3 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$3(result, mod, k); + } + __setModuleDefault$3(result, mod); + return result; + }; + var __awaiter$3 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.argStringToArray = exports.ToolRunner = void 0; + const os$1 = __importStar$3(__require("os")); + const events = __importStar$3(__require("events")); + const child = __importStar$3(__require("child_process")); + const path$1 = __importStar$3(__require("path")); + const io = __importStar$3(require_io()); + const ioUtil = __importStar$3(require_io_util()); + const timers_1 = __require("timers"); + const IS_WINDOWS = process.platform === "win32"; + var ToolRunner = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) throw new Error("Parameter 'toolPath' cannot be null or empty."); + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) this.options.listeners.debug(message); + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) cmd += ` ${a}`; + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) cmd += ` ${a}`; + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + else { + cmd += toolPath; + for (const a of args) cmd += ` ${a}`; + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os$1.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os$1.EOL.length); + n = s.indexOf(os$1.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) return process.env["COMSPEC"] || "cmd.exe"; + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += "\""; + return [argline]; + } + } + return this.args; + } + _endsWith(str, end) { + return str.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) return this._uvQuoteCmdArg(arg); + if (!arg) return "\"\""; + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + "\"" + ]; + let needsQuotes = false; + for (const char of arg) if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + if (!needsQuotes) return arg; + let reverse = "\""; + let quoteHit = true; + for (let i$1 = arg.length; i$1 > 0; i$1--) { + reverse += arg[i$1 - 1]; + if (quoteHit && arg[i$1 - 1] === "\\") reverse += "\\"; + else if (arg[i$1 - 1] === "\"") { + quoteHit = true; + reverse += "\""; + } else quoteHit = false; + } + reverse += "\""; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) return "\"\""; + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes("\"")) return arg; + if (!arg.includes("\"") && !arg.includes("\\")) return `"${arg}"`; + let reverse = "\""; + let quoteHit = true; + for (let i$1 = arg.length; i$1 > 0; i$1--) { + reverse += arg[i$1 - 1]; + if (quoteHit && arg[i$1 - 1] === "\\") reverse += "\\"; + else if (arg[i$1 - 1] === "\"") { + quoteHit = true; + reverse += "\\"; + } else quoteHit = false; + } + reverse += "\""; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) result.argv0 = `"${toolPath}"`; + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter$3(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) this.toolPath = path$1.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = yield io.which(this.toolPath, true); + return new Promise((resolve, reject) => __awaiter$3(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) this._debug(` ${arg}`); + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os$1.EOL); + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + const fileName = this._getSpawnFileName(); + const cp$1 = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp$1.stdout) cp$1.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) this.options.listeners.stdout(data); + if (!optionsNonNull.silent && optionsNonNull.outStream) optionsNonNull.outStream.write(data); + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) this.options.listeners.stdline(line); + }); + }); + let errbuffer = ""; + if (cp$1.stderr) cp$1.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) this.options.listeners.stderr(data); + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) this.options.listeners.errline(line); + }); + }); + cp$1.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp$1.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp$1.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error$1, exitCode) => { + if (stdbuffer.length > 0) this.emit("stdline", stdbuffer); + if (errbuffer.length > 0) this.emit("errline", errbuffer); + cp$1.removeAllListeners(); + if (error$1) reject(error$1); + else resolve(exitCode); + }); + if (this.options.input) { + if (!cp$1.stdin) throw new Error("child process missing stdin"); + cp$1.stdin.end(this.options.input); + } + })); + }); + } + }; + exports.ToolRunner = ToolRunner; + /** + * Convert an arg string to an array of args. Handles escaping + * + * @param argString string of arguments + * @returns string[] array of arguments + */ + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== "\"") arg += "\\"; + arg += c; + escaped = false; + } + for (let i$1 = 0; i$1 < argString.length; i$1++) { + const c = argString.charAt(i$1); + if (c === "\"") { + if (!escaped) inQuotes = !inQuotes; + else append(c); + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) args.push(arg.trim()); + return args; + } + exports.argStringToArray = argStringToArray; + var ExecState = class ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) throw new Error("toolPath must not be empty"); + this.options = options; + this.toolPath = toolPath; + if (options.delay) this.delay = options.delay; + } + CheckComplete() { + if (this.done) return; + if (this.processClosed) this._setResult(); + else if (this.processExited) this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error$1; + if (this.processExited) { + if (this.processError) error$1 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) error$1 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + else if (this.processStderr && this.options.failOnStdErr) error$1 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error$1, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) return; + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; +} }); + +//#endregion +//#region node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js +var require_exec = __commonJS({ "node_modules/.deno/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js"(exports) { + var __createBinding$2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { + enumerable: true, + get: function() { + return m[k]; + } + }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$2 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding$2(result, mod, k); + } + __setModuleDefault$2(result, mod); + return result; + }; + var __awaiter$2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getExecOutput = exports.exec = void 0; + const string_decoder_1 = __require("string_decoder"); + const tr = __importStar$2(require_toolrunner()); + /** + * Exec a command. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code + */ + function exec$1(commandLine, args, options) { + return __awaiter$2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports.exec = exec$1; + /** + * Exec a command and get the output. + * Output will be streamed to the live console. + * Returns promise with the exit code and collected stdout and stderr + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code, stdout, and stderr + */ + function getExecOutput(commandLine, args, options) { + var _a$1, _b; + return __awaiter$2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a$1 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a$1 === void 0 ? void 0 : _a$1.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) originalStdErrListener(data); + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) originalStdoutListener(data); + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { + stdout: stdOutListener, + stderr: stdErrListener + }); + const exitCode = yield exec$1(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports.getExecOutput = getExecOutput; +} }); + +//#endregion +//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js +var require_platform = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js"(exports) { + var __createBinding$1 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar$1 = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$1(result, mod, k); + } + __setModuleDefault$1(result, mod); + return result; + }; + var __awaiter$1 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; + const os_1 = __importDefault(__require("os")); + const exec = __importStar$1(require_exec()); + const getWindowsInfo = () => __awaiter$1(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"", void 0, { silent: true }); + const { stdout: name } = yield exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"", void 0, { silent: true }); + return { + name: name.trim(), + version: version.trim() + }; + }); + const getMacOsInfo = () => __awaiter$1(void 0, void 0, void 0, function* () { + var _a$1, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true }); + const version = (_b = (_a$1 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a$1 === void 0 ? void 0 : _a$1[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + const getLinuxInfo = () => __awaiter$1(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", [ + "-i", + "-r", + "-s" + ], { silent: true }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports.platform = os_1.default.platform(); + exports.arch = os_1.default.arch(); + exports.isWindows = exports.platform === "win32"; + exports.isMacOS = exports.platform === "darwin"; + exports.isLinux = exports.platform === "linux"; + function getDetails() { + return __awaiter$1(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports.isWindows ? getWindowsInfo() : exports.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports.platform, + arch: exports.arch, + isWindows: exports.isWindows, + isMacOS: exports.isMacOS, + isLinux: exports.isLinux + }); + }); + } + exports.getDetails = getDetails; +} }); + +//#endregion +//#region node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js +var require_core = __commonJS({ "node_modules/.deno/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js"(exports) { + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; + const command_1 = require_command(); + const file_command_1 = require_file_command(); + const utils_1 = require_utils$1(); + const os = __importStar(__require("os")); + const path = __importStar(__require("path")); + const oidc_utils_1 = require_oidc_utils(); + /** + * The code to exit an action + */ + var ExitCode; + (function(ExitCode$1) { + /** + * A code indicating that the action was successful + */ + ExitCode$1[ExitCode$1["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode$1[ExitCode$1["Failure"] = 1] = "Failure"; + })(ExitCode || (exports.ExitCode = ExitCode = {})); + /** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ + function exportVariable(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports.exportVariable = exportVariable; + /** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports.setSecret = setSecret; + /** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) (0, file_command_1.issueFileCommand)("PATH", inputPath); + else (0, command_1.issueCommand)("add-path", {}, inputPath); + process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; + } + exports.addPath = addPath; + /** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ + function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) throw new Error(`Input required and not supplied: ${name}`); + if (options && options.trimWhitespace === false) return val; + return val.trim(); + } + exports.getInput = getInput; + /** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ + function getMultilineInput(name, options) { + const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) return inputs; + return inputs.map((input) => input.trim()); + } + exports.getMultilineInput = getMultilineInput; + /** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ + function getBooleanInput(name, options) { + const trueValue = [ + "true", + "True", + "TRUE" + ]; + const falseValue = [ + "false", + "False", + "FALSE" + ]; + const val = getInput(name, options); + if (trueValue.includes(val)) return true; + if (falseValue.includes(val)) return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports.getBooleanInput = getBooleanInput; + /** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports.setOutput = setOutput; + /** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports.setCommandEcho = setCommandEcho; + /** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ + function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); + } + exports.setFailed = setFailed; + /** + * Gets whether Actions Step Debug is on or not + */ + function isDebug() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports.isDebug = isDebug; + /** + * Writes debug message to user log + * @param message debug message + */ + function debug$1(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports.debug = debug$1; + /** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ + function error(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports.error = error; + /** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ + function warning(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports.warning = warning; + /** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports.notice = notice; + /** + * Writes info to log with console.log. + * @param message info message + */ + function info(message) { + process.stdout.write(message + os.EOL); + } + exports.info = info; + /** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ + function startGroup(name) { + (0, command_1.issue)("group", name); + } + exports.startGroup = startGroup; + /** + * End an output group. + */ + function endGroup() { + (0, command_1.issue)("endgroup"); + } + exports.endGroup = endGroup; + /** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ + function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } finally { + endGroup(); + } + return result; + }); + } + exports.group = group; + /** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ + function saveState(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports.saveState = saveState; + /** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ + function getState(name) { + return process.env[`STATE_${name}`] || ""; + } + exports.getState = getState; + function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports.getIDToken = getIDToken; + /** + * Summary exports + */ + var summary_1 = require_summary(); + Object.defineProperty(exports, "summary", { + enumerable: true, + get: function() { + return summary_1.summary; + } + }); + /** + * @deprecated use core.summary + */ + var summary_2 = require_summary(); + Object.defineProperty(exports, "markdownSummary", { + enumerable: true, + get: function() { + return summary_2.markdownSummary; + } + }); + /** + * Path exports + */ + var path_utils_1 = require_path_utils(); + Object.defineProperty(exports, "toPosixPath", { + enumerable: true, + get: function() { + return path_utils_1.toPosixPath; + } + }); + Object.defineProperty(exports, "toWin32Path", { + enumerable: true, + get: function() { + return path_utils_1.toWin32Path; + } + }); + Object.defineProperty(exports, "toPlatformPath", { + enumerable: true, + get: function() { + return path_utils_1.toPlatformPath; + } + }); + /** + * Platform utilities exports + */ + exports.platform = __importStar(require_platform()); +} }); +var import_core = __toESM(require_core()); + +//#endregion +//#region node_modules/.deno/semver@6.3.1/node_modules/semver/semver.js +var require_semver = __commonJS({ "node_modules/.deno/semver@6.3.1/node_modules/semver/semver.js"(exports, module) { + exports = module.exports = SemVer; + var debug; + /* istanbul ignore next */ + if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) debug = function() { + var args = Array.prototype.slice.call(arguments, 0); + args.unshift("SEMVER"); + console.log.apply(console, args); + }; + else debug = function() {}; + exports.SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var re = exports.re = []; + var safeRe = exports.safeRe = []; + var src = exports.src = []; + var t = exports.tokens = {}; + var R = 0; + function tok(n) { + t[n] = R++; + } + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + function makeSafeRe(value) { + for (var i$1 = 0; i$1 < safeRegexReplacements.length; i$1++) { + var token = safeRegexReplacements[i$1][0]; + var max = safeRegexReplacements[i$1][1]; + value = value.split(token + "*").join(token + "{0," + max + "}").split(token + "+").join(token + "{1," + max + "}"); + } + return value; + } + tok("NUMERICIDENTIFIER"); + src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; + tok("NUMERICIDENTIFIERLOOSE"); + src[t.NUMERICIDENTIFIERLOOSE] = "\\d+"; + tok("NONNUMERICIDENTIFIER"); + src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-]" + LETTERDASHNUMBER + "*"; + tok("MAINVERSION"); + src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; + tok("MAINVERSIONLOOSE"); + src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; + tok("PRERELEASEIDENTIFIER"); + src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASEIDENTIFIERLOOSE"); + src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASE"); + src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; + tok("PRERELEASELOOSE"); + src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; + tok("BUILDIDENTIFIER"); + src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + "+"; + tok("BUILD"); + src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; + tok("FULL"); + tok("FULLPLAIN"); + src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; + src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; + tok("LOOSEPLAIN"); + src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; + tok("LOOSE"); + src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; + tok("GTLT"); + src[t.GTLT] = "((?:<|>)?=?)"; + tok("XRANGEIDENTIFIERLOOSE"); + src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; + tok("XRANGEIDENTIFIER"); + src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; + tok("XRANGEPLAIN"); + src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGEPLAINLOOSE"); + src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGE"); + src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; + tok("XRANGELOOSE"); + src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COERCE"); + src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; + tok("COERCERTL"); + re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); + safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), "g"); + tok("LONETILDE"); + src[t.LONETILDE] = "(?:~>?)"; + tok("TILDETRIM"); + src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; + re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); + safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), "g"); + var tildeTrimReplace = "$1~"; + tok("TILDE"); + src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; + tok("TILDELOOSE"); + src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("LONECARET"); + src[t.LONECARET] = "(?:\\^)"; + tok("CARETTRIM"); + src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; + re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); + safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), "g"); + var caretTrimReplace = "$1^"; + tok("CARET"); + src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; + tok("CARETLOOSE"); + src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COMPARATORLOOSE"); + src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; + tok("COMPARATOR"); + src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; + tok("COMPARATORTRIM"); + src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; + re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); + safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), "g"); + var comparatorTrimReplace = "$1$2$3"; + tok("HYPHENRANGE"); + src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; + tok("HYPHENRANGELOOSE"); + src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; + tok("STAR"); + src[t.STAR] = "(<|>)?=?\\s*\\*"; + for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) { + re[i] = new RegExp(src[i]); + safeRe[i] = new RegExp(makeSafeRe(src[i])); + } + } + exports.parse = parse; + function parse(version, options) { + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + if (version instanceof SemVer) return version; + if (typeof version !== "string") return null; + if (version.length > MAX_LENGTH) return null; + var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; + if (!r.test(version)) return null; + try { + return new SemVer(version, options); + } catch (er) { + return null; + } + } + exports.valid = valid; + function valid(version, options) { + var v = parse(version, options); + return v ? v.version : null; + } + exports.clean = clean; + function clean(version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + } + exports.SemVer = SemVer; + function SemVer(version, options) { + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + if (version instanceof SemVer) if (version.loose === options.loose) return version; + else version = version.version; + else if (typeof version !== "string") throw new TypeError("Invalid Version: " + version); + if (version.length > MAX_LENGTH) throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); + if (!(this instanceof SemVer)) return new SemVer(version, options); + debug("SemVer", version, options); + this.options = options; + this.loose = !!options.loose; + var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); + if (!m) throw new TypeError("Invalid Version: " + version); + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version"); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version"); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version"); + if (!m[4]) this.prerelease = []; + else this.prerelease = m[4].split(".").map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + return id; + }); + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + SemVer.prototype.format = function() { + this.version = this.major + "." + this.minor + "." + this.patch; + if (this.prerelease.length) this.version += "-" + this.prerelease.join("."); + return this.version; + }; + SemVer.prototype.toString = function() { + return this.version; + }; + SemVer.prototype.compare = function(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return this.compareMain(other) || this.comparePre(other); + }; + SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + if (this.prerelease.length && !other.prerelease.length) return -1; + else if (!this.prerelease.length && other.prerelease.length) return 1; + else if (!this.prerelease.length && !other.prerelease.length) return 0; + var i$1 = 0; + do { + var a = this.prerelease[i$1]; + var b = other.prerelease[i$1]; + debug("prerelease compare", i$1, a, b); + if (a === void 0 && b === void 0) return 0; + else if (b === void 0) return 1; + else if (a === void 0) return -1; + else if (a === b) continue; + else return compareIdentifiers(a, b); + } while (++i$1); + }; + SemVer.prototype.compareBuild = function(other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + var i$1 = 0; + do { + var a = this.build[i$1]; + var b = other.build[i$1]; + debug("prerelease compare", i$1, a, b); + if (a === void 0 && b === void 0) return 0; + else if (b === void 0) return 1; + else if (a === void 0) return -1; + else if (a === b) continue; + else return compareIdentifiers(a, b); + } while (++i$1); + }; + SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier); + this.inc("pre", identifier); + break; + case "prerelease": + if (this.prerelease.length === 0) this.inc("patch", identifier); + this.inc("pre", identifier); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) this.prerelease = [0]; + else { + var i$1 = this.prerelease.length; + while (--i$1 >= 0) if (typeof this.prerelease[i$1] === "number") { + this.prerelease[i$1]++; + i$1 = -2; + } + if (i$1 === -1) this.prerelease.push(0); + } + if (identifier) if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; + } else this.prerelease = [identifier, 0]; + break; + default: throw new Error("invalid increment argument: " + release); + } + this.format(); + this.raw = this.version; + return this; + }; + exports.inc = inc; + function inc(version, release, loose, identifier) { + if (typeof loose === "string") { + identifier = loose; + loose = void 0; + } + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + exports.diff = diff; + function diff(version1, version2) { + if (eq(version1, version2)) return null; + else { + var v1 = parse(version1); + var v2 = parse(version2); + var prefix = ""; + if (v1.prerelease.length || v2.prerelease.length) { + prefix = "pre"; + var defaultResult = "prerelease"; + } + for (var key in v1) if (key === "major" || key === "minor" || key === "patch") { + if (v1[key] !== v2[key]) return prefix + key; + } + return defaultResult; + } + } + exports.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + } + exports.rcompareIdentifiers = rcompareIdentifiers; + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + exports.major = major; + function major(a, loose) { + return new SemVer(a, loose).major; + } + exports.minor = minor; + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + exports.patch = patch; + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + exports.compare = compare; + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + exports.compareLoose = compareLoose; + function compareLoose(a, b) { + return compare(a, b, true); + } + exports.compareBuild = compareBuild; + function compareBuild(a, b, loose) { + var versionA = new SemVer(a, loose); + var versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + } + exports.rcompare = rcompare; + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + exports.sort = sort; + function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compareBuild(a, b, loose); + }); + } + exports.rsort = rsort; + function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.compareBuild(b, a, loose); + }); + } + exports.gt = gt; + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + exports.lt = lt; + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + exports.eq = eq; + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + exports.neq = neq; + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + exports.gte = gte; + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + exports.lte = lte; + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + exports.cmp = cmp; + function cmp(a, op, b, loose) { + switch (op) { + case "===": + if (typeof a === "object") a = a.version; + if (typeof b === "object") b = b.version; + return a === b; + case "!==": + if (typeof a === "object") a = a.version; + if (typeof b === "object") b = b.version; + return a !== b; + case "": + case "=": + case "==": return eq(a, b, loose); + case "!=": return neq(a, b, loose); + case ">": return gt(a, b, loose); + case ">=": return gte(a, b, loose); + case "<": return lt(a, b, loose); + case "<=": return lte(a, b, loose); + default: throw new TypeError("Invalid operator: " + op); + } + } + exports.Comparator = Comparator; + function Comparator(comp, options) { + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp; + else comp = comp.value; + if (!(this instanceof Comparator)) return new Comparator(comp, options); + comp = comp.trim().split(/\s+/).join(" "); + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) this.value = ""; + else this.value = this.operator + this.semver.version; + debug("comp", this); + } + var ANY = {}; + Comparator.prototype.parse = function(comp) { + var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; + var m = comp.match(r); + if (!m) throw new TypeError("Invalid comparator: " + comp); + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") this.operator = ""; + if (!m[2]) this.semver = ANY; + else this.semver = new SemVer(m[2], this.options.loose); + }; + Comparator.prototype.toString = function() { + return this.value; + }; + Comparator.prototype.test = function(version) { + debug("Comparator.test", version, this.options.loose); + if (this.semver === ANY || version === ANY) return true; + if (typeof version === "string") try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + return cmp(version, this.operator, this.semver, this.options); + }; + Comparator.prototype.intersects = function(comp, options) { + if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required"); + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + var rangeTmp; + if (this.operator === "") { + if (this.value === "") return true; + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === "") { + if (comp.value === "") return true; + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); + var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); + var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"); + var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + exports.Range = Range; + function Range(range, options) { + if (!options || typeof options !== "object") options = { + loose: !!options, + includePrerelease: false + }; + if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; + else return new Range(range.raw, options); + if (range instanceof Comparator) return new Range(range.value, options); + if (!(this instanceof Range)) return new Range(range, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range.trim().split(/\s+/).join(" "); + this.set = this.raw.split("||").map(function(range$1) { + return this.parseRange(range$1.trim()); + }, this).filter(function(c) { + return c.length; + }); + if (!this.set.length) throw new TypeError("Invalid SemVer Range: " + this.raw); + this.format(); + } + Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; + }; + Range.prototype.toString = function() { + return this.range; + }; + Range.prototype.parseRange = function(range) { + var loose = this.options.loose; + var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug("hyphen replace", range); + range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range, safeRe[t.COMPARATORTRIM]); + range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace); + range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); + var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; + var set = range.split(" ").map(function(comp) { + return parseComparator(comp, this.options); + }, this).join(" ").split(/\s+/); + if (this.options.loose) set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + set = set.map(function(comp) { + return new Comparator(comp, this.options); + }, this); + return set; + }; + Range.prototype.intersects = function(range, options) { + if (!(range instanceof Range)) throw new TypeError("a Range is required"); + return this.set.some(function(thisComparators) { + return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { + return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + }; + function isSatisfiable(comparators, options) { + var result = true; + var remainingComparators = comparators.slice(); + var testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every(function(otherComparator) { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + } + exports.toComparators = toComparators; + function toComparators(range, options) { + return new Range(range, options).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(" ").trim().split(" "); + }); + } + function parseComparator(comp, options) { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + } + function isX(id) { + return !id || id.toLowerCase() === "x" || id === "*"; + } + function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function(comp$1) { + return replaceTilde(comp$1, options); + }).join(" "); + } + function replaceTilde(comp, options) { + var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("tilde", comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = ""; + else if (isX(m)) ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + else if (isX(p)) ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + else if (pr) { + debug("replaceTilde pr", pr); + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } else ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + debug("tilde return", ret); + return ret; + }); + } + function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function(comp$1) { + return replaceCaret(comp$1, options); + }).join(" "); + } + function replaceCaret(comp, options) { + debug("caret", comp, options); + var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("caret", comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = ""; + else if (isX(m)) ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + else if (isX(p)) if (M === "0") ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + else ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; + else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") if (m === "0") ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); + else ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + else ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; + } else { + debug("no pr"); + if (M === "0") if (m === "0") ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); + else ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + else ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; + } + debug("caret return", ret); + return ret; + }); + } + function replaceXRanges(comp, options) { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map(function(comp$1) { + return replaceXRange(comp$1, options); + }).join(" "); + } + function replaceXRange(comp, options) { + comp = comp.trim(); + var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === "=" && anyX) gtlt = ""; + pr = options.includePrerelease ? "-0" : ""; + if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0"; + else ret = "*"; + else if (gtlt && anyX) { + if (xm) m = 0; + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) M = +M + 1; + else m = +m + 1; + } + ret = gtlt + M + "." + m + "." + p + pr; + } else if (xm) ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; + else if (xp) ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; + debug("xRange return", ret); + return ret; + }); + } + function replaceStars(comp, options) { + debug("replaceStars", comp, options); + return comp.trim().replace(safeRe[t.STAR], ""); + } + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) from = ""; + else if (isX(fm)) from = ">=" + fM + ".0.0"; + else if (isX(fp)) from = ">=" + fM + "." + fm + ".0"; + else from = ">=" + from; + if (isX(tM)) to = ""; + else if (isX(tm)) to = "<" + (+tM + 1) + ".0.0"; + else if (isX(tp)) to = "<" + tM + "." + (+tm + 1) + ".0"; + else if (tpr) to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; + else to = "<=" + to; + return (from + " " + to).trim(); + } + Range.prototype.test = function(version) { + if (!version) return false; + if (typeof version === "string") try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + for (var i$1 = 0; i$1 < this.set.length; i$1++) if (testSet(this.set[i$1], version, this.options)) return true; + return false; + }; + function testSet(set, version, options) { + for (var i$1 = 0; i$1 < set.length; i$1++) if (!set[i$1].test(version)) return false; + if (version.prerelease.length && !options.includePrerelease) { + for (i$1 = 0; i$1 < set.length; i$1++) { + debug(set[i$1].semver); + if (set[i$1].semver === ANY) continue; + if (set[i$1].semver.prerelease.length > 0) { + var allowed = set[i$1].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; + } + } + return false; + } + return true; + } + exports.satisfies = satisfies; + function satisfies(version, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version); + } + exports.maxSatisfying = maxSatisfying; + function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + } + exports.minSatisfying = minSatisfying; + function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + } + exports.minVersion = minVersion; + function minVersion(range, loose) { + range = new Range(range, loose); + var minver = new SemVer("0.0.0"); + if (range.test(minver)) return minver; + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) return minver; + minver = null; + for (var i$1 = 0; i$1 < range.set.length; ++i$1) { + var comparators = range.set[i$1]; + comparators.forEach(function(comparator) { + var compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) compver.patch++; + else compver.prerelease.push(0); + compver.raw = compver.format(); + case "": + case ">=": + if (!minver || gt(minver, compver)) minver = compver; + break; + case "<": + case "<=": break; + default: throw new Error("Unexpected operation: " + comparator.operator); + } + }); + } + if (minver && range.test(minver)) return minver; + return null; + } + exports.validRange = validRange; + function validRange(range, options) { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + } + exports.ltr = ltr; + function ltr(version, range, options) { + return outside(version, range, "<", options); + } + exports.gtr = gtr; + function gtr(version, range, options) { + return outside(version, range, ">", options); + } + exports.outside = outside; + function outside(version, range, hilo, options) { + version = new SemVer(version, options); + range = new Range(range, options); + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: throw new TypeError("Must provide a hilo val of \"<\" or \">\""); + } + if (satisfies(version, range, options)) return false; + for (var i$1 = 0; i$1 < range.set.length; ++i$1) { + var comparators = range.set[i$1]; + var high = null; + var low = null; + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0"); + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) high = comparator; + else if (ltfn(comparator.semver, low.semver, options)) low = comparator; + }); + if (high.operator === comp || high.operator === ecomp) return false; + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false; + else if (low.operator === ecomp && ltfn(version, low.semver)) return false; + } + return true; + } + exports.prerelease = prerelease; + function prerelease(version, options) { + var parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + exports.intersects = intersects; + function intersects(r1, r2, options) { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + } + exports.coerce = coerce; + function coerce(version, options) { + if (version instanceof SemVer) return version; + if (typeof version === "number") version = String(version); + if (typeof version !== "string") return null; + options = options || {}; + var match = null; + if (!options.rtl) match = version.match(safeRe[t.COERCE]); + else { + var next; + while ((next = safeRe[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) match = next; + safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + } + safeRe[t.COERCERTL].lastIndex = -1; + } + if (match === null) return null; + return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + } +} }); + +//#endregion +export { __commonJS, __require, __toESM, import_core, require_auth, require_core, require_exec, require_io, require_lib, require_semver }; \ No newline at end of file diff --git a/scripts/build.ts b/scripts/build.ts index c8e7940..f26de33 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -9,9 +9,16 @@ await new Deno.Command(Deno.execPath(), { stderr: "inherit", }).output(); +try { + Deno.removeSync(join(import.meta.dirname!, "../dist"), { recursive: true }); +} catch { + // ignore +} + await build({ entry: { main: "src/main.ts", + post: "src/post.ts", }, target: "node20.19", platform: "node", diff --git a/src/cache.ts b/src/cache.ts new file mode 100644 index 0000000..9303290 --- /dev/null +++ b/src/cache.ts @@ -0,0 +1,81 @@ +import process from "node:process"; +import cache from "@actions/cache"; +import core from "@actions/core"; + +const state = { + DENO_DIR: "DENO_DIR", + CACHE_HIT: "CACHE_HIT", + CACHE_SAVE: "CACHE_SAVE", +} as const; + +export async function saveCache() { + if (!cache.isFeatureAvailable()) { + core.warning("Caching is not available. Caching is skipped."); + return; + } + + const denoDir = core.getState(state.DENO_DIR); + const saveKey = core.getState(state.CACHE_SAVE); + if (!denoDir || !saveKey) { + core.info("Caching is not enabled. Caching is skipped."); + return; + } else if (core.getState(state.CACHE_HIT) === "true") { + core.info( + `Cache hit occurred on the primary key "${saveKey}", not saving cache.`, + ); + return; + } + + await cache.saveCache([denoDir], saveKey); + core.info(`Cache saved with key: "${saveKey}".`); +} + +export async function restoreCache(cacheHash: string) { + try { + const denoDir = await resolveDenoDir(); + core.saveState(state.DENO_DIR, denoDir); + + const { GITHUB_JOB, RUNNER_OS, RUNNER_ARCH } = process.env; + const restoreKey = `deno-cache-${RUNNER_OS}-${RUNNER_ARCH}`; + // CI jobs often download different dependencies, so include Job ID in the cache key. + const primaryKey = `${restoreKey}-${GITHUB_JOB}-${cacheHash}`; + core.saveState(state.CACHE_SAVE, primaryKey); + + const loadedCacheKey = await cache.restoreCache([denoDir], primaryKey, [ + restoreKey, + ]); + const cacheHit = primaryKey === loadedCacheKey; + core.setOutput("cache-hit", cacheHit); + core.saveState(state.CACHE_HIT, cacheHit); + + const message = loadedCacheKey + ? `Cache key used: "${loadedCacheKey}".` + : `No cache found for restore key: "${restoreKey}".`; + core.info(message); + } catch (err) { + core.warning( + new Error("Failed to restore cache. Continuing without cache.", { + cause: err, + }), + ); + } +} + +async function resolveDenoDir(): Promise { + const { DENO_DIR } = process.env; + if (DENO_DIR) return DENO_DIR; + + // Retrieve the DENO_DIR from `deno info --json` + const { exec } = await import("node:child_process"); + const output = await new Promise((res, rej) => { + exec("deno info --json", (err, stdout) => err ? rej(err) : res(stdout)); + }); + const info = JSON.parse(output); + if (typeof info.denoDir !== "string") { + throw new Error( + "`deno info --json` output did not contain a denoDir property. " + + "Maybe try updating this action or your Deno version if either are old.", + ); + } + return info.denoDir; +} diff --git a/src/main.ts b/src/main.ts index 9f12576..95fd50a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -56,6 +56,11 @@ async function main() { core.setOutput("release-channel", version.kind); core.info("Installation complete."); + + if (core.getInput("cache") === "true") { + const { restoreCache } = await import("./cache.ts"); + await restoreCache(core.getInput("cache-hash")); + } } catch (err) { core.setFailed((err instanceof Error) ? err : String(err)); process.exit(); diff --git a/src/post.ts b/src/post.ts new file mode 100644 index 0000000..8dc16d7 --- /dev/null +++ b/src/post.ts @@ -0,0 +1,14 @@ +import process from "node:process"; +import core from "@actions/core"; +import { saveCache } from "./cache.ts"; + +async function main() { + try { + await saveCache(); + } catch (err) { + core.setFailed((err instanceof Error) ? err : String(err)); + process.exit(); + } +} + +main();