diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index f6583ff37f4fe49d18819affc38e873e5e031d7f..0000000000000000000000000000000000000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -app/Dockerfile \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..6f9185791af15e1cbf15957a9ce09b39fabd5d80 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,141 @@ +# Contributing + +## Install + +[nodeJS](https://nodejs.org/en/download) + +## Launch the app + +``` +npm install +npm run dev +``` + +Open chrome base browser and go to http://localhost:5173/. + +## Add a new device + +1. Get the device code from the stock ROM + - We link device and its resources with deviceName.toLowerCase().replace(/ /g, ''); ex: One Plus Nord -> oneplusnord.json + - Since the deviceName may not be the same in fastboot (Android), we need at least a first connexion in adb to retrieve the deviceName +2. Understand how does the flash process works +3. Configure the flash process + - Define the steps in an array of objects describing the process + - template: + ```json + "steps": [ + { + "mode": string?, + "command" : string?, + "instruction": string?, + "needUser": boolean? + } + ] + ``` + - Options + + | key | exemple | description | + |---------------|---------------------------------|-----------------------------------------------------------------------------| + | `mode` | `[fastboot\| adb\| bootloader]` | It's a shortcut for a reboot and a reconnect before the command is executed | + | `needUser` | `[true\| false]` | The user needs to click on continue before the command is executed | + | `instruction` | `Please select unlock` | String displayed to the user at this step. Command is used if not defined | + | `command` | `flashing unlock unlocked` | Command as defined in the next chapter | + - Available commands + + | command | exemple | description | + |----------------------------------------|----------------------------|-----------------| + | `[flashing\| oem] unlock [varName?]` | `flashing unlock unlocked` | -------------- | + | `[flashing\|oem] lock [varName?]` | `flashing lock` | -------------- | + | `flash [partitionName] [fileName.img]` | `flashing unlock unlocked` | -------------- | + | `sideload [fileName.zip]` | `sideload romFile.zip` | -------------- | + | `erase [partitionName]` | `erase userdata` | -------------- | + | `reboot [fastboot\| adb\| bootloader]` | `reboot bootloader` | -------------- | + | `connect [adb\| bootloader]` | `connect device` | -------------- | + + > For oem, recovery, rom and key, we parse these command and execute them. The others commands are not analyzed and executed arbitrarily in the device. + + - Define the folder, an array describing the files involved in the flash process + - template: + ```json + "folder": [ + { + "name" : "filename.zip", # fileName used for the command. + "path": "https://domain.com/image.zip", # path used to download the file. + "unzip": true # optional boolean in case we have a zip we want to uncompress. + } + ] + ``` + + > In case of unzip : the file is unzipped, and the retrieved files are stored in the "folder" like the other file + - example: + + ```json + { + "folder": [ + { + "name": "recovery.img" + "path" : "assets/sources/coral/recovery-e-latest-s-community-coral.img" + }, + { + "name": "rom.zip", + "path" : "assets/sources/coral/e-latest-s-community-coral.zip" + }, + { + "name": "pkmd_pixel.bin", + "path" : "assets/sources/coral/pkmd_pixel.bin" + }, + { + "path" : "assets/sources/emerald/IMG-e-latest-s-official-emerald.zip", + "name": "Teracube_2e installer", + "unzip": true + }, + ] + } + ``` +4. Adding images + - Add the images files within `app/public/assets/images/illustrations/fp5` + - declare the image in the html, at `app/index.html` + - example: + ```html + +
+
+
+

+

+
+ +
+
+ +
+ ``` + +## Other + +- Vues + - `vue.manager.js` + - Need log.manager.js and translation.manager.js + - Need a div with id "process" + - `log.manager.js` + - Need a div with id "log-ctn" to scroll on log added + - Need a select with id "log" to add log + - `translation.manager.js` + - Need a select with id "translation" to listen to. + - On select change : download the translation file and render the DOM + - Translation are in `static/assets/languages` +- Controller + - `controller.manager.js` + +## Doctrine + +- my-class are for css class +- camelCase are for variable +- $variableName are for DOM Nodes +- MAJUSCULE are for global constant +- object.manager.js are for class directing subClass or vue. It's just my arbitrary concept to mark a class as "directive" in the process +- object.class.js are for class used by object.manager.js where functions should have a single responsibility + +Please respect ♥ diff --git a/README.md b/README.md index 5c55fdaca529e036798e03f2fbe67f0e05d195f1..e64526e3580f9d8574302134825d36bce3210ad4 100644 --- a/README.md +++ b/README.md @@ -23,142 +23,13 @@ Install /e/OS from a chromium-based browser - Linux: `docker run -v "$(pwd)/src:/app/src" -p 127.0.0.1:3000:3000 eos-installer` 3. The app is available at `http://localhost:3000/` -## Usage +## Supportted devices + +The list of supported devices is available [here](https://gitlab.e.foundation/e/devices/eos-installer/-/tree/main/app/public/resources). ## Contributing -### Build - -```shell -docker build -t eos-installer app/. -``` - -### Add a new device - -1. Get the device code from the stock ROM - - We link device and its resources with deviceName.toLowerCase().replace(/ /g, ''); ex: One Plus Nord -> oneplusnord.json - - Since the deviceName may not be the same in fastboot (Android), we need at least a first connexion in adb to retrieve the deviceName -2. Understand how does the flash process works -3. Configure the flash process - - Define the steps in an array of objects describing the process - - template: - ```json - "steps": [ - { - "mode": string?, - "command" : string?, - "instruction": string?, - "needUser": boolean? - } - ] - ``` - - Options - - | key | exemple | description | - |---------------|---------------------------------|-----------------------------------------------------------------------------| - | `mode` | `[fastboot\| adb\| bootloader]` | It's a shortcut for a reboot and a reconnect before the command is executed | - | `needUser` | `[true\| false]` | The user needs to click on continue before the command is executed | - | `instruction` | `Please select unlock` | String displayed to the user at this step. Command is used if not defined | - | `command` | `flashing unlock unlocked` | Command as defined in the next chapter | - - Available commands - - | command | exemple | description | - |----------------------------------------|----------------------------|-----------------| - | `[flashing\| oem] unlock [varName?]` | `flashing unlock unlocked` | -------------- | - | `[flashing\|oem] lock [varName?]` | `flashing lock` | -------------- | - | `flash [partitionName] [fileName.img]` | `flashing unlock unlocked` | -------------- | - | `sideload [fileName.zip]` | `sideload romFile.zip` | -------------- | - | `erase [partitionName]` | `erase userdata` | -------------- | - | `reboot [fastboot\| adb\| bootloader]` | `reboot bootloader` | -------------- | - | `connect [adb\| bootloader]` | `connect device` | -------------- | - - > For oem, recovery, rom and key, we parse these command and execute them. The others commands are not analyzed and executed arbitrarily in the device. - - - Define the folder, an array describing the files involved in the flash process - - template: - ```json - "folder": [ - { - name : fileName used for the command , - path: path used to download the file, - unzip: optional boolean in case we have a zip we want to parse - } - ] - ``` - - > In case of unzip : the file is unzipped, and the retrieved files are stored in the "folder" like the other file - - example: - - ```json - { - "folder": [ - { - "name": "recovery.img" - "path" : "assets/sources/coral/recovery-e-1.14-s-20230818321663-dev-coral.img" - }, - { - "name": "rom.zip", - "path" : "assets/sources/coral/e-1.14-s-20230818321663-dev-coral.zip" - }, - { - "name": "pkmd_pixel.bin", - "path" : "assets/sources/coral/pkmd_pixel.bin" - }, - { - "path" : "assets/sources/emerald/IMG-e-1.14.2-s-20230825321006-stable-emerald.zip", - "name": "Teracube_2e installer", - "unzip": true - }, - ] - } - ``` -4. Adding images - - Add the images files within `app/src/static/assets/images/illustrations/fp5` - - declare the image in the html, at `app/src/static/index.html` - - example: - ```html - -
-
-
-

-

-
- -
-
- -
- ``` - -### Other - -- Vues - - `vue.manager.js` - - Need log.manager.js and translation.manager.js - - Need a div with id "process" - - `log.manager.js` - - Need a div with id "log-ctn" to scroll on log added - - Need a select with id "log" to add log - - `translation.manager.js` - - Need a select with id "translation" to listen to. - - On select change : download the translation file and render the DOM - - Translation are in `static/assets/languages` -- Controller - - `controller.manager.js` - -### Doctrine - -- my-class are for css class -- camelCase are for variable -- $variableName are for DOM Nodes -- MAJUSCULE are for global constant -- object.manager.js are for class directing subClass or vue. It's just my arbitrary concept to mark a class as "directive" in the process -- object.class.js are for class used by object.manager.js where functions should have a single responsibility - -Please respect ♥ +See [CONTRIBUTING.md](CONTRIBUTING.md). ## License @@ -173,4 +44,3 @@ Using: Libraries: - fastboot.js (License: MIT): https://github.com/kdrag0n/fastboot.js/ - ya-webadb (License: MIT): https://github.com/yume-chan/ya-webadb -- zip-no-worker-inflate.js (License: BSD3): https://github.com/gildas-lormeau/zip.js/blob/master/lib/zip-no-worker-inflate.js diff --git a/app/Dockerfile b/app/Dockerfile index b05651a78f0dcfb0ec1dffd6e145cbe0fea1bc50..2a2a3e4eef48ec259406e959143445baffcdee82 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -1,8 +1,8 @@ -# syntax=docker/dockerfile:1 - -FROM node:22-alpine +FROM node:23-alpine AS builder WORKDIR /app COPY . . -RUN yarn install --production -CMD ["node", "src/index.js"] -EXPOSE 3000 +RUN npm install && npm run build + +FROM nginx:1.27.3 + +COPY --from=builder /app/dist /usr/share/nginx/html diff --git a/app/src/static/index.html b/app/index.html similarity index 86% rename from app/src/static/index.html rename to app/index.html index 4f2b5179170c83810f6029de35a62c2479427abb..9e59fb30ce005705980f41af8c1db0f39e48791c 100644 --- a/app/src/static/index.html +++ b/app/index.html @@ -5,13 +5,12 @@ - - + + /e/OS Installer - - - - + + + diff --git a/app/package-lock.json b/app/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..72412105d4c6a592e4c9c7d6562fec8948cf12b5 --- /dev/null +++ b/app/package-lock.json @@ -0,0 +1,312 @@ +{ + "name": "eOS-installer", + "version": "0.7.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "eOS-installer", + "version": "0.7.1", + "license": "GPLv3", + "dependencies": { + "@zip.js/zip.js": "^2.7.54", + "ky": "^1.7.4" + }, + "devDependencies": { + "vite": "^6.0.5" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.29.1.tgz", + "integrity": "sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.29.1.tgz", + "integrity": "sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@zip.js/zip.js": { + "version": "2.7.54", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.54.tgz", + "integrity": "sha512-qMrJVg2hoEsZJjMJez9yI2+nZlBUxgYzGV3mqcb2B/6T1ihXp0fWBDYlVHlHquuorgNUQP5a8qSmX6HF5rFJNg==", + "license": "BSD-3-Clause", + "engines": { + "bun": ">=0.7.0", + "deno": ">=1.0.0", + "node": ">=16.5.0" + } + }, + "node_modules/esbuild": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + } + }, + "node_modules/ky": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/ky/-/ky-1.7.4.tgz", + "integrity": "sha512-zYEr/gh7uLW2l4su11bmQ2M9xLgQLjyvx58UyNM/6nuqyWFHPX5ktMjvpev3F8QWdjSsHUpnWew4PBCswBNuMQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/ky?sponsor=1" + } + }, + "node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.29.1.tgz", + "integrity": "sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.29.1", + "@rollup/rollup-android-arm64": "4.29.1", + "@rollup/rollup-darwin-arm64": "4.29.1", + "@rollup/rollup-darwin-x64": "4.29.1", + "@rollup/rollup-freebsd-arm64": "4.29.1", + "@rollup/rollup-freebsd-x64": "4.29.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.29.1", + "@rollup/rollup-linux-arm-musleabihf": "4.29.1", + "@rollup/rollup-linux-arm64-gnu": "4.29.1", + "@rollup/rollup-linux-arm64-musl": "4.29.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.29.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.29.1", + "@rollup/rollup-linux-riscv64-gnu": "4.29.1", + "@rollup/rollup-linux-s390x-gnu": "4.29.1", + "@rollup/rollup-linux-x64-gnu": "4.29.1", + "@rollup/rollup-linux-x64-musl": "4.29.1", + "@rollup/rollup-win32-arm64-msvc": "4.29.1", + "@rollup/rollup-win32-ia32-msvc": "4.29.1", + "@rollup/rollup-win32-x64-msvc": "4.29.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/vite": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.6.tgz", + "integrity": "sha512-NSjmUuckPmDU18bHz7QZ+bTYhRR0iA72cs2QAxCqDpafJ0S6qetco0LB3WW2OxlMHS0JmAv+yZ/R3uPmMyGTjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.24.2", + "postcss": "^8.4.49", + "rollup": "^4.23.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + } + } +} diff --git a/app/package.json b/app/package.json index 45d538246f4b1aca8b6647f747f17946e3c34fd6..e18102fa5ca2ad8f67aec01db41d95d991fad912 100644 --- a/app/package.json +++ b/app/package.json @@ -1,19 +1,18 @@ { - "name": "eos-web_installer", - "version": "1.0.0", - "main": "index.js", - "license": "TBD", + "name": "eOS-installer", + "license": "GPLv3", + "version": "0.7.1", + "type": "module", "scripts": { - "dev": "nodemon src/index.js" - }, - "dependencies": { - "express": "^4.18.2", - "wait-port": "^1.0.4" - }, - "resolutions": { - "ansi-regex": "5.0.1" + "dev": "vite", + "build": "vite build", + "preview": "vite preview" }, "devDependencies": { - "nodemon": "^2.0.20" + "vite": "^6.0.5" + }, + "dependencies": { + "@zip.js/zip.js": "^2.7.54", + "ky": "^1.7.4" } } diff --git a/app/src/static/assets/fonts/century-gothic/COPYRIGHT.txt b/app/public/assets/fonts/century-gothic/COPYRIGHT.txt similarity index 100% rename from app/src/static/assets/fonts/century-gothic/COPYRIGHT.txt rename to app/public/assets/fonts/century-gothic/COPYRIGHT.txt diff --git a/app/src/static/assets/fonts/century-gothic/Century-Gothic.ttf b/app/public/assets/fonts/century-gothic/Century-Gothic.ttf similarity index 100% rename from app/src/static/assets/fonts/century-gothic/Century-Gothic.ttf rename to app/public/assets/fonts/century-gothic/Century-Gothic.ttf diff --git a/app/src/static/assets/fonts/century-gothic/Century-Gothic_bold.ttf b/app/public/assets/fonts/century-gothic/Century-Gothic_bold.ttf similarity index 100% rename from app/src/static/assets/fonts/century-gothic/Century-Gothic_bold.ttf rename to app/public/assets/fonts/century-gothic/Century-Gothic_bold.ttf diff --git a/app/src/static/assets/images/icons/alert-before-relocking.svg b/app/public/assets/images/icons/alert-before-relocking.svg similarity index 100% rename from app/src/static/assets/images/icons/alert-before-relocking.svg rename to app/public/assets/images/icons/alert-before-relocking.svg diff --git a/app/src/static/assets/images/icons/back-up-your-data.svg b/app/public/assets/images/icons/back-up-your-data.svg similarity index 100% rename from app/src/static/assets/images/icons/back-up-your-data.svg rename to app/public/assets/images/icons/back-up-your-data.svg diff --git a/app/src/static/assets/images/icons/bootloader-message.svg b/app/public/assets/images/icons/bootloader-message.svg similarity index 100% rename from app/src/static/assets/images/icons/bootloader-message.svg rename to app/public/assets/images/icons/bootloader-message.svg diff --git a/app/src/static/assets/images/icons/charge-your-phone.svg b/app/public/assets/images/icons/charge-your-phone.svg similarity index 100% rename from app/src/static/assets/images/icons/charge-your-phone.svg rename to app/public/assets/images/icons/charge-your-phone.svg diff --git a/app/src/static/assets/images/icons/check-success.svg b/app/public/assets/images/icons/check-success.svg similarity index 100% rename from app/src/static/assets/images/icons/check-success.svg rename to app/public/assets/images/icons/check-success.svg diff --git a/app/src/static/assets/images/icons/check.svg b/app/public/assets/images/icons/check.svg similarity index 100% rename from app/src/static/assets/images/icons/check.svg rename to app/public/assets/images/icons/check.svg diff --git a/app/src/static/assets/images/icons/chrome.svg b/app/public/assets/images/icons/chrome.svg similarity index 100% rename from app/src/static/assets/images/icons/chrome.svg rename to app/public/assets/images/icons/chrome.svg diff --git a/app/src/static/assets/images/icons/critical-error.svg b/app/public/assets/images/icons/critical-error.svg similarity index 100% rename from app/src/static/assets/images/icons/critical-error.svg rename to app/public/assets/images/icons/critical-error.svg diff --git a/app/src/static/assets/images/icons/donate.svg b/app/public/assets/images/icons/donate.svg similarity index 100% rename from app/src/static/assets/images/icons/donate.svg rename to app/public/assets/images/icons/donate.svg diff --git a/app/src/static/assets/images/icons/e-logo-black-2-1.svg b/app/public/assets/images/icons/e-logo-black-2-1.svg similarity index 100% rename from app/src/static/assets/images/icons/e-logo-black-2-1.svg rename to app/public/assets/images/icons/e-logo-black-2-1.svg diff --git a/app/src/static/assets/images/icons/e-logo-black-2.svg b/app/public/assets/images/icons/e-logo-black-2.svg similarity index 100% rename from app/src/static/assets/images/icons/e-logo-black-2.svg rename to app/public/assets/images/icons/e-logo-black-2.svg diff --git a/app/src/static/assets/images/icons/edge.svg b/app/public/assets/images/icons/edge.svg similarity index 100% rename from app/src/static/assets/images/icons/edge.svg rename to app/public/assets/images/icons/edge.svg diff --git a/app/src/static/assets/images/icons/error.svg b/app/public/assets/images/icons/error.svg similarity index 100% rename from app/src/static/assets/images/icons/error.svg rename to app/public/assets/images/icons/error.svg diff --git a/app/src/static/assets/images/icons/free-up-some-disk-space.svg b/app/public/assets/images/icons/free-up-some-disk-space.svg similarity index 100% rename from app/src/static/assets/images/icons/free-up-some-disk-space.svg rename to app/public/assets/images/icons/free-up-some-disk-space.svg diff --git a/app/src/static/assets/images/icons/free-up-some-time.svg b/app/public/assets/images/icons/free-up-some-time.svg similarity index 100% rename from app/src/static/assets/images/icons/free-up-some-time.svg rename to app/public/assets/images/icons/free-up-some-time.svg diff --git a/app/src/static/assets/images/icons/grab-a-USB-data-cable.svg b/app/public/assets/images/icons/grab-a-USB-data-cable.svg similarity index 100% rename from app/src/static/assets/images/icons/grab-a-USB-data-cable.svg rename to app/public/assets/images/icons/grab-a-USB-data-cable.svg diff --git a/app/src/static/assets/images/icons/help.svg b/app/public/assets/images/icons/help.svg similarity index 100% rename from app/src/static/assets/images/icons/help.svg rename to app/public/assets/images/icons/help.svg diff --git a/app/src/static/assets/images/icons/logo.png b/app/public/assets/images/icons/logo.png similarity index 100% rename from app/src/static/assets/images/icons/logo.png rename to app/public/assets/images/icons/logo.png diff --git a/app/src/static/assets/images/icons/murena-workspace-account.svg b/app/public/assets/images/icons/murena-workspace-account.svg similarity index 100% rename from app/src/static/assets/images/icons/murena-workspace-account.svg rename to app/public/assets/images/icons/murena-workspace-account.svg diff --git a/app/src/static/assets/images/icons/opera.svg b/app/public/assets/images/icons/opera.svg similarity index 100% rename from app/src/static/assets/images/icons/opera.svg rename to app/public/assets/images/icons/opera.svg diff --git a/app/src/static/assets/images/icons/survey-dissatisfied.svg b/app/public/assets/images/icons/survey-dissatisfied.svg similarity index 100% rename from app/src/static/assets/images/icons/survey-dissatisfied.svg rename to app/public/assets/images/icons/survey-dissatisfied.svg diff --git a/app/src/static/assets/images/icons/survey-neutral.svg b/app/public/assets/images/icons/survey-neutral.svg similarity index 100% rename from app/src/static/assets/images/icons/survey-neutral.svg rename to app/public/assets/images/icons/survey-neutral.svg diff --git a/app/src/static/assets/images/icons/survey-satisfied.svg b/app/public/assets/images/icons/survey-satisfied.svg similarity index 100% rename from app/src/static/assets/images/icons/survey-satisfied.svg rename to app/public/assets/images/icons/survey-satisfied.svg diff --git a/app/src/static/assets/images/icons/survey-very-dissatisfied.svg b/app/public/assets/images/icons/survey-very-dissatisfied.svg similarity index 100% rename from app/src/static/assets/images/icons/survey-very-dissatisfied.svg rename to app/public/assets/images/icons/survey-very-dissatisfied.svg diff --git a/app/src/static/assets/images/icons/survey-very-satisfied.svg b/app/public/assets/images/icons/survey-very-satisfied.svg similarity index 100% rename from app/src/static/assets/images/icons/survey-very-satisfied.svg rename to app/public/assets/images/icons/survey-very-satisfied.svg diff --git a/app/src/static/assets/images/illustrations/Illustration - Accept warning-1.png b/app/public/assets/images/illustrations/Illustration - Accept warning-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Accept warning-1.png rename to app/public/assets/images/illustrations/Illustration - Accept warning-1.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Accept warning-2.png b/app/public/assets/images/illustrations/Illustration - Accept warning-2.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Accept warning-2.png rename to app/public/assets/images/illustrations/Illustration - Accept warning-2.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Access Download mode-1.png b/app/public/assets/images/illustrations/Illustration - Access Download mode-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Access Download mode-1.png rename to app/public/assets/images/illustrations/Illustration - Access Download mode-1.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Access Download mode-2.png b/app/public/assets/images/illustrations/Illustration - Access Download mode-2.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Access Download mode-2.png rename to app/public/assets/images/illustrations/Illustration - Access Download mode-2.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Access Download mode-3.png b/app/public/assets/images/illustrations/Illustration - Access Download mode-3.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Access Download mode-3.png rename to app/public/assets/images/illustrations/Illustration - Access Download mode-3.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Access Download mode-4.png b/app/public/assets/images/illustrations/Illustration - Access Download mode-4.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Access Download mode-4.png rename to app/public/assets/images/illustrations/Illustration - Access Download mode-4.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Access Download mode.png b/app/public/assets/images/illustrations/Illustration - Access Download mode.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Access Download mode.png rename to app/public/assets/images/illustrations/Illustration - Access Download mode.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Access recovery mode-1.png b/app/public/assets/images/illustrations/Illustration - Access recovery mode-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Access recovery mode-1.png rename to app/public/assets/images/illustrations/Illustration - Access recovery mode-1.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Access recovery mode.png b/app/public/assets/images/illustrations/Illustration - Access recovery mode.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Access recovery mode.png rename to app/public/assets/images/illustrations/Illustration - Access recovery mode.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Swipe right to confirm-1.png b/app/public/assets/images/illustrations/Illustration - Swipe right to confirm-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Swipe right to confirm-1.png rename to app/public/assets/images/illustrations/Illustration - Swipe right to confirm-1.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Swipe right to confirm.png b/app/public/assets/images/illustrations/Illustration - Swipe right to confirm.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Swipe right to confirm.png rename to app/public/assets/images/illustrations/Illustration - Swipe right to confirm.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Turn off your phone-1.png b/app/public/assets/images/illustrations/Illustration - Turn off your phone-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Turn off your phone-1.png rename to app/public/assets/images/illustrations/Illustration - Turn off your phone-1.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Turn off your phone-2.png b/app/public/assets/images/illustrations/Illustration - Turn off your phone-2.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Turn off your phone-2.png rename to app/public/assets/images/illustrations/Illustration - Turn off your phone-2.png diff --git a/app/src/static/assets/images/illustrations/Illustration - Turn off your phone.png b/app/public/assets/images/illustrations/Illustration - Turn off your phone.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - Turn off your phone.png rename to app/public/assets/images/illustrations/Illustration - Turn off your phone.png diff --git a/app/src/static/assets/images/illustrations/Illustration - old phone - swipe right.png b/app/public/assets/images/illustrations/Illustration - old phone - swipe right.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - old phone - swipe right.png rename to app/public/assets/images/illustrations/Illustration - old phone - swipe right.png diff --git a/app/src/static/assets/images/illustrations/Illustration - old phone - accept warning.png b/app/public/assets/images/illustrations/Illustration - old phone - accept warning.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - old phone - accept warning.png rename to app/public/assets/images/illustrations/Illustration - old phone - accept warning.png diff --git a/app/src/static/assets/images/illustrations/Illustration - old phone - access download mode.png b/app/public/assets/images/illustrations/Illustration - old phone - access download mode.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - old phone - access download mode.png rename to app/public/assets/images/illustrations/Illustration - old phone - access download mode.png diff --git a/app/src/static/assets/images/illustrations/Illustration - old phone - access recovery mode.png b/app/public/assets/images/illustrations/Illustration - old phone - access recovery mode.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - old phone - access recovery mode.png rename to app/public/assets/images/illustrations/Illustration - old phone - access recovery mode.png diff --git a/app/src/static/assets/images/illustrations/Illustration - old phone - turn off your phone.png b/app/public/assets/images/illustrations/Illustration - old phone - turn off your phone.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - old phone - turn off your phone.png rename to app/public/assets/images/illustrations/Illustration - old phone - turn off your phone.png diff --git a/app/src/static/assets/images/illustrations/Illustration - old phone -acces recovery mode.png b/app/public/assets/images/illustrations/Illustration - old phone -acces recovery mode.png similarity index 100% rename from app/src/static/assets/images/illustrations/Illustration - old phone -acces recovery mode.png rename to app/public/assets/images/illustrations/Illustration - old phone -acces recovery mode.png diff --git a/app/src/static/assets/images/illustrations/Tutorial - Device detection.png b/app/public/assets/images/illustrations/Tutorial - Device detection.png similarity index 100% rename from app/src/static/assets/images/illustrations/Tutorial - Device detection.png rename to app/public/assets/images/illustrations/Tutorial - Device detection.png diff --git a/app/src/static/assets/images/illustrations/activate-developer-options-1.png b/app/public/assets/images/illustrations/activate-developer-options-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/activate-developer-options-1.png rename to app/public/assets/images/illustrations/activate-developer-options-1.png diff --git a/app/src/static/assets/images/illustrations/activate-developer-options-2.png b/app/public/assets/images/illustrations/activate-developer-options-2.png similarity index 100% rename from app/src/static/assets/images/illustrations/activate-developer-options-2.png rename to app/public/assets/images/illustrations/activate-developer-options-2.png diff --git a/app/src/static/assets/images/illustrations/activate-usb-debugging-1.png b/app/public/assets/images/illustrations/activate-usb-debugging-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/activate-usb-debugging-1.png rename to app/public/assets/images/illustrations/activate-usb-debugging-1.png diff --git a/app/src/static/assets/images/illustrations/activate-usb-debugging-2.png b/app/public/assets/images/illustrations/activate-usb-debugging-2.png similarity index 100% rename from app/src/static/assets/images/illustrations/activate-usb-debugging-2.png rename to app/public/assets/images/illustrations/activate-usb-debugging-2.png diff --git a/app/src/static/assets/images/illustrations/allow-usb-debugging-1.png b/app/public/assets/images/illustrations/allow-usb-debugging-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/allow-usb-debugging-1.png rename to app/public/assets/images/illustrations/allow-usb-debugging-1.png diff --git a/app/src/static/assets/images/illustrations/allow-usb-debugging-2.png b/app/public/assets/images/illustrations/allow-usb-debugging-2.png similarity index 100% rename from app/src/static/assets/images/illustrations/allow-usb-debugging-2.png rename to app/public/assets/images/illustrations/allow-usb-debugging-2.png diff --git a/app/src/static/assets/images/illustrations/allowOEMUnlocking.png b/app/public/assets/images/illustrations/allowOEMUnlocking.png similarity index 100% rename from app/src/static/assets/images/illustrations/allowOEMUnlocking.png rename to app/public/assets/images/illustrations/allowOEMUnlocking.png diff --git a/app/src/static/assets/images/illustrations/connect-your-phone.png b/app/public/assets/images/illustrations/connect-your-phone.png similarity index 100% rename from app/src/static/assets/images/illustrations/connect-your-phone.png rename to app/public/assets/images/illustrations/connect-your-phone.png diff --git a/app/src/static/assets/images/illustrations/enable-usb-file-transfer-1.png b/app/public/assets/images/illustrations/enable-usb-file-transfer-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/enable-usb-file-transfer-1.png rename to app/public/assets/images/illustrations/enable-usb-file-transfer-1.png diff --git a/app/src/static/assets/images/illustrations/enable-usb-file-transfer-2.png b/app/public/assets/images/illustrations/enable-usb-file-transfer-2.png similarity index 100% rename from app/src/static/assets/images/illustrations/enable-usb-file-transfer-2.png rename to app/public/assets/images/illustrations/enable-usb-file-transfer-2.png diff --git a/app/src/static/assets/images/illustrations/enableOEMUnlocking.png b/app/public/assets/images/illustrations/enableOEMUnlocking.png similarity index 100% rename from app/src/static/assets/images/illustrations/enableOEMUnlocking.png rename to app/public/assets/images/illustrations/enableOEMUnlocking.png diff --git a/app/src/static/assets/images/illustrations/fp3/Illustration - Accept warning-1.png b/app/public/assets/images/illustrations/fp3/Illustration - Accept warning-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/fp3/Illustration - Accept warning-1.png rename to app/public/assets/images/illustrations/fp3/Illustration - Accept warning-1.png diff --git a/app/src/static/assets/images/illustrations/fp4/Illustration - Accept warning-1.png b/app/public/assets/images/illustrations/fp4/Illustration - Accept warning-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/fp4/Illustration - Accept warning-1.png rename to app/public/assets/images/illustrations/fp4/Illustration - Accept warning-1.png diff --git a/app/src/static/assets/images/illustrations/gs290/Illustration - Accept warning-1.png b/app/public/assets/images/illustrations/gs290/Illustration - Accept warning-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/gs290/Illustration - Accept warning-1.png rename to app/public/assets/images/illustrations/gs290/Illustration - Accept warning-1.png diff --git a/app/src/static/assets/images/illustrations/installation-complete.png b/app/public/assets/images/illustrations/installation-complete.png similarity index 100% rename from app/src/static/assets/images/illustrations/installation-complete.png rename to app/public/assets/images/illustrations/installation-complete.png diff --git a/app/src/static/assets/images/illustrations/murena-workspace-account.png b/app/public/assets/images/illustrations/murena-workspace-account.png similarity index 100% rename from app/src/static/assets/images/illustrations/murena-workspace-account.png rename to app/public/assets/images/illustrations/murena-workspace-account.png diff --git a/app/src/static/assets/images/illustrations/oneplus/Illustration - Accept warning-1.png b/app/public/assets/images/illustrations/oneplus/Illustration - Accept warning-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/oneplus/Illustration - Accept warning-1.png rename to app/public/assets/images/illustrations/oneplus/Illustration - Accept warning-1.png diff --git a/app/src/static/assets/images/illustrations/pixel/Illustration - Accept warning-1.png b/app/public/assets/images/illustrations/pixel/Illustration - Accept warning-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/pixel/Illustration - Accept warning-1.png rename to app/public/assets/images/illustrations/pixel/Illustration - Accept warning-1.png diff --git a/app/src/static/assets/images/illustrations/teracube-v1/Illustration - Accept warning-1.png b/app/public/assets/images/illustrations/teracube-v1/Illustration - Accept warning-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/teracube-v1/Illustration - Accept warning-1.png rename to app/public/assets/images/illustrations/teracube-v1/Illustration - Accept warning-1.png diff --git a/app/src/static/assets/images/illustrations/teracube-v2/Illustration - Accept warning-1.png b/app/public/assets/images/illustrations/teracube-v2/Illustration - Accept warning-1.png similarity index 100% rename from app/src/static/assets/images/illustrations/teracube-v2/Illustration - Accept warning-1.png rename to app/public/assets/images/illustrations/teracube-v2/Illustration - Accept warning-1.png diff --git a/app/src/static/assets/images/pictures/photo_3_2024-07-29_10-41-26.jpg b/app/public/assets/images/pictures/photo_3_2024-07-29_10-41-26.jpg similarity index 100% rename from app/src/static/assets/images/pictures/photo_3_2024-07-29_10-41-26.jpg rename to app/public/assets/images/pictures/photo_3_2024-07-29_10-41-26.jpg diff --git a/app/src/static/assets/images/pictures/photo_4_2024-07-29_10-41-26.jpg b/app/public/assets/images/pictures/photo_4_2024-07-29_10-41-26.jpg similarity index 100% rename from app/src/static/assets/images/pictures/photo_4_2024-07-29_10-41-26.jpg rename to app/public/assets/images/pictures/photo_4_2024-07-29_10-41-26.jpg diff --git a/app/src/static/assets/images/pictures/photo_5_2024-07-29_10-41-26.jpg b/app/public/assets/images/pictures/photo_5_2024-07-29_10-41-26.jpg similarity index 100% rename from app/src/static/assets/images/pictures/photo_5_2024-07-29_10-41-26.jpg rename to app/public/assets/images/pictures/photo_5_2024-07-29_10-41-26.jpg diff --git a/app/src/static/assets/images/pictures/photo_6_2024-07-29_10-41-26.jpg b/app/public/assets/images/pictures/photo_6_2024-07-29_10-41-26.jpg similarity index 100% rename from app/src/static/assets/images/pictures/photo_6_2024-07-29_10-41-26.jpg rename to app/public/assets/images/pictures/photo_6_2024-07-29_10-41-26.jpg diff --git a/app/src/static/assets/images/pictures/photo_7_2024-07-29_10-41-26.jpg b/app/public/assets/images/pictures/photo_7_2024-07-29_10-41-26.jpg similarity index 100% rename from app/src/static/assets/images/pictures/photo_7_2024-07-29_10-41-26.jpg rename to app/public/assets/images/pictures/photo_7_2024-07-29_10-41-26.jpg diff --git a/app/src/static/assets/images/pictures/photo_8_2024-07-29_10-41-26.jpg b/app/public/assets/images/pictures/photo_8_2024-07-29_10-41-26.jpg similarity index 100% rename from app/src/static/assets/images/pictures/photo_8_2024-07-29_10-41-26.jpg rename to app/public/assets/images/pictures/photo_8_2024-07-29_10-41-26.jpg diff --git a/app/src/static/assets/images/pictures/photo_9_2024-07-29_10-41-26.jpg b/app/public/assets/images/pictures/photo_9_2024-07-29_10-41-26.jpg similarity index 100% rename from app/src/static/assets/images/pictures/photo_9_2024-07-29_10-41-26.jpg rename to app/public/assets/images/pictures/photo_9_2024-07-29_10-41-26.jpg diff --git a/app/src/static/assets/images/pictures/recovery_select_apply_update.jpg b/app/public/assets/images/pictures/recovery_select_apply_update.jpg similarity index 100% rename from app/src/static/assets/images/pictures/recovery_select_apply_update.jpg rename to app/public/assets/images/pictures/recovery_select_apply_update.jpg diff --git a/app/src/static/assets/images/pictures/recovery_select_format_data.jpg b/app/public/assets/images/pictures/recovery_select_format_data.jpg similarity index 100% rename from app/src/static/assets/images/pictures/recovery_select_format_data.jpg rename to app/public/assets/images/pictures/recovery_select_format_data.jpg diff --git a/app/src/static/assets/images/pictures/recovery_select_reboot_to_bootloader.jpg b/app/public/assets/images/pictures/recovery_select_reboot_to_bootloader.jpg similarity index 100% rename from app/src/static/assets/images/pictures/recovery_select_reboot_to_bootloader.jpg rename to app/public/assets/images/pictures/recovery_select_reboot_to_bootloader.jpg diff --git a/app/src/static/assets/languages/de.json b/app/public/assets/languages/de.json similarity index 100% rename from app/src/static/assets/languages/de.json rename to app/public/assets/languages/de.json diff --git a/app/src/static/assets/languages/en.json b/app/public/assets/languages/en.json similarity index 100% rename from app/src/static/assets/languages/en.json rename to app/public/assets/languages/en.json diff --git a/app/src/static/assets/languages/es.json b/app/public/assets/languages/es.json similarity index 100% rename from app/src/static/assets/languages/es.json rename to app/public/assets/languages/es.json diff --git a/app/src/static/assets/languages/fr.json b/app/public/assets/languages/fr.json similarity index 100% rename from app/src/static/assets/languages/fr.json rename to app/public/assets/languages/fr.json diff --git a/app/src/static/assets/languages/is.json b/app/public/assets/languages/is.json similarity index 100% rename from app/src/static/assets/languages/is.json rename to app/public/assets/languages/is.json diff --git a/app/src/static/assets/languages/it.json b/app/public/assets/languages/it.json similarity index 100% rename from app/src/static/assets/languages/it.json rename to app/public/assets/languages/it.json diff --git a/app/src/static/assets/languages/nb-NO.json b/app/public/assets/languages/nb-NO.json similarity index 100% rename from app/src/static/assets/languages/nb-NO.json rename to app/public/assets/languages/nb-NO.json diff --git a/app/src/static/assets/languages/nl.json b/app/public/assets/languages/nl.json similarity index 100% rename from app/src/static/assets/languages/nl.json rename to app/public/assets/languages/nl.json diff --git a/app/src/static/assets/languages/ru.json b/app/public/assets/languages/ru.json similarity index 100% rename from app/src/static/assets/languages/ru.json rename to app/public/assets/languages/ru.json diff --git a/app/src/static/assets/languages/sv.json b/app/public/assets/languages/sv.json similarity index 100% rename from app/src/static/assets/languages/sv.json rename to app/public/assets/languages/sv.json diff --git a/app/src/static/assets/languages/tr.json b/app/public/assets/languages/tr.json similarity index 100% rename from app/src/static/assets/languages/tr.json rename to app/public/assets/languages/tr.json diff --git a/app/src/static/css/loader.css b/app/public/css/loader.css similarity index 100% rename from app/src/static/css/loader.css rename to app/public/css/loader.css diff --git a/app/src/static/css/styles.css b/app/public/css/styles.css similarity index 100% rename from app/src/static/css/styles.css rename to app/public/css/styles.css diff --git a/app/src/static/css/theme.css b/app/public/css/theme.css similarity index 100% rename from app/src/static/css/theme.css rename to app/public/css/theme.css diff --git a/app/public/resources/-Nord.json b/app/public/resources/-Nord.json new file mode 100644 index 0000000000000000000000000000000000000000..ea93fc8fc018bff0de2fdff6fbe623714003678f --- /dev/null +++ b/app/public/resources/-Nord.json @@ -0,0 +1,102 @@ +{ + "android": 12, + "steps": [ + { + "command": "reboot bootloader" + }, + { + "id": "connect-bootloader", + "command": [ + "connect bootloader", + "oem unlock" + ], + "needUserGesture": true + }, + { + "id": "unlocking", + "needUserGesture": true + }, + { + "id": "activate-developer-options", + "needUserGesture": true + }, + { + "id": "activate-usb-debugging", + "needUserGesture": true + }, + { + "id": "enable-usb-file-transfer", + "needUserGesture": true + }, + { + "id": "device-detection", + "command": "connect adb", + "needUserGesture": true + }, + { + "mode": "bootloader", + "id": "connect-bootloader", + "command": "connect bootloader", + "needUserGesture": true + }, + { + "id": "flashing", + "command": [ + "flash dtbo dtbo.img", + "flash vbmeta vbmeta.img", + "flash recovery recovery.img" + ] + }, + { + "id": "bootloader-to-recovery-manually", + "needUserGesture": true + }, + { + "id": "format-device", + "needUserGesture": true + }, + { + "id": "go-to-apply-update", + "needUserGesture": true + }, + { + "id": "sideload", + "command": "sideload oneplus-nord-rom.zip" + }, + { + "id": "sideload-ended", + "needUserGesture": true + }, + { + "id": "connect-bootloader", + "command": [ + "connect bootloader", + "reboot" + ], + "needUserGesture": true + }, + { + "id": "murena-workspace-account", + "needUserGesture": true + }, + { + "id": "installation-complete" + } + ], + "folder": [ + { + "name": "One+ Nord recovery installer", + "path": "https://images.ecloud.global/official/avicii/recovery-IMG-e-latest-s-official-avicii.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^vbmeta.*img$": "vbmeta.img", + "^recovery.*img$": "recovery.img" + } + }, + { + "name": "oneplus-nord-rom.zip", + "path": "https://images.ecloud.global/stable/avicii/e-latest-s-official-avicii.zip" + } + ] +} diff --git a/app/src/static/resources/FP3.json b/app/public/resources/FP3.json similarity index 95% rename from app/src/static/resources/FP3.json rename to app/public/resources/FP3.json index b23dabde35707250e6c404b9d1f1140dc4ee4c6c..b4a50a9fc433efd1bb8c03a2432a9c9309d63b35 100644 --- a/app/src/static/resources/FP3.json +++ b/app/public/resources/FP3.json @@ -87,7 +87,7 @@ { "name": "fp3.zip", "unzip": true, - "path": "https://images.ecloud.global/official/FP3/IMG-e-2.6.3-t-20241217455358-official-FP3.zip" + "path": "https://images.ecloud.global/official/FP3/IMG-e-latest-t-official-FP3.zip" } ] } diff --git a/app/src/static/resources/FP4-safe.json b/app/public/resources/FP4-safe.json similarity index 97% rename from app/src/static/resources/FP4-safe.json rename to app/public/resources/FP4-safe.json index 9b57a5b6b81bf9368c6c0f03a812b06f376baae1..6646670ab59ecdee6ce9ad9815a973253b64911d 100644 --- a/app/src/static/resources/FP4-safe.json +++ b/app/public/resources/FP4-safe.json @@ -124,7 +124,7 @@ { "name": "FP4 installer", "unzip": true, - "path": "https://images.ecloud.global/stable/FP4/IMG-e-2.4.1-t-20241009439851-official-FP4.zip" + "path": "https://images.ecloud.global/official/FP4/IMG-e-latest-u-official-FP4.zip" } ] } diff --git a/app/src/static/resources/FP4.json b/app/public/resources/FP4.json similarity index 97% rename from app/src/static/resources/FP4.json rename to app/public/resources/FP4.json index b3e01cab586964944584794c53c31e771b3b1d4b..fa9e4d3e21c02fd9ad5bbc83ebe4cd980d6abfae 100644 --- a/app/src/static/resources/FP4.json +++ b/app/public/resources/FP4.json @@ -156,7 +156,7 @@ { "name": "FP4 installer", "unzip": true, - "path": "https://images.ecloud.global/official/FP4/IMG-e-2.6.3-u-20241217455359-official-FP4.zip" + "path": "https://images.ecloud.global/official/FP4/IMG-e-latest-u-official-FP4.zip" } ] } diff --git a/app/src/static/resources/GS290.json b/app/public/resources/GS290.json similarity index 96% rename from app/src/static/resources/GS290.json rename to app/public/resources/GS290.json index e1814772c2fcc670f802ee7977311d8f2f5ea4f6..f8cd8cb95817baecaff5ba2877b3dbf884f4ff21 100644 --- a/app/src/static/resources/GS290.json +++ b/app/public/resources/GS290.json @@ -47,7 +47,7 @@ { "name": "GS290 installer", "unzip": true, - "path": "https://images.ecloud.global/official/GS290/IMG-e-2.6.3-s-20241217455357-official-GS290.zip" + "path": "https://images.ecloud.global/official/GS290/IMG-e-latest-s-official-GS290.zip" } ] } diff --git a/app/src/static/resources/OnePlus7.json b/app/public/resources/OnePlus7.json similarity index 81% rename from app/src/static/resources/OnePlus7.json rename to app/public/resources/OnePlus7.json index ac8a0e481a99eab8b74a4605b9da13247b78f6fe..6a9562a41e43f0c571c424d59287df09d3b4c16f 100644 --- a/app/src/static/resources/OnePlus7.json +++ b/app/public/resources/OnePlus7.json @@ -1,5 +1,5 @@ { - "android": 12, + "android": 14, "steps": [ { "command": "reboot bootloader" @@ -38,9 +38,9 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.6.3-u-20241217455391-community-guacamoleb.img", - "flash vbmeta vbmeta-e-2.6.3-u-20241217455391-community-guacamoleb.img", - "flash recovery recovery-e-2.6.3-u-20241217455391-community-guacamoleb.img" + "flash dtbo dtbo.img", + "flash vbmeta vbmeta.img", + "flash recovery recovery.img" ] }, { @@ -82,12 +82,17 @@ "folder": [ { "name": "One+ 7 recovery installer", - "path": "https://images.ecloud.global/community/guacamoleb/recovery-IMG-e-2.6.3-u-20241217455391-community-guacamoleb.zip", - "unzip": true + "path": "https://images.ecloud.global/community/guacamoleb/recovery-IMG-e-latest-u-community-guacamoleb.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^vbmeta.*img$": "vbmeta.img", + "^recovery.*img$": "recovery.img" + } }, { "name": "oneplus-7-rom.zip", - "path": "https://images.ecloud.global/community/guacamoleb/e-2.6.3-u-20241217455391-community-guacamoleb.zip" + "path": "https://images.ecloud.global/community/guacamoleb/e-latest-u-community-guacamoleb.zip" } ] } diff --git a/app/src/static/resources/OnePlus7Pro.json b/app/public/resources/OnePlus7Pro.json similarity index 81% rename from app/src/static/resources/OnePlus7Pro.json rename to app/public/resources/OnePlus7Pro.json index ec44053efdf92c104eca9159a3c3af60165b3e92..f123030a45affc2f65ffc7e40ae8bf5cad01dffb 100644 --- a/app/src/static/resources/OnePlus7Pro.json +++ b/app/public/resources/OnePlus7Pro.json @@ -1,5 +1,5 @@ { - "android": 12, + "android": 14, "steps": [ { "command": "reboot bootloader" @@ -38,9 +38,9 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.6.3-u-20241218455570-community-guacamole.img", - "flash vbmeta vbmeta-e-2.6.3-u-20241218455570-community-guacamole.img", - "flash recovery recovery-e-2.6.3-u-20241218455570-community-guacamole.img" + "flash dtbo dtbo.img", + "flash vbmeta vbmeta.img", + "flash recovery recovery.img" ] }, { @@ -82,12 +82,17 @@ "folder": [ { "name": "One+ 7 Pro recovery installer", - "path": "https://images.ecloud.global/community/guacamole/recovery-IMG-e-2.6.3-u-20241218455570-community-guacamole.zip", - "unzip": true + "path": "https://images.ecloud.global/community/guacamole/recovery-IMG-e-latest-u-community-guacamole.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^vbmeta.*img$": "vbmeta.img", + "^recovery.*img$": "recovery.img" + } }, { "name": "oneplus-7pro-rom.zip", - "path": "https://images.ecloud.global/community/guacamole/e-2.6.3-u-20241218455570-community-guacamole.zip" + "path": "https://images.ecloud.global/community/guacamole/e-latest-u-community-guacamole.zip" } ] } diff --git a/app/src/static/resources/OnePlus7T.json b/app/public/resources/OnePlus7T.json similarity index 81% rename from app/src/static/resources/OnePlus7T.json rename to app/public/resources/OnePlus7T.json index b41ec182200acbe66edb788a32f1d272a7a9cd13..4365250a4c42c3ce21f99b02156c63fe53954398 100644 --- a/app/src/static/resources/OnePlus7T.json +++ b/app/public/resources/OnePlus7T.json @@ -1,5 +1,5 @@ { - "android": 12, + "android": 14, "steps": [ { "command": "reboot bootloader" @@ -38,9 +38,9 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.6.3-u-20241217455391-community-hotdogb.img", - "flash vbmeta vbmeta-e-2.6.3-u-20241217455391-community-hotdogb.img", - "flash recovery recovery-e-2.6.3-u-20241217455391-community-hotdogb.img" + "flash dtbo dtbo.img", + "flash vbmeta vbmeta.img", + "flash recovery recovery.img" ] }, { @@ -82,12 +82,17 @@ "folder": [ { "name": "One+ 7T recovery installer", - "path": "https://images.ecloud.global/community/hotdogb/recovery-IMG-e-2.6.3-u-20241217455391-community-hotdogb.zip", - "unzip": true + "path": "https://images.ecloud.global/community/hotdogb/recovery-IMG-e-latest-u-community-hotdogb.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^vbmeta.*img$": "vbmeta.img", + "^recovery.*img$": "recovery.img" + } }, { "name": "oneplus-7t-rom.zip", - "path": "https://images.ecloud.global/community/hotdogb/e-2.6.3-u-20241217455391-community-hotdogb.zip" + "path": "https://images.ecloud.global/community/hotdogb/e-latest-u-community-hotdogb.zip" } ] } diff --git a/app/src/static/resources/OnePlus8.json b/app/public/resources/OnePlus8.json similarity index 80% rename from app/src/static/resources/OnePlus8.json rename to app/public/resources/OnePlus8.json index 4999fb10053183a287229944007d061ff3c2b235..caf17ff1f42ebcac5ab3e7e4a99ee8ee4125ac3a 100644 --- a/app/src/static/resources/OnePlus8.json +++ b/app/public/resources/OnePlus8.json @@ -1,5 +1,5 @@ { - "android": 13, + "android": 14, "steps": [ { "command": "reboot bootloader" @@ -38,9 +38,9 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.6.3-u-20241218455570-community-instantnoodle.img", - "flash vbmeta vbmeta-e-2.6.3-u-20241218455570-community-instantnoodle.img", - "flash recovery recovery-e-2.6.3-u-20241218455570-community-instantnoodle.img" + "flash dtbo dtbo.img", + "flash vbmeta vbmeta.img", + "flash recovery recovery.img" ] }, { @@ -82,12 +82,17 @@ "folder": [ { "name": "One+ 8 recovery installer", - "path": "https://images.ecloud.global/community/instantnoodle/recovery-IMG-e-2.6.3-u-20241218455570-community-instantnoodle.zip", - "unzip": true + "path": "https://images.ecloud.global/community/instantnoodle/recovery-IMG-e-latest-u-community-instantnoodle.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^vbmeta.*img$": "vbmeta.img", + "^recovery.*img$": "recovery.img" + } }, { "name": "oneplus-8-rom.zip", - "path": "https://images.ecloud.global/community/instantnoodle/e-2.6.3-u-20241218455570-community-instantnoodle.zip" + "path": "https://images.ecloud.global/community/instantnoodle/e-latest-u-community-instantnoodle.zip" } ] } diff --git a/app/src/static/resources/OnePlus8Pro.json b/app/public/resources/OnePlus8Pro.json similarity index 81% rename from app/src/static/resources/OnePlus8Pro.json rename to app/public/resources/OnePlus8Pro.json index 774a9e51acdcc69b03e3d638e285057081ac2fd0..db34b444ee67a3baae695e207c4d37f6924f14d0 100644 --- a/app/src/static/resources/OnePlus8Pro.json +++ b/app/public/resources/OnePlus8Pro.json @@ -38,9 +38,9 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.6.3-u-20241218455570-community-instantnoodlep.img", - "flash vbmeta vbmeta-e-2.6.3-u-20241218455570-community-instantnoodlep.img", - "flash recovery recovery-e-2.6.3-u-20241218455570-community-instantnoodlep.img" + "flash dtbo dtbo.img", + "flash vbmeta vbmeta.img", + "flash recovery recovery.img" ] }, { @@ -82,12 +82,17 @@ "folder": [ { "name": "One+ 8 pro recovery installer", - "path": "https://images.ecloud.global/community/instantnoodlep/recovery-IMG-e-2.6.3-u-20241218455570-community-instantnoodlep.zip", - "unzip": true + "path": "https://images.ecloud.global/community/instantnoodlep/recovery-IMG-e-latest-u-community-instantnoodlep.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^vbmeta.*img$": "vbmeta.img", + "^recovery.*img$": "recovery.img" + } }, { "name": "oneplus-8-pro-rom.zip", - "path": "https://images.ecloud.global/community/instantnoodlep/e-2.6.3-u-20241218455570-community-instantnoodlep.zip" + "path": "https://images.ecloud.global/community/instantnoodlep/e-latest-u-community-instantnoodlep.zip" } ] } diff --git a/app/src/static/resources/Teracube_2e.json b/app/public/resources/Teracube_2e.json similarity index 96% rename from app/src/static/resources/Teracube_2e.json rename to app/public/resources/Teracube_2e.json index f9b1d89ab366d5bb1000c0a7a9ba03ee75303dc6..1a4ecf878976486ae16e8d14d8f078518dc3e551 100644 --- a/app/src/static/resources/Teracube_2e.json +++ b/app/public/resources/Teracube_2e.json @@ -48,7 +48,7 @@ ], "folder": [ { - "path": "https://images.ecloud.global/official/zirconia/IMG-e-2.6.3-s-20241217455357-official-zirconia.zip", + "path": "https://images.ecloud.global/official/zirconia/IMG-e-latest-s-official-zirconia.zip", "name": "Teracube 2e (2020) installer", "unzip": true } diff --git a/app/src/static/resources/coral.json b/app/public/resources/coral.json similarity index 78% rename from app/src/static/resources/coral.json rename to app/public/resources/coral.json index 425fecfb8f64be00250f8666d3764d064f57d32c..52a28c4830e4977f0974a82874b78fb0aecaca68 100644 --- a/app/src/static/resources/coral.json +++ b/app/public/resources/coral.json @@ -1,5 +1,5 @@ { - "android": 13, + "android": 14, "steps": [ { "command": "reboot bootloader" @@ -17,8 +17,8 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.6.3-u-20241218455570-community-coral.img", - "flash boot recovery-e-2.6.3-u-20241218455570-community-coral.img" + "flash dtbo dtbo.img", + "flash boot recovery.img" ] }, { @@ -60,12 +60,16 @@ "folder": [ { "name": "pixel4-xl-recovery.img", - "path": "https://images.ecloud.global/community/coral/recovery-IMG-e-2.6.3-u-20241218455570-community-coral.zip", - "unzip": true + "path": "https://images.ecloud.global/community/coral/recovery-IMG-e-latest-u-community-coral.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^recovery.*img$": "recovery.img" + } }, { "name": "pixel4-xl-rom.zip", - "path": "https://images.ecloud.global/community/coral/e-2.6.3-u-20241218455570-community-coral.zip" + "path": "https://images.ecloud.global/community/coral/e-latest-u-community-coral.zip" } ] } diff --git a/app/src/static/resources/emerald-safe.json b/app/public/resources/emerald-safe.json similarity index 96% rename from app/src/static/resources/emerald-safe.json rename to app/public/resources/emerald-safe.json index 255766013f5b2e050ac0ea21db703f147ca50d46..5587166fc3c03ecf1cfb791b2d1f68c63c8cf6fc 100644 --- a/app/src/static/resources/emerald-safe.json +++ b/app/public/resources/emerald-safe.json @@ -50,7 +50,7 @@ ], "folder": [ { - "path": "https://images.ecloud.global/stable/emerald/IMG-e-2.4.1-s-20241008439849-official-emerald.zip", + "path": "https://images.ecloud.global/stable/emerald/IMG-e-latest-s-official-emerald.zip", "name": "Teracube 2e (2021 emerald) safe installer", "unzip": true } diff --git a/app/src/static/resources/emerald.json b/app/public/resources/emerald.json similarity index 97% rename from app/src/static/resources/emerald.json rename to app/public/resources/emerald.json index 59efc481af02315195ecad73287359fc8e80b138..4576d107de41701bfb7ddaabb73dacd5c9e3e524 100644 --- a/app/src/static/resources/emerald.json +++ b/app/public/resources/emerald.json @@ -56,7 +56,7 @@ ], "folder": [ { - "path": "https://images.ecloud.global/official/emerald/IMG-e-2.6.3-s-20241217455357-official-emerald.zip", + "path": "https://images.ecloud.global/official/emerald/IMG-e-latest-s-official-emerald.zip", "name": "Teracube 2e (2021 emerald) installer", "unzip": true } diff --git a/app/src/static/resources/flame.json b/app/public/resources/flame.json similarity index 78% rename from app/src/static/resources/flame.json rename to app/public/resources/flame.json index 1210b45db775159b32c657fe39614d503d5c6f70..18557d829c36e591b4453fa42a782c9efb038f94 100644 --- a/app/src/static/resources/flame.json +++ b/app/public/resources/flame.json @@ -1,5 +1,5 @@ { - "android": 13, + "android": 14, "steps": [ { "command": "reboot bootloader" @@ -17,8 +17,8 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.6.3-u-20241218455570-community-flame.img", - "flash boot recovery-e-2.6.3-u-20241218455570-community-flame.img" + "flash dtbo dtbo.img", + "flash boot recovery.img" ] }, { @@ -60,12 +60,16 @@ "folder": [ { "name": "pixel-4-recovery.img", - "path": "https://images.ecloud.global/community/flame/recovery-IMG-e-2.6.3-u-20241218455570-community-flame.zip", - "unzip": true + "path": "https://images.ecloud.global/community/flame/recovery-IMG-e-latest-u-community-flame.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^recovery.*img$": "recovery.img" + } }, { "name": "pixel-4-rom.zip", - "path": "https://images.ecloud.global/community/flame/e-2.6.3-u-20241218455570-community-flame.zip" + "path": "https://images.ecloud.global/community/flame/e-latest-u-community-flame.zip" } ] } diff --git a/app/src/static/resources/panther.json b/app/public/resources/panther.json similarity index 75% rename from app/src/static/resources/panther.json rename to app/public/resources/panther.json index ad4f1020ac3382d76899ec3e7730d39eb95a0248..92594b3effdfb7dcf7f12cef73306fc2a7ec0399 100644 --- a/app/src/static/resources/panther.json +++ b/app/public/resources/panther.json @@ -17,10 +17,10 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.6.3-t-20241217455358-official-panther.img", - "flash boot boot-e-2.6.3-t-20241217455358-official-panther.img", - "flash vendor_boot recovery-e-2.6.3-t-20241217455358-official-panther.img", - "flash vendor_kernel_boot vendor_kernel_boot-e-2.6.3-t-20241217455358-official-panther.img" + "flash dtbo dtbo.img", + "flash boot boot.img", + "flash vendor_boot recovery.img", + "flash vendor_kernel_boot vendor_kernel_boot.img" ] }, { @@ -68,12 +68,18 @@ "folder": [ { "name": "pixel-7-recovery.img", - "path": "https://images.ecloud.global/official/panther/recovery-IMG-e-2.6.3-t-20241217455358-official-panther.zip", - "unzip": true + "path": "https://images.ecloud.global/official/panther/recovery-IMG-e-latest-t-official-panther.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^boot.*img$": "boot.img", + "^recovery.*img$": "recovery.img", + "^vendor_kernel_boot.*img$": "vendor_kernel_boot.img" + } }, { "name": "pixel-7-rom.zip", - "path": "https://images.ecloud.global/official/panther/e-2.6.3-t-20241217455358-official-panther.zip" + "path": "https://images.ecloud.global/official/panther/e-latest-t-official-panther.zip" }, { "name": "pkmd_pixel.bin", diff --git a/app/src/static/resources/redfin.json b/app/public/resources/redfin.json similarity index 79% rename from app/src/static/resources/redfin.json rename to app/public/resources/redfin.json index d33a431f441199f5a260993d6730da3d63117ab5..38f909bce70356cf012012be87d356f48f4af659 100644 --- a/app/src/static/resources/redfin.json +++ b/app/public/resources/redfin.json @@ -17,10 +17,9 @@ { "id": "flashing", "command": [ - - "flash dtbo dtbo-e-2.6.3-t-20241217455358-official-redfin.img", - "flash boot boot-e-2.6.3-t-20241217455358-official-redfin.img", - "flash vendor_boot recovery-e-2.6.3-t-20241217455358-official-redfin.img" + "flash dtbo dtbo.img", + "flash boot boot.img", + "flash vendor_boot recovery.img" ] }, { @@ -68,12 +67,17 @@ "folder": [ { "name": "pixel-5-recovery.img", - "path": "https://images.ecloud.global/official/redfin/recovery-IMG-e-2.6.3-t-20241217455358-official-redfin.zip", - "unzip": true + "path": "https://images.ecloud.global/official/redfin/recovery-IMG-e-latest-t-official-redfin.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^boot.*img$": "boot.img", + "^recovery.*img$": "recovery.img" + } }, { "name": "pixel-5-rom.zip", - "path": "https://images.ecloud.global/official/redfin/e-2.6.3-t-20241217455358-official-redfin.zip" + "path": "https://images.ecloud.global/official/redfin/e-latest-t-official-redfin.zip" }, { "name": "pkmd_pixel.bin", diff --git a/app/src/static/resources/shiba.json b/app/public/resources/shiba.json similarity index 75% rename from app/src/static/resources/shiba.json rename to app/public/resources/shiba.json index 5e0a3c7c4268849fdddecafe2cfa5b5118c646c1..b41bb830bceddd55d05dd9ce0c25ce7c5079d96e 100644 --- a/app/src/static/resources/shiba.json +++ b/app/public/resources/shiba.json @@ -17,10 +17,10 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.6.3-u-20241217455359-official-shiba.img", - "flash boot boot-e-2.6.3-u-20241217455359-official-shiba.img", - "flash vendor_boot recovery-e-2.6.3-u-20241217455359-official-shiba.img", - "flash vendor_kernel_boot vendor_kernel_boot-e-2.6.3-u-20241217455359-official-shiba.img" + "flash dtbo dtbo.img", + "flash boot boot.img", + "flash vendor_boot recovery.img", + "flash vendor_kernel_boot vendor_kernel_boot.img" ] }, { @@ -68,12 +68,18 @@ "folder": [ { "name": "pixel-8-recovery.img", - "path": "https://images.ecloud.global/official/shiba/recovery-IMG-e-2.6.3-u-20241217455359-official-shiba.zip", - "unzip": true + "path": "https://images.ecloud.global/official/shiba/recovery-IMG-e-latest-u-official-shiba.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^boot.*img$": "boot.img", + "^recovery.*img$": "recovery.img", + "^vendor_kernel_boot.*img$": "vendor_kernel_boot.img" + } }, { "name": "pixel-8-rom.zip", - "path": "https://images.ecloud.global/official/shiba/e-2.6.3-u-20241217455359-official-shiba.zip" + "path": "https://images.ecloud.global/official/shiba/e-latest-u-official-shiba.zip" }, { "name": "pkmd_pixel.bin", diff --git a/app/src/static/resources/sunfish.json b/app/public/resources/sunfish.json similarity index 81% rename from app/src/static/resources/sunfish.json rename to app/public/resources/sunfish.json index 8a99acef9d37c685ac0ddcc3d03c3458bd695ff9..b2a793c30f7409f453aa710fc405e48989504a32 100644 --- a/app/src/static/resources/sunfish.json +++ b/app/public/resources/sunfish.json @@ -1,5 +1,5 @@ { - "android": 13, + "android": 14, "steps": [ { "command": "reboot bootloader" @@ -17,8 +17,8 @@ { "id": "flashing", "command": [ - "flash dtbo dtbo-e-2.4.1-t-20241011439852-community-sunfish.img", - "flash boot recovery-e-2.4.1-t-20241011439852-community-sunfish.img" + "flash dtbo dtbo.img", + "flash boot recovery.img" ] }, { @@ -60,12 +60,16 @@ "folder": [ { "name": "pixel-4a-recovery.img", - "path": "https://images.ecloud.global/community/sunfish/recovery-IMG-e-2.6.3-u-20241217455391-community-sunfish.zip", - "unzip": true + "path": "https://images.ecloud.global/community/sunfish/recovery-IMG-e-latest-u-community-sunfish.zip", + "unzip": true, + "mapping": { + "^dtbo.*img$": "dtbo.img", + "^recovery.*img$": "recovery.img" + } }, { "name": "pixel-4a-rom.zip", - "path": "https://images.ecloud.global/community/sunfish/e-2.6.3-u-20241217455391-community-sunfish.zip" + "path": "https://images.ecloud.global/community/sunfish/e-latest-u-community-sunfish.zip" } ] } diff --git a/app/src/static/resources/tetris.json b/app/public/resources/tetris.json similarity index 97% rename from app/src/static/resources/tetris.json rename to app/public/resources/tetris.json index c39c4da7ff0e9c8d7b8ea58c2715d14ef32935e6..0486ebba6bb576f61263a68cc2eec11e5618c638 100644 --- a/app/src/static/resources/tetris.json +++ b/app/public/resources/tetris.json @@ -1,4 +1,5 @@ { + "android": 14, "steps": [ { "mode": "bootloader", @@ -73,7 +74,7 @@ { "name": "cmf-phone1-rom.zip", "unzip": true, - "path": "https://images.ecloud.global/official/tetris/IMG-e-2.6.3-u-20241217455359-official-tetris.zip" + "path": "https://images.ecloud.global/official/tetris/IMG-e-latest-u-20241217455359-official-tetris.zip" } ] } diff --git a/app/src/static/js/before-leave-app.js b/app/src/before-leave-app.js similarity index 100% rename from app/src/static/js/before-leave-app.js rename to app/src/before-leave-app.js diff --git a/app/src/static/js/controller.manager.js b/app/src/controller.manager.js similarity index 91% rename from app/src/static/js/controller.manager.js rename to app/src/controller.manager.js index 6270c5066481b0f63491d40db0cfe0c1e0217bee..d40dacb64cc64acfb2521f12680ea70d6bfc0f9b 100644 --- a/app/src/static/js/controller.manager.js +++ b/app/src/controller.manager.js @@ -21,9 +21,10 @@ export class Controller { } - async init() { + async init(view) { this.deviceManager = new DeviceManager(); await this.deviceManager.init(); + this.view = view; } async next() { @@ -46,7 +47,7 @@ export class Controller { } this.currentIndex++; current = this.steps[this.currentIndex]; - VIEW.onStepStarted(this.currentIndex, current); + this.view.onStepStarted(this.currentIndex, current); if (!current.needUserGesture) { await this.executeStep(current.name); } @@ -72,11 +73,11 @@ export class Controller { let previous = this.steps[this.currentIndex - 1]; if (res) { if (next) { - VIEW.onStepFinished(current, next); + this.view.onStepFinished(current, next); await this.next(); } } else { - VIEW.onStepFailed(current, previous); + this.view.onStepFailed(current, previous); if (!current.needUserGesture) { this.currentIndex--; } @@ -86,7 +87,7 @@ export class Controller { throw new Error(`Cannot execute command ${this_command.command}
${e.message || e}`); } } else { - throw new Error('this is not the current step') + throw new Error('this is not the current step ' + current.name + ' is not equals to ' + stepName) } } @@ -112,11 +113,11 @@ export class Controller { let res = false; try { await this.deviceManager.downloadAll((loaded, total, name) => { - VIEW.onDownloading(name, loaded, total); + this.view.onDownloading(name, loaded, total); }, (loaded, total, name) => { - VIEW.onUnzip(name, loaded, total); + this.view.onUnzip(name, loaded, total); }); - VIEW.onDownloadingEnd(); + this.view.onDownloadingEnd(); return true; } catch (e) { const proposal = "Proposal: Retry by refreshing this page."; @@ -151,7 +152,7 @@ export class Controller { return this.deviceManager.erase(cmd.partition); case Command.CMD_TYPE.flash: return this.deviceManager.flash(cmd.file, cmd.partition, (done, total) => { - VIEW.onInstalling(cmd.file, done, total); + this.view.onInstalling(cmd.file, done, total); }); case Command.CMD_TYPE.unlock: //check if unlocked to avoid unnecessary command @@ -250,20 +251,20 @@ export class Controller { const productName = this.deviceManager.getProductName(); const wasAlreadyConnected = this.deviceManager.wasAlreadyConnected(); if (!wasAlreadyConnected) { - VIEW.updateData('product-name', productName); + this.view.updateData('product-name', productName); this.model = productName; WDebug.log("ControllerManager Model:", this.model); try { const resources = await this.getResources(); if(resources.android){ - VIEW.updateData('android-version-required', resources.android); + this.view.updateData('android-version-required', resources.android); await this.checkAndroidVersion(resources.android); } this.setResources(resources); } catch(e) { this.steps.push(new Step(e.message)); - VIEW.updateTotalStep(this.steps.length); + this.view.updateTotalStep(this.steps.length); // Don not throw this error, as it is handled by the UI directly. } } @@ -272,7 +273,7 @@ export class Controller { const android = await this.deviceManager.getAndroidVersion(); WDebug.log("current android version:", android); if( android) { - VIEW.updateData('android-version', android); + this.view.updateData('android-version', android); if(android < versionRequired){ throw Error('android-version-not-supported'); } @@ -349,7 +350,7 @@ export class Controller { this.steps.push(...this.resources.steps.map((step) => { return new Step(step.id, step.command, step.needUserGesture ?? false, step.mode); })); - VIEW.updateTotalStep(this.steps.length); + this.view.updateTotalStep(this.steps.length); } this.deviceManager.setResources(this.resources.folder, this.steps); } diff --git a/app/src/static/js/controller/device.manager.js b/app/src/controller/device.manager.js similarity index 100% rename from app/src/static/js/controller/device.manager.js rename to app/src/controller/device.manager.js diff --git a/app/src/static/js/controller/device/adb.class.js b/app/src/controller/device/adb.class.js similarity index 91% rename from app/src/static/js/controller/device/adb.class.js rename to app/src/controller/device/adb.class.js index 4d6081ddebe6d66efcd5945a15c86f5578cd3fdc..28adebcd9e28356d2a98ae75258d82b3c91c9c41 100644 --- a/app/src/static/js/controller/device/adb.class.js +++ b/app/src/controller/device/adb.class.js @@ -1,5 +1,6 @@ import {Device} from "./device.class.js"; import {WDebug} from "../../debug.js"; +import {AdbWebBackend, Adb2} from "../../lib/webadb/adb.bundle.js"; export class ADB extends Device { constructor(device) { @@ -25,6 +26,7 @@ export class ADB extends Device { async connect(cb) { let res = false; try { + console.log("debug adb connect") let adbWebBackend = await AdbWebBackend.requestDevice(); if (adbWebBackend) { let adbDevice = new Adb2(adbWebBackend, null); //adb.bundle.js diff --git a/app/src/static/js/controller/device/bootloader.class.js b/app/src/controller/device/bootloader.class.js similarity index 100% rename from app/src/static/js/controller/device/bootloader.class.js rename to app/src/controller/device/bootloader.class.js diff --git a/app/src/static/js/controller/device/command.class.js b/app/src/controller/device/command.class.js similarity index 100% rename from app/src/static/js/controller/device/command.class.js rename to app/src/controller/device/command.class.js diff --git a/app/src/static/js/controller/device/device.class.js b/app/src/controller/device/device.class.js similarity index 100% rename from app/src/static/js/controller/device/device.class.js rename to app/src/controller/device/device.class.js diff --git a/app/src/static/js/controller/device/recovery.class.js b/app/src/controller/device/recovery.class.js similarity index 91% rename from app/src/static/js/controller/device/recovery.class.js rename to app/src/controller/device/recovery.class.js index be306694c94c56b8348e2395227e072645a58c28..3114594770f59d51cc500de1c5c1fa5b88fc34ed 100644 --- a/app/src/static/js/controller/device/recovery.class.js +++ b/app/src/controller/device/recovery.class.js @@ -2,6 +2,7 @@ import {MessageClass} from "../../lib/webadb/message.class.js"; import {MessageHeader} from "../../lib/webadb/message-header.class.js"; import {Device} from "./device.class.js"; import {WDebug} from "../../debug.js"; +import {AdbWebBackend3, Adb3} from "../../lib/webadb/adb.bundle.js"; export class Recovery extends Device { constructor(device) { @@ -31,7 +32,7 @@ export class Recovery extends Device { try { if (this.device && this.device.isConnected) { WDebug.log("Connect recovery the device is connected"); - } else { + } else { const adbWebBackend = await AdbWebBackend3.requestDevice(); WDebug.log("adbWebBackend = ", adbWebBackend); const adbDevice = new Adb3(adbWebBackend, null); //adb.bundle.js @@ -428,4 +429,4 @@ export class Recovery extends Device { } return true; } -} \ No newline at end of file +} diff --git a/app/src/static/js/controller/downloader.manager.js b/app/src/controller/downloader.manager.js similarity index 80% rename from app/src/static/js/controller/downloader.manager.js rename to app/src/controller/downloader.manager.js index b14026aa91c0384303ea79de12f1fdb9fc55d600..c8d6a561d625aac6dc01db28464d17c675278c1e 100644 --- a/app/src/static/js/controller/downloader.manager.js +++ b/app/src/controller/downloader.manager.js @@ -1,12 +1,14 @@ const DB_NAME = "MurenaBlobStore"; const DB_VERSION = 1; +import ky from 'ky'; +import {ZipReader, BlobReader, BlobWriter} from "@zip.js/zip.js"; import { WDebug } from "../debug.js"; /** * Download Manager * Download files from the device folder of [modelname].json - * Download with DBStore and unizip if necessary + * Download with DBStore and unzip if necessary * Blobs are in this.files[filename] */ export class Downloader { @@ -36,15 +38,16 @@ export class Downloader { onDownloadProgress(value, total, file.name); }); if(file.unzip){ - const zipReader = new zip.ZipReader(new zip.BlobReader(blob)); + const zipReader = new ZipReader(new BlobReader(blob)); const filesEntries = await zipReader.getEntries(); for(let i= 0 ; i < filesEntries.length; i++) { - if(filesRequired.includes(filesEntries[i].filename)){ - const unzippedEntry = await this.getFileFromZip(filesEntries[i], (value, total) => { + const unzippedEntry = await this.getFileFromZip(filesEntries[i], (value, total) => { onUnzipProgress(value, total, filesEntries[i].filename); - }); - await this.setInDBStore(unzippedEntry.blob, filesEntries[i].filename); - this.stored[filesEntries[i].filename] = true; + }); + let filename = this.getMappedName(filesEntries[i].filename, file.mapping); + if(filesRequired.includes(filename)){ + await this.setInDBStore(unzippedEntry.blob, filename); + this.stored[filename] = true; } } await zipReader.close(); @@ -62,7 +65,7 @@ export class Downloader { async getFileFromZip(file, onProgress) { const name = file.filename; - const blob = await file.getData(new zip.BlobWriter(), { + const blob = await file.getData(new BlobWriter(), { onprogress: (value, total) => { onProgress(value, total, name); }, @@ -74,6 +77,21 @@ export class Downloader { } } + getMappedName(filename, map) { + if (!map) { + return filename; + } + + console.log(map); + for (const [regex, newFilename] of Object.entries(map)) { + let re = new RegExp(regex); + if (filename.match(re)) { + return newFilename; + } + } + return filename; + } + /** * @param name @@ -93,7 +111,7 @@ export class Downloader { * getData from a zip file * */ async getData(dbFile, fileEntry, onProgress) { - const _zip = new zip.BlobWriter(); + const _zip = new BlobWriter(); const blob = await fileEntry.getData(_zip, { onprogress: (value, total) => { onProgress(value, total, dbFile); @@ -187,33 +205,10 @@ export class Downloader { return result; } - getContentLength(url) { - return new Promise((resolve, reject) => { - let xhr = new XMLHttpRequest(); - xhr.open("HEAD", url); - xhr.send(); - - xhr.onload = function () { - if (xhr.status >= 200 && xhr.status < 300) { - const contentLength = xhr.getResponseHeader("Content-Length"); - if (contentLength) { - resolve(parseInt(contentLength, 10)); - } else { - reject(new Error("Cannot get Content-Length")); - } - } else { - reject(new Error(`Request error : ${xhr.status} ${xhr.statusText}`)); - } - }; - - xhr.onerror = function () { - reject(new Error("Connetion issue")); - }; - - xhr.ontimeout = function () { - reject(new Error("Timeout issue")); - }; - }); + async getContentLength(url) { + const response = await ky.head(url) + const contentLength = response.headers.get("content-length"); + return parseInt(contentLength, 10); } async fetch({url, chunkSize}, onProgress) { @@ -226,7 +221,7 @@ export class Downloader { const start = i * chunkSize; const end = Math.min(start + chunkSize - 1, contentLength - 1); try { - const response = await fetch(url, { + const response = await ky.get(url, { headers: { 'Range': `bytes=${start}-${end}` } @@ -251,4 +246,4 @@ export class Downloader { } -} \ No newline at end of file +} diff --git a/app/src/static/js/controller/utils/step.class.js b/app/src/controller/utils/step.class.js similarity index 100% rename from app/src/static/js/controller/utils/step.class.js rename to app/src/controller/utils/step.class.js diff --git a/app/src/static/js/debug.js b/app/src/debug.js similarity index 100% rename from app/src/static/js/debug.js rename to app/src/debug.js diff --git a/app/src/static/js/errorManager.js b/app/src/errorManager.js similarity index 100% rename from app/src/static/js/errorManager.js rename to app/src/errorManager.js diff --git a/app/src/index.js b/app/src/index.js deleted file mode 100644 index 101eef29eb3dd89584877eeb7f542fbd50cb2e7b..0000000000000000000000000000000000000000 --- a/app/src/index.js +++ /dev/null @@ -1,21 +0,0 @@ -const PRODUCT = '/e/OS Installer'; -const VERSION = '0.7.1'; - -const express = require('express'); -const app = express(); - -app.use(express.json()); -app.use(express.static(__dirname + '/static')); - - -console.log(`Starting ${PRODUCT} ${VERSION}`); - -app.listen(3000, () => console.log('Listening on port 3000')); - -const gracefulShutdown = () => { - process.exit(); -}; - -process.on('SIGINT', gracefulShutdown); -process.on('SIGTERM', gracefulShutdown); -process.on('SIGUSR2', gracefulShutdown); // Sent by nodemon diff --git a/app/src/static/js/lib/fastboot/fastboot.js b/app/src/lib/fastboot/fastboot.js similarity index 100% rename from app/src/static/js/lib/fastboot/fastboot.js rename to app/src/lib/fastboot/fastboot.js diff --git a/app/src/static/js/lib/fastboot/vendor/pako_inflate.min.js b/app/src/lib/fastboot/vendor/pako_inflate.min.js similarity index 100% rename from app/src/static/js/lib/fastboot/vendor/pako_inflate.min.js rename to app/src/lib/fastboot/vendor/pako_inflate.min.js diff --git a/app/src/static/js/lib/fastboot/vendor/z-worker-pako.js b/app/src/lib/fastboot/vendor/z-worker-pako.js similarity index 100% rename from app/src/static/js/lib/fastboot/vendor/z-worker-pako.js rename to app/src/lib/fastboot/vendor/z-worker-pako.js diff --git a/app/src/static/js/lib/webadb/_UNUSED_-webadb.js b/app/src/lib/webadb/_UNUSED_-webadb.js similarity index 100% rename from app/src/static/js/lib/webadb/_UNUSED_-webadb.js rename to app/src/lib/webadb/_UNUSED_-webadb.js diff --git a/app/src/static/js/lib/webadb/adb.bundle.js b/app/src/lib/webadb/adb.bundle.js similarity index 99% rename from app/src/static/js/lib/webadb/adb.bundle.js rename to app/src/lib/webadb/adb.bundle.js index 0b80036da0f926a85e7419d530c990133917f6cc..62d13640718d99644c96eabd0c7692d641512d55 100644 --- a/app/src/static/js/lib/webadb/adb.bundle.js +++ b/app/src/lib/webadb/adb.bundle.js @@ -2244,7 +2244,7 @@ function decodeUtf8(buffer) { return Utf8Decoder.decode(buffer); } -class AdbWebBackend { +export class AdbWebBackend { constructor(device) { this.disconnectEvent = new EventEmitter(); this.onDisconnected = this.disconnectEvent.event; @@ -2378,7 +2378,7 @@ var AdbPropKey; AdbPropKey["Device"] = "ro.product.device"; AdbPropKey["Features"] = "features"; })(AdbPropKey || (AdbPropKey = {})); -class Adb2 { +export class Adb2 { constructor(backend, logger) { this._connected = false; this.packetDispatcher = new AdbPacketDispatcher(backend, logger); @@ -2555,7 +2555,7 @@ class Adb2 { } } -class AdbWebBackend3 { +export class AdbWebBackend3 { constructor(device) { this.disconnectEvent = new EventEmitter(); this.onDisconnected = this.disconnectEvent.event; @@ -2673,7 +2673,7 @@ class AdbWebBackend3 { } } -class Adb3 { +export class Adb3 { // This one is dedicated for adb sidelaod constructor(backend) { this._connected = false; diff --git a/app/src/static/js/lib/webadb/helper.class.js b/app/src/lib/webadb/helper.class.js similarity index 100% rename from app/src/static/js/lib/webadb/helper.class.js rename to app/src/lib/webadb/helper.class.js diff --git a/app/src/static/js/lib/webadb/message-header.class.js b/app/src/lib/webadb/message-header.class.js similarity index 100% rename from app/src/static/js/lib/webadb/message-header.class.js rename to app/src/lib/webadb/message-header.class.js diff --git a/app/src/static/js/lib/webadb/message.class.js b/app/src/lib/webadb/message.class.js similarity index 100% rename from app/src/static/js/lib/webadb/message.class.js rename to app/src/lib/webadb/message.class.js diff --git a/app/src/static/js/lib/zip/zip-no-worker-inflate.min.js b/app/src/static/js/lib/zip/zip-no-worker-inflate.min.js deleted file mode 100644 index dcef89ce041d6808941b12ee2281d5a6243fd16b..0000000000000000000000000000000000000000 --- a/app/src/static/js/lib/zip/zip-no-worker-inflate.min.js +++ /dev/null @@ -1,9203 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.zip = {})); -})(this, (function (exports) { 'use strict'; - - const { Array, Object, String, Number, BigInt, Math, Date, Map, Set, Response, URL, Error, Uint8Array, Uint16Array, Uint32Array, DataView, Blob, Promise, TextEncoder, TextDecoder, document, crypto, btoa, TransformStream, ReadableStream, WritableStream, CompressionStream, DecompressionStream, navigator, Worker } = typeof globalThis !== 'undefined' ? globalThis : this || self; - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - /* - * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc. - * JZlib is based on zlib-1.1.3, so all credit should go authors - * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu) - * and contributors of zlib. - */ - - // deno-lint-ignore-file no-this-alias prefer-const - - // Global - - const MAX_BITS$1 = 15; - const D_CODES = 30; - const BL_CODES = 19; - - const LENGTH_CODES = 29; - const LITERALS = 256; - const L_CODES = (LITERALS + 1 + LENGTH_CODES); - const HEAP_SIZE = (2 * L_CODES + 1); - - const END_BLOCK = 256; - - // Bit length codes must not exceed MAX_BL_BITS bits - const MAX_BL_BITS = 7; - - // repeat previous bit length 3-6 times (2 bits of repeat count) - const REP_3_6 = 16; - - // repeat a zero length 3-10 times (3 bits of repeat count) - const REPZ_3_10 = 17; - - // repeat a zero length 11-138 times (7 bits of repeat count) - const REPZ_11_138 = 18; - - // The lengths of the bit length codes are sent in order of decreasing - // probability, to avoid transmitting the lengths for unused bit - // length codes. - - const Buf_size = 8 * 2; - - // JZlib version : "1.0.2" - const Z_DEFAULT_COMPRESSION = -1; - - // compression strategy - const Z_FILTERED = 1; - const Z_HUFFMAN_ONLY = 2; - const Z_DEFAULT_STRATEGY = 0; - - const Z_NO_FLUSH$1 = 0; - const Z_PARTIAL_FLUSH = 1; - const Z_FULL_FLUSH = 3; - const Z_FINISH$1 = 4; - - const Z_OK$1 = 0; - const Z_STREAM_END$1 = 1; - const Z_NEED_DICT$1 = 2; - const Z_STREAM_ERROR$1 = -2; - const Z_DATA_ERROR$1 = -3; - const Z_BUF_ERROR$1 = -5; - - // Tree - - function extractArray(array) { - return flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length))); - } - - function flatArray(array) { - return array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []); - } - - // see definition of array dist_code below - const _dist_code = [0, 1, 2, 3].concat(...extractArray([ - [2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16], - [1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29] - ])); - - function Tree() { - const that = this; - - // dyn_tree; // the dynamic tree - // max_code; // largest code with non zero frequency - // stat_desc; // the corresponding static tree - - // Compute the optimal bit lengths for a tree and update the total bit - // length - // for the current block. - // IN assertion: the fields freq and dad are set, heap[heap_max] and - // above are the tree nodes sorted by increasing frequency. - // OUT assertions: the field len is set to the optimal bit length, the - // array bl_count contains the frequencies for each bit length. - // The length opt_len is updated; static_len is also updated if stree is - // not null. - function gen_bitlen(s) { - const tree = that.dyn_tree; - const stree = that.stat_desc.static_tree; - const extra = that.stat_desc.extra_bits; - const base = that.stat_desc.extra_base; - const max_length = that.stat_desc.max_length; - let h; // heap index - let n, m; // iterate over the tree elements - let bits; // bit length - let xbits; // extra bits - let f; // frequency - let overflow = 0; // number of elements with bit length too large - - for (bits = 0; bits <= MAX_BITS$1; bits++) - s.bl_count[bits] = 0; - - // In a first pass, compute the optimal bit lengths (which may - // overflow in the case of the bit length tree). - tree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1] * 2 + 1] + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1] = bits; - // We overwrite tree[n*2+1] which is no longer needed - - if (n > that.max_code) - continue; // not a leaf node - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) - xbits = extra[n - base]; - f = tree[n * 2]; - s.opt_len += f * (bits + xbits); - if (stree) - s.static_len += f * (stree[n * 2 + 1] + xbits); - } - if (overflow === 0) - return; - - // This happens for example on obj2 and pic of the Calgary corpus - // Find the first bit length which could increase: - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) - bits--; - s.bl_count[bits]--; // move one leaf down the tree - s.bl_count[bits + 1] += 2; // move one overflow item as its brother - s.bl_count[max_length]--; - // The brother of the overflow item also moves one step up, - // but this does not affect bl_count[max_length] - overflow -= 2; - } while (overflow > 0); - - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > that.max_code) - continue; - if (tree[m * 2 + 1] != bits) { - s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2]; - tree[m * 2 + 1] = bits; - } - n--; - } - } - } - - // Reverse the first len bits of a code, using straightforward code (a - // faster - // method would use a table) - // IN assertion: 1 <= len <= 15 - function bi_reverse(code, // the value to invert - len // its bit length - ) { - let res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; - } - - // Generate the codes for a given tree and bit counts (which need not be - // optimal). - // IN assertion: the array bl_count contains the bit length statistics for - // the given tree and the field len is set for all tree elements. - // OUT assertion: the field code is set for all tree elements of non - // zero code length. - function gen_codes(tree, // the tree to decorate - max_code, // largest code with non zero frequency - bl_count // number of codes at each bit length - ) { - const next_code = []; // next code value for each - // bit length - let code = 0; // running code value - let bits; // bit index - let n; // code index - let len; - - // The distribution counts are first used to generate the code values - // without bit reversal. - for (bits = 1; bits <= MAX_BITS$1; bits++) { - next_code[bits] = code = ((code + bl_count[bits - 1]) << 1); - } - - // Check that the bit counts in bl_count are consistent. The last code - // must be all ones. - // Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--) - s.pqdownheap(tree, n); - - // Construct the Huffman tree by repeatedly combining the least two - // frequent nodes. - - node = elems; // next internal node of the tree - do { - // n = node of least frequency - n = s.heap[1]; - s.heap[1] = s.heap[s.heap_len--]; - s.pqdownheap(tree, 1); - m = s.heap[1]; // m = node of next least frequency - - s.heap[--s.heap_max] = n; // keep the nodes sorted by frequency - s.heap[--s.heap_max] = m; - - // Create a new node father of n and m - tree[node * 2] = (tree[n * 2] + tree[m * 2]); - s.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1; - tree[n * 2 + 1] = tree[m * 2 + 1] = node; - - // and insert the new node in the heap - s.heap[1] = node++; - s.pqdownheap(tree, 1); - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1]; - - // At this point, the fields freq and dad are set. We can now - // generate the bit lengths. - - gen_bitlen(s); - - // The field len is now set, we can generate the bit codes - gen_codes(tree, that.max_code, s.bl_count); - }; - - } - - Tree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([ - [2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19], - [16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]])); - - Tree.base_length = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0]; - - Tree.base_dist = [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, - 24576]; - - // Mapping from a distance to a distance code. dist is the distance - 1 and - // must not have side effects. _dist_code[256] and _dist_code[257] are never - // used. - Tree.d_code = function (dist) { - return ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]); - }; - - // extra bits for each length code - Tree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]; - - // extra bits for each distance code - Tree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]; - - // extra bits for each bit length code - Tree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]; - - Tree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - // StaticTree - - function StaticTree(static_tree, extra_bits, extra_base, elems, max_length) { - const that = this; - that.static_tree = static_tree; - that.extra_bits = extra_bits; - that.extra_base = extra_base; - that.elems = elems; - that.max_length = max_length; - } - - const static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, - 210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, - 214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, - 209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, - 213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307, - 179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475, - 59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215, - 471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95, - 351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52, - 116, 3, 131, 67, 195, 35, 163, 99, 227]; - const static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]); - StaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]])); - - const static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23]; - const static_dtree_second_part = extractArray([[30, 5]]); - StaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]])); - - StaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS$1); - - StaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS$1); - - StaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - // Deflate - - const MAX_MEM_LEVEL = 9; - const DEF_MEM_LEVEL = 8; - - function Config(good_length, max_lazy, nice_length, max_chain, func) { - const that = this; - that.good_length = good_length; - that.max_lazy = max_lazy; - that.nice_length = nice_length; - that.max_chain = max_chain; - that.func = func; - } - - const STORED$1 = 0; - const FAST = 1; - const SLOW = 2; - const config_table = [ - new Config(0, 0, 0, 0, STORED$1), - new Config(4, 4, 8, 4, FAST), - new Config(4, 5, 16, 8, FAST), - new Config(4, 6, 32, 32, FAST), - new Config(4, 4, 16, 16, SLOW), - new Config(8, 16, 32, 32, SLOW), - new Config(8, 16, 128, 128, SLOW), - new Config(8, 32, 128, 256, SLOW), - new Config(32, 128, 258, 1024, SLOW), - new Config(32, 258, 258, 4096, SLOW) - ]; - - const z_errmsg = ["need dictionary", // Z_NEED_DICT - // 2 - "stream end", // Z_STREAM_END 1 - "", // Z_OK 0 - "", // Z_ERRNO (-1) - "stream error", // Z_STREAM_ERROR (-2) - "data error", // Z_DATA_ERROR (-3) - "", // Z_MEM_ERROR (-4) - "buffer error", // Z_BUF_ERROR (-5) - "",// Z_VERSION_ERROR (-6) - ""]; - - // block not completed, need more input or more output - const NeedMore = 0; - - // block flush performed - const BlockDone = 1; - - // finish started, need only more output at next deflate - const FinishStarted = 2; - - // finish done, accept no more input or output - const FinishDone = 3; - - // preset dictionary flag in zlib header - const PRESET_DICT$1 = 0x20; - - const INIT_STATE = 42; - const BUSY_STATE = 113; - const FINISH_STATE = 666; - - // The deflate compression method - const Z_DEFLATED$1 = 8; - - const STORED_BLOCK = 0; - const STATIC_TREES = 1; - const DYN_TREES = 2; - - const MIN_MATCH = 3; - const MAX_MATCH = 258; - const MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - - function smaller(tree, n, m, depth) { - const tn2 = tree[n * 2]; - const tm2 = tree[m * 2]; - return (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m])); - } - - function Deflate() { - - const that = this; - let strm; // pointer back to this zlib stream - let status; // as the name implies - // pending_buf; // output still pending - let pending_buf_size; // size of pending_buf - // pending_out; // next pending byte to output to the stream - // pending; // nb of bytes in the pending buffer - - // dist_buf; // buffer for distances - // lc_buf; // buffer for literals or lengths - // To simplify the code, dist_buf and lc_buf have the same number of elements. - // To use different lengths, an extra flag array would be necessary. - - let last_flush; // value of flush param for previous deflate call - - let w_size; // LZ77 win size (32K by default) - let w_bits; // log2(w_size) (8..16) - let w_mask; // w_size - 1 - - let win; - // Sliding win. Input bytes are read into the second half of the win, - // and move to the first half later to keep a dictionary of at least wSize - // bytes. With this organization, matches are limited to a distance of - // wSize-MAX_MATCH bytes, but this ensures that IO is always - // performed with a length multiple of the block size. Also, it limits - // the win size to 64K, which is quite useful on MSDOS. - // To do: use the user input buffer as sliding win. - - let window_size; - // Actual size of win: 2*wSize, except when the user input buffer - // is directly used as sliding win. - - let prev; - // Link to older string with same hash index. To limit the size of this - // array to 64K, this link is maintained only for the last 32K strings. - // An index in this array is thus a win index modulo 32K. - - let head; // Heads of the hash chains or NIL. - - let ins_h; // hash index of string to be inserted - let hash_size; // number of elements in hash table - let hash_bits; // log2(hash_size) - let hash_mask; // hash_size-1 - - // Number of bits by which ins_h must be shifted at each input - // step. It must be such that after MIN_MATCH steps, the oldest - // byte no longer takes part in the hash key, that is: - // hash_shift * MIN_MATCH >= hash_bits - let hash_shift; - - // Window position at the beginning of the current output block. Gets - // negative when the win is moved backwards. - - let block_start; - - let match_length; // length of best match - let prev_match; // previous match - let match_available; // set if previous match exists - let strstart; // start of string to insert - let match_start; // start of matching string - let lookahead; // number of valid bytes ahead in win - - // Length of the best match at previous step. Matches not greater than this - // are discarded. This is used in the lazy match evaluation. - let prev_length; - - // To speed up deflation, hash chains are never searched beyond this - // length. A higher limit improves compression ratio but degrades the speed. - let max_chain_length; - - // Attempt to find a better match only when the current match is strictly - // smaller than this value. This mechanism is used only for compression - // levels >= 4. - let max_lazy_match; - - // Insert new strings in the hash table only if the match length is not - // greater than this length. This saves time but degrades compression. - // max_insert_length is used only for compression levels <= 3. - - let level; // compression level (1..9) - let strategy; // favor or force Huffman coding - - // Use a faster search when the previous match is longer than this - let good_match; - - // Stop searching when current match exceeds this - let nice_match; - - let dyn_ltree; // literal and length tree - let dyn_dtree; // distance tree - let bl_tree; // Huffman tree for bit lengths - - const l_desc = new Tree(); // desc for literal tree - const d_desc = new Tree(); // desc for distance tree - const bl_desc = new Tree(); // desc for bit length tree - - // that.heap_len; // number of elements in the heap - // that.heap_max; // element of largest frequency - // The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - // The same heap array is used to build all trees. - - // Depth of each subtree used as tie breaker for trees of equal frequency - that.depth = []; - - // Size of match buffer for literals/lengths. There are 4 reasons for - // limiting lit_bufsize to 64K: - // - frequencies can be kept in 16 bit counters - // - if compression is not successful for the first block, all input - // data is still in the win so we can still emit a stored block even - // when input comes from standard input. (This can also be done for - // all blocks if lit_bufsize is not greater than 32K.) - // - if compression is not successful for a file smaller than 64K, we can - // even emit a stored file instead of a stored block (saving 5 bytes). - // This is applicable only for zip (not gzip or zlib). - // - creating new Huffman trees less frequently may not provide fast - // adaptation to changes in the input data statistics. (Take for - // example a binary file with poorly compressible code followed by - // a highly compressible string table.) Smaller buffer sizes give - // fast adaptation but have of course the overhead of transmitting - // trees more frequently. - // - I can't count above 4 - let lit_bufsize; - - let last_lit; // running index in dist_buf and lc_buf - - // that.opt_len; // bit length of current block with optimal trees - // that.static_len; // bit length of current block with static trees - let matches; // number of string matches in current block - let last_eob_len; // bit length of EOB code for last block - - // Output buffer. bits are inserted starting at the bottom (least - // significant bits). - let bi_buf; - - // Number of valid bits in bi_buf. All bits above the last valid bit - // are always zero. - let bi_valid; - - // number of codes at each bit length for an optimal tree - that.bl_count = []; - - // heap used to build the Huffman trees - that.heap = []; - - dyn_ltree = []; - dyn_dtree = []; - bl_tree = []; - - function lm_init() { - window_size = 2 * w_size; - - head[hash_size - 1] = 0; - for (let i = 0; i < hash_size - 1; i++) { - head[i] = 0; - } - - // Set the default configuration parameters: - max_lazy_match = config_table[level].max_lazy; - good_match = config_table[level].good_length; - nice_match = config_table[level].nice_length; - max_chain_length = config_table[level].max_chain; - - strstart = 0; - block_start = 0; - lookahead = 0; - match_length = prev_length = MIN_MATCH - 1; - match_available = 0; - ins_h = 0; - } - - function init_block() { - let i; - // Initialize the trees. - for (i = 0; i < L_CODES; i++) - dyn_ltree[i * 2] = 0; - for (i = 0; i < D_CODES; i++) - dyn_dtree[i * 2] = 0; - for (i = 0; i < BL_CODES; i++) - bl_tree[i * 2] = 0; - - dyn_ltree[END_BLOCK * 2] = 1; - that.opt_len = that.static_len = 0; - last_lit = matches = 0; - } - - // Initialize the tree data structures for a new zlib stream. - function tr_init() { - - l_desc.dyn_tree = dyn_ltree; - l_desc.stat_desc = StaticTree.static_l_desc; - - d_desc.dyn_tree = dyn_dtree; - d_desc.stat_desc = StaticTree.static_d_desc; - - bl_desc.dyn_tree = bl_tree; - bl_desc.stat_desc = StaticTree.static_bl_desc; - - bi_buf = 0; - bi_valid = 0; - last_eob_len = 8; // enough lookahead for inflate - - // Initialize the first block of the first file: - init_block(); - } - - // Restore the heap property by moving down the tree starting at node k, - // exchanging a node with the smallest of its two sons if necessary, - // stopping - // when the heap property is re-established (each father smaller than its - // two sons). - that.pqdownheap = function (tree, // the tree to restore - k // node to move down - ) { - const heap = that.heap; - const v = heap[k]; - let j = k << 1; // left son of k - while (j <= that.heap_len) { - // Set j to the smallest of the two sons: - if (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) { - j++; - } - // Exit if v is smaller than both sons - if (smaller(tree, v, heap[j], that.depth)) - break; - - // Exchange v with the smallest son - heap[k] = heap[j]; - k = j; - // And continue down the tree, setting j to the left son of k - j <<= 1; - } - heap[k] = v; - }; - - // Scan a literal or distance tree to determine the frequencies of the codes - // in the bit length tree. - function scan_tree(tree,// the tree to be scanned - max_code // and its largest code of non zero frequency - ) { - let prevlen = -1; // last emitted length - let curlen; // length of current code - let nextlen = tree[0 * 2 + 1]; // length of next code - let count = 0; // repeat count of the current code - let max_count = 7; // max repeat count - let min_count = 4; // min repeat count - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1] = 0xffff; // guard - - for (let n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - bl_tree[curlen * 2] += count; - } else if (curlen !== 0) { - if (curlen != prevlen) - bl_tree[curlen * 2]++; - bl_tree[REP_3_6 * 2]++; - } else if (count <= 10) { - bl_tree[REPZ_3_10 * 2]++; - } else { - bl_tree[REPZ_11_138 * 2]++; - } - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - - // Construct the Huffman tree for the bit lengths and return the index in - // bl_order of the last bit length code to send. - function build_bl_tree() { - let max_blindex; // index of last bit length code of non zero freq - - // Determine the bit length frequencies for literal and distance trees - scan_tree(dyn_ltree, l_desc.max_code); - scan_tree(dyn_dtree, d_desc.max_code); - - // Build the bit length tree: - bl_desc.build_tree(that); - // opt_len now includes the length of the tree representations, except - // the lengths of the bit lengths codes and the 5+5+4 bits for the - // counts. - - // Determine the number of bit length codes to send. The pkzip format - // requires that at least 4 bit length codes be sent. (appnote.txt says - // 3 but the actual value used is 4.) - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0) - break; - } - // Update opt_len to include the bit length tree and counts - that.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - - return max_blindex; - } - - // Output a byte on the stream. - // IN assertion: there is enough room in pending_buf. - function put_byte(p) { - that.pending_buf[that.pending++] = p; - } - - function put_short(w) { - put_byte(w & 0xff); - put_byte((w >>> 8) & 0xff); - } - - function putShortMSB(b) { - put_byte((b >> 8) & 0xff); - put_byte((b & 0xff) & 0xff); - } - - function send_bits(value, length) { - let val; - const len = length; - if (bi_valid > Buf_size - len) { - val = value; - // bi_buf |= (val << bi_valid); - bi_buf |= ((val << bi_valid) & 0xffff); - put_short(bi_buf); - bi_buf = val >>> (Buf_size - bi_valid); - bi_valid += len - Buf_size; - } else { - // bi_buf |= (value) << bi_valid; - bi_buf |= (((value) << bi_valid) & 0xffff); - bi_valid += len; - } - } - - function send_code(c, tree) { - const c2 = c * 2; - send_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff); - } - - // Send a literal or distance tree in compressed form, using the codes in - // bl_tree. - function send_tree(tree,// the tree to be sent - max_code // and its largest code of non zero frequency - ) { - let n; // iterates over all tree elements - let prevlen = -1; // last emitted length - let curlen; // length of current code - let nextlen = tree[0 * 2 + 1]; // length of next code - let count = 0; // repeat count of the current code - let max_count = 7; // max repeat count - let min_count = 4; // min repeat count - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { - send_code(curlen, bl_tree); - } while (--count !== 0); - } else if (curlen !== 0) { - if (curlen != prevlen) { - send_code(curlen, bl_tree); - count--; - } - send_code(REP_3_6, bl_tree); - send_bits(count - 3, 2); - } else if (count <= 10) { - send_code(REPZ_3_10, bl_tree); - send_bits(count - 3, 3); - } else { - send_code(REPZ_11_138, bl_tree); - send_bits(count - 11, 7); - } - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - - // Send the header for a block using dynamic Huffman trees: the counts, the - // lengths of the bit length codes, the literal tree and the distance tree. - // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - function send_all_trees(lcodes, dcodes, blcodes) { - let rank; // index in bl_order - - send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt - send_bits(dcodes - 1, 5); - send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt - for (rank = 0; rank < blcodes; rank++) { - send_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3); - } - send_tree(dyn_ltree, lcodes - 1); // literal tree - send_tree(dyn_dtree, dcodes - 1); // distance tree - } - - // Flush the bit buffer, keeping at most 7 bits in it. - function bi_flush() { - if (bi_valid == 16) { - put_short(bi_buf); - bi_buf = 0; - bi_valid = 0; - } else if (bi_valid >= 8) { - put_byte(bi_buf & 0xff); - bi_buf >>>= 8; - bi_valid -= 8; - } - } - - // Send one empty static block to give enough lookahead for inflate. - // This takes 10 bits, of which 7 may remain in the bit buffer. - // The current inflate code requires 9 bits of lookahead. If the - // last two codes for the previous block (real code plus EOB) were coded - // on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode - // the last real code. In this case we send two empty static blocks instead - // of one. (There are no problems if the previous block is stored or fixed.) - // To simplify the code, we assume the worst case of last real code encoded - // on one bit only. - function _tr_align() { - send_bits(STATIC_TREES << 1, 3); - send_code(END_BLOCK, StaticTree.static_ltree); - - bi_flush(); - - // Of the 10 bits for the empty block, we have already sent - // (10 - bi_valid) bits. The lookahead for the last real code (before - // the EOB of the previous block) was thus at least one plus the length - // of the EOB plus what we have just sent of the empty static block. - if (1 + last_eob_len + 10 - bi_valid < 9) { - send_bits(STATIC_TREES << 1, 3); - send_code(END_BLOCK, StaticTree.static_ltree); - bi_flush(); - } - last_eob_len = 7; - } - - // Save the match info and tally the frequency counts. Return true if - // the current block must be flushed. - function _tr_tally(dist, // distance of matched string - lc // match length-MIN_MATCH or unmatched char (if dist==0) - ) { - let out_length, in_length, dcode; - that.dist_buf[last_lit] = dist; - that.lc_buf[last_lit] = lc & 0xff; - last_lit++; - - if (dist === 0) { - // lc is the unmatched char - dyn_ltree[lc * 2]++; - } else { - matches++; - // Here, lc is the match length - MIN_MATCH - dist--; // dist = match distance - 1 - dyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++; - dyn_dtree[Tree.d_code(dist) * 2]++; - } - - if ((last_lit & 0x1fff) === 0 && level > 2) { - // Compute an upper bound for the compressed length - out_length = last_lit * 8; - in_length = strstart - block_start; - for (dcode = 0; dcode < D_CODES; dcode++) { - out_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]); - } - out_length >>>= 3; - if ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2)) - return true; - } - - return (last_lit == lit_bufsize - 1); - // We avoid equality with lit_bufsize because of wraparound at 64K - // on 16 bit machines and because stored blocks are restricted to - // 64K-1 bytes. - } - - // Send the block data compressed using the given Huffman trees - function compress_block(ltree, dtree) { - let dist; // distance of matched string - let lc; // match length or unmatched char (if dist === 0) - let lx = 0; // running index in dist_buf and lc_buf - let code; // the code to send - let extra; // number of extra bits to send - - if (last_lit !== 0) { - do { - dist = that.dist_buf[lx]; - lc = that.lc_buf[lx]; - lx++; - - if (dist === 0) { - send_code(lc, ltree); // send a literal byte - } else { - // Here, lc is the match length - MIN_MATCH - code = Tree._length_code[lc]; - - send_code(code + LITERALS + 1, ltree); // send the length - // code - extra = Tree.extra_lbits[code]; - if (extra !== 0) { - lc -= Tree.base_length[code]; - send_bits(lc, extra); // send the extra length bits - } - dist--; // dist is now the match distance - 1 - code = Tree.d_code(dist); - - send_code(code, dtree); // send the distance code - extra = Tree.extra_dbits[code]; - if (extra !== 0) { - dist -= Tree.base_dist[code]; - send_bits(dist, extra); // send the extra distance bits - } - } // literal or match pair ? - } while (lx < last_lit); - } - - send_code(END_BLOCK, ltree); - last_eob_len = ltree[END_BLOCK * 2 + 1]; - } - - // Flush the bit buffer and align the output on a byte boundary - function bi_windup() { - if (bi_valid > 8) { - put_short(bi_buf); - } else if (bi_valid > 0) { - put_byte(bi_buf & 0xff); - } - bi_buf = 0; - bi_valid = 0; - } - - // Copy a stored block, storing first the length and its - // one's complement if requested. - function copy_block(buf, // the input data - len, // its length - header // true if block header must be written - ) { - bi_windup(); // align on byte boundary - last_eob_len = 8; // enough lookahead for inflate - - if (header) { - put_short(len); - put_short(~len); - } - - that.pending_buf.set(win.subarray(buf, buf + len), that.pending); - that.pending += len; - } - - // Send a stored block - function _tr_stored_block(buf, // input block - stored_len, // length of input block - eof // true if this is the last block for a file - ) { - send_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type - copy_block(buf, stored_len, true); // with header - } - - // Determine the best encoding for the current block: dynamic trees, static - // trees or store, and output the encoded block to the zip file. - function _tr_flush_block(buf, // input block, or NULL if too old - stored_len, // length of input block - eof // true if this is the last block for a file - ) { - let opt_lenb, static_lenb;// opt_len and static_len in bytes - let max_blindex = 0; // index of last bit length code of non zero freq - - // Build the Huffman trees unless a stored block is forced - if (level > 0) { - // Construct the literal and distance trees - l_desc.build_tree(that); - - d_desc.build_tree(that); - - // At this point, opt_len and static_len are the total bit lengths - // of - // the compressed block data, excluding the tree representations. - - // Build the bit length tree for the above two trees, and get the - // index - // in bl_order of the last bit length code to send. - max_blindex = build_bl_tree(); - - // Determine the best encoding. Compute first the block length in - // bytes - opt_lenb = (that.opt_len + 3 + 7) >>> 3; - static_lenb = (that.static_len + 3 + 7) >>> 3; - - if (static_lenb <= opt_lenb) - opt_lenb = static_lenb; - } else { - opt_lenb = static_lenb = stored_len + 5; // force a stored block - } - - if ((stored_len + 4 <= opt_lenb) && buf != -1) { - // 4: two words for the lengths - // The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - // Otherwise we can't have processed more than WSIZE input bytes - // since - // the last block flush, because compression would have been - // successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - // transform a block into a stored block. - _tr_stored_block(buf, stored_len, eof); - } else if (static_lenb == opt_lenb) { - send_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3); - compress_block(StaticTree.static_ltree, StaticTree.static_dtree); - } else { - send_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3); - send_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1); - compress_block(dyn_ltree, dyn_dtree); - } - - // The above check is made mod 2^32, for files larger than 512 MB - // and uLong implemented on 32 bits. - - init_block(); - - if (eof) { - bi_windup(); - } - } - - function flush_block_only(eof) { - _tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof); - block_start = strstart; - strm.flush_pending(); - } - - // Fill the win when the lookahead becomes insufficient. - // Updates strstart and lookahead. - // - // IN assertion: lookahead < MIN_LOOKAHEAD - // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - // At least one byte has been read, or avail_in === 0; reads are - // performed for at least two bytes (required for the zip translate_eol - // option -- not supported here). - function fill_window() { - let n, m; - let p; - let more; // Amount of free space at the end of the win. - - do { - more = (window_size - lookahead - strstart); - - // Deal with !@#$% 64K limit: - if (more === 0 && strstart === 0 && lookahead === 0) { - more = w_size; - } else if (more == -1) { - // Very unlikely, but possible on 16 bit machine if strstart == - // 0 - // and lookahead == 1 (input done one byte at time) - more--; - - // If the win is almost full and there is insufficient - // lookahead, - // move the upper half to the lower one to make room in the - // upper half. - } else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) { - win.set(win.subarray(w_size, w_size + w_size), 0); - - match_start -= w_size; - strstart -= w_size; // we now have strstart >= MAX_DIST - block_start -= w_size; - - // Slide the hash table (could be avoided with 32 bit values - // at the expense of memory usage). We slide even when level == - // 0 - // to keep the hash table consistent if we switch back to level - // > 0 - // later. (Using level 0 permanently is not an optimal usage of - // zlib, so we don't care about this pathological case.) - - n = hash_size; - p = n; - do { - m = (head[--p] & 0xffff); - head[p] = (m >= w_size ? m - w_size : 0); - } while (--n !== 0); - - n = w_size; - p = n; - do { - m = (prev[--p] & 0xffff); - prev[p] = (m >= w_size ? m - w_size : 0); - // If n is not on any hash chain, prev[n] is garbage but - // its value will never be used. - } while (--n !== 0); - more += w_size; - } - - if (strm.avail_in === 0) - return; - - // If there was no sliding: - // strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - // more == window_size - lookahead - strstart - // => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - // => more >= window_size - 2*WSIZE + 2 - // In the BIG_MEM or MMAP case (not yet supported), - // window_size == input_size + MIN_LOOKAHEAD && - // strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - // Otherwise, window_size == 2*WSIZE so more >= 2. - // If there was sliding, more >= WSIZE. So in all cases, more >= 2. - - n = strm.read_buf(win, strstart + lookahead, more); - lookahead += n; - - // Initialize the hash value now that we have some input: - if (lookahead >= MIN_MATCH) { - ins_h = win[strstart] & 0xff; - ins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask; - } - // If the whole input has less than MIN_MATCH bytes, ins_h is - // garbage, - // but this is not important since only literal bytes will be - // emitted. - } while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0); - } - - // Copy without compression as much as possible from the input stream, - // return - // the current block state. - // This function does not insert new strings in the dictionary since - // uncompressible data is probably not useful. This function is used - // only for the level=0 compression option. - // NOTE: this function should be optimized to avoid extra copying from - // win to pending_buf. - function deflate_stored(flush) { - // Stored blocks are limited to 0xffff bytes, pending_buf is limited - // to pending_buf_size, and each stored block has a 5 byte header: - - let max_block_size = 0xffff; - let max_start; - - if (max_block_size > pending_buf_size - 5) { - max_block_size = pending_buf_size - 5; - } - - // Copy as much as possible from input to output: - // eslint-disable-next-line no-constant-condition - while (true) { - // Fill the win as much as possible: - if (lookahead <= 1) { - fill_window(); - if (lookahead === 0 && flush == Z_NO_FLUSH$1) - return NeedMore; - if (lookahead === 0) - break; // flush the current block - } - - strstart += lookahead; - lookahead = 0; - - // Emit a stored block if pending_buf will be full: - max_start = block_start + max_block_size; - if (strstart === 0 || strstart >= max_start) { - // strstart === 0 is possible when wraparound on 16-bit machine - lookahead = (strstart - max_start); - strstart = max_start; - - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - - } - - // Flush if we may have to slide, otherwise block_start may become - // negative and the data will be gone: - if (strstart - block_start >= w_size - MIN_LOOKAHEAD) { - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - } - } - - flush_block_only(flush == Z_FINISH$1); - if (strm.avail_out === 0) - return (flush == Z_FINISH$1) ? FinishStarted : NeedMore; - - return flush == Z_FINISH$1 ? FinishDone : BlockDone; - } - - function longest_match(cur_match) { - let chain_length = max_chain_length; // max hash chain length - let scan = strstart; // current string - let match; // matched string - let len; // length of current match - let best_len = prev_length; // best match length so far - const limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0; - let _nice_match = nice_match; - - // Stop when cur_match becomes <= limit. To simplify the code, - // we prevent matches with the string of win index 0. - - const wmask = w_mask; - - const strend = strstart + MAX_MATCH; - let scan_end1 = win[scan + best_len - 1]; - let scan_end = win[scan + best_len]; - - // The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of - // 16. - // It is easy to get rid of this optimization if necessary. - - // Do not waste too much time if we already have a good match: - if (prev_length >= good_match) { - chain_length >>= 2; - } - - // Do not look for matches beyond the end of the input. This is - // necessary - // to make deflate deterministic. - if (_nice_match > lookahead) - _nice_match = lookahead; - - do { - match = cur_match; - - // Skip to next match if the match length cannot increase - // or if the match length is less than 2: - if (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan] - || win[++match] != win[scan + 1]) - continue; - - // The check at best_len-1 can be removed because it will be made - // again later. (This heuristic is not always a win.) - // It is not necessary to compare scan[2] and match[2] since they - // are always equal when the other bytes match, given that - // the hash keys are equal and that HASH_BITS >= 8. - scan += 2; - match++; - - // We check for insufficient lookahead only every 8th comparison; - // the 256th check will be made at strstart+258. - // eslint-disable-next-line no-empty - do { - // empty block - } while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match] - && win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match] - && win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - match_start = cur_match; - best_len = len; - if (len >= _nice_match) - break; - scan_end1 = win[scan + best_len - 1]; - scan_end = win[scan + best_len]; - } - - } while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0); - - if (best_len <= lookahead) - return best_len; - return lookahead; - } - - // Compress as much as possible from the input stream, return the current - // block state. - // This function does not perform lazy evaluation of matches and inserts - // new strings in the dictionary only for unmatched strings or for short - // matches. It is used only for the fast compression options. - function deflate_fast(flush) { - // short hash_head = 0; // head of the hash chain - let hash_head = 0; // head of the hash chain - let bflush; // set if current block must be flushed - - // eslint-disable-next-line no-constant-condition - while (true) { - // Make sure that we always have enough lookahead, except - // at the end of the input file. We need MAX_MATCH bytes - // for the next match, plus MIN_MATCH bytes to insert the - // string following the next match. - if (lookahead < MIN_LOOKAHEAD) { - fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { - return NeedMore; - } - if (lookahead === 0) - break; // flush the current block - } - - // Insert the string win[strstart .. strstart+2] in the - // dictionary, and set hash_head to the head of the hash chain: - if (lookahead >= MIN_MATCH) { - ins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - } - - // Find the longest match, discarding those <= prev_length. - // At this point we have always match_length < MIN_MATCH - - if (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) { - // To simplify the code, we prevent matches with the string - // of win index 0 (in particular we have to avoid a match - // of the string with itself at the start of the input file). - if (strategy != Z_HUFFMAN_ONLY) { - match_length = longest_match(hash_head); - } - // longest_match() sets match_start - } - if (match_length >= MIN_MATCH) { - // check_match(strstart, match_start, match_length); - - bflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH); - - lookahead -= match_length; - - // Insert new strings in the hash table only if the match length - // is not too large. This saves time but degrades compression. - if (match_length <= max_lazy_match && lookahead >= MIN_MATCH) { - match_length--; // string at strstart already in hash table - do { - strstart++; - - ins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - - // strstart never exceeds WSIZE-MAX_MATCH, so there are - // always MIN_MATCH bytes ahead. - } while (--match_length !== 0); - strstart++; - } else { - strstart += match_length; - match_length = 0; - ins_h = win[strstart] & 0xff; - - ins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask; - // If lookahead < MIN_MATCH, ins_h is garbage, but it does - // not - // matter since it will be recomputed at next deflate call. - } - } else { - // No match, output a literal byte - - bflush = _tr_tally(0, win[strstart] & 0xff); - lookahead--; - strstart++; - } - if (bflush) { - - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - } - } - - flush_block_only(flush == Z_FINISH$1); - if (strm.avail_out === 0) { - if (flush == Z_FINISH$1) - return FinishStarted; - else - return NeedMore; - } - return flush == Z_FINISH$1 ? FinishDone : BlockDone; - } - - // Same as above, but achieves better compression. We use a lazy - // evaluation for matches: a match is finally adopted only if there is - // no better match at the next win position. - function deflate_slow(flush) { - // short hash_head = 0; // head of hash chain - let hash_head = 0; // head of hash chain - let bflush; // set if current block must be flushed - let max_insert; - - // Process the input block. - // eslint-disable-next-line no-constant-condition - while (true) { - // Make sure that we always have enough lookahead, except - // at the end of the input file. We need MAX_MATCH bytes - // for the next match, plus MIN_MATCH bytes to insert the - // string following the next match. - - if (lookahead < MIN_LOOKAHEAD) { - fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { - return NeedMore; - } - if (lookahead === 0) - break; // flush the current block - } - - // Insert the string win[strstart .. strstart+2] in the - // dictionary, and set hash_head to the head of the hash chain: - - if (lookahead >= MIN_MATCH) { - ins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - } - - // Find the longest match, discarding those <= prev_length. - prev_length = match_length; - prev_match = match_start; - match_length = MIN_MATCH - 1; - - if (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) { - // To simplify the code, we prevent matches with the string - // of win index 0 (in particular we have to avoid a match - // of the string with itself at the start of the input file). - - if (strategy != Z_HUFFMAN_ONLY) { - match_length = longest_match(hash_head); - } - // longest_match() sets match_start - - if (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) { - - // If prev_match is also MIN_MATCH, match_start is garbage - // but we will ignore the current match anyway. - match_length = MIN_MATCH - 1; - } - } - - // If there was a match at the previous step and the current - // match is not better, output the previous match: - if (prev_length >= MIN_MATCH && match_length <= prev_length) { - max_insert = strstart + lookahead - MIN_MATCH; - // Do not insert strings in hash table beyond this. - - // check_match(strstart-1, prev_match, prev_length); - - bflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH); - - // Insert in hash table all strings up to the end of the match. - // strstart-1 and strstart are already inserted. If there is not - // enough lookahead, the last two strings are not inserted in - // the hash table. - lookahead -= prev_length - 1; - prev_length -= 2; - do { - if (++strstart <= max_insert) { - ins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - } - } while (--prev_length !== 0); - match_available = 0; - match_length = MIN_MATCH - 1; - strstart++; - - if (bflush) { - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - } - } else if (match_available !== 0) { - - // If there was no match at the previous position, output a - // single literal. If there was a match but the current match - // is longer, truncate the previous match to a single literal. - - bflush = _tr_tally(0, win[strstart - 1] & 0xff); - - if (bflush) { - flush_block_only(false); - } - strstart++; - lookahead--; - if (strm.avail_out === 0) - return NeedMore; - } else { - // There is no previous match to compare with, wait for - // the next step to decide. - - match_available = 1; - strstart++; - lookahead--; - } - } - - if (match_available !== 0) { - bflush = _tr_tally(0, win[strstart - 1] & 0xff); - match_available = 0; - } - flush_block_only(flush == Z_FINISH$1); - - if (strm.avail_out === 0) { - if (flush == Z_FINISH$1) - return FinishStarted; - else - return NeedMore; - } - - return flush == Z_FINISH$1 ? FinishDone : BlockDone; - } - - function deflateReset(strm) { - strm.total_in = strm.total_out = 0; - strm.msg = null; // - - that.pending = 0; - that.pending_out = 0; - - status = BUSY_STATE; - - last_flush = Z_NO_FLUSH$1; - - tr_init(); - lm_init(); - return Z_OK$1; - } - - that.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) { - if (!_method) - _method = Z_DEFLATED$1; - if (!memLevel) - memLevel = DEF_MEM_LEVEL; - if (!_strategy) - _strategy = Z_DEFAULT_STRATEGY; - - // byte[] my_version=ZLIB_VERSION; - - // - // if (!version || version[0] != my_version[0] - // || stream_size != sizeof(z_stream)) { - // return Z_VERSION_ERROR; - // } - - strm.msg = null; - - if (_level == Z_DEFAULT_COMPRESSION) - _level = 6; - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED$1 || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0 - || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR$1; - } - - strm.dstate = that; - - w_bits = bits; - w_size = 1 << w_bits; - w_mask = w_size - 1; - - hash_bits = memLevel + 7; - hash_size = 1 << hash_bits; - hash_mask = hash_size - 1; - hash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - win = new Uint8Array(w_size * 2); - prev = []; - head = []; - - lit_bufsize = 1 << (memLevel + 6); // 16K elements by default - - that.pending_buf = new Uint8Array(lit_bufsize * 4); - pending_buf_size = lit_bufsize * 4; - - that.dist_buf = new Uint16Array(lit_bufsize); - that.lc_buf = new Uint8Array(lit_bufsize); - - level = _level; - - strategy = _strategy; - - return deflateReset(strm); - }; - - that.deflateEnd = function () { - if (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) { - return Z_STREAM_ERROR$1; - } - // Deallocate in reverse order of allocations: - that.lc_buf = null; - that.dist_buf = null; - that.pending_buf = null; - head = null; - prev = null; - win = null; - // free - that.dstate = null; - return status == BUSY_STATE ? Z_DATA_ERROR$1 : Z_OK$1; - }; - - that.deflateParams = function (strm, _level, _strategy) { - let err = Z_OK$1; - - if (_level == Z_DEFAULT_COMPRESSION) { - _level = 6; - } - if (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR$1; - } - - if (config_table[level].func != config_table[_level].func && strm.total_in !== 0) { - // Flush the last buffer: - err = strm.deflate(Z_PARTIAL_FLUSH); - } - - if (level != _level) { - level = _level; - max_lazy_match = config_table[level].max_lazy; - good_match = config_table[level].good_length; - nice_match = config_table[level].nice_length; - max_chain_length = config_table[level].max_chain; - } - strategy = _strategy; - return err; - }; - - that.deflateSetDictionary = function (_strm, dictionary, dictLength) { - let length = dictLength; - let n, index = 0; - - if (!dictionary || status != INIT_STATE) - return Z_STREAM_ERROR$1; - - if (length < MIN_MATCH) - return Z_OK$1; - if (length > w_size - MIN_LOOKAHEAD) { - length = w_size - MIN_LOOKAHEAD; - index = dictLength - length; // use the tail of the dictionary - } - win.set(dictionary.subarray(index, index + length), 0); - - strstart = length; - block_start = length; - - // Insert all strings in the hash table (except for the last two bytes). - // s->lookahead stays null, so s->ins_h will be recomputed at the next - // call of fill_window. - - ins_h = win[0] & 0xff; - ins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask; - - for (n = 0; n <= length - MIN_MATCH; n++) { - ins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - prev[n & w_mask] = head[ins_h]; - head[ins_h] = n; - } - return Z_OK$1; - }; - - that.deflate = function (_strm, flush) { - let i, header, level_flags, old_flush, bstate; - - if (flush > Z_FINISH$1 || flush < 0) { - return Z_STREAM_ERROR$1; - } - - if (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH$1)) { - _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_STREAM_ERROR$1)]; - return Z_STREAM_ERROR$1; - } - if (_strm.avail_out === 0) { - _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; - return Z_BUF_ERROR$1; - } - - strm = _strm; // just in case - old_flush = last_flush; - last_flush = flush; - - // Write the zlib header - if (status == INIT_STATE) { - header = (Z_DEFLATED$1 + ((w_bits - 8) << 4)) << 8; - level_flags = ((level - 1) & 0xff) >> 1; - - if (level_flags > 3) - level_flags = 3; - header |= (level_flags << 6); - if (strstart !== 0) - header |= PRESET_DICT$1; - header += 31 - (header % 31); - - status = BUSY_STATE; - putShortMSB(header); - } - - // Flush as much pending output as possible - if (that.pending !== 0) { - strm.flush_pending(); - if (strm.avail_out === 0) { - // console.log(" avail_out==0"); - // Since avail_out is 0, deflate will be called again with - // more output space, but possibly with both pending and - // avail_in equal to zero. There won't be anything to do, - // but this is not an error situation so make sure we - // return OK instead of BUF_ERROR at next call of deflate: - last_flush = -1; - return Z_OK$1; - } - - // Make sure there is something to do and avoid duplicate - // consecutive - // flushes. For repeated and useless calls with Z_FINISH, we keep - // returning Z_STREAM_END instead of Z_BUFF_ERROR. - } else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH$1) { - strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; - return Z_BUF_ERROR$1; - } - - // User must not provide more input after the first FINISH: - if (status == FINISH_STATE && strm.avail_in !== 0) { - _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; - return Z_BUF_ERROR$1; - } - - // Start a new block or continue the current one. - if (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH$1 && status != FINISH_STATE)) { - bstate = -1; - switch (config_table[level].func) { - case STORED$1: - bstate = deflate_stored(flush); - break; - case FAST: - bstate = deflate_fast(flush); - break; - case SLOW: - bstate = deflate_slow(flush); - break; - } - - if (bstate == FinishStarted || bstate == FinishDone) { - status = FINISH_STATE; - } - if (bstate == NeedMore || bstate == FinishStarted) { - if (strm.avail_out === 0) { - last_flush = -1; // avoid BUF_ERROR next call, see above - } - return Z_OK$1; - // If flush != Z_NO_FLUSH && avail_out === 0, the next call - // of deflate should use the same flush parameter to make sure - // that the flush is complete. So we don't have to output an - // empty block here, this will be done at next call. This also - // ensures that for a very small output buffer, we emit at most - // one empty block. - } - - if (bstate == BlockDone) { - if (flush == Z_PARTIAL_FLUSH) { - _tr_align(); - } else { // FULL_FLUSH or SYNC_FLUSH - _tr_stored_block(0, 0, false); - // For a full flush, this empty block will be recognized - // as a special marker by inflate_sync(). - if (flush == Z_FULL_FLUSH) { - // state.head[s.hash_size-1]=0; - for (i = 0; i < hash_size/*-1*/; i++) - // forget history - head[i] = 0; - } - } - strm.flush_pending(); - if (strm.avail_out === 0) { - last_flush = -1; // avoid BUF_ERROR at next call, see above - return Z_OK$1; - } - } - } - - if (flush != Z_FINISH$1) - return Z_OK$1; - return Z_STREAM_END$1; - }; - } - - // ZStream - - function ZStream$1() { - const that = this; - that.next_in_index = 0; - that.next_out_index = 0; - // that.next_in; // next input byte - that.avail_in = 0; // number of bytes available at next_in - that.total_in = 0; // total nb of input bytes read so far - // that.next_out; // next output byte should be put there - that.avail_out = 0; // remaining free space at next_out - that.total_out = 0; // total nb of bytes output so far - // that.msg; - // that.dstate; - } - - ZStream$1.prototype = { - deflateInit(level, bits) { - const that = this; - that.dstate = new Deflate(); - if (!bits) - bits = MAX_BITS$1; - return that.dstate.deflateInit(that, level, bits); - }, - - deflate(flush) { - const that = this; - if (!that.dstate) { - return Z_STREAM_ERROR$1; - } - return that.dstate.deflate(that, flush); - }, - - deflateEnd() { - const that = this; - if (!that.dstate) - return Z_STREAM_ERROR$1; - const ret = that.dstate.deflateEnd(); - that.dstate = null; - return ret; - }, - - deflateParams(level, strategy) { - const that = this; - if (!that.dstate) - return Z_STREAM_ERROR$1; - return that.dstate.deflateParams(that, level, strategy); - }, - - deflateSetDictionary(dictionary, dictLength) { - const that = this; - if (!that.dstate) - return Z_STREAM_ERROR$1; - return that.dstate.deflateSetDictionary(that, dictionary, dictLength); - }, - - // Read a new buffer from the current input stream, update the - // total number of bytes read. All deflate() input goes through - // this function so some applications may wish to modify it to avoid - // allocating a large strm->next_in buffer and copying from it. - // (See also flush_pending()). - read_buf(buf, start, size) { - const that = this; - let len = that.avail_in; - if (len > size) - len = size; - if (len === 0) - return 0; - that.avail_in -= len; - buf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start); - that.next_in_index += len; - that.total_in += len; - return len; - }, - - // Flush as much pending output as possible. All deflate() output goes - // through this function so some applications may wish to modify it - // to avoid allocating a large strm->next_out buffer and copying into it. - // (See also read_buf()). - flush_pending() { - const that = this; - let len = that.dstate.pending; - - if (len > that.avail_out) - len = that.avail_out; - if (len === 0) - return; - - // if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index - // || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index + - // len)) { - // console.log(that.dstate.pending_buf.length + ", " + that.dstate.pending_out + ", " + that.next_out.length + ", " + - // that.next_out_index + ", " + len); - // console.log("avail_out=" + that.avail_out); - // } - - that.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index); - - that.next_out_index += len; - that.dstate.pending_out += len; - that.total_out += len; - that.avail_out -= len; - that.dstate.pending -= len; - if (that.dstate.pending === 0) { - that.dstate.pending_out = 0; - } - } - }; - - // Deflate - - function ZipDeflate(options) { - const that = this; - const z = new ZStream$1(); - const bufsize = getMaximumCompressedSize$1(options && options.chunkSize ? options.chunkSize : 64 * 1024); - const flush = Z_NO_FLUSH$1; - const buf = new Uint8Array(bufsize); - let level = options ? options.level : Z_DEFAULT_COMPRESSION; - if (typeof level == "undefined") - level = Z_DEFAULT_COMPRESSION; - z.deflateInit(level); - z.next_out = buf; - - that.append = function (data, onprogress) { - let err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0; - const buffers = []; - if (!data.length) - return; - z.next_in_index = 0; - z.next_in = data; - z.avail_in = data.length; - do { - z.next_out_index = 0; - z.avail_out = bufsize; - err = z.deflate(flush); - if (err != Z_OK$1) - throw new Error("deflating: " + z.msg); - if (z.next_out_index) - if (z.next_out_index == bufsize) - buffers.push(new Uint8Array(buf)); - else - buffers.push(buf.subarray(0, z.next_out_index)); - bufferSize += z.next_out_index; - if (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) { - onprogress(z.next_in_index); - lastIndex = z.next_in_index; - } - } while (z.avail_in > 0 || z.avail_out === 0); - if (buffers.length > 1) { - array = new Uint8Array(bufferSize); - buffers.forEach(function (chunk) { - array.set(chunk, bufferIndex); - bufferIndex += chunk.length; - }); - } else { - array = buffers[0] ? new Uint8Array(buffers[0]) : new Uint8Array(); - } - return array; - }; - that.flush = function () { - let err, array, bufferIndex = 0, bufferSize = 0; - const buffers = []; - do { - z.next_out_index = 0; - z.avail_out = bufsize; - err = z.deflate(Z_FINISH$1); - if (err != Z_STREAM_END$1 && err != Z_OK$1) - throw new Error("deflating: " + z.msg); - if (bufsize - z.avail_out > 0) - buffers.push(buf.slice(0, z.next_out_index)); - bufferSize += z.next_out_index; - } while (z.avail_in > 0 || z.avail_out === 0); - z.deflateEnd(); - array = new Uint8Array(bufferSize); - buffers.forEach(function (chunk) { - array.set(chunk, bufferIndex); - bufferIndex += chunk.length; - }); - return array; - }; - } - - function getMaximumCompressedSize$1(uncompressedSize) { - return uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1)); - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - /* - * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc. - * JZlib is based on zlib-1.1.3, so all credit should go authors - * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu) - * and contributors of zlib. - */ - - // deno-lint-ignore-file no-this-alias prefer-const - - // Global - - const MAX_BITS = 15; - - const Z_OK = 0; - const Z_STREAM_END = 1; - const Z_NEED_DICT = 2; - const Z_STREAM_ERROR = -2; - const Z_DATA_ERROR = -3; - const Z_MEM_ERROR = -4; - const Z_BUF_ERROR = -5; - - const inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff, - 0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff]; - - const MANY = 1440; - - // JZlib version : "1.0.2" - const Z_NO_FLUSH = 0; - const Z_FINISH = 4; - - // InfTree - const fixed_bl = 9; - const fixed_bd = 5; - - const fixed_tl = [96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0, - 0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40, - 0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13, - 0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60, - 0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, - 35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8, - 26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80, - 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0, - 8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0, - 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97, - 0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210, - 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, - 0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154, - 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83, - 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230, - 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139, - 0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174, - 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111, - 0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, - 193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8, - 120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, - 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8, - 92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, - 249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8, - 130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, - 181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8, - 102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, - 221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, - 8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, - 147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8, - 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, - 235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8, - 141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, - 167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8, - 107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, - 207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8, - 127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255]; - const fixed_td = [80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5, - 8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5, - 24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577]; - - // Tables for deflate from PKZIP's appnote.txt. - const cplens = [ // Copy lengths for literal codes 257..285 - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0]; - - // see note #13 above about 258 - const cplext = [ // Extra bits for literal codes 257..285 - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid - ]; - - const cpdist = [ // Copy offsets for distance codes 0..29 - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577]; - - const cpdext = [ // Extra bits for distance codes - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]; - - // If BMAX needs to be larger than 16, then h and x[] should be uLong. - const BMAX = 15; // maximum bit length of any code - - function InfTree() { - const that = this; - - let hn; // hufts used in space - let v; // work area for huft_build - let c; // bit length count table - let r; // table entry for structure assignment - let u; // table stack - let x; // bit offsets, then code stack - - function huft_build(b, // code lengths in bits (all assumed <= - // BMAX) - bindex, n, // number of codes (assumed <= 288) - s, // number of simple-valued codes (0..s-1) - d, // list of base values for non-simple codes - e, // list of extra bits for non-simple codes - t, // result: starting table - m, // maximum lookup bits, returns actual - hp,// space for trees - hn,// hufts used in space - v // working area: values in order of bit length - ) { - // Given a list of code lengths and a maximum table size, make a set of - // tables to decode that set of codes. Return Z_OK on success, - // Z_BUF_ERROR - // if the given code set is incomplete (the tables are still built in - // this - // case), Z_DATA_ERROR if the input is invalid (an over-subscribed set - // of - // lengths), or Z_MEM_ERROR if not enough memory. - - let a; // counter for codes of length k - let f; // i repeats in table every f entries - let g; // maximum code length - let h; // table level - let i; // counter, current code - let j; // counter - let k; // number of bits in current code - let l; // bits per table (returned in m) - let mask; // (1 << w) - 1, to avoid cc -O bug on HP - let p; // pointer into c[], b[], or v[] - let q; // points to current table - let w; // bits before this table == (l * h) - let xp; // pointer into x - let y; // number of dummy codes added - let z; // number of entries in current table - - // Generate counts for each bit length - - p = 0; - i = n; - do { - c[b[bindex + p]]++; - p++; - i--; // assume all entries <= BMAX - } while (i !== 0); - - if (c[0] == n) { // null input--all zero length codes - t[0] = -1; - m[0] = 0; - return Z_OK; - } - - // Find minimum and maximum length, bound *m by those - l = m[0]; - for (j = 1; j <= BMAX; j++) - if (c[j] !== 0) - break; - k = j; // minimum code length - if (l < j) { - l = j; - } - for (i = BMAX; i !== 0; i--) { - if (c[i] !== 0) - break; - } - g = i; // maximum code length - if (l > i) { - l = i; - } - m[0] = l; - - // Adjust last length count to fill out codes, if needed - for (y = 1 << j; j < i; j++, y <<= 1) { - if ((y -= c[j]) < 0) { - return Z_DATA_ERROR; - } - } - if ((y -= c[i]) < 0) { - return Z_DATA_ERROR; - } - c[i] += y; - - // Generate starting offsets into the value table for each length - x[1] = j = 0; - p = 1; - xp = 2; - while (--i !== 0) { // note that i == g from above - x[xp] = (j += c[p]); - xp++; - p++; - } - - // Make a table of values in order of bit lengths - i = 0; - p = 0; - do { - if ((j = b[bindex + p]) !== 0) { - v[x[j]++] = i; - } - p++; - } while (++i < n); - n = x[g]; // set n to length of v - - // Generate the Huffman codes and for each, make the table entries - x[0] = i = 0; // first Huffman code is zero - p = 0; // grab values in bit order - h = -1; // no tables yet--level -1 - w = -l; // bits decoded == (l * h) - u[0] = 0; // just to keep compilers happy - q = 0; // ditto - z = 0; // ditto - - // go through the bit lengths (k already is bits in shortest code) - for (; k <= g; k++) { - a = c[k]; - while (a-- !== 0) { - // here i is the Huffman code of length k bits for value *p - // make tables up to required level - while (k > w + l) { - h++; - w += l; // previous table always l bits - // compute minimum size table less than or equal to l bits - z = g - w; - z = (z > l) ? l : z; // table size upper limit - if ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table - // too few codes for - // k-w bit table - f -= a + 1; // deduct codes from patterns left - xp = k; - if (j < z) { - while (++j < z) { // try smaller tables up to z bits - if ((f <<= 1) <= c[++xp]) - break; // enough codes to use up j bits - f -= c[xp]; // else deduct codes from patterns - } - } - } - z = 1 << j; // table entries for j-bit table - - // allocate new table - if (hn[0] + z > MANY) { // (note: doesn't matter for fixed) - return Z_DATA_ERROR; // overflow of MANY - } - u[h] = q = /* hp+ */hn[0]; // DEBUG - hn[0] += z; - - // connect to last table, if there is one - if (h !== 0) { - x[h] = i; // save pattern for backing up - r[0] = /* (byte) */j; // bits in this table - r[1] = /* (byte) */l; // bits to dump before this table - j = i >>> (w - l); - r[2] = /* (int) */(q - u[h - 1] - j); // offset to this table - hp.set(r, (u[h - 1] + j) * 3); - // to - // last - // table - } else { - t[0] = q; // first table is returned result - } - } - - // set up table entry in r - r[1] = /* (byte) */(k - w); - if (p >= n) { - r[0] = 128 + 64; // out of values--invalid code - } else if (v[p] < s) { - r[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is - // end-of-block - r[2] = v[p++]; // simple code is just the value - } else { - r[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look - // up in lists - r[2] = d[v[p++] - s]; - } - - // fill code-like entries with r - f = 1 << (k - w); - for (j = i >>> w; j < z; j += f) { - hp.set(r, (q + j) * 3); - } - - // backwards increment the k-bit code i - for (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) { - i ^= j; - } - i ^= j; - - // backup over finished tables - mask = (1 << w) - 1; // needed on HP, cc -O bug - while ((i & mask) != x[h]) { - h--; // don't need to update q - w -= l; - mask = (1 << w) - 1; - } - } - } - // Return Z_BUF_ERROR if we were given an incomplete table - return y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK; - } - - function initWorkArea(vsize) { - let i; - if (!hn) { - hn = []; // []; //new Array(1); - v = []; // new Array(vsize); - c = new Int32Array(BMAX + 1); // new Array(BMAX + 1); - r = []; // new Array(3); - u = new Int32Array(BMAX); // new Array(BMAX); - x = new Int32Array(BMAX + 1); // new Array(BMAX + 1); - } - if (v.length < vsize) { - v = []; // new Array(vsize); - } - for (i = 0; i < vsize; i++) { - v[i] = 0; - } - for (i = 0; i < BMAX + 1; i++) { - c[i] = 0; - } - for (i = 0; i < 3; i++) { - r[i] = 0; - } - // for(int i=0; i 257)) { - if (result == Z_DATA_ERROR) { - z.msg = "oversubscribed distance tree"; - } else if (result == Z_BUF_ERROR) { - z.msg = "incomplete distance tree"; - result = Z_DATA_ERROR; - } else if (result != Z_MEM_ERROR) { - z.msg = "empty distance tree with lengths"; - result = Z_DATA_ERROR; - } - return result; - } - - return Z_OK; - }; - - } - - InfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth - bd, // distance desired/actual bit depth - tl,// literal/length tree result - td// distance tree result - ) { - bl[0] = fixed_bl; - bd[0] = fixed_bd; - tl[0] = fixed_tl; - td[0] = fixed_td; - return Z_OK; - }; - - // InfCodes - - // waiting for "i:"=input, - // "o:"=output, - // "x:"=nothing - const START = 0; // x: set up for LEN - const LEN = 1; // i: get length/literal/eob next - const LENEXT = 2; // i: getting length extra (have base) - const DIST = 3; // i: get distance next - const DISTEXT = 4;// i: getting distance extra - const COPY = 5; // o: copying bytes in win, waiting - // for space - const LIT = 6; // o: got literal, waiting for output - // space - const WASH = 7; // o: got eob, possibly still output - // waiting - const END = 8; // x: got eob and all data flushed - const BADCODE = 9;// x: got error - - function InfCodes() { - const that = this; - - let mode; // current inflate_codes mode - - // mode dependent information - let len = 0; - - let tree; // pointer into tree - let tree_index = 0; - let need = 0; // bits needed - - let lit = 0; - - // if EXT or COPY, where and how much - let get = 0; // bits to get for extra - let dist = 0; // distance back to copy from - - let lbits = 0; // ltree bits decoded per branch - let dbits = 0; // dtree bits decoder per branch - let ltree; // literal/length/eob tree - let ltree_index = 0; // literal/length/eob tree - let dtree; // distance tree - let dtree_index = 0; // distance tree - - // Called with number of bytes left to write in win at least 258 - // (the maximum string length) and number of input bytes available - // at least ten. The ten bytes are six bytes for the longest length/ - // distance pair plus four bytes for overloading the bit buffer. - - function inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) { - let t; // temporary pointer - let tp; // temporary pointer - let tp_index; // temporary pointer - let e; // extra bits or operation - let b; // bit buffer - let k; // bits in bit buffer - let p; // input data pointer - let n; // bytes available there - let q; // output win write pointer - let m; // bytes to end of win or read pointer - let ml; // mask for literal/length tree - let md; // mask for distance tree - let c; // bytes to copy - let d; // distance back to copy from - let r; // copy source pointer - - let tp_index_t_3; // (tp_index+t)*3 - - // load input, output, bit values - p = z.next_in_index; - n = z.avail_in; - b = s.bitb; - k = s.bitk; - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - // initialize masks - ml = inflate_mask[bl]; - md = inflate_mask[bd]; - - // do until not enough input or output space for fast loop - do { // assume called with m >= 258 && n >= 10 - // get literal/length code - while (k < (20)) { // max bits for literal/length code - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - t = b & ml; - tp = tl; - tp_index = tl_index; - tp_index_t_3 = (tp_index + t) * 3; - if ((e = tp[tp_index_t_3]) === 0) { - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - s.win[q++] = /* (byte) */tp[tp_index_t_3 + 2]; - m--; - continue; - } - do { - - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - if ((e & 16) !== 0) { - e &= 15; - c = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]); - - b >>= e; - k -= e; - - // decode distance base of block to copy - while (k < (15)) { // max bits for distance code - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - t = b & md; - tp = td; - tp_index = td_index; - tp_index_t_3 = (tp_index + t) * 3; - e = tp[tp_index_t_3]; - - do { - - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - if ((e & 16) !== 0) { - // get extra bits to add to distance base - e &= 15; - while (k < (e)) { // get extra bits (up to 13) - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - d = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]); - - b >>= (e); - k -= (e); - - // do the copy - m -= c; - if (q >= d) { // offset before dest - // just copy - r = q - d; - if (q - r > 0 && 2 > (q - r)) { - s.win[q++] = s.win[r++]; // minimum - // count is - // three, - s.win[q++] = s.win[r++]; // so unroll - // loop a - // little - c -= 2; - } else { - s.win.set(s.win.subarray(r, r + 2), q); - q += 2; - r += 2; - c -= 2; - } - } else { // else offset after destination - r = q - d; - do { - r += s.end; // force pointer in win - } while (r < 0); // covers invalid distances - e = s.end - r; - if (c > e) { // if source crosses, - c -= e; // wrapped copy - if (q - r > 0 && e > (q - r)) { - do { - s.win[q++] = s.win[r++]; - } while (--e !== 0); - } else { - s.win.set(s.win.subarray(r, r + e), q); - q += e; - r += e; - e = 0; - } - r = 0; // copy rest from start of win - } - - } - - // copy all or what's left - if (q - r > 0 && c > (q - r)) { - do { - s.win[q++] = s.win[r++]; - } while (--c !== 0); - } else { - s.win.set(s.win.subarray(r, r + c), q); - q += c; - r += c; - c = 0; - } - break; - } else if ((e & 64) === 0) { - t += tp[tp_index_t_3 + 2]; - t += (b & inflate_mask[e]); - tp_index_t_3 = (tp_index + t) * 3; - e = tp[tp_index_t_3]; - } else { - z.msg = "invalid distance code"; - - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_DATA_ERROR; - } - // eslint-disable-next-line no-constant-condition - } while (true); - break; - } - - if ((e & 64) === 0) { - t += tp[tp_index_t_3 + 2]; - t += (b & inflate_mask[e]); - tp_index_t_3 = (tp_index + t) * 3; - if ((e = tp[tp_index_t_3]) === 0) { - - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - s.win[q++] = /* (byte) */tp[tp_index_t_3 + 2]; - m--; - break; - } - } else if ((e & 32) !== 0) { - - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_STREAM_END; - } else { - z.msg = "invalid literal/length code"; - - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_DATA_ERROR; - } - // eslint-disable-next-line no-constant-condition - } while (true); - } while (m >= 258 && n >= 10); - - // not enough input or output--restore pointers and return - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_OK; - } - - that.init = function (bl, bd, tl, tl_index, td, td_index) { - mode = START; - lbits = /* (byte) */bl; - dbits = /* (byte) */bd; - ltree = tl; - ltree_index = tl_index; - dtree = td; - dtree_index = td_index; - tree = null; - }; - - that.proc = function (s, z, r) { - let j; // temporary storage - let tindex; // temporary pointer - let e; // extra bits or operation - let b = 0; // bit buffer - let k = 0; // bits in bit buffer - let p = 0; // input data pointer - let n; // bytes available there - let q; // output win write pointer - let m; // bytes to end of win or read pointer - let f; // pointer to copy strings from - - // copy input/output information to locals (UPDATE macro restores) - p = z.next_in_index; - n = z.avail_in; - b = s.bitb; - k = s.bitk; - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - // process input and output based on current state - // eslint-disable-next-line no-constant-condition - while (true) { - switch (mode) { - // waiting for "i:"=input, "o:"=output, "x:"=nothing - case START: // x: set up for LEN - if (m >= 258 && n >= 10) { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - r = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z); - - p = z.next_in_index; - n = z.avail_in; - b = s.bitb; - k = s.bitk; - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (r != Z_OK) { - mode = r == Z_STREAM_END ? WASH : BADCODE; - break; - } - } - need = lbits; - tree = ltree; - tree_index = ltree_index; - - mode = LEN; - /* falls through */ - case LEN: // i: get length/literal/eob next - j = need; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - tindex = (tree_index + (b & inflate_mask[j])) * 3; - - b >>>= (tree[tindex + 1]); - k -= (tree[tindex + 1]); - - e = tree[tindex]; - - if (e === 0) { // literal - lit = tree[tindex + 2]; - mode = LIT; - break; - } - if ((e & 16) !== 0) { // length - get = e & 15; - len = tree[tindex + 2]; - mode = LENEXT; - break; - } - if ((e & 64) === 0) { // next table - need = e; - tree_index = tindex / 3 + tree[tindex + 2]; - break; - } - if ((e & 32) !== 0) { // end of block - mode = WASH; - break; - } - mode = BADCODE; // invalid code - z.msg = "invalid literal/length code"; - r = Z_DATA_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - case LENEXT: // i: getting length extra (have base) - j = get; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - len += (b & inflate_mask[j]); - - b >>= j; - k -= j; - - need = dbits; - tree = dtree; - tree_index = dtree_index; - mode = DIST; - /* falls through */ - case DIST: // i: get distance next - j = need; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - tindex = (tree_index + (b & inflate_mask[j])) * 3; - - b >>= tree[tindex + 1]; - k -= tree[tindex + 1]; - - e = (tree[tindex]); - if ((e & 16) !== 0) { // distance - get = e & 15; - dist = tree[tindex + 2]; - mode = DISTEXT; - break; - } - if ((e & 64) === 0) { // next table - need = e; - tree_index = tindex / 3 + tree[tindex + 2]; - break; - } - mode = BADCODE; // invalid code - z.msg = "invalid distance code"; - r = Z_DATA_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - case DISTEXT: // i: getting distance extra - j = get; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - dist += (b & inflate_mask[j]); - - b >>= j; - k -= j; - - mode = COPY; - /* falls through */ - case COPY: // o: copying bytes in win, waiting for space - f = q - dist; - while (f < 0) { // modulo win size-"while" instead - f += s.end; // of "if" handles invalid distances - } - while (len !== 0) { - - if (m === 0) { - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - if (m === 0) { - s.write = q; - r = s.inflate_flush(z, r); - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - - if (m === 0) { - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - } - } - - s.win[q++] = s.win[f++]; - m--; - - if (f == s.end) - f = 0; - len--; - } - mode = START; - break; - case LIT: // o: got literal, waiting for output space - if (m === 0) { - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - if (m === 0) { - s.write = q; - r = s.inflate_flush(z, r); - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - if (m === 0) { - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - } - } - r = Z_OK; - - s.win[q++] = /* (byte) */lit; - m--; - - mode = START; - break; - case WASH: // o: got eob, possibly more output - if (k > 7) { // return unused byte, if any - k -= 8; - n++; - p--; // can always return one - } - - s.write = q; - r = s.inflate_flush(z, r); - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (s.read != s.write) { - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - mode = END; - /* falls through */ - case END: - r = Z_STREAM_END; - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - case BADCODE: // x: got error - - r = Z_DATA_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - default: - r = Z_STREAM_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - } - }; - - that.free = function () { - // ZFREE(z, c); - }; - - } - - // InfBlocks - - // Table for deflate from PKZIP's appnote.txt. - const border = [ // Order of the bit length code lengths - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - const TYPE = 0; // get type bits (3, including end bit) - const LENS = 1; // get lengths for stored - const STORED = 2;// processing stored block - const TABLE = 3; // get table lengths - const BTREE = 4; // get bit lengths tree for a dynamic - // block - const DTREE = 5; // get length, distance trees for a - // dynamic block - const CODES = 6; // processing fixed or dynamic block - const DRY = 7; // output remaining win bytes - const DONELOCKS = 8; // finished last block, done - const BADBLOCKS = 9; // ot a data error--stuck here - - function InfBlocks(z, w) { - const that = this; - - let mode = TYPE; // current inflate_block mode - - let left = 0; // if STORED, bytes left to copy - - let table = 0; // table lengths (14 bits) - let index = 0; // index into blens (or border) - let blens; // bit lengths of codes - const bb = [0]; // bit length tree depth - const tb = [0]; // bit length decoding tree - - const codes = new InfCodes(); // if CODES, current state - - let last = 0; // true if this block is the last block - - let hufts = new Int32Array(MANY * 3); // single malloc for tree space - const check = 0; // check on output - const inftree = new InfTree(); - - that.bitk = 0; // bits in bit buffer - that.bitb = 0; // bit buffer - that.win = new Uint8Array(w); // sliding win - that.end = w; // one byte after sliding win - that.read = 0; // win read pointer - that.write = 0; // win write pointer - - that.reset = function (z, c) { - if (c) - c[0] = check; - // if (mode == BTREE || mode == DTREE) { - // } - if (mode == CODES) { - codes.free(z); - } - mode = TYPE; - that.bitk = 0; - that.bitb = 0; - that.read = that.write = 0; - }; - - that.reset(z, null); - - // copy as much as possible from the sliding win to the output area - that.inflate_flush = function (z, r) { - let n; - let p; - let q; - - // local copies of source and destination pointers - p = z.next_out_index; - q = that.read; - - // compute number of bytes to copy as far as end of win - n = /* (int) */((q <= that.write ? that.write : that.end) - q); - if (n > z.avail_out) - n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR) - r = Z_OK; - - // update counters - z.avail_out -= n; - z.total_out += n; - - // copy as far as end of win - z.next_out.set(that.win.subarray(q, q + n), p); - p += n; - q += n; - - // see if more to copy at beginning of win - if (q == that.end) { - // wrap pointers - q = 0; - if (that.write == that.end) - that.write = 0; - - // compute bytes to copy - n = that.write - q; - if (n > z.avail_out) - n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR) - r = Z_OK; - - // update counters - z.avail_out -= n; - z.total_out += n; - - // copy - z.next_out.set(that.win.subarray(q, q + n), p); - p += n; - q += n; - } - - // update pointers - z.next_out_index = p; - that.read = q; - - // done - return r; - }; - - that.proc = function (z, r) { - let t; // temporary storage - let b; // bit buffer - let k; // bits in bit buffer - let p; // input data pointer - let n; // bytes available there - let q; // output win write pointer - let m; // bytes to end of win or read pointer - - let i; - - // copy input/output information to locals (UPDATE macro restores) - // { - p = z.next_in_index; - n = z.avail_in; - b = that.bitb; - k = that.bitk; - // } - // { - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - // } - - // process input based on current state - // DEBUG dtree - // eslint-disable-next-line no-constant-condition - while (true) { - let bl, bd, tl, td, bl_, bd_, tl_, td_; - switch (mode) { - case TYPE: - - while (k < (3)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - t = /* (int) */(b & 7); - last = t & 1; - - switch (t >>> 1) { - case 0: // stored - // { - b >>>= (3); - k -= (3); - // } - t = k & 7; // go to byte boundary - - // { - b >>>= (t); - k -= (t); - // } - mode = LENS; // get length of stored block - break; - case 1: // fixed - // { - bl = []; // new Array(1); - bd = []; // new Array(1); - tl = [[]]; // new Array(1); - td = [[]]; // new Array(1); - - InfTree.inflate_trees_fixed(bl, bd, tl, td); - codes.init(bl[0], bd[0], tl[0], 0, td[0], 0); - // } - - // { - b >>>= (3); - k -= (3); - // } - - mode = CODES; - break; - case 2: // dynamic - - // { - b >>>= (3); - k -= (3); - // } - - mode = TABLE; - break; - case 3: // illegal - - // { - b >>>= (3); - k -= (3); - // } - mode = BADBLOCKS; - z.msg = "invalid block type"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - break; - case LENS: - - while (k < (32)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - if ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) { - mode = BADBLOCKS; - z.msg = "invalid stored block lengths"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - left = (b & 0xffff); - b = k = 0; // dump bits - mode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE); - break; - case STORED: - if (n === 0) { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - if (m === 0) { - if (q == that.end && that.read !== 0) { - q = 0; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - } - if (m === 0) { - that.write = q; - r = that.inflate_flush(z, r); - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - if (q == that.end && that.read !== 0) { - q = 0; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - } - if (m === 0) { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - } - } - r = Z_OK; - - t = left; - if (t > n) - t = n; - if (t > m) - t = m; - that.win.set(z.read_buf(p, t), q); - p += t; - n -= t; - q += t; - m -= t; - if ((left -= t) !== 0) - break; - mode = last !== 0 ? DRY : TYPE; - break; - case TABLE: - - while (k < (14)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - table = t = (b & 0x3fff); - if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) { - mode = BADBLOCKS; - z.msg = "too many length or distance symbols"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); - if (!blens || blens.length < t) { - blens = []; // new Array(t); - } else { - for (i = 0; i < t; i++) { - blens[i] = 0; - } - } - - // { - b >>>= (14); - k -= (14); - // } - - index = 0; - mode = BTREE; - /* falls through */ - case BTREE: - while (index < 4 + (table >>> 10)) { - while (k < (3)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - blens[border[index++]] = b & 7; - - // { - b >>>= (3); - k -= (3); - // } - } - - while (index < 19) { - blens[border[index++]] = 0; - } - - bb[0] = 7; - t = inftree.inflate_trees_bits(blens, bb, tb, hufts, z); - if (t != Z_OK) { - r = t; - if (r == Z_DATA_ERROR) { - blens = null; - mode = BADBLOCKS; - } - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - index = 0; - mode = DTREE; - /* falls through */ - case DTREE: - // eslint-disable-next-line no-constant-condition - while (true) { - t = table; - if (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) { - break; - } - - let j, c; - - t = bb[0]; - - while (k < (t)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - // if (tb[0] == -1) { - // System.err.println("null..."); - // } - - t = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1]; - c = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2]; - - if (c < 16) { - b >>>= (t); - k -= (t); - blens[index++] = c; - } else { // c == 16..18 - i = c == 18 ? 7 : c - 14; - j = c == 18 ? 11 : 3; - - while (k < (t + i)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - b >>>= (t); - k -= (t); - - j += (b & inflate_mask[i]); - - b >>>= (i); - k -= (i); - - i = index; - t = table; - if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) { - blens = null; - mode = BADBLOCKS; - z.msg = "invalid bit length repeat"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - c = c == 16 ? blens[i - 1] : 0; - do { - blens[i++] = c; - } while (--j !== 0); - index = i; - } - } - - tb[0] = -1; - // { - bl_ = []; // new Array(1); - bd_ = []; // new Array(1); - tl_ = []; // new Array(1); - td_ = []; // new Array(1); - bl_[0] = 9; // must be <= 9 for lookahead assumptions - bd_[0] = 6; // must be <= 9 for lookahead assumptions - - t = table; - t = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z); - - if (t != Z_OK) { - if (t == Z_DATA_ERROR) { - blens = null; - mode = BADBLOCKS; - } - r = t; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - codes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]); - // } - mode = CODES; - /* falls through */ - case CODES: - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - - if ((r = codes.proc(that, z, r)) != Z_STREAM_END) { - return that.inflate_flush(z, r); - } - r = Z_OK; - codes.free(z); - - p = z.next_in_index; - n = z.avail_in; - b = that.bitb; - k = that.bitk; - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - - if (last === 0) { - mode = TYPE; - break; - } - mode = DRY; - /* falls through */ - case DRY: - that.write = q; - r = that.inflate_flush(z, r); - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - if (that.read != that.write) { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - mode = DONELOCKS; - /* falls through */ - case DONELOCKS: - r = Z_STREAM_END; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - case BADBLOCKS: - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - - default: - r = Z_STREAM_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - } - }; - - that.free = function (z) { - that.reset(z, null); - that.win = null; - hufts = null; - // ZFREE(z, s); - }; - - that.set_dictionary = function (d, start, n) { - that.win.set(d.subarray(start, start + n), 0); - that.read = that.write = n; - }; - - // Returns true if inflate is currently at the end of a block generated - // by Z_SYNC_FLUSH or Z_FULL_FLUSH. - that.sync_point = function () { - return mode == LENS ? 1 : 0; - }; - - } - - // Inflate - - // preset dictionary flag in zlib header - const PRESET_DICT = 0x20; - - const Z_DEFLATED = 8; - - const METHOD = 0; // waiting for method byte - const FLAG = 1; // waiting for flag byte - const DICT4 = 2; // four dictionary check bytes to go - const DICT3 = 3; // three dictionary check bytes to go - const DICT2 = 4; // two dictionary check bytes to go - const DICT1 = 5; // one dictionary check byte to go - const DICT0 = 6; // waiting for inflateSetDictionary - const BLOCKS = 7; // decompressing blocks - const DONE = 12; // finished check, done - const BAD = 13; // got an error--stay here - - const mark = [0, 0, 0xff, 0xff]; - - function Inflate() { - const that = this; - - that.mode = 0; // current inflate mode - - // mode dependent information - that.method = 0; // if FLAGS, method byte - - // if CHECK, check values to compare - that.was = [0]; // new Array(1); // computed check value - that.need = 0; // stream check value - - // if BAD, inflateSync's marker bytes count - that.marker = 0; - - // mode independent information - that.wbits = 0; // log2(win size) (8..15, defaults to 15) - - // this.blocks; // current inflate_blocks state - - function inflateReset(z) { - if (!z || !z.istate) - return Z_STREAM_ERROR; - - z.total_in = z.total_out = 0; - z.msg = null; - z.istate.mode = BLOCKS; - z.istate.blocks.reset(z, null); - return Z_OK; - } - - that.inflateEnd = function (z) { - if (that.blocks) - that.blocks.free(z); - that.blocks = null; - // ZFREE(z, z->state); - return Z_OK; - }; - - that.inflateInit = function (z, w) { - z.msg = null; - that.blocks = null; - - // set win size - if (w < 8 || w > 15) { - that.inflateEnd(z); - return Z_STREAM_ERROR; - } - that.wbits = w; - - z.istate.blocks = new InfBlocks(z, 1 << w); - - // reset state - inflateReset(z); - return Z_OK; - }; - - that.inflate = function (z, f) { - let r; - let b; - - if (!z || !z.istate || !z.next_in) - return Z_STREAM_ERROR; - const istate = z.istate; - f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; - r = Z_BUF_ERROR; - // eslint-disable-next-line no-constant-condition - while (true) { - switch (istate.mode) { - case METHOD: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - if (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) { - istate.mode = BAD; - z.msg = "unknown compression method"; - istate.marker = 5; // can't try inflateSync - break; - } - if ((istate.method >> 4) + 8 > istate.wbits) { - istate.mode = BAD; - z.msg = "invalid win size"; - istate.marker = 5; // can't try inflateSync - break; - } - istate.mode = FLAG; - /* falls through */ - case FLAG: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - b = (z.read_byte(z.next_in_index++)) & 0xff; - - if ((((istate.method << 8) + b) % 31) !== 0) { - istate.mode = BAD; - z.msg = "incorrect header check"; - istate.marker = 5; // can't try inflateSync - break; - } - - if ((b & PRESET_DICT) === 0) { - istate.mode = BLOCKS; - break; - } - istate.mode = DICT4; - /* falls through */ - case DICT4: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000; - istate.mode = DICT3; - /* falls through */ - case DICT3: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000; - istate.mode = DICT2; - /* falls through */ - case DICT2: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00; - istate.mode = DICT1; - /* falls through */ - case DICT1: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need += (z.read_byte(z.next_in_index++) & 0xff); - istate.mode = DICT0; - return Z_NEED_DICT; - case DICT0: - istate.mode = BAD; - z.msg = "need dictionary"; - istate.marker = 0; // can try inflateSync - return Z_STREAM_ERROR; - case BLOCKS: - - r = istate.blocks.proc(z, r); - if (r == Z_DATA_ERROR) { - istate.mode = BAD; - istate.marker = 0; // can try inflateSync - break; - } - if (r == Z_OK) { - r = f; - } - if (r != Z_STREAM_END) { - return r; - } - r = f; - istate.blocks.reset(z, istate.was); - istate.mode = DONE; - /* falls through */ - case DONE: - z.avail_in = 0; - return Z_STREAM_END; - case BAD: - return Z_DATA_ERROR; - default: - return Z_STREAM_ERROR; - } - } - }; - - that.inflateSetDictionary = function (z, dictionary, dictLength) { - let index = 0, length = dictLength; - if (!z || !z.istate || z.istate.mode != DICT0) - return Z_STREAM_ERROR; - const istate = z.istate; - if (length >= (1 << istate.wbits)) { - length = (1 << istate.wbits) - 1; - index = dictLength - length; - } - istate.blocks.set_dictionary(dictionary, index, length); - istate.mode = BLOCKS; - return Z_OK; - }; - - that.inflateSync = function (z) { - let n; // number of bytes to look at - let p; // pointer to bytes - let m; // number of marker bytes found in a row - let r, w; // temporaries to save total_in and total_out - - // set up - if (!z || !z.istate) - return Z_STREAM_ERROR; - const istate = z.istate; - if (istate.mode != BAD) { - istate.mode = BAD; - istate.marker = 0; - } - if ((n = z.avail_in) === 0) - return Z_BUF_ERROR; - p = z.next_in_index; - m = istate.marker; - - // search - while (n !== 0 && m < 4) { - if (z.read_byte(p) == mark[m]) { - m++; - } else if (z.read_byte(p) !== 0) { - m = 0; - } else { - m = 4 - m; - } - p++; - n--; - } - - // restore - z.total_in += p - z.next_in_index; - z.next_in_index = p; - z.avail_in = n; - istate.marker = m; - - // return no joy or set up to restart on a new block - if (m != 4) { - return Z_DATA_ERROR; - } - r = z.total_in; - w = z.total_out; - inflateReset(z); - z.total_in = r; - z.total_out = w; - istate.mode = BLOCKS; - return Z_OK; - }; - - // Returns true if inflate is currently at the end of a block generated - // by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP - // implementation to provide an additional safety check. PPP uses - // Z_SYNC_FLUSH - // but removes the length bytes of the resulting empty stored block. When - // decompressing, PPP checks that at the end of input packet, inflate is - // waiting for these length bytes. - that.inflateSyncPoint = function (z) { - if (!z || !z.istate || !z.istate.blocks) - return Z_STREAM_ERROR; - return z.istate.blocks.sync_point(); - }; - } - - // ZStream - - function ZStream() { - } - - ZStream.prototype = { - inflateInit(bits) { - const that = this; - that.istate = new Inflate(); - if (!bits) - bits = MAX_BITS; - return that.istate.inflateInit(that, bits); - }, - - inflate(f) { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - return that.istate.inflate(that, f); - }, - - inflateEnd() { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - const ret = that.istate.inflateEnd(that); - that.istate = null; - return ret; - }, - - inflateSync() { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - return that.istate.inflateSync(that); - }, - inflateSetDictionary(dictionary, dictLength) { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - return that.istate.inflateSetDictionary(that, dictionary, dictLength); - }, - read_byte(start) { - const that = this; - return that.next_in[start]; - }, - read_buf(start, size) { - const that = this; - return that.next_in.subarray(start, start + size); - } - }; - - // Inflater - - function ZipInflate(options) { - const that = this; - const z = new ZStream(); - const bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024; - const flush = Z_NO_FLUSH; - const buf = new Uint8Array(bufsize); - let nomoreinput = false; - - z.inflateInit(); - z.next_out = buf; - - that.append = function (data, onprogress) { - const buffers = []; - let err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0; - if (data.length === 0) - return; - z.next_in_index = 0; - z.next_in = data; - z.avail_in = data.length; - do { - z.next_out_index = 0; - z.avail_out = bufsize; - if ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it - z.next_in_index = 0; - nomoreinput = true; - } - err = z.inflate(flush); - if (nomoreinput && (err === Z_BUF_ERROR)) { - if (z.avail_in !== 0) - throw new Error("inflating: bad input"); - } else if (err !== Z_OK && err !== Z_STREAM_END) - throw new Error("inflating: " + z.msg); - if ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length)) - throw new Error("inflating: bad input"); - if (z.next_out_index) - if (z.next_out_index === bufsize) - buffers.push(new Uint8Array(buf)); - else - buffers.push(buf.subarray(0, z.next_out_index)); - bufferSize += z.next_out_index; - if (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) { - onprogress(z.next_in_index); - lastIndex = z.next_in_index; - } - } while (z.avail_in > 0 || z.avail_out === 0); - if (buffers.length > 1) { - array = new Uint8Array(bufferSize); - buffers.forEach(function (chunk) { - array.set(chunk, bufferIndex); - bufferIndex += chunk.length; - }); - } else { - array = buffers[0] ? new Uint8Array(buffers[0]) : new Uint8Array(); - } - return array; - }; - that.flush = function () { - z.inflateEnd(); - }; - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const MAX_32_BITS = 0xffffffff; - const MAX_16_BITS = 0xffff; - const COMPRESSION_METHOD_DEFLATE = 0x08; - const COMPRESSION_METHOD_STORE = 0x00; - const COMPRESSION_METHOD_AES = 0x63; - - const LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50; - const SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50; - const DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE; - const CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50; - const END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50; - const ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50; - const ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50; - const END_OF_CENTRAL_DIR_LENGTH = 22; - const ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20; - const ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56; - const ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH; - - const EXTRAFIELD_TYPE_ZIP64 = 0x0001; - const EXTRAFIELD_TYPE_AES = 0x9901; - const EXTRAFIELD_TYPE_NTFS = 0x000a; - const EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001; - const EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455; - const EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075; - const EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375; - - const BITFLAG_ENCRYPTED = 0x01; - const BITFLAG_LEVEL = 0x06; - const BITFLAG_DATA_DESCRIPTOR = 0x0008; - const BITFLAG_LANG_ENCODING_FLAG = 0x0800; - const FILE_ATTR_MSDOS_DIR_MASK = 0x10; - - const VERSION_DEFLATE = 0x14; - const VERSION_ZIP64 = 0x2D; - const VERSION_AES = 0x33; - - const DIRECTORY_SIGNATURE = "/"; - - const MAX_DATE = new Date(2107, 11, 31); - const MIN_DATE = new Date(1980, 0, 1); - - const UNDEFINED_VALUE = undefined; - const UNDEFINED_TYPE$1 = "undefined"; - const FUNCTION_TYPE$1 = "function"; - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class StreamAdapter { - - constructor(Codec) { - return class extends TransformStream { - constructor(_format, options) { - const codec = new Codec(options); - super({ - transform(chunk, controller) { - controller.enqueue(codec.append(chunk)); - }, - flush(controller) { - const chunk = codec.flush(); - if (chunk) { - controller.enqueue(chunk); - } - } - }); - } - }; - } - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const MINIMUM_CHUNK_SIZE = 64; - let maxWorkers = 2; - try { - if (typeof navigator != UNDEFINED_TYPE$1 && navigator.hardwareConcurrency) { - maxWorkers = navigator.hardwareConcurrency; - } - } catch (_error) { - console.error(_error) - } - const DEFAULT_CONFIGURATION = { - chunkSize: 512 * 1024, - maxWorkers, - terminateWorkerTimeout: 5000, - useWebWorkers: true, - useCompressionStream: true, - workerScripts: UNDEFINED_VALUE, - CompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE$1 && CompressionStream, - DecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE$1 && DecompressionStream - }; - - const config = Object.assign({}, DEFAULT_CONFIGURATION); - - function getConfiguration() { - return config; - } - - function getChunkSize(config) { - return Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE); - } - - function configure(configuration) { - const { - baseURL, - chunkSize, - maxWorkers, - terminateWorkerTimeout, - useCompressionStream, - useWebWorkers, - Deflate, - Inflate, - CompressionStream, - DecompressionStream, - workerScripts - } = configuration; - setIfDefined("baseURL", baseURL); - setIfDefined("chunkSize", chunkSize); - setIfDefined("maxWorkers", maxWorkers); - setIfDefined("terminateWorkerTimeout", terminateWorkerTimeout); - setIfDefined("useCompressionStream", useCompressionStream); - setIfDefined("useWebWorkers", useWebWorkers); - if (Deflate) { - config.CompressionStream = new StreamAdapter(Deflate); - } - if (Inflate) { - config.DecompressionStream = new StreamAdapter(Inflate); - } - setIfDefined("CompressionStream", CompressionStream); - setIfDefined("DecompressionStream", DecompressionStream); - if (workerScripts !== UNDEFINED_VALUE) { - const { deflate, inflate } = workerScripts; - if (deflate || inflate) { - if (!config.workerScripts) { - config.workerScripts = {}; - } - } - if (deflate) { - if (!Array.isArray(deflate)) { - throw new Error("workerScripts.deflate must be an array"); - } - config.workerScripts.deflate = deflate; - } - if (inflate) { - if (!Array.isArray(inflate)) { - throw new Error("workerScripts.inflate must be an array"); - } - config.workerScripts.inflate = inflate; - } - } - } - - function setIfDefined(propertyName, propertyValue) { - if (propertyValue !== UNDEFINED_VALUE) { - config[propertyName] = propertyValue; - } - } - - function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){let e;const t=new S;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.D(),n=new e.M(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues,V="Invalid password",P="Invalid signature",R="zipjs-abort-check-password";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:"PBKDF2"},U=t.assign({hash:{name:"HMAC"}},M),K=t.assign({iterations:1e3,hash:{name:"SHA-1"}},M),N=["deriveBits"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H="undefined",L="function",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,U,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,K.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,K.iterations,n)}})(t.assign({salt:o},K),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me="deflate-raw";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||(w=new z,d=ze(d,w)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new z,d=ze(d,w)),ve(this,d,(async()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce="data";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=be:s.startsWith("inflate")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:"pull",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.getWriter().close()}catch(e){}const{signature:a,size:l}=f;Ve({type:"close",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ue(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ke(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ue.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ue.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ue.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ue.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ue.ze=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ue.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ue.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ue._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ke.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ke.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ke.Ee=new Ke(Ke.Ae,Ue.ze,257,286,15),Ke.Me=new Ke(Ke.Be,Ue.Ce,0,30,15),Ke.Ue=new Ke(null,Ue.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,U;const K=new Ue,N=new Ue,O=new Ue;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ue.ge[n]+256+1)]++,M[2*Ue.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ue.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*Ue._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ke.Ae,Ke.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*Ue._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,K.re=E,K.ie=Ke.Ee,N.re=M,N.ie=Ke.Me,O.re=U,O.ie=Ke.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ke.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],tt=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],nt=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],rt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],st=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],it=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le="oversubscribed dynamic bit lengths tree":a!=Ze&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le="oversubscribed distance tree":h==Ze?(w.Le="incomplete distance tree",h=Ye):-4!=h&&(w.Le="empty distance tree with lengths",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le="need dictionary",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}});} - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - function getMimeType() { - return "application/octet-stream"; - } - - function initShimAsyncCodec(library, options = {}, registerDataHandler) { - return { - Deflate: createCodecClass(library.Deflate, options.deflate, registerDataHandler), - Inflate: createCodecClass(library.Inflate, options.inflate, registerDataHandler) - }; - } - - function objectHasOwn(object, propertyName) { - // eslint-disable-next-line no-prototype-builtins - return typeof Object.hasOwn === "function" ? Object.hasOwn(object, propertyName) : object.hasOwnProperty(propertyName); - } - - function createCodecClass(constructor, constructorOptions, registerDataHandler) { - return class { - - constructor(options) { - const codecAdapter = this; - const onData = data => { - if (codecAdapter.pendingData) { - const previousPendingData = codecAdapter.pendingData; - codecAdapter.pendingData = new Uint8Array(previousPendingData.length + data.length); - const { pendingData } = codecAdapter; - pendingData.set(previousPendingData, 0); - pendingData.set(data, previousPendingData.length); - } else { - codecAdapter.pendingData = new Uint8Array(data); - } - }; - if (objectHasOwn(options, "level") && options.level === undefined) { - delete options.level; - } - codecAdapter.codec = new constructor(Object.assign({}, constructorOptions, options)); - registerDataHandler(codecAdapter.codec, onData); - } - append(data) { - this.codec.push(data); - return getResponse(this); - } - flush() { - this.codec.push(new Uint8Array(), true); - return getResponse(this); - } - }; - - function getResponse(codec) { - if (codec.pendingData) { - const output = codec.pendingData; - codec.pendingData = null; - return output; - } else { - return new Uint8Array(); - } - } - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const table = []; - for (let i = 0; i < 256; i++) { - let t = i; - for (let j = 0; j < 8; j++) { - if (t & 1) { - t = (t >>> 1) ^ 0xEDB88320; - } else { - t = t >>> 1; - } - } - table[i] = t; - } - - class Crc32 { - - constructor(crc) { - this.crc = crc || -1; - } - - append(data) { - let crc = this.crc | 0; - for (let offset = 0, length = data.length | 0; offset < length; offset++) { - crc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF]; - } - this.crc = crc; - } - - get() { - return ~this.crc; - } - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class Crc32Stream extends TransformStream { - - constructor() { - let stream; - const crc32 = new Crc32(); - super({ - transform(chunk, controller) { - crc32.append(chunk); - controller.enqueue(chunk); - }, - flush() { - const value = new Uint8Array(4); - const dataView = new DataView(value.buffer); - dataView.setUint32(0, crc32.get()); - stream.value = value; - } - }); - stream = this; - } - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - function encodeText(value) { - if (typeof TextEncoder == "undefined") { - value = unescape(encodeURIComponent(value)); - const result = new Uint8Array(value.length); - for (let i = 0; i < result.length; i++) { - result[i] = value.charCodeAt(i); - } - return result; - } else { - return new TextEncoder().encode(value); - } - } - - // Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl - - // deno-lint-ignore-file no-this-alias - - /* - * SJCL is open. You can use, modify and redistribute it under a BSD - * license or under the GNU GPL, version 2.0. - */ - - /** @fileOverview Javascript cryptography implementation. - * - * Crush to remove comments, shorten variable names and - * generally reduce transmission size. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - - /*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */ - - /** @fileOverview Arrays of bits, encoded as arrays of Numbers. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - - /** - * Arrays of bits, encoded as arrays of Numbers. - * @namespace - * @description - *

- * These objects are the currency accepted by SJCL's crypto functions. - *

- * - *

- * Most of our crypto primitives operate on arrays of 4-byte words internally, - * but many of them can take arguments that are not a multiple of 4 bytes. - * This library encodes arrays of bits (whose size need not be a multiple of 8 - * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an - * array of words, 32 bits at a time. Since the words are double-precision - * floating point numbers, they fit some extra data. We use this (in a private, - * possibly-changing manner) to encode the number of bits actually present - * in the last word of the array. - *

- * - *

- * Because bitwise ops clear this out-of-band data, these arrays can be passed - * to ciphers like AES which want arrays of words. - *

- */ - const bitArray = { - /** - * Concatenate two bit arrays. - * @param {bitArray} a1 The first array. - * @param {bitArray} a2 The second array. - * @return {bitArray} The concatenation of a1 and a2. - */ - concat(a1, a2) { - if (a1.length === 0 || a2.length === 0) { - return a1.concat(a2); - } - - const last = a1[a1.length - 1], shift = bitArray.getPartial(last); - if (shift === 32) { - return a1.concat(a2); - } else { - return bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1)); - } - }, - - /** - * Find the length of an array of bits. - * @param {bitArray} a The array. - * @return {Number} The length of a, in bits. - */ - bitLength(a) { - const l = a.length; - if (l === 0) { - return 0; - } - const x = a[l - 1]; - return (l - 1) * 32 + bitArray.getPartial(x); - }, - - /** - * Truncate an array. - * @param {bitArray} a The array. - * @param {Number} len The length to truncate to, in bits. - * @return {bitArray} A new array, truncated to len bits. - */ - clamp(a, len) { - if (a.length * 32 < len) { - return a; - } - a = a.slice(0, Math.ceil(len / 32)); - const l = a.length; - len = len & 31; - if (l > 0 && len) { - a[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1); - } - return a; - }, - - /** - * Make a partial word for a bit array. - * @param {Number} len The number of bits in the word. - * @param {Number} x The bits. - * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side. - * @return {Number} The partial word. - */ - partial(len, x, _end) { - if (len === 32) { - return x; - } - return (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000; - }, - - /** - * Get the number of bits used by a partial word. - * @param {Number} x The partial word. - * @return {Number} The number of bits used by the partial word. - */ - getPartial(x) { - return Math.round(x / 0x10000000000) || 32; - }, - - /** Shift an array right. - * @param {bitArray} a The array to shift. - * @param {Number} shift The number of bits to shift. - * @param {Number} [carry=0] A byte to carry in - * @param {bitArray} [out=[]] An array to prepend to the output. - * @private - */ - _shiftRight(a, shift, carry, out) { - if (out === undefined) { - out = []; - } - - for (; shift >= 32; shift -= 32) { - out.push(carry); - carry = 0; - } - if (shift === 0) { - return out.concat(a); - } - - for (let i = 0; i < a.length; i++) { - out.push(carry | a[i] >>> shift); - carry = a[i] << (32 - shift); - } - const last2 = a.length ? a[a.length - 1] : 0; - const shift2 = bitArray.getPartial(last2); - out.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1)); - return out; - } - }; - - /** @fileOverview Bit array codec implementations. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - - /** - * Arrays of bytes - * @namespace - */ - const codec = { - bytes: { - /** Convert from a bitArray to an array of bytes. */ - fromBits(arr) { - const bl = bitArray.bitLength(arr); - const byteLength = bl / 8; - const out = new Uint8Array(byteLength); - let tmp; - for (let i = 0; i < byteLength; i++) { - if ((i & 3) === 0) { - tmp = arr[i / 4]; - } - out[i] = tmp >>> 24; - tmp <<= 8; - } - return out; - }, - /** Convert from an array of bytes to a bitArray. */ - toBits(bytes) { - const out = []; - let i; - let tmp = 0; - for (i = 0; i < bytes.length; i++) { - tmp = tmp << 8 | bytes[i]; - if ((i & 3) === 3) { - out.push(tmp); - tmp = 0; - } - } - if (i & 3) { - out.push(bitArray.partial(8 * (i & 3), tmp)); - } - return out; - } - } - }; - - const hash = {}; - - /** - * Context for a SHA-1 operation in progress. - * @constructor - */ - hash.sha1 = class { - constructor(hash) { - const sha1 = this; - /** - * The hash's block size, in bits. - * @constant - */ - sha1.blockSize = 512; - /** - * The SHA-1 initialization vector. - * @private - */ - sha1._init = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]; - /** - * The SHA-1 hash key. - * @private - */ - sha1._key = [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6]; - if (hash) { - sha1._h = hash._h.slice(0); - sha1._buffer = hash._buffer.slice(0); - sha1._length = hash._length; - } else { - sha1.reset(); - } - } - - /** - * Reset the hash state. - * @return this - */ - reset() { - const sha1 = this; - sha1._h = sha1._init.slice(0); - sha1._buffer = []; - sha1._length = 0; - return sha1; - } - - /** - * Input several words to the hash. - * @param {bitArray|String} data the data to hash. - * @return this - */ - update(data) { - const sha1 = this; - if (typeof data === "string") { - data = codec.utf8String.toBits(data); - } - const b = sha1._buffer = bitArray.concat(sha1._buffer, data); - const ol = sha1._length; - const nl = sha1._length = ol + bitArray.bitLength(data); - if (nl > 9007199254740991) { - throw new Error("Cannot hash more than 2^53 - 1 bits"); - } - const c = new Uint32Array(b); - let j = 0; - for (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl; - i += sha1.blockSize) { - sha1._block(c.subarray(16 * j, 16 * (j + 1))); - j += 1; - } - b.splice(0, 16 * j); - return sha1; - } - - /** - * Complete hashing and output the hash value. - * @return {bitArray} The hash value, an array of 5 big-endian words. TODO - */ - finalize() { - const sha1 = this; - let b = sha1._buffer; - const h = sha1._h; - - // Round out and push the buffer - b = bitArray.concat(b, [bitArray.partial(1, 1)]); - // Round out the buffer to a multiple of 16 words, less the 2 length words. - for (let i = b.length + 2; i & 15; i++) { - b.push(0); - } - - // append the length - b.push(Math.floor(sha1._length / 0x100000000)); - b.push(sha1._length | 0); - - while (b.length) { - sha1._block(b.splice(0, 16)); - } - - sha1.reset(); - return h; - } - - /** - * The SHA-1 logical functions f(0), f(1), ..., f(79). - * @private - */ - _f(t, b, c, d) { - if (t <= 19) { - return (b & c) | (~b & d); - } else if (t <= 39) { - return b ^ c ^ d; - } else if (t <= 59) { - return (b & c) | (b & d) | (c & d); - } else if (t <= 79) { - return b ^ c ^ d; - } - } - - /** - * Circular left-shift operator. - * @private - */ - _S(n, x) { - return (x << n) | (x >>> 32 - n); - } - - /** - * Perform one cycle of SHA-1. - * @param {Uint32Array|bitArray} words one block of words. - * @private - */ - _block(words) { - const sha1 = this; - const h = sha1._h; - // When words is passed to _block, it has 16 elements. SHA1 _block - // function extends words with new elements (at the end there are 80 elements). - // The problem is that if we use Uint32Array instead of Array, - // the length of Uint32Array cannot be changed. Thus, we replace words with a - // normal Array here. - const w = Array(80); // do not use Uint32Array here as the instantiation is slower - for (let j = 0; j < 16; j++) { - w[j] = words[j]; - } - - let a = h[0]; - let b = h[1]; - let c = h[2]; - let d = h[3]; - let e = h[4]; - - for (let t = 0; t <= 79; t++) { - if (t >= 16) { - w[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]); - } - const tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] + - sha1._key[Math.floor(t / 20)]) | 0; - e = d; - d = c; - c = sha1._S(30, b); - b = a; - a = tmp; - } - - h[0] = (h[0] + a) | 0; - h[1] = (h[1] + b) | 0; - h[2] = (h[2] + c) | 0; - h[3] = (h[3] + d) | 0; - h[4] = (h[4] + e) | 0; - } - }; - - /** @fileOverview Low-level AES implementation. - * - * This file contains a low-level implementation of AES, optimized for - * size and for efficiency on several browsers. It is based on - * OpenSSL's aes_core.c, a public-domain implementation by Vincent - * Rijmen, Antoon Bosselaers and Paulo Barreto. - * - * An older version of this implementation is available in the public - * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh, - * Stanford University 2008-2010 and BSD-licensed for liability - * reasons. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - - const cipher = {}; - - /** - * Schedule out an AES key for both encryption and decryption. This - * is a low-level class. Use a cipher mode to do bulk encryption. - * - * @constructor - * @param {Array} key The key as an array of 4, 6 or 8 words. - */ - cipher.aes = class { - constructor(key) { - /** - * The expanded S-box and inverse S-box tables. These will be computed - * on the client so that we don't have to send them down the wire. - * - * There are two tables, _tables[0] is for encryption and - * _tables[1] is for decryption. - * - * The first 4 sub-tables are the expanded S-box with MixColumns. The - * last (_tables[01][4]) is the S-box itself. - * - * @private - */ - const aes = this; - aes._tables = [[[], [], [], [], []], [[], [], [], [], []]]; - - if (!aes._tables[0][0][0]) { - aes._precompute(); - } - - const sbox = aes._tables[0][4]; - const decTable = aes._tables[1]; - const keyLen = key.length; - - let i, encKey, decKey, rcon = 1; - - if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) { - throw new Error("invalid aes key size"); - } - - aes._key = [encKey = key.slice(0), decKey = []]; - - // schedule encryption keys - for (i = keyLen; i < 4 * keyLen + 28; i++) { - let tmp = encKey[i - 1]; - - // apply sbox - if (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) { - tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; - - // shift rows and add rcon - if (i % keyLen === 0) { - tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24; - rcon = rcon << 1 ^ (rcon >> 7) * 283; - } - } - - encKey[i] = encKey[i - keyLen] ^ tmp; - } - - // schedule decryption keys - for (let j = 0; i; j++, i--) { - const tmp = encKey[j & 3 ? i : i - 4]; - if (i <= 4 || j < 4) { - decKey[j] = tmp; - } else { - decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ - decTable[1][sbox[tmp >> 16 & 255]] ^ - decTable[2][sbox[tmp >> 8 & 255]] ^ - decTable[3][sbox[tmp & 255]]; - } - } - } - // public - /* Something like this might appear here eventually - name: "AES", - blockSize: 4, - keySizes: [4,6,8], - */ - - /** - * Encrypt an array of 4 big-endian words. - * @param {Array} data The plaintext. - * @return {Array} The ciphertext. - */ - encrypt(data) { - return this._crypt(data, 0); - } - - /** - * Decrypt an array of 4 big-endian words. - * @param {Array} data The ciphertext. - * @return {Array} The plaintext. - */ - decrypt(data) { - return this._crypt(data, 1); - } - - /** - * Expand the S-box tables. - * - * @private - */ - _precompute() { - const encTable = this._tables[0]; - const decTable = this._tables[1]; - const sbox = encTable[4]; - const sboxInv = decTable[4]; - const d = []; - const th = []; - let xInv, x2, x4, x8; - - // Compute double and third tables - for (let i = 0; i < 256; i++) { - th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i; - } - - for (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) { - // Compute sbox - let s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4; - s = s >> 8 ^ s & 255 ^ 99; - sbox[x] = s; - sboxInv[s] = x; - - // Compute MixColumns - x8 = d[x4 = d[x2 = d[x]]]; - let tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100; - let tEnc = d[s] * 0x101 ^ s * 0x1010100; - - for (let i = 0; i < 4; i++) { - encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8; - decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8; - } - } - - // Compactify. Considerable speedup on Firefox. - for (let i = 0; i < 5; i++) { - encTable[i] = encTable[i].slice(0); - decTable[i] = decTable[i].slice(0); - } - } - - /** - * Encryption and decryption core. - * @param {Array} input Four words to be encrypted or decrypted. - * @param dir The direction, 0 for encrypt and 1 for decrypt. - * @return {Array} The four encrypted or decrypted words. - * @private - */ - _crypt(input, dir) { - if (input.length !== 4) { - throw new Error("invalid aes block size"); - } - - const key = this._key[dir]; - - const nInnerRounds = key.length / 4 - 2; - const out = [0, 0, 0, 0]; - const table = this._tables[dir]; - - // load up the tables - const t0 = table[0]; - const t1 = table[1]; - const t2 = table[2]; - const t3 = table[3]; - const sbox = table[4]; - - // state variables a,b,c,d are loaded with pre-whitened data - let a = input[0] ^ key[0]; - let b = input[dir ? 3 : 1] ^ key[1]; - let c = input[2] ^ key[2]; - let d = input[dir ? 1 : 3] ^ key[3]; - let kIndex = 4; - let a2, b2, c2; - - // Inner rounds. Cribbed from OpenSSL. - for (let i = 0; i < nInnerRounds; i++) { - a2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex]; - b2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1]; - c2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2]; - d = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3]; - kIndex += 4; - a = a2; b = b2; c = c2; - } - - // Last round. - for (let i = 0; i < 4; i++) { - out[dir ? 3 & -i : i] = - sbox[a >>> 24] << 24 ^ - sbox[b >> 16 & 255] << 16 ^ - sbox[c >> 8 & 255] << 8 ^ - sbox[d & 255] ^ - key[kIndex++]; - a2 = a; a = b; b = c; c = d; d = a2; - } - - return out; - } - }; - - /** - * Random values - * @namespace - */ - const random = { - /** - * Generate random words with pure js, cryptographically not as strong & safe as native implementation. - * @param {TypedArray} typedArray The array to fill. - * @return {TypedArray} The random values. - */ - getRandomValues(typedArray) { - const words = new Uint32Array(typedArray.buffer); - const r = (m_w) => { - let m_z = 0x3ade68b1; - const mask = 0xffffffff; - return function () { - m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; - m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; - const result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5; - return result * (Math.random() > .5 ? 1 : -1); - }; - }; - for (let i = 0, rcache; i < typedArray.length; i += 4) { - const _r = r((rcache || Math.random()) * 0x100000000); - rcache = _r() * 0x3ade67b7; - words[i / 4] = (_r() * 0x100000000) | 0; - } - return typedArray; - } - }; - - /** @fileOverview CTR mode implementation. - * - * Special thanks to Roy Nicholson for pointing out a bug in our - * implementation. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - - /** Brian Gladman's CTR Mode. - * @constructor - * @param {Object} _prf The aes instance to generate key. - * @param {bitArray} _iv The iv for ctr mode, it must be 128 bits. - */ - - const mode = {}; - - /** - * Brian Gladman's CTR Mode. - * @namespace - */ - mode.ctrGladman = class { - constructor(prf, iv) { - this._prf = prf; - this._initIv = iv; - this._iv = iv; - } - - reset() { - this._iv = this._initIv; - } - - /** Input some data to calculate. - * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last. - */ - update(data) { - return this.calculate(this._prf, data, this._iv); - } - - incWord(word) { - if (((word >> 24) & 0xff) === 0xff) { //overflow - let b1 = (word >> 16) & 0xff; - let b2 = (word >> 8) & 0xff; - let b3 = word & 0xff; - - if (b1 === 0xff) { // overflow b1 - b1 = 0; - if (b2 === 0xff) { - b2 = 0; - if (b3 === 0xff) { - b3 = 0; - } else { - ++b3; - } - } else { - ++b2; - } - } else { - ++b1; - } - - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; - } else { - word += (0x01 << 24); - } - return word; - } - - incCounter(counter) { - if ((counter[0] = this.incWord(counter[0])) === 0) { - // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = this.incWord(counter[1]); - } - } - - calculate(prf, data, iv) { - let l; - if (!(l = data.length)) { - return []; - } - const bl = bitArray.bitLength(data); - for (let i = 0; i < l; i += 4) { - this.incCounter(iv); - const e = prf.encrypt(iv); - data[i] ^= e[0]; - data[i + 1] ^= e[1]; - data[i + 2] ^= e[2]; - data[i + 3] ^= e[3]; - } - return bitArray.clamp(data, bl); - } - }; - - const misc = { - importKey(password) { - return new misc.hmacSha1(codec.bytes.toBits(password)); - }, - pbkdf2(prf, salt, count, length) { - count = count || 10000; - if (length < 0 || count < 0) { - throw new Error("invalid params to pbkdf2"); - } - const byteLength = ((length >> 5) + 1) << 2; - let u, ui, i, j, k; - const arrayBuffer = new ArrayBuffer(byteLength); - const out = new DataView(arrayBuffer); - let outLength = 0; - const b = bitArray; - salt = codec.bytes.toBits(salt); - for (k = 1; outLength < (byteLength || 1); k++) { - u = ui = prf.encrypt(b.concat(salt, [k])); - for (i = 1; i < count; i++) { - ui = prf.encrypt(ui); - for (j = 0; j < ui.length; j++) { - u[j] ^= ui[j]; - } - } - for (i = 0; outLength < (byteLength || 1) && i < u.length; i++) { - out.setInt32(outLength, u[i]); - outLength += 4; - } - } - return arrayBuffer.slice(0, length / 8); - } - }; - - /** @fileOverview HMAC implementation. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - - /** HMAC with the specified hash function. - * @constructor - * @param {bitArray} key the key for HMAC. - * @param {Object} [Hash=hash.sha1] The hash function to use. - */ - misc.hmacSha1 = class { - - constructor(key) { - const hmac = this; - const Hash = hmac._hash = hash.sha1; - const exKey = [[], []]; - hmac._baseHash = [new Hash(), new Hash()]; - const bs = hmac._baseHash[0].blockSize / 32; - - if (key.length > bs) { - key = new Hash().update(key).finalize(); - } - - for (let i = 0; i < bs; i++) { - exKey[0][i] = key[i] ^ 0x36363636; - exKey[1][i] = key[i] ^ 0x5C5C5C5C; - } - - hmac._baseHash[0].update(exKey[0]); - hmac._baseHash[1].update(exKey[1]); - hmac._resultHash = new Hash(hmac._baseHash[0]); - } - reset() { - const hmac = this; - hmac._resultHash = new hmac._hash(hmac._baseHash[0]); - hmac._updated = false; - } - - update(data) { - const hmac = this; - hmac._updated = true; - hmac._resultHash.update(data); - } - - digest() { - const hmac = this; - const w = hmac._resultHash.finalize(); - const result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize(); - - hmac.reset(); - - return result; - } - - encrypt(data) { - if (!this._updated) { - this.update(data); - return this.digest(data); - } else { - throw new Error("encrypt on already updated hmac called!"); - } - } - }; - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const GET_RANDOM_VALUES_SUPPORTED = typeof crypto != "undefined" && typeof crypto.getRandomValues == "function"; - - const ERR_INVALID_PASSWORD = "Invalid password"; - const ERR_INVALID_SIGNATURE = "Invalid signature"; - const ERR_ABORT_CHECK_PASSWORD = "zipjs-abort-check-password"; - - function getRandomValues(array) { - if (GET_RANDOM_VALUES_SUPPORTED) { - return crypto.getRandomValues(array); - } else { - return random.getRandomValues(array); - } - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const BLOCK_LENGTH = 16; - const RAW_FORMAT = "raw"; - const PBKDF2_ALGORITHM = { name: "PBKDF2" }; - const HASH_ALGORITHM = { name: "HMAC" }; - const HASH_FUNCTION = "SHA-1"; - const BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM); - const DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM); - const DERIVED_BITS_USAGE = ["deriveBits"]; - const SALT_LENGTH = [8, 12, 16]; - const KEY_LENGTH = [16, 24, 32]; - const SIGNATURE_LENGTH = 10; - const COUNTER_DEFAULT_VALUE = [0, 0, 0, 0]; - const UNDEFINED_TYPE = "undefined"; - const FUNCTION_TYPE = "function"; - // deno-lint-ignore valid-typeof - const CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE; - const subtle = CRYPTO_API_SUPPORTED && crypto.subtle; - const SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE; - const codecBytes = codec.bytes; - const Aes = cipher.aes; - const CtrGladman = mode.ctrGladman; - const HmacSha1 = misc.hmacSha1; - - let IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE; - let DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE; - - class AESDecryptionStream extends TransformStream { - - constructor({ password, signed, encryptionStrength, checkPasswordOnly }) { - super({ - start() { - Object.assign(this, { - ready: new Promise(resolve => this.resolveReady = resolve), - password, - signed, - strength: encryptionStrength - 1, - pending: new Uint8Array() - }); - }, - async transform(chunk, controller) { - const aesCrypto = this; - const { - password, - strength, - resolveReady, - ready - } = aesCrypto; - if (password) { - await createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2)); - chunk = subarray(chunk, SALT_LENGTH[strength] + 2); - if (checkPasswordOnly) { - controller.error(new Error(ERR_ABORT_CHECK_PASSWORD)); - } else { - resolveReady(); - } - } else { - await ready; - } - const output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH)); - controller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true)); - }, - async flush(controller) { - const { - signed, - ctr, - hmac, - pending, - ready - } = this; - await ready; - const chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH); - const originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH); - let decryptedChunkArray = new Uint8Array(); - if (chunkToDecrypt.length) { - const encryptedChunk = toBits(codecBytes, chunkToDecrypt); - hmac.update(encryptedChunk); - const decryptedChunk = ctr.update(encryptedChunk); - decryptedChunkArray = fromBits(codecBytes, decryptedChunk); - } - if (signed) { - const signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH); - for (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) { - if (signature[indexSignature] != originalSignature[indexSignature]) { - throw new Error(ERR_INVALID_SIGNATURE); - } - } - } - controller.enqueue(decryptedChunkArray); - } - }); - } - } - - class AESEncryptionStream extends TransformStream { - - constructor({ password, encryptionStrength }) { - // deno-lint-ignore prefer-const - let stream; - super({ - start() { - Object.assign(this, { - ready: new Promise(resolve => this.resolveReady = resolve), - password, - strength: encryptionStrength - 1, - pending: new Uint8Array() - }); - }, - async transform(chunk, controller) { - const aesCrypto = this; - const { - password, - strength, - resolveReady, - ready - } = aesCrypto; - let preamble = new Uint8Array(); - if (password) { - preamble = await createEncryptionKeys(aesCrypto, strength, password); - resolveReady(); - } else { - await ready; - } - const output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH)); - output.set(preamble, 0); - controller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0)); - }, - async flush(controller) { - const { - ctr, - hmac, - pending, - ready - } = this; - await ready; - let encryptedChunkArray = new Uint8Array(); - if (pending.length) { - const encryptedChunk = ctr.update(toBits(codecBytes, pending)); - hmac.update(encryptedChunk); - encryptedChunkArray = fromBits(codecBytes, encryptedChunk); - } - stream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH); - controller.enqueue(concat(encryptedChunkArray, stream.signature)); - } - }); - stream = this; - } - } - - function append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) { - const { - ctr, - hmac, - pending - } = aesCrypto; - const inputLength = input.length - paddingEnd; - if (pending.length) { - input = concat(pending, input); - output = expand(output, inputLength - (inputLength % BLOCK_LENGTH)); - } - let offset; - for (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) { - const inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH)); - if (verifySignature) { - hmac.update(inputChunk); - } - const outputChunk = ctr.update(inputChunk); - if (!verifySignature) { - hmac.update(outputChunk); - } - output.set(fromBits(codecBytes, outputChunk), offset + paddingStart); - } - aesCrypto.pending = subarray(input, offset); - return output; - } - - async function createDecryptionKeys(decrypt, strength, password, preamble) { - const passwordVerificationKey = await createKeys$1(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength])); - const passwordVerification = subarray(preamble, SALT_LENGTH[strength]); - if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) { - throw new Error(ERR_INVALID_PASSWORD); - } - } - - async function createEncryptionKeys(encrypt, strength, password) { - const salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength])); - const passwordVerification = await createKeys$1(encrypt, strength, password, salt); - return concat(salt, passwordVerification); - } - - async function createKeys$1(aesCrypto, strength, password, salt) { - aesCrypto.password = null; - const encodedPassword = encodeText(password); - const baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE); - const derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2)); - const compositeKey = new Uint8Array(derivedBits); - const key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength])); - const authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2)); - const passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2); - Object.assign(aesCrypto, { - keys: { - key, - authentication, - passwordVerification - }, - ctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)), - hmac: new HmacSha1(authentication) - }); - return passwordVerification; - } - - async function importKey(format, password, algorithm, extractable, keyUsages) { - if (IMPORT_KEY_SUPPORTED) { - try { - return await subtle.importKey(format, password, algorithm, extractable, keyUsages); - } catch (_error) { - IMPORT_KEY_SUPPORTED = false; - return misc.importKey(password); - } - } else { - return misc.importKey(password); - } - } - - async function deriveBits(algorithm, baseKey, length) { - if (DERIVE_BITS_SUPPORTED) { - try { - return await subtle.deriveBits(algorithm, baseKey, length); - } catch (_error) { - DERIVE_BITS_SUPPORTED = false; - return misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length); - } - } else { - return misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length); - } - } - - function concat(leftArray, rightArray) { - let array = leftArray; - if (leftArray.length + rightArray.length) { - array = new Uint8Array(leftArray.length + rightArray.length); - array.set(leftArray, 0); - array.set(rightArray, leftArray.length); - } - return array; - } - - function expand(inputArray, length) { - if (length && length > inputArray.length) { - const array = inputArray; - inputArray = new Uint8Array(length); - inputArray.set(array, 0); - } - return inputArray; - } - - function subarray(array, begin, end) { - return array.subarray(begin, end); - } - - function fromBits(codecBytes, chunk) { - return codecBytes.fromBits(chunk); - } - function toBits(codecBytes, chunk) { - return codecBytes.toBits(chunk); - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const HEADER_LENGTH = 12; - - class ZipCryptoDecryptionStream extends TransformStream { - - constructor({ password, passwordVerification, checkPasswordOnly }) { - super({ - start() { - Object.assign(this, { - password, - passwordVerification - }); - createKeys(this, password); - }, - transform(chunk, controller) { - const zipCrypto = this; - if (zipCrypto.password) { - const decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH)); - zipCrypto.password = null; - if (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) { - throw new Error(ERR_INVALID_PASSWORD); - } - chunk = chunk.subarray(HEADER_LENGTH); - } - if (checkPasswordOnly) { - controller.error(new Error(ERR_ABORT_CHECK_PASSWORD)); - } else { - controller.enqueue(decrypt(zipCrypto, chunk)); - } - } - }); - } - } - - class ZipCryptoEncryptionStream extends TransformStream { - - constructor({ password, passwordVerification }) { - super({ - start() { - Object.assign(this, { - password, - passwordVerification - }); - createKeys(this, password); - }, - transform(chunk, controller) { - const zipCrypto = this; - let output; - let offset; - if (zipCrypto.password) { - zipCrypto.password = null; - const header = getRandomValues(new Uint8Array(HEADER_LENGTH)); - header[HEADER_LENGTH - 1] = zipCrypto.passwordVerification; - output = new Uint8Array(chunk.length + header.length); - output.set(encrypt(zipCrypto, header), 0); - offset = HEADER_LENGTH; - } else { - output = new Uint8Array(chunk.length); - offset = 0; - } - output.set(encrypt(zipCrypto, chunk), offset); - controller.enqueue(output); - } - }); - } - } - - function decrypt(target, input) { - const output = new Uint8Array(input.length); - for (let index = 0; index < input.length; index++) { - output[index] = getByte(target) ^ input[index]; - updateKeys(target, output[index]); - } - return output; - } - - function encrypt(target, input) { - const output = new Uint8Array(input.length); - for (let index = 0; index < input.length; index++) { - output[index] = getByte(target) ^ input[index]; - updateKeys(target, input[index]); - } - return output; - } - - function createKeys(target, password) { - const keys = [0x12345678, 0x23456789, 0x34567890]; - Object.assign(target, { - keys, - crcKey0: new Crc32(keys[0]), - crcKey2: new Crc32(keys[2]), - }); - for (let index = 0; index < password.length; index++) { - updateKeys(target, password.charCodeAt(index)); - } - } - - function updateKeys(target, byte) { - let [key0, key1, key2] = target.keys; - target.crcKey0.append([byte]); - key0 = ~target.crcKey0.get(); - key1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1); - target.crcKey2.append([key1 >>> 24]); - key2 = ~target.crcKey2.get(); - target.keys = [key0, key1, key2]; - } - - function getByte(target) { - const temp = target.keys[2] | 2; - return getInt8(Math.imul(temp, (temp ^ 1)) >>> 8); - } - - function getInt8(number) { - return number & 0xFF; - } - - function getInt32(number) { - return number & 0xFFFFFFFF; - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const COMPRESSION_FORMAT = "deflate-raw"; - - class DeflateStream extends TransformStream { - - constructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) { - super({}); - const { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options; - const stream = this; - let crc32Stream, encryptionStream; - let readable = filterEmptyChunks(super.readable); - if ((!encrypted || zipCrypto) && signed) { - crc32Stream = new Crc32Stream(); - readable = pipeThrough(readable, crc32Stream); - } - if (compressed) { - readable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream); - } - if (encrypted) { - if (zipCrypto) { - readable = pipeThrough(readable, new ZipCryptoEncryptionStream(options)); - } else { - encryptionStream = new AESEncryptionStream(options); - readable = pipeThrough(readable, encryptionStream); - } - } - setReadable(stream, readable, async () => { - let signature; - if (encrypted && !zipCrypto) { - signature = encryptionStream.signature; - } - if ((!encrypted || zipCrypto) && signed) { - signature = new DataView(crc32Stream.value.buffer).getUint32(0); - } - stream.signature = signature; - }); - } - } - - class InflateStream extends TransformStream { - - constructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) { - super({}); - const { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options; - let crc32Stream, decryptionStream; - let readable = filterEmptyChunks(super.readable); - if (encrypted) { - if (zipCrypto) { - readable = pipeThrough(readable, new ZipCryptoDecryptionStream(options)); - } else { - decryptionStream = new AESDecryptionStream(options); - readable = pipeThrough(readable, decryptionStream); - } - } - if (compressed) { - readable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream); - } - if ((!encrypted || zipCrypto) && signed) { - crc32Stream = new Crc32Stream(); - readable = pipeThrough(readable, crc32Stream); - } - setReadable(this, readable, async () => { - if ((!encrypted || zipCrypto) && signed) { - const dataViewSignature = new DataView(crc32Stream.value.buffer); - if (signature != dataViewSignature.getUint32(0, false)) { - throw new Error(ERR_INVALID_SIGNATURE); - } - } - }); - } - } - - function filterEmptyChunks(readable) { - return pipeThrough(readable, new TransformStream({ - transform(chunk, controller) { - if (chunk && chunk.length) { - controller.enqueue(chunk); - } - } - })); - } - - function setReadable(stream, readable, flush) { - readable = pipeThrough(readable, new TransformStream({ flush })); - Object.defineProperty(stream, "readable", { - get() { - return readable; - } - }); - } - - function pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) { - try { - const CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream; - readable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options)); - } catch (error) { - if (useCompressionStream) { - readable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options)); - } else { - throw error; - } - } - return readable; - } - - function pipeThrough(readable, transformStream) { - return readable.pipeThrough(transformStream); - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const MESSAGE_EVENT_TYPE = "message"; - const MESSAGE_START = "start"; - const MESSAGE_PULL = "pull"; - const MESSAGE_DATA = "data"; - const MESSAGE_ACK_DATA = "ack"; - const MESSAGE_CLOSE = "close"; - const CODEC_DEFLATE = "deflate"; - const CODEC_INFLATE = "inflate"; - - class CodecStream extends TransformStream { - - constructor(options, config) { - super({}); - const codec = this; - const { codecType } = options; - let Stream; - if (codecType.startsWith(CODEC_DEFLATE)) { - Stream = DeflateStream; - } else if (codecType.startsWith(CODEC_INFLATE)) { - Stream = InflateStream; - } - let size = 0; - const stream = new Stream(options, config); - const readable = super.readable; - const transformStream = new TransformStream({ - transform(chunk, controller) { - if (chunk && chunk.length) { - size += chunk.length; - controller.enqueue(chunk); - } - }, - flush() { - const { signature } = stream; - Object.assign(codec, { - signature, - size - }); - } - }); - Object.defineProperty(codec, "readable", { - get() { - return readable.pipeThrough(stream).pipeThrough(transformStream); - } - }); - } - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - // deno-lint-ignore valid-typeof - const WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE$1; - - class CodecWorker { - - constructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) { - const { signal } = streamOptions; - Object.assign(workerData, { - busy: true, - readable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }), - writable, - options: Object.assign({}, options), - scripts, - transferStreams, - terminate() { - const { worker, busy } = workerData; - if (worker && !busy) { - worker.terminate(); - workerData.interface = null; - } - }, - onTaskFinished() { - workerData.busy = false; - onTaskFinished(workerData); - } - }); - return (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config); - } - } - - class ProgressWatcherStream extends TransformStream { - - constructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) { - let chunkOffset = 0; - super({ - start() { - if (onstart) { - callHandler(onstart, size); - } - }, - async transform(chunk, controller) { - chunkOffset += chunk.length; - if (onprogress) { - await callHandler(onprogress, chunkOffset, size); - } - controller.enqueue(chunk); - }, - flush() { - readableSource.size = chunkOffset; - if (onend) { - callHandler(onend, chunkOffset); - } - } - }, { highWaterMark: 1, size: () => chunkSize }); - } - } - - async function callHandler(handler, ...parameters) { - try { - await handler(...parameters); - } catch (_error) { - console.error(_error) - } - } - - function createWorkerInterface(workerData, config) { - return { - run: () => runWorker$1(workerData, config) - }; - } - - function createWebWorkerInterface(workerData, { baseURL, chunkSize }) { - if (!workerData.interface) { - Object.assign(workerData, { - worker: getWebWorker(workerData.scripts[0], baseURL, workerData), - interface: { - run: () => runWebWorker(workerData, { chunkSize }) - } - }); - } - return workerData.interface; - } - - async function runWorker$1({ options, readable, writable, onTaskFinished }, config) { - const codecStream = new CodecStream(options, config); - try { - await readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true }); - const { - signature, - size - } = codecStream; - return { - signature, - size - }; - } finally { - onTaskFinished(); - } - } - - async function runWebWorker(workerData, config) { - let resolveResult, rejectResult; - const result = new Promise((resolve, reject) => { - resolveResult = resolve; - rejectResult = reject; - }); - Object.assign(workerData, { - reader: null, - writer: null, - resolveResult, - rejectResult, - result - }); - const { readable, options, scripts } = workerData; - const { writable, closed } = watchClosedStream(workerData.writable); - const streamsTransferred = sendMessage({ - type: MESSAGE_START, - scripts: scripts.slice(1), - options, - config, - readable, - writable - }, workerData); - if (!streamsTransferred) { - Object.assign(workerData, { - reader: readable.getReader(), - writer: writable.getWriter() - }); - } - const resultValue = await result; - try { - await writable.getWriter().close(); - } catch (_error) { - console.error(_error) - } - await closed; - return resultValue; - } - - function watchClosedStream(writableSource) { - const writer = writableSource.getWriter(); - let resolveStreamClosed; - const closed = new Promise(resolve => resolveStreamClosed = resolve); - const writable = new WritableStream({ - async write(chunk) { - await writer.ready; - await writer.write(chunk); - }, - close() { - writer.releaseLock(); - resolveStreamClosed(); - }, - abort(reason) { - return writer.abort(reason); - } - }); - return { writable, closed }; - } - - let classicWorkersSupported = true; - let transferStreamsSupported = true; - - function getWebWorker(url, baseURL, workerData) { - const workerOptions = { type: "module" }; - let scriptUrl, worker; - // deno-lint-ignore valid-typeof - if (typeof url == FUNCTION_TYPE$1) { - url = url(); - } - try { - scriptUrl = new URL(url, baseURL); - } catch (_error) { - scriptUrl = url; - } - if (classicWorkersSupported) { - try { - worker = new Worker(scriptUrl); - } catch (_error) { - classicWorkersSupported = false; - worker = new Worker(scriptUrl, workerOptions); - } - } else { - worker = new Worker(scriptUrl, workerOptions); - } - worker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData)); - return worker; - } - - function sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) { - try { - let { value, readable, writable } = message; - const transferables = []; - if (value) { - message.value = value.buffer; - transferables.push(message.value); - } - if (transferStreams && transferStreamsSupported) { - if (readable) { - transferables.push(readable); - } - if (writable) { - transferables.push(writable); - } - } else { - message.readable = message.writable = null; - } - if (transferables.length) { - try { - worker.postMessage(message, transferables); - return true; - } catch (_error) { - transferStreamsSupported = false; - message.readable = message.writable = null; - worker.postMessage(message); - } - } else { - worker.postMessage(message); - } - } catch (error) { - if (writer) { - writer.releaseLock(); - } - onTaskFinished(); - throw error; - } - } - - async function onMessage({ data }, workerData) { - const { type, value, messageId, result, error } = data; - const { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData; - try { - if (error) { - const { message, stack, code, name } = error; - const responseError = new Error(message); - Object.assign(responseError, { stack, code, name }); - close(responseError); - } else { - if (type == MESSAGE_PULL) { - const { value, done } = await reader.read(); - sendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData); - } - if (type == MESSAGE_DATA) { - await writer.ready; - await writer.write(new Uint8Array(value)); - sendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData); - } - if (type == MESSAGE_CLOSE) { - close(null, result); - } - } - } catch (error) { - close(error); - } - - function close(error, result) { - if (error) { - rejectResult(error); - } else { - resolveResult(result); - } - if (writer) { - writer.releaseLock(); - } - onTaskFinished(); - } - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - let pool = []; - const pendingRequests = []; - - let indexWorker = 0; - - async function runWorker(stream, workerOptions) { - const { options, config } = workerOptions; - const { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options; - const { workerScripts, maxWorkers, terminateWorkerTimeout } = config; - workerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE; - const streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams; - workerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers)); - workerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : []; - options.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream); - let worker; - const workerData = pool.find(workerData => !workerData.busy); - if (workerData) { - clearTerminateTimeout(workerData); - worker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished); - } else if (pool.length < maxWorkers) { - const workerData = { indexWorker }; - indexWorker++; - pool.push(workerData); - worker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished); - } else { - worker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions })); - } - return worker.run(); - - function onTaskFinished(workerData) { - if (pendingRequests.length) { - const [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1); - resolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished)); - } else if (workerData.worker) { - clearTerminateTimeout(workerData); - if (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) { - workerData.terminateTimeout = setTimeout(() => { - pool = pool.filter(data => data != workerData); - workerData.terminate(); - }, terminateWorkerTimeout); - } - } else { - pool = pool.filter(data => data != workerData); - } - } - } - - function clearTerminateTimeout(workerData) { - const { terminateTimeout } = workerData; - if (terminateTimeout) { - clearTimeout(terminateTimeout); - workerData.terminateTimeout = null; - } - } - - function terminateWorkers() { - pool.forEach(workerData => { - clearTerminateTimeout(workerData); - workerData.terminate(); - }); - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const ERR_HTTP_STATUS = "HTTP error "; - const ERR_HTTP_RANGE = "HTTP Range not supported"; - const ERR_ITERATOR_COMPLETED_TOO_SOON = "Writer iterator completed too soon"; - - const CONTENT_TYPE_TEXT_PLAIN = "text/plain"; - const HTTP_HEADER_CONTENT_LENGTH = "Content-Length"; - const HTTP_HEADER_CONTENT_RANGE = "Content-Range"; - const HTTP_HEADER_ACCEPT_RANGES = "Accept-Ranges"; - const HTTP_HEADER_RANGE = "Range"; - const HTTP_HEADER_CONTENT_TYPE = "Content-Type"; - const HTTP_METHOD_HEAD = "HEAD"; - const HTTP_METHOD_GET = "GET"; - const HTTP_RANGE_UNIT = "bytes"; - const DEFAULT_CHUNK_SIZE = 64 * 1024; - - const PROPERTY_NAME_WRITABLE = "writable"; - - class Stream { - - constructor() { - this.size = 0; - } - - init() { - this.initialized = true; - } - } - - class Reader extends Stream { - - get readable() { - const reader = this; - const { chunkSize = DEFAULT_CHUNK_SIZE } = reader; - const readable = new ReadableStream({ - start() { - this.chunkOffset = 0; - }, - async pull(controller) { - const { offset = 0, size, diskNumberStart } = readable; - const { chunkOffset } = this; - controller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart)); - if (chunkOffset + chunkSize > size) { - controller.close(); - } else { - this.chunkOffset += chunkSize; - } - } - }); - return readable; - } - } - - class Writer extends Stream { - - constructor() { - super(); - const writer = this; - const writable = new WritableStream({ - write(chunk) { - return writer.writeUint8Array(chunk); - } - }); - Object.defineProperty(writer, PROPERTY_NAME_WRITABLE, { - get() { - return writable; - } - }); - } - - writeUint8Array() { - // abstract - } - } - - class Data64URIReader extends Reader { - - constructor(dataURI) { - super(); - let dataEnd = dataURI.length; - while (dataURI.charAt(dataEnd - 1) == "=") { - dataEnd--; - } - const dataStart = dataURI.indexOf(",") + 1; - Object.assign(this, { - dataURI, - dataStart, - size: Math.floor((dataEnd - dataStart) * 0.75) - }); - } - - readUint8Array(offset, length) { - const { - dataStart, - dataURI - } = this; - const dataArray = new Uint8Array(length); - const start = Math.floor(offset / 3) * 4; - const bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart)); - const delta = offset - Math.floor(start / 4) * 3; - for (let indexByte = delta; indexByte < delta + length; indexByte++) { - dataArray[indexByte - delta] = bytes.charCodeAt(indexByte); - } - return dataArray; - } - } - - class Data64URIWriter extends Writer { - - constructor(contentType) { - super(); - Object.assign(this, { - data: "data:" + (contentType || "") + ";base64,", - pending: [] - }); - } - - writeUint8Array(array) { - const writer = this; - let indexArray = 0; - let dataString = writer.pending; - const delta = writer.pending.length; - writer.pending = ""; - for (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) { - dataString += String.fromCharCode(array[indexArray]); - } - for (; indexArray < array.length; indexArray++) { - writer.pending += String.fromCharCode(array[indexArray]); - } - if (dataString.length > 2) { - writer.data += btoa(dataString); - } else { - writer.pending = dataString; - } - } - - getData() { - return this.data + btoa(this.pending); - } - } - - class BlobReader extends Reader { - - constructor(blob) { - super(); - Object.assign(this, { - blob, - size: blob.size - }); - } - - async readUint8Array(offset, length) { - const reader = this; - const offsetEnd = offset + length; - const blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob; - let arrayBuffer = await blob.arrayBuffer(); - if (arrayBuffer.byteLength > length) { - arrayBuffer = arrayBuffer.slice(offset, offsetEnd); - } - return new Uint8Array(arrayBuffer); - } - } - - class BlobWriter extends Stream { - - constructor(contentType) { - super(); - const writer = this; - const transformStream = new TransformStream(); - const headers = []; - if (contentType) { - headers.push([HTTP_HEADER_CONTENT_TYPE, contentType]); - } - Object.defineProperty(writer, PROPERTY_NAME_WRITABLE, { - get() { - return transformStream.writable; - } - }); - writer.blob = new Response(transformStream.readable, { headers }).blob(); - } - - getData() { - return this.blob; - } - } - - class TextReader extends BlobReader { - - constructor(text) { - super(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN })); - } - } - - class TextWriter extends BlobWriter { - - constructor(encoding) { - super(encoding); - Object.assign(this, { - encoding, - utf8: !encoding || encoding.toLowerCase() == "utf-8" - }); - } - - async getData() { - const { - encoding, - utf8 - } = this; - const blob = await super.getData(); - if (blob.text && utf8) { - return blob.text(); - } else { - const reader = new FileReader(); - return new Promise((resolve, reject) => { - Object.assign(reader, { - onload: ({ target }) => resolve(target.result), - onerror: () => reject(reader.error) - }); - reader.readAsText(blob, encoding); - }); - } - } - } - - class FetchReader extends Reader { - - constructor(url, options) { - super(); - createHtpReader(this, url, options); - } - - async init() { - await initHttpReader(this, sendFetchRequest, getFetchRequestData); - super.init(); - } - - readUint8Array(index, length) { - return readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData); - } - } - - class XHRReader extends Reader { - - constructor(url, options) { - super(); - createHtpReader(this, url, options); - } - - async init() { - await initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData); - super.init(); - } - - readUint8Array(index, length) { - return readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData); - } - } - - function createHtpReader(httpReader, url, options) { - const { - preventHeadRequest, - useRangeHeader, - forceRangeRequests - } = options; - options = Object.assign({}, options); - delete options.preventHeadRequest; - delete options.useRangeHeader; - delete options.forceRangeRequests; - delete options.useXHR; - Object.assign(httpReader, { - url, - options, - preventHeadRequest, - useRangeHeader, - forceRangeRequests - }); - } - - async function initHttpReader(httpReader, sendRequest, getRequestData) { - const { - url, - useRangeHeader, - forceRangeRequests - } = httpReader; - if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) { - const { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader)); - if (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) { - throw new Error(ERR_HTTP_RANGE); - } else { - let contentSize; - const contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE); - if (contentRangeHeader) { - const splitHeader = contentRangeHeader.trim().split(/\s*\/\s*/); - if (splitHeader.length) { - const headerValue = splitHeader[1]; - if (headerValue && headerValue != "*") { - contentSize = Number(headerValue); - } - } - } - if (contentSize === UNDEFINED_VALUE) { - await getContentLength(httpReader, sendRequest, getRequestData); - } else { - httpReader.size = contentSize; - } - } - } else { - await getContentLength(httpReader, sendRequest, getRequestData); - } - } - - async function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) { - const { - useRangeHeader, - forceRangeRequests, - options - } = httpReader; - if (useRangeHeader || forceRangeRequests) { - const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length)); - if (response.status != 206) { - throw new Error(ERR_HTTP_RANGE); - } - return new Uint8Array(await response.arrayBuffer()); - } else { - const { data } = httpReader; - if (!data) { - await getRequestData(httpReader, options); - } - return new Uint8Array(httpReader.data.subarray(index, index + length)); - } - } - - function getRangeHeaders(httpReader, index = 0, length = 1) { - return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + index + "-" + (index + length - 1) }); - } - - function getHeaders({ options }) { - const { headers } = options; - if (headers) { - if (Symbol.iterator in headers) { - return Object.fromEntries(headers); - } else { - return headers; - } - } - } - - async function getFetchRequestData(httpReader) { - await getRequestData(httpReader, sendFetchRequest); - } - - async function getXMLHttpRequestData(httpReader) { - await getRequestData(httpReader, sendXMLHttpRequest); - } - - async function getRequestData(httpReader, sendRequest) { - const response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader)); - httpReader.data = new Uint8Array(await response.arrayBuffer()); - if (!httpReader.size) { - httpReader.size = httpReader.data.length; - } - } - - async function getContentLength(httpReader, sendRequest, getRequestData) { - if (httpReader.preventHeadRequest) { - await getRequestData(httpReader, httpReader.options); - } else { - const response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader)); - const contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH); - if (contentLength) { - httpReader.size = Number(contentLength); - } else { - await getRequestData(httpReader, httpReader.options); - } - } - } - - async function sendFetchRequest(method, { options, url }, headers) { - const response = await fetch(url, Object.assign({}, options, { method, headers })); - if (response.status < 400) { - return response; - } else { - throw response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status)); - } - } - - function sendXMLHttpRequest(method, { url }, headers) { - return new Promise((resolve, reject) => { - const request = new XMLHttpRequest(); - request.addEventListener("load", () => { - if (request.status < 400) { - const headers = []; - request.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(header => { - const splitHeader = header.trim().split(/\s*:\s*/); - splitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase()); - headers.push(splitHeader); - }); - resolve({ - status: request.status, - arrayBuffer: () => request.response, - headers: new Map(headers) - }); - } else { - reject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status))); - } - }, false); - request.addEventListener("error", event => reject(event.detail ? event.detail.error : new Error("Network error")), false); - request.open(method, url); - if (headers) { - for (const entry of Object.entries(headers)) { - request.setRequestHeader(entry[0], entry[1]); - } - } - request.responseType = "arraybuffer"; - request.send(); - }); - } - - class HttpReader extends Reader { - - constructor(url, options = {}) { - super(); - Object.assign(this, { - url, - reader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options) - }); - } - - set size(value) { - console.error(_error) - } - - get size() { - return this.reader.size; - } - - async init() { - await this.reader.init(); - super.init(); - } - - readUint8Array(index, length) { - return this.reader.readUint8Array(index, length); - } - } - - class HttpRangeReader extends HttpReader { - - constructor(url, options = {}) { - options.useRangeHeader = true; - super(url, options); - } - } - - - class Uint8ArrayReader extends Reader { - - constructor(array) { - super(); - Object.assign(this, { - array, - size: array.length - }); - } - - readUint8Array(index, length) { - return this.array.slice(index, index + length); - } - } - - class Uint8ArrayWriter extends Writer { - - init(initSize = 0) { - Object.assign(this, { - offset: 0, - array: new Uint8Array(initSize) - }); - super.init(); - } - - writeUint8Array(array) { - const writer = this; - if (writer.offset + array.length > writer.array.length) { - const previousArray = writer.array; - writer.array = new Uint8Array(previousArray.length + array.length); - writer.array.set(previousArray); - } - writer.array.set(array, writer.offset); - writer.offset += array.length; - } - - getData() { - return this.array; - } - } - - class SplitDataReader extends Reader { - - constructor(readers) { - super(); - this.readers = readers; - } - - async init() { - const reader = this; - const { readers } = reader; - reader.lastDiskNumber = 0; - reader.lastDiskOffset = 0; - await Promise.all(readers.map(async (diskReader, indexDiskReader) => { - await diskReader.init(); - if (indexDiskReader != readers.length - 1) { - reader.lastDiskOffset += diskReader.size; - } - reader.size += diskReader.size; - })); - super.init(); - } - - async readUint8Array(offset, length, diskNumber = 0) { - const reader = this; - const { readers } = this; - let result; - let currentDiskNumber = diskNumber; - if (currentDiskNumber == -1) { - currentDiskNumber = readers.length - 1; - } - let currentReaderOffset = offset; - while (currentReaderOffset >= readers[currentDiskNumber].size) { - currentReaderOffset -= readers[currentDiskNumber].size; - currentDiskNumber++; - } - const currentReader = readers[currentDiskNumber]; - const currentReaderSize = currentReader.size; - if (currentReaderOffset + length <= currentReaderSize) { - result = await readUint8Array(currentReader, currentReaderOffset, length); - } else { - const chunkLength = currentReaderSize - currentReaderOffset; - result = new Uint8Array(length); - result.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength)); - result.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength); - } - reader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber); - return result; - } - } - - class SplitDataWriter extends Stream { - - constructor(writerGenerator, maxSize = 4294967295) { - super(); - const zipWriter = this; - Object.assign(zipWriter, { - diskNumber: 0, - diskOffset: 0, - size: 0, - maxSize, - availableSize: maxSize - }); - let diskSourceWriter, diskWritable, diskWriter; - const writable = new WritableStream({ - async write(chunk) { - const { availableSize } = zipWriter; - if (!diskWriter) { - const { value, done } = await writerGenerator.next(); - if (done && !value) { - throw new Error(ERR_ITERATOR_COMPLETED_TOO_SOON); - } else { - diskSourceWriter = value; - diskSourceWriter.size = 0; - if (diskSourceWriter.maxSize) { - zipWriter.maxSize = diskSourceWriter.maxSize; - } - zipWriter.availableSize = zipWriter.maxSize; - await initStream(diskSourceWriter); - diskWritable = value.writable; - diskWriter = diskWritable.getWriter(); - } - await this.write(chunk); - } else if (chunk.length >= availableSize) { - await writeChunk(chunk.slice(0, availableSize)); - await closeDisk(); - zipWriter.diskOffset += diskSourceWriter.size; - zipWriter.diskNumber++; - diskWriter = null; - await this.write(chunk.slice(availableSize)); - } else { - await writeChunk(chunk); - } - }, - async close() { - await diskWriter.ready; - await closeDisk(); - } - }); - Object.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, { - get() { - return writable; - } - }); - - async function writeChunk(chunk) { - const chunkLength = chunk.length; - if (chunkLength) { - await diskWriter.ready; - await diskWriter.write(chunk); - diskSourceWriter.size += chunkLength; - zipWriter.size += chunkLength; - zipWriter.availableSize -= chunkLength; - } - } - - async function closeDisk() { - diskWritable.size = diskSourceWriter.size; - await diskWriter.close(); - } - } - } - - function isHttpFamily(url) { - const { baseURL } = getConfiguration(); - const { protocol } = new URL(url, baseURL); - return protocol == "http:" || protocol == "https:"; - } - - async function initStream(stream, initSize) { - if (stream.init && !stream.initialized) { - await stream.init(initSize); - } - } - - function initReader(reader) { - if (Array.isArray(reader)) { - reader = new SplitDataReader(reader); - } - if (reader instanceof ReadableStream) { - reader = { - readable: reader - }; - } - return reader; - } - - function initWriter(writer) { - if (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE$1) { - writer = new SplitDataWriter(writer); - } - if (writer instanceof WritableStream) { - writer = { - writable: writer - }; - } - const { writable } = writer; - if (writable.size === UNDEFINED_VALUE) { - writable.size = 0; - } - const splitZipFile = writer instanceof SplitDataWriter; - if (!splitZipFile) { - Object.assign(writer, { - diskNumber: 0, - diskOffset: 0, - availableSize: Infinity, - maxSize: Infinity - }); - } - return writer; - } - - function readUint8Array(reader, offset, size, diskNumber) { - return reader.readUint8Array(offset, size, diskNumber); - } - - const SplitZipReader = SplitDataReader; - const SplitZipWriter = SplitDataWriter; - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - /* global TextDecoder */ - - const CP437 = "\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""); - const VALID_CP437 = CP437.length == 256; - - function decodeCP437(stringValue) { - if (VALID_CP437) { - let result = ""; - for (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) { - result += CP437[stringValue[indexCharacter]]; - } - return result; - } else { - return new TextDecoder().decode(stringValue); - } - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - function decodeText(value, encoding) { - if (encoding && encoding.trim().toLowerCase() == "cp437") { - return decodeCP437(value); - } else { - return new TextDecoder(encoding).decode(value); - } - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const PROPERTY_NAME_FILENAME = "filename"; - const PROPERTY_NAME_RAW_FILENAME = "rawFilename"; - const PROPERTY_NAME_COMMENT = "comment"; - const PROPERTY_NAME_RAW_COMMENT = "rawComment"; - const PROPERTY_NAME_UNCOMPPRESSED_SIZE = "uncompressedSize"; - const PROPERTY_NAME_COMPPRESSED_SIZE = "compressedSize"; - const PROPERTY_NAME_OFFSET = "offset"; - const PROPERTY_NAME_DISK_NUMBER_START = "diskNumberStart"; - const PROPERTY_NAME_LAST_MODIFICATION_DATE = "lastModDate"; - const PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = "rawLastModDate"; - const PROPERTY_NAME_LAST_ACCESS_DATE = "lastAccessDate"; - const PROPERTY_NAME_RAW_LAST_ACCESS_DATE = "rawLastAccessDate"; - const PROPERTY_NAME_CREATION_DATE = "creationDate"; - const PROPERTY_NAME_RAW_CREATION_DATE = "rawCreationDate"; - const PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = "internalFileAttribute"; - const PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = "externalFileAttribute"; - const PROPERTY_NAME_MS_DOS_COMPATIBLE = "msDosCompatible"; - const PROPERTY_NAME_ZIP64 = "zip64"; - - const PROPERTY_NAMES = [ - PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE, - PROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, - PROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START, - PROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE, - PROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64, - "directory", "bitFlag", "encrypted", "signature", "filenameUTF8", "commentUTF8", "compressionMethod", "version", "versionMadeBy", - "extraField", "rawExtraField", "extraFieldZip64", "extraFieldUnicodePath", "extraFieldUnicodeComment", "extraFieldAES", "extraFieldNTFS", - "extraFieldExtendedTimestamp"]; - - class Entry { - - constructor(data) { - PROPERTY_NAMES.forEach(name => this[name] = data[name]); - } - - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const ERR_BAD_FORMAT = "File format is not recognized"; - const ERR_EOCDR_NOT_FOUND = "End of central directory not found"; - const ERR_EOCDR_ZIP64_NOT_FOUND = "End of Zip64 central directory not found"; - const ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = "End of Zip64 central directory locator not found"; - const ERR_CENTRAL_DIRECTORY_NOT_FOUND = "Central directory header not found"; - const ERR_LOCAL_FILE_HEADER_NOT_FOUND = "Local file header not found"; - const ERR_EXTRAFIELD_ZIP64_NOT_FOUND = "Zip64 extra field not found"; - const ERR_ENCRYPTED = "File contains encrypted entry"; - const ERR_UNSUPPORTED_ENCRYPTION = "Encryption method not supported"; - const ERR_UNSUPPORTED_COMPRESSION = "Compression method not supported"; - const ERR_SPLIT_ZIP_FILE = "Split zip file"; - const CHARSET_UTF8 = "utf-8"; - const CHARSET_CP437 = "cp437"; - const ZIP64_PROPERTIES = [ - [PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS], - [PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS], - [PROPERTY_NAME_OFFSET, MAX_32_BITS], - [PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS] - ]; - const ZIP64_EXTRACTION = { - [MAX_16_BITS]: { - getValue: getUint32, - bytes: 4 - }, - [MAX_32_BITS]: { - getValue: getBigUint64, - bytes: 8 - } - }; - - class ZipReader { - - constructor(reader, options = {}) { - Object.assign(this, { - reader: initReader(reader), - options, - config: getConfiguration() - }); - } - - async* getEntriesGenerator(options = {}) { - const zipReader = this; - let { reader } = zipReader; - const { config } = zipReader; - await initStream(reader); - if (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) { - reader = new BlobReader(await new Response(reader.readable).blob()); - await initStream(reader); - } - if (reader.size < END_OF_CENTRAL_DIR_LENGTH) { - throw new Error(ERR_BAD_FORMAT); - } - reader.chunkSize = getChunkSize(config); - const endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16); - if (!endOfDirectoryInfo) { - const signatureArray = await readUint8Array(reader, 0, 4); - const signatureView = getDataView$1(signatureArray); - if (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) { - throw new Error(ERR_SPLIT_ZIP_FILE); - } else { - throw new Error(ERR_EOCDR_NOT_FOUND); - } - } - const endOfDirectoryView = getDataView$1(endOfDirectoryInfo); - let directoryDataLength = getUint32(endOfDirectoryView, 12); - let directoryDataOffset = getUint32(endOfDirectoryView, 16); - const commentOffset = endOfDirectoryInfo.offset; - const commentLength = getUint16(endOfDirectoryView, 20); - const appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength; - let lastDiskNumber = getUint16(endOfDirectoryView, 4); - const expectedLastDiskNumber = reader.lastDiskNumber || 0; - let diskNumber = getUint16(endOfDirectoryView, 6); - let filesLength = getUint16(endOfDirectoryView, 8); - let prependedDataLength = 0; - let startOffset = 0; - if (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) { - const endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH); - const endOfDirectoryLocatorView = getDataView$1(endOfDirectoryLocatorArray); - if (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) { - throw new Error(ERR_EOCDR_ZIP64_NOT_FOUND); - } - directoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8); - let endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1); - let endOfDirectoryView = getDataView$1(endOfDirectoryArray); - const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH; - if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) { - const originalDirectoryDataOffset = directoryDataOffset; - directoryDataOffset = expectedDirectoryDataOffset; - prependedDataLength = directoryDataOffset - originalDirectoryDataOffset; - endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1); - endOfDirectoryView = getDataView$1(endOfDirectoryArray); - } - if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) { - throw new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND); - } - if (lastDiskNumber == MAX_16_BITS) { - lastDiskNumber = getUint32(endOfDirectoryView, 16); - } - if (diskNumber == MAX_16_BITS) { - diskNumber = getUint32(endOfDirectoryView, 20); - } - if (filesLength == MAX_16_BITS) { - filesLength = getBigUint64(endOfDirectoryView, 32); - } - if (directoryDataLength == MAX_32_BITS) { - directoryDataLength = getBigUint64(endOfDirectoryView, 40); - } - directoryDataOffset -= directoryDataLength; - } - if (expectedLastDiskNumber != lastDiskNumber) { - throw new Error(ERR_SPLIT_ZIP_FILE); - } - if (directoryDataOffset < 0 || directoryDataOffset >= reader.size) { - throw new Error(ERR_BAD_FORMAT); - } - let offset = 0; - let directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber); - let directoryView = getDataView$1(directoryArray); - if (directoryDataLength) { - const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength; - if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) { - const originalDirectoryDataOffset = directoryDataOffset; - directoryDataOffset = expectedDirectoryDataOffset; - prependedDataLength = directoryDataOffset - originalDirectoryDataOffset; - directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber); - directoryView = getDataView$1(directoryArray); - } - } - const expectedDirectoryDataLength = endOfDirectoryInfo.offset - directoryDataOffset - (reader.lastDiskOffset || 0); - if (directoryDataLength != expectedDirectoryDataLength && expectedDirectoryDataLength >= 0) { - directoryDataLength = expectedDirectoryDataLength; - directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber); - directoryView = getDataView$1(directoryArray); - } - if (directoryDataOffset < 0 || directoryDataOffset >= reader.size) { - throw new Error(ERR_BAD_FORMAT); - } - const filenameEncoding = getOptionValue$1(zipReader, options, "filenameEncoding"); - const commentEncoding = getOptionValue$1(zipReader, options, "commentEncoding"); - for (let indexFile = 0; indexFile < filesLength; indexFile++) { - const fileEntry = new ZipEntry(reader, config, zipReader.options); - if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) { - throw new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND); - } - readCommonHeader(fileEntry, directoryView, offset + 6); - const languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag); - const filenameOffset = offset + 46; - const extraFieldOffset = filenameOffset + fileEntry.filenameLength; - const commentOffset = extraFieldOffset + fileEntry.extraFieldLength; - const versionMadeBy = getUint16(directoryView, offset + 4); - const msDosCompatible = (versionMadeBy & 0) == 0; - const rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset); - const commentLength = getUint16(directoryView, offset + 32); - const endOffset = commentOffset + commentLength; - const rawComment = directoryArray.subarray(commentOffset, endOffset); - const filenameUTF8 = languageEncodingFlag; - const commentUTF8 = languageEncodingFlag; - const directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK); - const offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength; - Object.assign(fileEntry, { - versionMadeBy, - msDosCompatible, - compressedSize: 0, - uncompressedSize: 0, - commentLength, - directory, - offset: offsetFileEntry, - diskNumberStart: getUint16(directoryView, offset + 34), - internalFileAttribute: getUint16(directoryView, offset + 36), - externalFileAttribute: getUint32(directoryView, offset + 38), - rawFilename, - filenameUTF8, - commentUTF8, - rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset) - }); - const [filename, comment] = await Promise.all([ - decodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), - decodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) - ]); - Object.assign(fileEntry, { - rawComment, - filename, - comment, - directory: directory || filename.endsWith(DIRECTORY_SIGNATURE) - }); - startOffset = Math.max(offsetFileEntry, startOffset); - await readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6); - const entry = new Entry(fileEntry); - entry.getData = (writer, options) => fileEntry.getData(writer, entry, options); - offset = endOffset; - const { onprogress } = options; - if (onprogress) { - try { - await onprogress(indexFile + 1, filesLength, new Entry(fileEntry)); - } catch (_error) { - console.error(_error) - } - } - yield entry; - } - const extractPrependedData = getOptionValue$1(zipReader, options, "extractPrependedData"); - const extractAppendedData = getOptionValue$1(zipReader, options, "extractAppendedData"); - if (extractPrependedData) { - zipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array(); - } - zipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array(); - if (extractAppendedData) { - zipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array(); - } - return true; - } - - async getEntries(options = {}) { - const entries = []; - for await (const entry of this.getEntriesGenerator(options)) { - entries.push(entry); - } - return entries; - } - - async close() { - } - } - - class ZipEntry { - - constructor(reader, config, options) { - Object.assign(this, { - reader, - config, - options - }); - } - - async getData(writer, fileEntry, options = {}) { - const zipEntry = this; - const { - reader, - offset, - diskNumberStart, - extraFieldAES, - compressionMethod, - config, - bitFlag, - signature, - rawLastModDate, - uncompressedSize, - compressedSize - } = zipEntry; - const localDirectory = zipEntry.localDirectory = {}; - const dataArray = await readUint8Array(reader, offset, 30, diskNumberStart); - const dataView = getDataView$1(dataArray); - let password = getOptionValue$1(zipEntry, options, "password"); - password = password && password.length && password; - if (extraFieldAES) { - if (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) { - throw new Error(ERR_UNSUPPORTED_COMPRESSION); - } - } - if (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) { - throw new Error(ERR_UNSUPPORTED_COMPRESSION); - } - if (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) { - throw new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND); - } - readCommonHeader(localDirectory, dataView, 4); - localDirectory.rawExtraField = localDirectory.extraFieldLength ? - await readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) : - new Uint8Array(); - await readCommonFooter(zipEntry, localDirectory, dataView, 4, true); - Object.assign(fileEntry, { - lastAccessDate: localDirectory.lastAccessDate, - creationDate: localDirectory.creationDate - }); - const encrypted = zipEntry.encrypted && localDirectory.encrypted; - const zipCrypto = encrypted && !extraFieldAES; - if (encrypted) { - if (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) { - throw new Error(ERR_UNSUPPORTED_ENCRYPTION); - } else if (!password) { - throw new Error(ERR_ENCRYPTED); - } - } - const dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength; - const size = compressedSize; - const readable = reader.readable; - Object.assign(readable, { - diskNumberStart, - offset: dataOffset, - size - }); - const signal = getOptionValue$1(zipEntry, options, "signal"); - const checkPasswordOnly = getOptionValue$1(zipEntry, options, "checkPasswordOnly"); - if (checkPasswordOnly) { - writer = new WritableStream(); - } - writer = initWriter(writer); - await initStream(writer, uncompressedSize); - const { writable } = writer; - const { onstart, onprogress, onend } = options; - const workerOptions = { - options: { - codecType: CODEC_INFLATE, - password, - zipCrypto, - encryptionStrength: extraFieldAES && extraFieldAES.strength, - signed: getOptionValue$1(zipEntry, options, "checkSignature"), - passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)), - signature, - compressed: compressionMethod != 0, - encrypted, - useWebWorkers: getOptionValue$1(zipEntry, options, "useWebWorkers"), - useCompressionStream: getOptionValue$1(zipEntry, options, "useCompressionStream"), - transferStreams: getOptionValue$1(zipEntry, options, "transferStreams"), - checkPasswordOnly - }, - config, - streamOptions: { signal, size, onstart, onprogress, onend } - }; - let outputSize = 0; - try { - ({ outputSize } = (await runWorker({ readable, writable }, workerOptions))); - } catch (error) { - if (!checkPasswordOnly || error.message != ERR_ABORT_CHECK_PASSWORD) { - throw error; - } - } finally { - const preventClose = getOptionValue$1(zipEntry, options, "preventClose"); - writable.size += outputSize; - if (!preventClose && !writable.locked) { - await writable.getWriter().close(); - } - } - return checkPasswordOnly ? undefined : writer.getData ? writer.getData() : writable; - } - } - - function readCommonHeader(directory, dataView, offset) { - const rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2); - const encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED; - const rawLastModDate = getUint32(dataView, offset + 6); - Object.assign(directory, { - encrypted, - version: getUint16(dataView, offset), - bitFlag: { - level: (rawBitFlag & BITFLAG_LEVEL) >> 1, - dataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR, - languageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG - }, - rawLastModDate, - lastModDate: getDate(rawLastModDate), - filenameLength: getUint16(dataView, offset + 22), - extraFieldLength: getUint16(dataView, offset + 24) - }); - } - - async function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory) { - const { rawExtraField } = directory; - const extraField = directory.extraField = new Map(); - const rawExtraFieldView = getDataView$1(new Uint8Array(rawExtraField)); - let offsetExtraField = 0; - try { - while (offsetExtraField < rawExtraField.length) { - const type = getUint16(rawExtraFieldView, offsetExtraField); - const size = getUint16(rawExtraFieldView, offsetExtraField + 2); - extraField.set(type, { - type, - data: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size) - }); - offsetExtraField += 4 + size; - } - } catch (_error) { - console.error(_error) - } - const compressionMethod = getUint16(dataView, offset + 4); - Object.assign(directory, { - signature: getUint32(dataView, offset + 10), - uncompressedSize: getUint32(dataView, offset + 18), - compressedSize: getUint32(dataView, offset + 14) - }); - const extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64); - if (extraFieldZip64) { - readExtraFieldZip64(extraFieldZip64, directory); - directory.extraFieldZip64 = extraFieldZip64; - } - const extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH); - if (extraFieldUnicodePath) { - await readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry); - directory.extraFieldUnicodePath = extraFieldUnicodePath; - } - const extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT); - if (extraFieldUnicodeComment) { - await readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry); - directory.extraFieldUnicodeComment = extraFieldUnicodeComment; - } - const extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES); - if (extraFieldAES) { - readExtraFieldAES(extraFieldAES, directory, compressionMethod); - directory.extraFieldAES = extraFieldAES; - } else { - directory.compressionMethod = compressionMethod; - } - const extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS); - if (extraFieldNTFS) { - readExtraFieldNTFS(extraFieldNTFS, directory); - directory.extraFieldNTFS = extraFieldNTFS; - } - const extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP); - if (extraFieldExtendedTimestamp) { - readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory); - directory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp; - } - } - - function readExtraFieldZip64(extraFieldZip64, directory) { - directory.zip64 = true; - const extraFieldView = getDataView$1(extraFieldZip64.data); - const missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max); - for (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) { - const [propertyName, max] = missingProperties[indexMissingProperty]; - if (directory[propertyName] == max) { - const extraction = ZIP64_EXTRACTION[max]; - directory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset); - offset += extraction.bytes; - } else if (extraFieldZip64[propertyName]) { - throw new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND); - } - } - } - - async function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) { - const extraFieldView = getDataView$1(extraFieldUnicode.data); - const crc32 = new Crc32(); - crc32.append(fileEntry[rawPropertyName]); - const dataViewSignature = getDataView$1(new Uint8Array(4)); - dataViewSignature.setUint32(0, crc32.get(), true); - const signature = getUint32(extraFieldView, 1); - Object.assign(extraFieldUnicode, { - version: getUint8(extraFieldView, 0), - [propertyName]: decodeText(extraFieldUnicode.data.subarray(5)), - valid: !fileEntry.bitFlag.languageEncodingFlag && signature == getUint32(dataViewSignature, 0) - }); - if (extraFieldUnicode.valid) { - directory[propertyName] = extraFieldUnicode[propertyName]; - directory[propertyName + "UTF8"] = true; - } - } - - function readExtraFieldAES(extraFieldAES, directory, compressionMethod) { - const extraFieldView = getDataView$1(extraFieldAES.data); - const strength = getUint8(extraFieldView, 4); - Object.assign(extraFieldAES, { - vendorVersion: getUint8(extraFieldView, 0), - vendorId: getUint8(extraFieldView, 2), - strength, - originalCompressionMethod: compressionMethod, - compressionMethod: getUint16(extraFieldView, 5) - }); - directory.compressionMethod = extraFieldAES.compressionMethod; - } - - function readExtraFieldNTFS(extraFieldNTFS, directory) { - const extraFieldView = getDataView$1(extraFieldNTFS.data); - let offsetExtraField = 4; - let tag1Data; - try { - while (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) { - const tagValue = getUint16(extraFieldView, offsetExtraField); - const attributeSize = getUint16(extraFieldView, offsetExtraField + 2); - if (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) { - tag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize); - } - offsetExtraField += 4 + attributeSize; - } - } catch (_error) { - console.error(_error) - } - try { - if (tag1Data && tag1Data.length == 24) { - const tag1View = getDataView$1(tag1Data); - const rawLastModDate = tag1View.getBigUint64(0, true); - const rawLastAccessDate = tag1View.getBigUint64(8, true); - const rawCreationDate = tag1View.getBigUint64(16, true); - Object.assign(extraFieldNTFS, { - rawLastModDate, - rawLastAccessDate, - rawCreationDate - }); - const lastModDate = getDateNTFS(rawLastModDate); - const lastAccessDate = getDateNTFS(rawLastAccessDate); - const creationDate = getDateNTFS(rawCreationDate); - const extraFieldData = { lastModDate, lastAccessDate, creationDate }; - Object.assign(extraFieldNTFS, extraFieldData); - Object.assign(directory, extraFieldData); - } - } catch (_error) { - console.error(_error) - } - } - - function readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory) { - const extraFieldView = getDataView$1(extraFieldExtendedTimestamp.data); - const flags = getUint8(extraFieldView, 0); - const timeProperties = []; - const timeRawProperties = []; - if (localDirectory) { - if ((flags & 0x1) == 0x1) { - timeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE); - } - if ((flags & 0x2) == 0x2) { - timeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE); - } - if ((flags & 0x4) == 0x4) { - timeProperties.push(PROPERTY_NAME_CREATION_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE); - } - } else if (extraFieldExtendedTimestamp.data.length >= 5) { - timeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE); - } - let offset = 1; - timeProperties.forEach((propertyName, indexProperty) => { - if (extraFieldExtendedTimestamp.data.length >= offset + 4) { - const time = getUint32(extraFieldView, offset); - directory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000); - const rawPropertyName = timeRawProperties[indexProperty]; - extraFieldExtendedTimestamp[rawPropertyName] = time; - } - offset += 4; - }); - } - - async function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) { - const signatureArray = new Uint8Array(4); - const signatureView = getDataView$1(signatureArray); - setUint32$1(signatureView, 0, signature); - const maximumBytes = minimumBytes + maximumLength; - return (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset)); - - async function seek(length) { - const offset = startOffset - length; - const bytes = await readUint8Array(reader, offset, length); - for (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) { - if (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] && - bytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) { - return { - offset: offset + indexByte, - buffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer - }; - } - } - } - } - - function getOptionValue$1(zipReader, options, name) { - return options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name]; - } - - function getDate(timeRaw) { - const date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff; - try { - return new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0); - } catch (_error) { - console.error(_error) - } - } - - function getDateNTFS(timeRaw) { - return new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000)))); - } - - function getUint8(view, offset) { - return view.getUint8(offset); - } - - function getUint16(view, offset) { - return view.getUint16(offset, true); - } - - function getUint32(view, offset) { - return view.getUint32(offset, true); - } - - function getBigUint64(view, offset) { - return Number(view.getBigUint64(offset, true)); - } - - function setUint32$1(view, offset, value) { - view.setUint32(offset, value, true); - } - - function getDataView$1(array) { - return new DataView(array.buffer); - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - const ERR_DUPLICATED_NAME = "File already exists"; - const ERR_INVALID_COMMENT = "Zip file comment exceeds 64KB"; - const ERR_INVALID_ENTRY_COMMENT = "File entry comment exceeds 64KB"; - const ERR_INVALID_ENTRY_NAME = "File entry name exceeds 64KB"; - const ERR_INVALID_VERSION = "Version exceeds 65535"; - const ERR_INVALID_ENCRYPTION_STRENGTH = "The strength must equal 1, 2, or 3"; - const ERR_INVALID_EXTRAFIELD_TYPE = "Extra field type exceeds 65535"; - const ERR_INVALID_EXTRAFIELD_DATA = "Extra field data exceeds 64KB"; - const ERR_UNSUPPORTED_FORMAT = "Zip64 is not supported (make sure 'keepOrder' is set to 'true')"; - - const EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]); - - let workers = 0; - const pendingEntries = []; - - class ZipWriter { - - constructor(writer, options = {}) { - writer = initWriter(writer); - Object.assign(this, { - writer, - addSplitZipSignature: writer instanceof SplitDataWriter, - options, - config: getConfiguration(), - files: new Map(), - filenames: new Set(), - offset: writer.writable.size, - pendingEntriesSize: 0, - pendingAddFileCalls: new Set(), - bufferedWrites: 0 - }); - } - - async add(name = "", reader, options = {}) { - const zipWriter = this; - const { - pendingAddFileCalls, - config - } = zipWriter; - if (workers < config.maxWorkers) { - workers++; - } else { - await new Promise(resolve => pendingEntries.push(resolve)); - } - let promiseAddFile; - try { - name = name.trim(); - if (zipWriter.filenames.has(name)) { - throw new Error(ERR_DUPLICATED_NAME); - } - zipWriter.filenames.add(name); - promiseAddFile = addFile(zipWriter, name, reader, options); - pendingAddFileCalls.add(promiseAddFile); - return await promiseAddFile; - } catch (error) { - zipWriter.filenames.delete(name); - throw error; - } finally { - pendingAddFileCalls.delete(promiseAddFile); - const pendingEntry = pendingEntries.shift(); - if (pendingEntry) { - pendingEntry(); - } else { - workers--; - } - } - } - - async close(comment = new Uint8Array(), options = {}) { - const zipWriter = this; - const { pendingAddFileCalls, writer } = this; - const { writable } = writer; - while (pendingAddFileCalls.size) { - await Promise.all(Array.from(pendingAddFileCalls)); - } - await closeFile(this, comment, options); - const preventClose = getOptionValue(zipWriter, options, "preventClose"); - if (!preventClose) { - await writable.getWriter().close(); - } - return writer.getData ? writer.getData() : writable; - } - } - - async function addFile(zipWriter, name, reader, options) { - name = name.trim(); - if (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) { - name += DIRECTORY_SIGNATURE; - } else { - options.directory = name.endsWith(DIRECTORY_SIGNATURE); - } - const rawFilename = encodeText(name); - if (getLength(rawFilename) > MAX_16_BITS) { - throw new Error(ERR_INVALID_ENTRY_NAME); - } - const comment = options.comment || ""; - const rawComment = encodeText(comment); - if (getLength(rawComment) > MAX_16_BITS) { - throw new Error(ERR_INVALID_ENTRY_COMMENT); - } - const version = getOptionValue(zipWriter, options, "version", VERSION_DEFLATE); - if (version > MAX_16_BITS) { - throw new Error(ERR_INVALID_VERSION); - } - const versionMadeBy = getOptionValue(zipWriter, options, "versionMadeBy", 20); - if (versionMadeBy > MAX_16_BITS) { - throw new Error(ERR_INVALID_VERSION); - } - const lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE, new Date()); - const lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE); - const creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE); - const msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE, true); - const internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, 0); - const externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE, 0); - const password = getOptionValue(zipWriter, options, "password"); - const encryptionStrength = getOptionValue(zipWriter, options, "encryptionStrength", 3); - const zipCrypto = getOptionValue(zipWriter, options, "zipCrypto"); - const extendedTimestamp = getOptionValue(zipWriter, options, "extendedTimestamp", true); - const keepOrder = getOptionValue(zipWriter, options, "keepOrder", true); - const level = getOptionValue(zipWriter, options, "level"); - const useWebWorkers = getOptionValue(zipWriter, options, "useWebWorkers"); - const bufferedWrite = getOptionValue(zipWriter, options, "bufferedWrite"); - const dataDescriptorSignature = getOptionValue(zipWriter, options, "dataDescriptorSignature", false); - const signal = getOptionValue(zipWriter, options, "signal"); - const useCompressionStream = getOptionValue(zipWriter, options, "useCompressionStream"); - let dataDescriptor = getOptionValue(zipWriter, options, "dataDescriptor", true); - let zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64); - if (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) { - throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH); - } - let rawExtraField = new Uint8Array(); - const { extraField } = options; - if (extraField) { - let extraFieldSize = 0; - let offset = 0; - extraField.forEach(data => extraFieldSize += 4 + getLength(data)); - rawExtraField = new Uint8Array(extraFieldSize); - extraField.forEach((data, type) => { - if (type > MAX_16_BITS) { - throw new Error(ERR_INVALID_EXTRAFIELD_TYPE); - } - if (getLength(data) > MAX_16_BITS) { - throw new Error(ERR_INVALID_EXTRAFIELD_DATA); - } - arraySet(rawExtraField, new Uint16Array([type]), offset); - arraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2); - arraySet(rawExtraField, data, offset + 4); - offset += 4 + getLength(data); - }); - } - let maximumCompressedSize = 0; - let maximumEntrySize = 0; - let uncompressedSize = 0; - const zip64Enabled = zip64 === true; - if (reader) { - reader = initReader(reader); - await initStream(reader); - if (reader.size === UNDEFINED_VALUE) { - dataDescriptor = true; - if (zip64 || zip64 === UNDEFINED_VALUE) { - zip64 = true; - uncompressedSize = maximumCompressedSize = MAX_32_BITS; - } - } else { - uncompressedSize = reader.size; - maximumCompressedSize = getMaximumCompressedSize(uncompressedSize); - } - } - const { diskOffset, diskNumber, maxSize } = zipWriter.writer; - const zip64UncompressedSize = zip64Enabled || uncompressedSize >= MAX_32_BITS; - const zip64CompressedSize = zip64Enabled || maximumCompressedSize >= MAX_32_BITS; - const zip64Offset = zip64Enabled || zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS; - const supportZip64SplitFile = getOptionValue(zipWriter, options, "supportZip64SplitFile", true); - const zip64DiskNumberStart = (supportZip64SplitFile && zip64Enabled) || diskNumber + Math.ceil(zipWriter.pendingEntriesSize / maxSize) >= MAX_16_BITS; - if (zip64Offset || zip64UncompressedSize || zip64CompressedSize || zip64DiskNumberStart) { - if (zip64 === false || !keepOrder) { - throw new Error(ERR_UNSUPPORTED_FORMAT); - } else { - zip64 = true; - } - } - zip64 = zip64 || false; - options = Object.assign({}, options, { - rawFilename, - rawComment, - version, - versionMadeBy, - lastModDate, - lastAccessDate, - creationDate, - rawExtraField, - zip64, - zip64UncompressedSize, - zip64CompressedSize, - zip64Offset, - zip64DiskNumberStart, - password, - level, - useWebWorkers, - encryptionStrength, - extendedTimestamp, - zipCrypto, - bufferedWrite, - keepOrder, - dataDescriptor, - dataDescriptorSignature, - signal, - msDosCompatible, - internalFileAttribute, - externalFileAttribute, - useCompressionStream - }); - const headerInfo = getHeaderInfo(options); - const dataDescriptorInfo = getDataDescriptorInfo(options); - const metadataSize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray); - maximumEntrySize = metadataSize + maximumCompressedSize; - zipWriter.pendingEntriesSize += maximumEntrySize; - let fileEntry; - try { - fileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo, metadataSize }, options); - } finally { - zipWriter.pendingEntriesSize -= maximumEntrySize; - } - Object.assign(fileEntry, { name, comment, extraField }); - return new Entry(fileEntry); - } - - async function getFileEntry(zipWriter, name, reader, entryInfo, options) { - const { - files, - writer - } = zipWriter; - const { - keepOrder, - dataDescriptor, - signal - } = options; - const { - headerInfo - } = entryInfo; - const previousFileEntry = Array.from(files.values()).pop(); - let fileEntry = {}; - let bufferedWrite; - let releaseLockWriter; - let releaseLockCurrentFileEntry; - let writingBufferedEntryData; - let writingEntryData; - let fileWriter; - files.set(name, fileEntry); - try { - let lockPreviousFileEntry; - if (keepOrder) { - lockPreviousFileEntry = previousFileEntry && previousFileEntry.lock; - requestLockCurrentFileEntry(); - } - if (options.bufferedWrite || zipWriter.writerLocked || (zipWriter.bufferedWrites && keepOrder) || !dataDescriptor) { - fileWriter = new BlobWriter(); - fileWriter.writable.size = 0; - bufferedWrite = true; - zipWriter.bufferedWrites++; - await initStream(writer); - } else { - fileWriter = writer; - await requestLockWriter(); - } - await initStream(fileWriter); - const { writable } = writer; - let { diskOffset } = writer; - if (zipWriter.addSplitZipSignature) { - delete zipWriter.addSplitZipSignature; - const signatureArray = new Uint8Array(4); - const signatureArrayView = getDataView(signatureArray); - setUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE); - await writeData(writable, signatureArray); - zipWriter.offset += 4; - } - if (!bufferedWrite) { - await lockPreviousFileEntry; - await skipDiskIfNeeded(writable); - } - const { diskNumber } = writer; - writingEntryData = true; - fileEntry.diskNumberStart = diskNumber; - fileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options); - writingEntryData = false; - files.set(name, fileEntry); - fileEntry.filename = name; - if (bufferedWrite) { - await fileWriter.writable.getWriter().close(); - let blob = await fileWriter.getData(); - await lockPreviousFileEntry; - await requestLockWriter(); - writingBufferedEntryData = true; - if (!dataDescriptor) { - blob = await writeExtraHeaderInfo(fileEntry, blob, writable, options); - } - await skipDiskIfNeeded(writable); - fileEntry.diskNumberStart = writer.diskNumber; - diskOffset = writer.diskOffset; - await blob.stream().pipeTo(writable, { preventClose: true, preventAbort: true, signal }); - writable.size += blob.size; - writingBufferedEntryData = false; - } - fileEntry.offset = zipWriter.offset - diskOffset; - if (fileEntry.zip64) { - setZip64ExtraInfo(fileEntry, options); - } else if (fileEntry.offset >= MAX_32_BITS) { - throw new Error(ERR_UNSUPPORTED_FORMAT); - } - zipWriter.offset += fileEntry.length; - return fileEntry; - } catch (error) { - if ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) { - zipWriter.hasCorruptedEntries = true; - if (error) { - try { - error.corruptedEntry = true; - } catch (_error) { - console.error(_error) - } - } - if (bufferedWrite) { - zipWriter.offset += fileWriter.writable.size; - } else { - zipWriter.offset = fileWriter.writable.size; - } - } - files.delete(name); - throw error; - } finally { - if (bufferedWrite) { - zipWriter.bufferedWrites--; - } - if (releaseLockCurrentFileEntry) { - releaseLockCurrentFileEntry(); - } - if (releaseLockWriter) { - releaseLockWriter(); - } - } - - function requestLockCurrentFileEntry() { - fileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve); - } - - async function requestLockWriter() { - zipWriter.writerLocked = true; - const { lockWriter } = zipWriter; - zipWriter.lockWriter = new Promise(resolve => releaseLockWriter = () => { - zipWriter.writerLocked = false; - resolve(); - }); - await lockWriter; - } - - async function skipDiskIfNeeded(writable) { - if (headerInfo.localHeaderArray.length > writer.availableSize) { - writer.availableSize = 0; - await writeData(writable, new Uint8Array()); - } - } - } - - async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) { - const { - headerInfo, - dataDescriptorInfo, - metadataSize - } = entryInfo; - const { - localHeaderArray, - headerArray, - lastModDate, - rawLastModDate, - encrypted, - compressed, - version, - compressionMethod, - rawExtraFieldExtendedTimestamp, - extraFieldExtendedTimestampFlag, - rawExtraFieldNTFS, - rawExtraFieldAES - } = headerInfo; - const { dataDescriptorArray } = dataDescriptorInfo; - const { - rawFilename, - lastAccessDate, - creationDate, - password, - level, - zip64, - zip64UncompressedSize, - zip64CompressedSize, - zip64Offset, - zip64DiskNumberStart, - zipCrypto, - dataDescriptor, - directory, - versionMadeBy, - rawComment, - rawExtraField, - useWebWorkers, - onstart, - onprogress, - onend, - signal, - encryptionStrength, - extendedTimestamp, - msDosCompatible, - internalFileAttribute, - externalFileAttribute, - useCompressionStream - } = options; - const fileEntry = { - lock, - versionMadeBy, - zip64, - directory: Boolean(directory), - filenameUTF8: true, - rawFilename, - commentUTF8: true, - rawComment, - rawExtraFieldExtendedTimestamp, - rawExtraFieldNTFS, - rawExtraFieldAES, - rawExtraField, - extendedTimestamp, - msDosCompatible, - internalFileAttribute, - externalFileAttribute, - diskNumberStart - }; - let compressedSize = 0; - let uncompressedSize = 0; - let signature; - const { writable } = writer; - if (reader) { - reader.chunkSize = getChunkSize(config); - await writeData(writable, localHeaderArray); - const readable = reader.readable; - const size = readable.size = reader.size; - const workerOptions = { - options: { - codecType: CODEC_DEFLATE, - level, - password, - encryptionStrength, - zipCrypto: encrypted && zipCrypto, - passwordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF, - signed: true, - compressed, - encrypted, - useWebWorkers, - useCompressionStream, - transferStreams: false - }, - config, - streamOptions: { signal, size, onstart, onprogress, onend } - }; - const result = await runWorker({ readable, writable }, workerOptions); - writable.size += result.size; - signature = result.signature; - uncompressedSize = reader.size = readable.size; - compressedSize = result.size; - } else { - await writeData(writable, localHeaderArray); - } - let rawExtraFieldZip64; - if (zip64) { - let rawExtraFieldZip64Length = 4; - if (zip64UncompressedSize) { - rawExtraFieldZip64Length += 8; - } - if (zip64CompressedSize) { - rawExtraFieldZip64Length += 8; - } - if (zip64Offset) { - rawExtraFieldZip64Length += 8; - } - if (zip64DiskNumberStart) { - rawExtraFieldZip64Length += 4; - } - rawExtraFieldZip64 = new Uint8Array(rawExtraFieldZip64Length); - } else { - rawExtraFieldZip64 = new Uint8Array(); - } - setEntryInfo({ - signature, - rawExtraFieldZip64, - compressedSize, - uncompressedSize, - headerInfo, - dataDescriptorInfo - }, options); - if (dataDescriptor) { - await writeData(writable, dataDescriptorArray); - } - Object.assign(fileEntry, { - uncompressedSize, - compressedSize, - lastModDate, - rawLastModDate, - creationDate, - lastAccessDate, - encrypted, - length: metadataSize + compressedSize, - compressionMethod, - version, - headerArray, - signature, - rawExtraFieldZip64, - extraFieldExtendedTimestampFlag, - zip64UncompressedSize, - zip64CompressedSize, - zip64Offset, - zip64DiskNumberStart - }); - return fileEntry; - } - - function getHeaderInfo(options) { - const { - rawFilename, - lastModDate, - lastAccessDate, - creationDate, - password, - level, - zip64, - zipCrypto, - dataDescriptor, - directory, - rawExtraField, - encryptionStrength, - extendedTimestamp - } = options; - const compressed = level !== 0 && !directory; - const encrypted = Boolean(password && getLength(password)); - let version = options.version; - let rawExtraFieldAES; - if (encrypted && !zipCrypto) { - rawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2); - const extraFieldAESView = getDataView(rawExtraFieldAES); - setUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES); - arraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2); - setUint8(extraFieldAESView, 8, encryptionStrength); - } else { - rawExtraFieldAES = new Uint8Array(); - } - let rawExtraFieldNTFS; - let rawExtraFieldExtendedTimestamp; - let extraFieldExtendedTimestampFlag; - if (extendedTimestamp) { - rawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0)); - const extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp); - setUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP); - setUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4); - extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0); - setUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag); - let offset = 5; - setUint32(extraFieldExtendedTimestampView, offset, Math.floor(lastModDate.getTime() / 1000)); - offset += 4; - if (lastAccessDate) { - setUint32(extraFieldExtendedTimestampView, offset, Math.floor(lastAccessDate.getTime() / 1000)); - offset += 4; - } - if (creationDate) { - setUint32(extraFieldExtendedTimestampView, offset, Math.floor(creationDate.getTime() / 1000)); - } - try { - rawExtraFieldNTFS = new Uint8Array(36); - const extraFieldNTFSView = getDataView(rawExtraFieldNTFS); - const lastModTimeNTFS = getTimeNTFS(lastModDate); - setUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS); - setUint16(extraFieldNTFSView, 2, 32); - setUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1); - setUint16(extraFieldNTFSView, 10, 24); - setBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS); - setBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS); - setBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS); - } catch (_error) { - rawExtraFieldNTFS = new Uint8Array(); - } - } else { - rawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array(); - } - let bitFlag = BITFLAG_LANG_ENCODING_FLAG; - if (dataDescriptor) { - bitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR; - } - let compressionMethod = COMPRESSION_METHOD_STORE; - if (compressed) { - compressionMethod = COMPRESSION_METHOD_DEFLATE; - } - if (zip64) { - version = version > VERSION_ZIP64 ? version : VERSION_ZIP64; - } - if (encrypted) { - bitFlag = bitFlag | BITFLAG_ENCRYPTED; - if (!zipCrypto) { - version = version > VERSION_AES ? version : VERSION_AES; - compressionMethod = COMPRESSION_METHOD_AES; - if (compressed) { - rawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE; - } - } - } - const headerArray = new Uint8Array(26); - const headerView = getDataView(headerArray); - setUint16(headerView, 0, version); - setUint16(headerView, 2, bitFlag); - setUint16(headerView, 4, compressionMethod); - const dateArray = new Uint32Array(1); - const dateView = getDataView(dateArray); - let lastModDateMsDos; - if (lastModDate < MIN_DATE) { - lastModDateMsDos = MIN_DATE; - } else if (lastModDate > MAX_DATE) { - lastModDateMsDos = MAX_DATE; - } else { - lastModDateMsDos = lastModDate; - } - setUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2); - setUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate()); - const rawLastModDate = dateArray[0]; - setUint32(headerView, 6, rawLastModDate); - setUint16(headerView, 22, getLength(rawFilename)); - const extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField); - setUint16(headerView, 24, extraFieldLength); - const localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength); - const localHeaderView = getDataView(localHeaderArray); - setUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE); - arraySet(localHeaderArray, headerArray, 4); - arraySet(localHeaderArray, rawFilename, 30); - arraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename)); - arraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES)); - arraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp)); - arraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS)); - return { - localHeaderArray, - headerArray, - headerView, - lastModDate, - rawLastModDate, - encrypted, - compressed, - version, - compressionMethod, - extraFieldExtendedTimestampFlag, - rawExtraFieldExtendedTimestamp, - rawExtraFieldNTFS, - rawExtraFieldAES - }; - } - - function getDataDescriptorInfo(options) { - const { - zip64, - dataDescriptor, - dataDescriptorSignature - } = options; - let dataDescriptorArray = new Uint8Array(); - let dataDescriptorView, dataDescriptorOffset = 0; - if (dataDescriptor) { - dataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12)); - dataDescriptorView = getDataView(dataDescriptorArray); - if (dataDescriptorSignature) { - dataDescriptorOffset = 4; - setUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); - } - } - return { - dataDescriptorArray, - dataDescriptorView, - dataDescriptorOffset - }; - } - - function setEntryInfo(entryInfo, options) { - const { - signature, - rawExtraFieldZip64, - compressedSize, - uncompressedSize, - headerInfo, - dataDescriptorInfo - } = entryInfo; - const { - headerView, - encrypted - } = headerInfo; - const { - dataDescriptorView, - dataDescriptorOffset - } = dataDescriptorInfo; - const { - zip64, - zip64UncompressedSize, - zip64CompressedSize, - zipCrypto, - dataDescriptor - } = options; - if ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) { - setUint32(headerView, 10, signature); - if (dataDescriptor) { - setUint32(dataDescriptorView, dataDescriptorOffset, signature); - } - } - if (zip64) { - const rawExtraFieldZip64View = getDataView(rawExtraFieldZip64); - setUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64); - setUint16(rawExtraFieldZip64View, 2, rawExtraFieldZip64.length - 4); - let rawExtraFieldZip64Offset = 4; - if (zip64UncompressedSize) { - setUint32(headerView, 18, MAX_32_BITS); - setBigUint64(rawExtraFieldZip64View, rawExtraFieldZip64Offset, BigInt(uncompressedSize)); - rawExtraFieldZip64Offset += 8; - } - if (zip64CompressedSize) { - setUint32(headerView, 14, MAX_32_BITS); - setBigUint64(rawExtraFieldZip64View, rawExtraFieldZip64Offset, BigInt(compressedSize)); - } - if (dataDescriptor) { - setBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize)); - setBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize)); - } - } else { - setUint32(headerView, 14, compressedSize); - setUint32(headerView, 18, uncompressedSize); - if (dataDescriptor) { - setUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize); - setUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize); - } - } - } - - async function writeExtraHeaderInfo(fileEntry, entryData, writable, { zipCrypto }) { - let arrayBuffer; - arrayBuffer = await entryData.slice(0, 26).arrayBuffer(); - if (arrayBuffer.byteLength != 26) { - arrayBuffer = arrayBuffer.slice(0, 26); - } - const arrayBufferView = new DataView(arrayBuffer); - if (!fileEntry.encrypted || zipCrypto) { - setUint32(arrayBufferView, 14, fileEntry.signature); - } - if (fileEntry.zip64) { - setUint32(arrayBufferView, 18, MAX_32_BITS); - setUint32(arrayBufferView, 22, MAX_32_BITS); - } else { - setUint32(arrayBufferView, 18, fileEntry.compressedSize); - setUint32(arrayBufferView, 22, fileEntry.uncompressedSize); - } - await writeData(writable, new Uint8Array(arrayBuffer)); - return entryData.slice(arrayBuffer.byteLength); - } - - function setZip64ExtraInfo(fileEntry, options) { - const { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry; - const { zip64UncompressedSize, zip64CompressedSize, zip64Offset, zip64DiskNumberStart } = options; - const rawExtraFieldZip64View = getDataView(rawExtraFieldZip64); - let rawExtraFieldZip64Offset = 4; - if (zip64UncompressedSize) { - rawExtraFieldZip64Offset += 8; - } - if (zip64CompressedSize) { - rawExtraFieldZip64Offset += 8; - } - if (zip64Offset) { - setBigUint64(rawExtraFieldZip64View, rawExtraFieldZip64Offset, BigInt(offset)); - rawExtraFieldZip64Offset += 8; - } - if (zip64DiskNumberStart) { - setUint32(rawExtraFieldZip64View, rawExtraFieldZip64Offset, diskNumberStart); - } - } - - async function closeFile(zipWriter, comment, options) { - const { files, writer } = zipWriter; - const { diskOffset, writable } = writer; - let { diskNumber } = writer; - let offset = 0; - let directoryDataLength = 0; - let directoryOffset = zipWriter.offset - diskOffset; - let filesLength = files.size; - for (const [, fileEntry] of files) { - const { - rawFilename, - rawExtraFieldZip64, - rawExtraFieldAES, - rawComment, - rawExtraFieldNTFS, - rawExtraField, - extendedTimestamp, - extraFieldExtendedTimestampFlag, - lastModDate - } = fileEntry; - let rawExtraFieldTimestamp; - if (extendedTimestamp) { - rawExtraFieldTimestamp = new Uint8Array(9); - const extraFieldExtendedTimestampView = getDataView(rawExtraFieldTimestamp); - setUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP); - setUint16(extraFieldExtendedTimestampView, 2, 5); - setUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag); - setUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000)); - } else { - rawExtraFieldTimestamp = new Uint8Array(); - } - fileEntry.rawExtraFieldCDExtendedTimestamp = rawExtraFieldTimestamp; - directoryDataLength += 46 + - getLength( - rawFilename, - rawComment, - rawExtraFieldZip64, - rawExtraFieldAES, - rawExtraFieldNTFS, - rawExtraFieldTimestamp, - rawExtraField); - } - const directoryArray = new Uint8Array(directoryDataLength); - const directoryView = getDataView(directoryArray); - await initStream(writer); - let directoryDiskOffset = 0; - for (const [indexFileEntry, fileEntry] of Array.from(files.values()).entries()) { - const { - offset: fileEntryOffset, - rawFilename, - rawExtraFieldZip64, - rawExtraFieldAES, - rawExtraFieldCDExtendedTimestamp, - rawExtraFieldNTFS, - rawExtraField, - rawComment, - versionMadeBy, - headerArray, - directory, - zip64, - zip64UncompressedSize, - zip64CompressedSize, - zip64DiskNumberStart, - zip64Offset, - msDosCompatible, - internalFileAttribute, - externalFileAttribute, - diskNumberStart, - uncompressedSize, - compressedSize - } = fileEntry; - const extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldCDExtendedTimestamp, rawExtraFieldNTFS, rawExtraField); - setUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); - setUint16(directoryView, offset + 4, versionMadeBy); - const headerView = getDataView(headerArray); - if (!zip64UncompressedSize) { - setUint32(headerView, 18, uncompressedSize); - } - if (!zip64CompressedSize) { - setUint32(headerView, 14, compressedSize); - } - arraySet(directoryArray, headerArray, offset + 6); - setUint16(directoryView, offset + 30, extraFieldLength); - setUint16(directoryView, offset + 32, getLength(rawComment)); - setUint16(directoryView, offset + 34, zip64 && zip64DiskNumberStart ? MAX_16_BITS : diskNumberStart); - setUint16(directoryView, offset + 36, internalFileAttribute); - if (externalFileAttribute) { - setUint32(directoryView, offset + 38, externalFileAttribute); - } else if (directory && msDosCompatible) { - setUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK); - } - setUint32(directoryView, offset + 42, zip64 && zip64Offset ? MAX_32_BITS : fileEntryOffset); - arraySet(directoryArray, rawFilename, offset + 46); - arraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename)); - arraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64)); - arraySet(directoryArray, rawExtraFieldCDExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES)); - arraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldCDExtendedTimestamp)); - arraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldCDExtendedTimestamp, rawExtraFieldNTFS)); - arraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength); - const directoryEntryLength = 46 + getLength(rawFilename, rawComment) + extraFieldLength; - if (offset - directoryDiskOffset > writer.availableSize) { - writer.availableSize = 0; - await writeData(writable, directoryArray.slice(directoryDiskOffset, offset)); - directoryDiskOffset = offset; - } - offset += directoryEntryLength; - if (options.onprogress) { - try { - await options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry)); - } catch (_error) { - console.error(_error) - } - } - } - await writeData(writable, directoryDiskOffset ? directoryArray.slice(directoryDiskOffset) : directoryArray); - let lastDiskNumber = writer.diskNumber; - const { availableSize } = writer; - if (availableSize < END_OF_CENTRAL_DIR_LENGTH) { - lastDiskNumber++; - } - let zip64 = getOptionValue(zipWriter, options, "zip64"); - if (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS || lastDiskNumber >= MAX_16_BITS) { - if (zip64 === false) { - throw new Error(ERR_UNSUPPORTED_FORMAT); - } else { - zip64 = true; - } - } - const endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH); - const endOfdirectoryView = getDataView(endOfdirectoryArray); - offset = 0; - if (zip64) { - setUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE); - setBigUint64(endOfdirectoryView, 4, BigInt(44)); - setUint16(endOfdirectoryView, 12, 45); - setUint16(endOfdirectoryView, 14, 45); - setUint32(endOfdirectoryView, 16, lastDiskNumber); - setUint32(endOfdirectoryView, 20, diskNumber); - setBigUint64(endOfdirectoryView, 24, BigInt(filesLength)); - setBigUint64(endOfdirectoryView, 32, BigInt(filesLength)); - setBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength)); - setBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset)); - setUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE); - setBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength)); - setUint32(endOfdirectoryView, 72, lastDiskNumber + 1); - const supportZip64SplitFile = getOptionValue(zipWriter, options, "supportZip64SplitFile", true); - if (supportZip64SplitFile) { - lastDiskNumber = MAX_16_BITS; - diskNumber = MAX_16_BITS; - } - filesLength = MAX_16_BITS; - directoryOffset = MAX_32_BITS; - directoryDataLength = MAX_32_BITS; - offset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH; - } - setUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE); - setUint16(endOfdirectoryView, offset + 4, lastDiskNumber); - setUint16(endOfdirectoryView, offset + 6, diskNumber); - setUint16(endOfdirectoryView, offset + 8, filesLength); - setUint16(endOfdirectoryView, offset + 10, filesLength); - setUint32(endOfdirectoryView, offset + 12, directoryDataLength); - setUint32(endOfdirectoryView, offset + 16, directoryOffset); - const commentLength = getLength(comment); - if (commentLength) { - if (commentLength <= MAX_16_BITS) { - setUint16(endOfdirectoryView, offset + 20, commentLength); - } else { - throw new Error(ERR_INVALID_COMMENT); - } - } - await writeData(writable, endOfdirectoryArray); - if (commentLength) { - await writeData(writable, comment); - } - } - - async function writeData(writable, array) { - const streamWriter = writable.getWriter(); - await streamWriter.ready; - writable.size += getLength(array); - await streamWriter.write(array); - streamWriter.releaseLock(); - } - - function getTimeNTFS(date) { - if (date) { - return ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000)); - } - } - - function getOptionValue(zipWriter, options, name, defaultValue) { - const result = options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name]; - return result === UNDEFINED_VALUE ? defaultValue : result; - } - - function getMaximumCompressedSize(uncompressedSize) { - return uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1)); - } - - function setUint8(view, offset, value) { - view.setUint8(offset, value); - } - - function setUint16(view, offset, value) { - view.setUint16(offset, value, true); - } - - function setUint32(view, offset, value) { - view.setUint32(offset, value, true); - } - - function setBigUint64(view, offset, value) { - view.setBigUint64(offset, value, true); - } - - function arraySet(array, typedArray, offset) { - array.set(typedArray, offset); - } - - function getDataView(array) { - return new DataView(array.buffer); - } - - function getLength(...arrayLikes) { - let result = 0; - arrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length)); - return result; - } - - /* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - let baseURL; - try { - baseURL = (typeof document === 'undefined' && typeof location === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('zip-full.js', document.baseURI).href)); - } catch (_error) { - console.error(_error) - } - e(configure); - configure({ Deflate: ZipDeflate, Inflate: ZipInflate, baseURL }); - - exports.BlobReader = BlobReader; - exports.BlobWriter = BlobWriter; - exports.Data64URIReader = Data64URIReader; - exports.Data64URIWriter = Data64URIWriter; - exports.ERR_BAD_FORMAT = ERR_BAD_FORMAT; - exports.ERR_CENTRAL_DIRECTORY_NOT_FOUND = ERR_CENTRAL_DIRECTORY_NOT_FOUND; - exports.ERR_DUPLICATED_NAME = ERR_DUPLICATED_NAME; - exports.ERR_ENCRYPTED = ERR_ENCRYPTED; - exports.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND; - exports.ERR_EOCDR_NOT_FOUND = ERR_EOCDR_NOT_FOUND; - exports.ERR_EOCDR_ZIP64_NOT_FOUND = ERR_EOCDR_ZIP64_NOT_FOUND; - exports.ERR_EXTRAFIELD_ZIP64_NOT_FOUND = ERR_EXTRAFIELD_ZIP64_NOT_FOUND; - exports.ERR_HTTP_RANGE = ERR_HTTP_RANGE; - exports.ERR_INVALID_COMMENT = ERR_INVALID_COMMENT; - exports.ERR_INVALID_ENCRYPTION_STRENGTH = ERR_INVALID_ENCRYPTION_STRENGTH; - exports.ERR_INVALID_ENTRY_COMMENT = ERR_INVALID_ENTRY_COMMENT; - exports.ERR_INVALID_ENTRY_NAME = ERR_INVALID_ENTRY_NAME; - exports.ERR_INVALID_EXTRAFIELD_DATA = ERR_INVALID_EXTRAFIELD_DATA; - exports.ERR_INVALID_EXTRAFIELD_TYPE = ERR_INVALID_EXTRAFIELD_TYPE; - exports.ERR_INVALID_PASSWORD = ERR_INVALID_PASSWORD; - exports.ERR_INVALID_SIGNATURE = ERR_INVALID_SIGNATURE; - exports.ERR_INVALID_VERSION = ERR_INVALID_VERSION; - exports.ERR_ITERATOR_COMPLETED_TOO_SOON = ERR_ITERATOR_COMPLETED_TOO_SOON; - exports.ERR_LOCAL_FILE_HEADER_NOT_FOUND = ERR_LOCAL_FILE_HEADER_NOT_FOUND; - exports.ERR_SPLIT_ZIP_FILE = ERR_SPLIT_ZIP_FILE; - exports.ERR_UNSUPPORTED_COMPRESSION = ERR_UNSUPPORTED_COMPRESSION; - exports.ERR_UNSUPPORTED_ENCRYPTION = ERR_UNSUPPORTED_ENCRYPTION; - exports.ERR_UNSUPPORTED_FORMAT = ERR_UNSUPPORTED_FORMAT; - exports.HttpRangeReader = HttpRangeReader; - exports.HttpReader = HttpReader; - exports.Reader = Reader; - exports.SplitDataReader = SplitDataReader; - exports.SplitDataWriter = SplitDataWriter; - exports.SplitZipReader = SplitZipReader; - exports.SplitZipWriter = SplitZipWriter; - exports.TextReader = TextReader; - exports.TextWriter = TextWriter; - exports.Uint8ArrayReader = Uint8ArrayReader; - exports.Uint8ArrayWriter = Uint8ArrayWriter; - exports.Writer = Writer; - exports.ZipReader = ZipReader; - exports.ZipWriter = ZipWriter; - exports.configure = configure; - exports.getMimeType = getMimeType; - exports.initReader = initReader; - exports.initShimAsyncCodec = initShimAsyncCodec; - exports.initStream = initStream; - exports.initWriter = initWriter; - exports.readUint8Array = readUint8Array; - exports.terminateWorkers = terminateWorkers; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); \ No newline at end of file diff --git a/app/src/static/resources/-Nord.json b/app/src/static/resources/-Nord.json deleted file mode 100644 index dedc9fed02f28807ea4e5f38be968578b3b117e4..0000000000000000000000000000000000000000 --- a/app/src/static/resources/-Nord.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "android": 12, - "steps": [ - { - "command": "reboot bootloader" - }, - { - "id": "connect-bootloader", - "command": [ - "connect bootloader", - "oem unlock" - ], - "needUserGesture": true - }, - { - "id": "unlocking", - "needUserGesture": true - }, - { - "id": "activate-developer-options", - "needUserGesture": true - }, - { - "id": "activate-usb-debugging", - "needUserGesture": true - }, - { - "id": "enable-usb-file-transfer", - "needUserGesture": true - }, - { - "id": "device-detection", - "command": "connect adb", - "needUserGesture": true - }, - { - "mode": "bootloader", - "id": "connect-bootloader", - "command": "connect bootloader", - "needUserGesture": true - }, - { - "id": "flashing", - "command": [ - "flash dtbo dtbo-e-2.2-s-20240715417774-stable-avicii.img", - "flash vbmeta vbmeta-e-2.2-s-20240715417774-stable-avicii.img", - "flash recovery recovery-e-2.2-s-20240715417774-stable-avicii.img" - ] - }, - { - "id": "bootloader-to-recovery-manually", - "needUserGesture": true - }, - { - "id": "format-device", - "needUserGesture": true - }, - { - "id": "go-to-apply-update", - "needUserGesture": true - }, - { - "id": "sideload", - "command": "sideload oneplus-nord-rom.zip" - }, - { - "id": "sideload-ended", - "needUserGesture": true - }, - { - "id": "connect-bootloader", - "command": [ - "connect bootloader", - "reboot" - ], - "needUserGesture": true - }, - { - "id": "murena-workspace-account", - "needUserGesture": true - }, - { - "id": "installation-complete" - } - ], - "folder": [ - { - "name": "One+ Nord recovery installer", - "path": "https://images.ecloud.global/stable/avicii/recovery-IMG-e-2.2-s-20240715417774-stable-avicii.zip", - "unzip": true - }, - { - "name": "oneplus-nord-rom.zip", - "path": "https://images.ecloud.global/stable/avicii/e-2.2-s-20240715417774-stable-avicii.zip" - } - ] - } - \ No newline at end of file diff --git a/app/src/static/js/viewManager.js b/app/src/viewManager.js similarity index 82% rename from app/src/static/js/viewManager.js rename to app/src/viewManager.js index 87f246200778a23aa2fddef01b27d64c5d0f0b87..f9ed2141ab8cee899f6a210e0868afea1f86d624 100644 --- a/app/src/static/js/viewManager.js +++ b/app/src/viewManager.js @@ -1,3 +1,7 @@ +import {WDebug} from './debug.js' +import {ErrorManager} from './errorManager.js' +import {Controller} from './controller.manager.js'; +import {TranslationManager} from './vue/translation.manager.js'; /* * Class to manage events @@ -5,22 +9,18 @@ * it's just log for now, but maybe it will be more usefull for dynamic display */ -class ViewManager { +export default class ViewManager { constructor() { } async init() { - const wdebug = await import ("./debug.js"); - this.WDebug = wdebug.WDebug; - const errorManager = await import ("./errorManager.js"); - this.ErrorManager = errorManager.ErrorManager; - const cm = await import("./controller.manager.js"); - const tm = await import("./vue/translation.manager.js"); - this.controller = new cm.Controller(); - await this.controller.init(); - this.translationManager = new tm.TranslationManager(); + this.WDebug = WDebug; + this.ErrorManager = ErrorManager; + this.controller = new Controller(); + await this.controller.init(this); + this.translationManager = new TranslationManager(); await this.translationManager.init(); window.scroll(0,0); } @@ -35,6 +35,9 @@ class ViewManager { $copyStep.id = step.id; $copyStep.classList.add('active'); $copyStep.classList.remove('inactive'); + $copyStep.addEventListener('click', async () => { + this.executeStep($copyStep, step.name); + }); let $processCtn = document.getElementById('process-ctn'); if($processCtn){ $processCtn.appendChild($copyStep); @@ -187,4 +190,20 @@ class ViewManager { } // /CONTROLLER EVENTS -} \ No newline at end of file +} + +document.addEventListener('DOMContentLoaded', async () => { + var VIEW = new ViewManager(); + await VIEW.init(); + + let elts = document.querySelectorAll(".card button") + for(let elt of elts) { + if (elt.parentElement.parentElement.className.includes("inactive")) { + continue; + } + elt.addEventListener('click', async () => { + VIEW.executeStep(elt, elt.parentElement.parentElement.id); + }) + } + +}); diff --git a/app/src/static/js/vue/translation.manager.js b/app/src/vue/translation.manager.js similarity index 100% rename from app/src/static/js/vue/translation.manager.js rename to app/src/vue/translation.manager.js diff --git a/app/vite.config.js b/app/vite.config.js new file mode 100644 index 0000000000000000000000000000000000000000..c5d471f453b92dea5499b0a7abf9984fdbfbc456 --- /dev/null +++ b/app/vite.config.js @@ -0,0 +1,5 @@ +import { defineConfig } from 'vite' + +export default defineConfig({ + base: '', +}) diff --git a/app/yarn.lock b/app/yarn.lock deleted file mode 100644 index 922f287dad67c25b8844de04832a64cd35648946..0000000000000000000000000000000000000000 --- a/app/yarn.lock +++ /dev/null @@ -1,3275 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.20.0": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30" - integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ== - -"@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92" - integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.2" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-module-transforms" "^7.20.2" - "@babel/helpers" "^7.20.1" - "@babel/parser" "^7.20.2" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@babel/generator@^7.20.1", "@babel/generator@^7.20.2", "@babel/generator@^7.7.2": - version "7.20.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8" - integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA== - dependencies: - "@babel/types" "^7.20.2" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a" - integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ== - dependencies: - "@babel/compat-data" "^7.20.0" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - semver "^6.3.0" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712" - integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.8.0": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== - -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== - dependencies: - "@babel/types" "^7.20.2" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/helpers@^7.20.1": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9" - integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg== - dependencies: - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.0" - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2": - version "7.20.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" - integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg== - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.7.2": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" - integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz#4e9a0cfc769c85689b77a2e642d24e9f697fc8c7" - integrity sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - -"@babel/template@^7.18.10", "@babel/template@^7.3.3": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" - integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.10" - "@babel/types" "^7.18.10" - -"@babel/traverse@^7.20.1", "@babel/traverse@^7.7.2": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8" - integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.1" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.1" - "@babel/types" "^7.20.0" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" - integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - -"@gar/promisify@^1.0.1": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" - integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.3.1.tgz#3e3f876e4e47616ea3b1464b9fbda981872e9583" - integrity sha512-IRE6GD47KwcqA09RIWrabKdHPiKDGgtAL31xDxbi/RjQMsr+lY+ppxmHwY0dUEV3qvvxZzoe5Hl0RXZJOjQNUg== - dependencies: - "@jest/types" "^29.3.1" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^29.3.1" - jest-util "^29.3.1" - slash "^3.0.0" - -"@jest/core@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.3.1.tgz#bff00f413ff0128f4debec1099ba7dcd649774a1" - integrity sha512-0ohVjjRex985w5MmO5L3u5GR1O30DexhBSpuwx2P+9ftyqHdJXnk7IUWiP80oHMvt7ubHCJHxV0a0vlKVuZirw== - dependencies: - "@jest/console" "^29.3.1" - "@jest/reporters" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^29.2.0" - jest-config "^29.3.1" - jest-haste-map "^29.3.1" - jest-message-util "^29.3.1" - jest-regex-util "^29.2.0" - jest-resolve "^29.3.1" - jest-resolve-dependencies "^29.3.1" - jest-runner "^29.3.1" - jest-runtime "^29.3.1" - jest-snapshot "^29.3.1" - jest-util "^29.3.1" - jest-validate "^29.3.1" - jest-watcher "^29.3.1" - micromatch "^4.0.4" - pretty-format "^29.3.1" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.3.1.tgz#eb039f726d5fcd14698acd072ac6576d41cfcaa6" - integrity sha512-pMmvfOPmoa1c1QpfFW0nXYtNLpofqo4BrCIk6f2kW4JFeNlHV2t3vd+3iDLf31e2ot2Mec0uqZfmI+U0K2CFag== - dependencies: - "@jest/fake-timers" "^29.3.1" - "@jest/types" "^29.3.1" - "@types/node" "*" - jest-mock "^29.3.1" - -"@jest/expect-utils@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.3.1.tgz#531f737039e9b9e27c42449798acb5bba01935b6" - integrity sha512-wlrznINZI5sMjwvUoLVk617ll/UYfGIZNxmbU+Pa7wmkL4vYzhV9R2pwVqUh4NWWuLQWkI8+8mOkxs//prKQ3g== - dependencies: - jest-get-type "^29.2.0" - -"@jest/expect@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.3.1.tgz#456385b62894349c1d196f2d183e3716d4c6a6cd" - integrity sha512-QivM7GlSHSsIAWzgfyP8dgeExPRZ9BIe2LsdPyEhCGkZkoyA+kGsoIzbKAfZCvvRzfZioKwPtCZIt5SaoxYCvg== - dependencies: - expect "^29.3.1" - jest-snapshot "^29.3.1" - -"@jest/fake-timers@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.3.1.tgz#b140625095b60a44de820876d4c14da1aa963f67" - integrity sha512-iHTL/XpnDlFki9Tq0Q1GGuVeQ8BHZGIYsvCO5eN/O/oJaRzofG9Xndd9HuSDBI/0ZS79pg0iwn07OMTQ7ngF2A== - dependencies: - "@jest/types" "^29.3.1" - "@sinonjs/fake-timers" "^9.1.2" - "@types/node" "*" - jest-message-util "^29.3.1" - jest-mock "^29.3.1" - jest-util "^29.3.1" - -"@jest/globals@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.3.1.tgz#92be078228e82d629df40c3656d45328f134a0c6" - integrity sha512-cTicd134vOcwO59OPaB6AmdHQMCtWOe+/DitpTZVxWgMJ+YvXL1HNAmPyiGbSHmF/mXVBkvlm8YYtQhyHPnV6Q== - dependencies: - "@jest/environment" "^29.3.1" - "@jest/expect" "^29.3.1" - "@jest/types" "^29.3.1" - jest-mock "^29.3.1" - -"@jest/reporters@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.3.1.tgz#9a6d78c109608e677c25ddb34f907b90e07b4310" - integrity sha512-GhBu3YFuDrcAYW/UESz1JphEAbvUjaY2vShRZRoRY1mxpCMB3yGSJ4j9n0GxVlEOdCf7qjvUfBCrTUUqhVfbRA== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" - "@jridgewell/trace-mapping" "^0.3.15" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^29.3.1" - jest-util "^29.3.1" - jest-worker "^29.3.1" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - v8-to-istanbul "^9.0.1" - -"@jest/schemas@^29.0.0": - version "29.0.0" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.0.0.tgz#5f47f5994dd4ef067fb7b4188ceac45f77fe952a" - integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA== - dependencies: - "@sinclair/typebox" "^0.24.1" - -"@jest/source-map@^29.2.0": - version "29.2.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.2.0.tgz#ab3420c46d42508dcc3dc1c6deee0b613c235744" - integrity sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ== - dependencies: - "@jridgewell/trace-mapping" "^0.3.15" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.3.1.tgz#92cd5099aa94be947560a24610aa76606de78f50" - integrity sha512-qeLa6qc0ddB0kuOZyZIhfN5q0e2htngokyTWsGriedsDhItisW7SDYZ7ceOe57Ii03sL988/03wAcBh3TChMGw== - dependencies: - "@jest/console" "^29.3.1" - "@jest/types" "^29.3.1" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.3.1.tgz#fa24b3b050f7a59d48f7ef9e0b782ab65123090d" - integrity sha512-IqYvLbieTv20ArgKoAMyhLHNrVHJfzO6ARZAbQRlY4UGWfdDnLlZEF0BvKOMd77uIiIjSZRwq3Jb3Fa3I8+2UA== - dependencies: - "@jest/test-result" "^29.3.1" - graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" - slash "^3.0.0" - -"@jest/transform@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.3.1.tgz#1e6bd3da4af50b5c82a539b7b1f3770568d6e36d" - integrity sha512-8wmCFBTVGYqFNLWfcOWoVuMuKYPUBTnTMDkdvFtAYELwDOl9RGwOsvQWGPFxDJ8AWY9xM/8xCXdqmPK3+Q5Lug== - dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^29.3.1" - "@jridgewell/trace-mapping" "^0.3.15" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^2.0.0" - fast-json-stable-stringify "^2.1.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" - jest-regex-util "^29.2.0" - jest-util "^29.3.1" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.1" - -"@jest/types@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.3.1.tgz#7c5a80777cb13e703aeec6788d044150341147e3" - integrity sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA== - dependencies: - "@jest/schemas" "^29.0.0" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.15", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@mapbox/node-pre-gyp@^1.0.0": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz#8e6735ccebbb1581e5a7e652244cadc8a844d03c" - integrity sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA== - dependencies: - detect-libc "^2.0.0" - https-proxy-agent "^5.0.0" - make-dir "^3.1.0" - node-fetch "^2.6.7" - nopt "^5.0.0" - npmlog "^5.0.1" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.11" - -"@npmcli/fs@^1.0.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.1.1.tgz#72f719fe935e687c56a4faecf3c03d06ba593257" - integrity sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ== - dependencies: - "@gar/promisify" "^1.0.1" - semver "^7.3.5" - -"@npmcli/move-file@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" - integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - -"@sinclair/typebox@^0.24.1": - version "0.24.51" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" - integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA== - -"@sinonjs/commons@^1.7.0": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.5.tgz#e280c94c95f206dcfd5aca00a43f2156b758c764" - integrity sha512-rTpCA0wG1wUxglBSFdMMY0oTrKYvgf4fNgv/sXbfCVAdf+FnPBdKJR/7XbpTCwbCrvCbdPYnlWaUUYz4V2fPDA== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" - integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== - dependencies: - "@sinonjs/commons" "^1.7.0" - -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@types/babel__core@^7.1.14": - version "7.1.20" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359" - integrity sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" - integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.2.tgz#235bf339d17185bdec25e024ca19cce257cc7309" - integrity sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg== - dependencies: - "@babel/types" "^7.3.0" - -"@types/graceful-fs@^4.1.3": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== - dependencies: - "@types/node" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" - integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/node@*": - version "18.11.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" - integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== - -"@types/prettier@^2.1.5": - version "2.7.1" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.1.tgz#dfd20e2dc35f027cdd6c1908e80a5ddc7499670e" - integrity sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow== - -"@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== - -"@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== - -"@types/yargs@^17.0.8": - version "17.0.13" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76" - integrity sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg== - dependencies: - "@types/yargs-parser" "*" - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -agent-base@6, agent-base@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -agentkeepalive@^4.1.3: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" - integrity sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA== - dependencies: - debug "^4.1.0" - depd "^1.1.2" - humanize-ms "^1.2.1" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@5.0.1, ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -anymatch@^3.0.3, anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -"aproba@^1.0.3 || ^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== - -are-we-there-yet@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" - integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - -are-we-there-yet@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd" - integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - -babel-jest@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.3.1.tgz#05c83e0d128cd48c453eea851482a38782249f44" - integrity sha512-aard+xnMoxgjwV70t0L6wkW/3HQQtV+O0PEimxKgzNqCJnbYmroPojdP2tqKSOAt8QAKV/uSZU8851M7B5+fcA== - dependencies: - "@jest/transform" "^29.3.1" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.2.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.2.0.tgz#23ee99c37390a98cfddf3ef4a78674180d823094" - integrity sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" - -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.2.0.tgz#3048bea3a1af222e3505e4a767a974c95a7620dc" - integrity sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA== - dependencies: - babel-plugin-jest-hoist "^29.2.0" - babel-preset-current-node-syntax "^1.0.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -body-parser@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" - integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browserslist@^4.21.3: - version "4.21.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" - integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== - dependencies: - caniuse-lite "^1.0.30001400" - electron-to-chromium "^1.4.251" - node-releases "^2.0.6" - update-browserslist-db "^1.0.9" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -cacache@^15.2.0: - version "15.3.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" - integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== - dependencies: - "@npmcli/fs" "^1.0.0" - "@npmcli/move-file" "^1.0.1" - chownr "^2.0.0" - fs-minipass "^2.0.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^6.0.0" - minipass "^3.1.1" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^1.0.3" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^8.0.1" - tar "^6.0.2" - unique-filename "^1.1.1" - -call-bind@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001400: - version "1.0.30001434" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz#ec1ec1cfb0a93a34a0600d37903853030520a4e5" - integrity sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -chokidar@^3.5.2: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - -ci-info@^3.2.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.6.2.tgz#362ea15378f1c39378ba786affbc1c9ef015ecfd" - integrity sha512-lVZdhvbEudris15CLytp2u6Y0p5EKfztae9Fqa189MfNmln9F33XuH69v5fvNfiRN5/0eAUz2yJL3mo+nhaRKg== - -cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-support@^1.1.2, color-support@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - -commander@^9.3.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" - integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -console-control-strings@^1.0.0, console-control-strings@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - -cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.3, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== - -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== - -denque@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" - integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -depd@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detect-libc@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" - integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.3.1.tgz#104b5b95fe725932421a9c6e5b4bef84c3f2249e" - integrity sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ== - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -electron-to-chromium@^1.4.251: - version "1.4.284" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" - integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== - -emittery@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" - integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -encoding@^0.1.12: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - -err-code@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" - integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.3.1.tgz#92877aad3f7deefc2e3f6430dd195b92295554a6" - integrity sha512-gGb1yTgU30Q0O/tQq+z30KBWv24ApkMgFUpvKBkyLUBL68Wv8dHdJxTBZFl/iT8K/bqDHvUYRH6IIN3rToopPA== - dependencies: - "@jest/expect-utils" "^29.3.1" - jest-get-type "^29.2.0" - jest-matcher-utils "^29.3.1" - jest-message-util "^29.3.1" - jest-util "^29.3.1" - -express@^4.18.2: - version "4.18.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" - integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.1" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.5.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.11.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -fast-json-stable-stringify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fb-watchman@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" - integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== - dependencies: - bser "2.1.1" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -fs-minipass@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -gauge@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" - integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.2" - console-control-strings "^1.0.0" - has-unicode "^2.0.1" - object-assign "^4.1.1" - signal-exit "^3.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.2" - -gauge@^4.0.3: - version "4.0.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" - integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.3" - console-control-strings "^1.1.0" - has-unicode "^2.0.1" - signal-exit "^3.0.7" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.5" - -generate-function@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" - integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== - dependencies: - is-property "^1.0.2" - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" - integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@^7.1.3, glob@^7.1.4: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -graceful-fs@^4.2.6, graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-unicode@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -http-cache-semantics@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== - dependencies: - ms "^2.0.0" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.6.2, iconv-lite@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -ignore-by-default@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" - integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ip@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-lambda@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" - integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-property@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.5" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" - integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jest-changed-files@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.2.0.tgz#b6598daa9803ea6a4dce7968e20ab380ddbee289" - integrity sha512-qPVmLLyBmvF5HJrY7krDisx6Voi8DmlV3GZYX0aFNbaQsZeoz1hfxcCMbqDGuQCxU1dJy9eYc2xscE8QrCCYaA== - dependencies: - execa "^5.0.0" - p-limit "^3.1.0" - -jest-circus@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.3.1.tgz#177d07c5c0beae8ef2937a67de68f1e17bbf1b4a" - integrity sha512-wpr26sEvwb3qQQbdlmei+gzp6yoSSoSL6GsLPxnuayZSMrSd5Ka7IjAvatpIernBvT2+Ic6RLTg+jSebScmasg== - dependencies: - "@jest/environment" "^29.3.1" - "@jest/expect" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/types" "^29.3.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - is-generator-fn "^2.0.0" - jest-each "^29.3.1" - jest-matcher-utils "^29.3.1" - jest-message-util "^29.3.1" - jest-runtime "^29.3.1" - jest-snapshot "^29.3.1" - jest-util "^29.3.1" - p-limit "^3.1.0" - pretty-format "^29.3.1" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.3.1.tgz#e89dff427db3b1df50cea9a393ebd8640790416d" - integrity sha512-TO/ewvwyvPOiBBuWZ0gm04z3WWP8TIK8acgPzE4IxgsLKQgb377NYGrQLc3Wl/7ndWzIH2CDNNsUjGxwLL43VQ== - dependencies: - "@jest/core" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/types" "^29.3.1" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - import-local "^3.0.2" - jest-config "^29.3.1" - jest-util "^29.3.1" - jest-validate "^29.3.1" - prompts "^2.0.1" - yargs "^17.3.1" - -jest-config@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.3.1.tgz#0bc3dcb0959ff8662957f1259947aedaefb7f3c6" - integrity sha512-y0tFHdj2WnTEhxmGUK1T7fgLen7YK4RtfvpLFBXfQkh2eMJAQq24Vx9472lvn5wg0MAO6B+iPfJfzdR9hJYalg== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.3.1" - "@jest/types" "^29.3.1" - babel-jest "^29.3.1" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^29.3.1" - jest-environment-node "^29.3.1" - jest-get-type "^29.2.0" - jest-regex-util "^29.2.0" - jest-resolve "^29.3.1" - jest-runner "^29.3.1" - jest-util "^29.3.1" - jest-validate "^29.3.1" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^29.3.1" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.3.1.tgz#d8215b72fed8f1e647aed2cae6c752a89e757527" - integrity sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.3.1" - jest-get-type "^29.2.0" - pretty-format "^29.3.1" - -jest-docblock@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.2.0.tgz#307203e20b637d97cee04809efc1d43afc641e82" - integrity sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A== - dependencies: - detect-newline "^3.0.0" - -jest-each@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.3.1.tgz#bc375c8734f1bb96625d83d1ca03ef508379e132" - integrity sha512-qrZH7PmFB9rEzCSl00BWjZYuS1BSOH8lLuC0azQE9lQrAx3PWGKHTDudQiOSwIy5dGAJh7KA0ScYlCP7JxvFYA== - dependencies: - "@jest/types" "^29.3.1" - chalk "^4.0.0" - jest-get-type "^29.2.0" - jest-util "^29.3.1" - pretty-format "^29.3.1" - -jest-environment-node@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.3.1.tgz#5023b32472b3fba91db5c799a0d5624ad4803e74" - integrity sha512-xm2THL18Xf5sIHoU7OThBPtuH6Lerd+Y1NLYiZJlkE3hbE+7N7r8uvHIl/FkZ5ymKXJe/11SQuf3fv4v6rUMag== - dependencies: - "@jest/environment" "^29.3.1" - "@jest/fake-timers" "^29.3.1" - "@jest/types" "^29.3.1" - "@types/node" "*" - jest-mock "^29.3.1" - jest-util "^29.3.1" - -jest-get-type@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.2.0.tgz#726646f927ef61d583a3b3adb1ab13f3a5036408" - integrity sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA== - -jest-haste-map@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.3.1.tgz#af83b4347f1dae5ee8c2fb57368dc0bb3e5af843" - integrity sha512-/FFtvoG1xjbbPXQLFef+WSU4yrc0fc0Dds6aRPBojUid7qlPqZvxdUBA03HW0fnVHXVCnCdkuoghYItKNzc/0A== - dependencies: - "@jest/types" "^29.3.1" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.2.0" - jest-util "^29.3.1" - jest-worker "^29.3.1" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-leak-detector@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.3.1.tgz#95336d020170671db0ee166b75cd8ef647265518" - integrity sha512-3DA/VVXj4zFOPagGkuqHnSQf1GZBmmlagpguxEERO6Pla2g84Q1MaVIB3YMxgUaFIaYag8ZnTyQgiZ35YEqAQA== - dependencies: - jest-get-type "^29.2.0" - pretty-format "^29.3.1" - -jest-matcher-utils@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.3.1.tgz#6e7f53512f80e817dfa148672bd2d5d04914a572" - integrity sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ== - dependencies: - chalk "^4.0.0" - jest-diff "^29.3.1" - jest-get-type "^29.2.0" - pretty-format "^29.3.1" - -jest-message-util@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.3.1.tgz#37bc5c468dfe5120712053dd03faf0f053bd6adb" - integrity sha512-lMJTbgNcDm5z+6KDxWtqOFWlGQxD6XaYwBqHR8kmpkP+WWWG90I35kdtQHY67Ay5CSuydkTBbJG+tH9JShFCyA== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.3.1" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.3.1" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.3.1.tgz#60287d92e5010979d01f218c6b215b688e0f313e" - integrity sha512-H8/qFDtDVMFvFP4X8NuOT3XRDzOUTz+FeACjufHzsOIBAxivLqkB1PoLCaJx9iPPQ8dZThHPp/G3WRWyMgA3JA== - dependencies: - "@jest/types" "^29.3.1" - "@types/node" "*" - jest-util "^29.3.1" - -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - -jest-regex-util@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.2.0.tgz#82ef3b587e8c303357728d0322d48bbfd2971f7b" - integrity sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA== - -jest-resolve-dependencies@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.3.1.tgz#a6a329708a128e68d67c49f38678a4a4a914c3bf" - integrity sha512-Vk0cYq0byRw2WluNmNWGqPeRnZ3p3hHmjJMp2dyyZeYIfiBskwq4rpiuGFR6QGAdbj58WC7HN4hQHjf2mpvrLA== - dependencies: - jest-regex-util "^29.2.0" - jest-snapshot "^29.3.1" - -jest-resolve@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.3.1.tgz#9a4b6b65387a3141e4a40815535c7f196f1a68a7" - integrity sha512-amXJgH/Ng712w3Uz5gqzFBBjxV8WFLSmNjoreBGMqxgCz5cH7swmBZzgBaCIOsvb0NbpJ0vgaSFdJqMdT+rADw== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" - jest-pnp-resolver "^1.2.2" - jest-util "^29.3.1" - jest-validate "^29.3.1" - resolve "^1.20.0" - resolve.exports "^1.1.0" - slash "^3.0.0" - -jest-runner@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.3.1.tgz#a92a879a47dd096fea46bb1517b0a99418ee9e2d" - integrity sha512-oFvcwRNrKMtE6u9+AQPMATxFcTySyKfLhvso7Sdk/rNpbhg4g2GAGCopiInk1OP4q6gz3n6MajW4+fnHWlU3bA== - dependencies: - "@jest/console" "^29.3.1" - "@jest/environment" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.13.1" - graceful-fs "^4.2.9" - jest-docblock "^29.2.0" - jest-environment-node "^29.3.1" - jest-haste-map "^29.3.1" - jest-leak-detector "^29.3.1" - jest-message-util "^29.3.1" - jest-resolve "^29.3.1" - jest-runtime "^29.3.1" - jest-util "^29.3.1" - jest-watcher "^29.3.1" - jest-worker "^29.3.1" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.3.1.tgz#21efccb1a66911d6d8591276a6182f520b86737a" - integrity sha512-jLzkIxIqXwBEOZx7wx9OO9sxoZmgT2NhmQKzHQm1xwR1kNW/dn0OjxR424VwHHf1SPN6Qwlb5pp1oGCeFTQ62A== - dependencies: - "@jest/environment" "^29.3.1" - "@jest/fake-timers" "^29.3.1" - "@jest/globals" "^29.3.1" - "@jest/source-map" "^29.2.0" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" - "@types/node" "*" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" - jest-message-util "^29.3.1" - jest-mock "^29.3.1" - jest-regex-util "^29.2.0" - jest-resolve "^29.3.1" - jest-snapshot "^29.3.1" - jest-util "^29.3.1" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.3.1.tgz#17bcef71a453adc059a18a32ccbd594b8cc4e45e" - integrity sha512-+3JOc+s28upYLI2OJM4PWRGK9AgpsMs/ekNryUV0yMBClT9B1DF2u2qay8YxcQd338PPYSFNb0lsar1B49sLDA== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" - "@types/babel__traverse" "^7.0.6" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.3.1" - graceful-fs "^4.2.9" - jest-diff "^29.3.1" - jest-get-type "^29.2.0" - jest-haste-map "^29.3.1" - jest-matcher-utils "^29.3.1" - jest-message-util "^29.3.1" - jest-util "^29.3.1" - natural-compare "^1.4.0" - pretty-format "^29.3.1" - semver "^7.3.5" - -jest-util@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.3.1.tgz#1dda51e378bbcb7e3bc9d8ab651445591ed373e1" - integrity sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ== - dependencies: - "@jest/types" "^29.3.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.3.1.tgz#d56fefaa2e7d1fde3ecdc973c7f7f8f25eea704a" - integrity sha512-N9Lr3oYR2Mpzuelp1F8negJR3YE+L1ebk1rYA5qYo9TTY3f9OWdptLoNSPP9itOCBIRBqjt/S5XHlzYglLN67g== - dependencies: - "@jest/types" "^29.3.1" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^29.2.0" - leven "^3.1.0" - pretty-format "^29.3.1" - -jest-watcher@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.3.1.tgz#3341547e14fe3c0f79f9c3a4c62dbc3fc977fd4a" - integrity sha512-RspXG2BQFDsZSRKGCT/NiNa8RkQ1iKAjrO0//soTMWx/QUt+OcxMqMSBxz23PYGqUuWm2+m2mNNsmj0eIoOaFg== - dependencies: - "@jest/test-result" "^29.3.1" - "@jest/types" "^29.3.1" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.13.1" - jest-util "^29.3.1" - string-length "^4.0.1" - -jest-worker@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.3.1.tgz#e9462161017a9bb176380d721cab022661da3d6b" - integrity sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw== - dependencies: - "@types/node" "*" - jest-util "^29.3.1" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.3.1.tgz#c130c0d551ae6b5459b8963747fed392ddbde122" - integrity sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA== - dependencies: - "@jest/core" "^29.3.1" - "@jest/types" "^29.3.1" - import-local "^3.0.2" - jest-cli "^29.3.1" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -long@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" - integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== - -lru-cache@^4.1.3: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -make-dir@^3.0.0, make-dir@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-fetch-happen@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" - integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== - dependencies: - agentkeepalive "^4.1.3" - cacache "^15.2.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^6.0.0" - minipass "^3.1.3" - minipass-collect "^1.0.2" - minipass-fetch "^1.3.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.2" - promise-retry "^2.0.1" - socks-proxy-agent "^6.0.0" - ssri "^8.0.0" - -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== - dependencies: - minipass "^3.0.0" - -minipass-fetch@^1.3.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.4.1.tgz#d75e0091daac1b0ffd7e9d41629faff7d0c1f1b6" - integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== - dependencies: - minipass "^3.1.0" - minipass-sized "^1.0.3" - minizlib "^2.0.0" - optionalDependencies: - encoding "^0.1.12" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" - integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - dependencies: - minipass "^3.0.0" - -minipass-sized@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" - integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== - dependencies: - minipass "^3.0.0" - -minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: - version "3.3.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.4.tgz#ca99f95dd77c43c7a76bf51e6d200025eee0ffae" - integrity sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw== - dependencies: - yallist "^4.0.0" - -minizlib@^2.0.0, minizlib@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -mysql2@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/mysql2/-/mysql2-2.3.3.tgz#944f3deca4b16629052ff8614fbf89d5552545a0" - integrity sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA== - dependencies: - denque "^2.0.1" - generate-function "^2.3.1" - iconv-lite "^0.6.3" - long "^4.0.0" - lru-cache "^6.0.0" - named-placeholders "^1.1.2" - seq-queue "^0.0.5" - sqlstring "^2.3.2" - -named-placeholders@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.2.tgz#ceb1fbff50b6b33492b5cf214ccf5e39cef3d0e8" - integrity sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA== - dependencies: - lru-cache "^4.1.3" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -negotiator@0.6.3, negotiator@^0.6.2: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -node-addon-api@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f" - integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== - -node-fetch@^2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -node-gyp@8.x: - version "8.4.1" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" - integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.6" - make-fetch-happen "^9.1.0" - nopt "^5.0.0" - npmlog "^6.0.0" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.2" - which "^2.0.2" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - -node-releases@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" - integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== - -nodemon@^2.0.20: - version "2.0.20" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.20.tgz#e3537de768a492e8d74da5c5813cb0c7486fc701" - integrity sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw== - dependencies: - chokidar "^3.5.2" - debug "^3.2.7" - ignore-by-default "^1.0.1" - minimatch "^3.1.2" - pstree.remy "^1.1.8" - semver "^5.7.1" - simple-update-notifier "^1.0.7" - supports-color "^5.5.0" - touch "^3.1.0" - undefsafe "^2.0.5" - -nopt@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" - integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== - dependencies: - abbrev "1" - -nopt@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" - integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== - dependencies: - abbrev "1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npmlog@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" - integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== - dependencies: - are-we-there-yet "^2.0.0" - console-control-strings "^1.1.0" - gauge "^3.0.0" - set-blocking "^2.0.0" - -npmlog@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" - integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== - dependencies: - are-we-there-yet "^3.0.0" - console-control-strings "^1.1.0" - gauge "^4.0.3" - set-blocking "^2.0.0" - -object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pirates@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -prettier@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" - integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== - -pretty-format@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.3.1.tgz#1841cac822b02b4da8971dacb03e8a871b4722da" - integrity sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg== - dependencies: - "@jest/schemas" "^29.0.0" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== - -promise-retry@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" - integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== - dependencies: - err-code "^2.0.2" - retry "^0.12.0" - -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== - -pstree.remy@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" - integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - -readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== - -resolve@^1.20.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -safe-buffer@5.2.1, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -semver@^5.7.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.0.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.5: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== - dependencies: - lru-cache "^6.0.0" - -semver@~7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -seq-queue@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/seq-queue/-/seq-queue-0.0.5.tgz#d56812e1c017a6e4e7c3e3a37a1da6d78dd3c93e" - integrity sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q== - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.0, signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -simple-update-notifier@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz#7edf75c5bdd04f88828d632f762b2bc32996a9cc" - integrity sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew== - dependencies: - semver "~7.0.0" - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -smart-buffer@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" - integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - -socks-proxy-agent@^6.0.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz#2687a31f9d7185e38d530bef1944fe1f1496d6ce" - integrity sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ== - dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" - -socks@^2.6.2: - version "2.7.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" - integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== - dependencies: - ip "^2.0.0" - smart-buffer "^4.2.0" - -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -sqlite3@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-5.1.2.tgz#f50d5b1482b6972fb650daf6f718e6507c6cfb0f" - integrity sha512-D0Reg6pRWAFXFUnZKsszCI67tthFD8fGPewRddDCX6w4cYwz3MbvuwRICbL+YQjBAh9zbw+lJ/V9oC8nG5j6eg== - dependencies: - "@mapbox/node-pre-gyp" "^1.0.0" - node-addon-api "^4.2.0" - tar "^6.1.11" - optionalDependencies: - node-gyp "8.x" - -sqlstring@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.3.tgz#2ddc21f03bce2c387ed60680e739922c65751d0c" - integrity sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg== - -ssri@^8.0.0, ssri@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" - integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== - dependencies: - minipass "^3.1.1" - -stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== - dependencies: - escape-string-regexp "^2.0.0" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^5.3.0, supports-color@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -tar@^6.0.2, tar@^6.1.11, tar@^6.1.2: - version "6.1.12" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.12.tgz#3b742fb05669b55671fb769ab67a7791ea1a62e6" - integrity sha512-jU4TdemS31uABHd+Lt5WEYJuzn+TJTCBLljvIAHZOz6M9Os5pJ4dD+vRFLxPa/n3T0iEFzpi+0x1UfuDZYbRMw== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^3.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -touch@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" - integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== - dependencies: - nopt "~1.0.10" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -undefsafe@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" - integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== - -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -update-browserslist-db@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -util-deprecate@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== - -v8-to-istanbul@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" - integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -wait-port@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/wait-port/-/wait-port-1.0.4.tgz#6f9474645ddbf7701ac100ab6762438edf6e5689" - integrity sha512-w8Ftna3h6XSFWWc2JC5gZEgp64nz8bnaTp5cvzbJSZ53j+omktWTDdwXxEF0jM8YveviLgFWvNGrSvRHnkyHyw== - dependencies: - chalk "^4.1.2" - commander "^9.3.0" - debug "^4.3.4" - -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -which@^2.0.1, which@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.2, wide-align@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" - integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== - dependencies: - string-width "^1.0.2 || 2 || 3 || 4" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.3.1: - version "17.6.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541" - integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/docker-compose.yml b/docker-compose.yml index a4469f397f6d28a77ba60b1272a55b6e9483452d..6909a0f0853bdafb14b4f2eddeb972300b47875e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,7 @@ services: - eos-web-installer: + installer: image: registry.gitlab.e.foundation/e/devices/eos-installer:latest build: context: app/ ports: - - '3000:3000' - volumes: - - ./app/src:/app/src + - '3000:80'