diff --git a/.eslintignore b/.eslintignore index 94f7322b..5551fd0b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1 @@ -src/static/* +static/* diff --git a/.eslintrc.js b/.eslintrc.js index 9477454d..88e222cd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,34 +1,100 @@ +/* eslint-env node */ +/** @type { import("eslint").Linter.Config } */ module.exports = { - "env": { - "browser": true, - "es6": true, - "webextensions": true - }, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "rules": { - "no-restricted-globals": [ - 2, - "event", "error" - ], - "indent": [ - "error", - 2 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "double" - ], - "semi": [ - "error", - "always" - ] - } + env: { + browser: true, + es6: true, + webextensions: true, + }, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:wc/recommended", + "plugin:lit/recommended", + "prettier", + ], + plugins: ["@typescript-eslint", "lit"], + parser: "@typescript-eslint/parser", + parserOptions: { + project: ["./tsconfig.eslint.json"], + tsconfigRootDir: __dirname, + }, + root: true, + rules: { + /* start stylistic rules */ + "@typescript-eslint/adjacent-overload-signatures": "error", + "@typescript-eslint/array-type": "error", + "@typescript-eslint/consistent-type-imports": [ + "error", + { + fixStyle: "inline-type-imports", + }, + ], + "@typescript-eslint/prefer-readonly": "warn", + "@typescript-eslint/class-literal-property-style": ["warn", "getters"], + "@typescript-eslint/consistent-generic-constructors": "error", + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/no-confusing-non-null-assertion": "warn", + "@typescript-eslint/no-inferrable-types": "warn", + "@typescript-eslint/non-nullable-type-assertion-style": "warn", + "@typescript-eslint/prefer-for-of": "warn", + // "@typescript-eslint/prefer-nullish-coalescing": "warn", + "@typescript-eslint/prefer-optional-chain": "warn", + "@typescript-eslint/prefer-string-starts-ends-with": "warn", + /* end stylistic rules */ + + /* start recommended rules */ + "no-restricted-globals": [2, "event", "error"], + "@typescript-eslint/no-base-to-string": "warn", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-duplicate-type-constituents": "warn", + "@typescript-eslint/no-explicit-any": "warn", + "@typescript-eslint/no-extra-non-null-assertion": "error", + // "@typescript-eslint/no-floating-promises": "warn", + "@typescript-eslint/no-for-in-array": "warn", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", + { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + }, + ], + "no-implied-eval": "off", + "@typescript-eslint/no-implied-eval": "error", + "no-loss-of-precision": "off", + "@typescript-eslint/no-loss-of-precision": "warn", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-misused-promises": [ + "error", + { checksVoidReturn: { arguments: false } }, + ], + "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "warn", + "@typescript-eslint/no-redundant-type-constituents": "warn", + "@typescript-eslint/no-this-alias": "warn", + "@typescript-eslint/no-unnecessary-type-assertion": "warn", + "@typescript-eslint/no-unnecessary-type-constraint": "warn", + // "@typescript-eslint/no-unsafe-argument": "warn", + // "@typescript-eslint/no-unsafe-assignment": "warn", + // "@typescript-eslint/no-unsafe-call": "warn", + "@typescript-eslint/no-unsafe-declaration-merging": "warn", + "@typescript-eslint/no-unsafe-enum-comparison": "warn", + // "@typescript-eslint/no-unsafe-member-access": "warn", + // "@typescript-eslint/no-unsafe-return": "warn", + "@typescript-eslint/prefer-as-const": "warn", + "require-await": "off", + "@typescript-eslint/require-await": "warn", + "@typescript-eslint/restrict-template-expressions": "warn", + "@typescript-eslint/unbound-method": "off", + }, + ignorePatterns: [ + "ruffle/**/*", + "build/**/*", + "/sw.js", + "/ui.js", + "dist/**/*", + ], + reportUnusedDisableDirectives: true, }; diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 3b858d34..93c2df73 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -8,7 +8,7 @@ body: id: version attributes: label: ArchiveWeb.page Version - description: "This can be found on the app home page under \"About\"" + description: 'This can be found on the app home page under "About"' placeholder: "v0.11.3" validations: required: true @@ -20,7 +20,7 @@ body: "I was trying to archive a page however..." Please submit any screenshots/videos that can be used to understand how to reproduce the issue. You can attach images by clicking this area to highlight it and then dragging files into the browser window. - + If something wasn't captured in the way you expect please include a link to the archived item if possible. validations: required: true diff --git a/.github/ISSUE_TEMPLATE/feature-change.yml b/.github/ISSUE_TEMPLATE/feature-change.yml index c898d82c..cf0a1d2a 100644 --- a/.github/ISSUE_TEMPLATE/feature-change.yml +++ b/.github/ISSUE_TEMPLATE/feature-change.yml @@ -25,7 +25,7 @@ body: label: Requirements description: | Intended primarily for use by Webrecorder team, leave blank if unknown. - + List the outcomes of the feature being implemented without design or implementation details. placeholder: | 1. Item metadata should show links to the collections that the item belongs to. @@ -43,6 +43,6 @@ body: placeholder: | - [ ] Mockups: - [ ] Design: - - [ ] UI: + - [ ] UI: validations: required: false diff --git a/.github/workflows/buildapp.yaml b/.github/workflows/buildapp.yaml index 5263dffc..b58ad386 100644 --- a/.github/workflows/buildapp.yaml +++ b/.github/workflows/buildapp.yaml @@ -48,53 +48,52 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - if [ "$GITHUB_REF" == "refs/heads/main" ] || [ -f ./force_release ]; then - export YARN_BUILD_CMD="release" - else - export YARN_BUILD_CMD="dist" - fi + if [ "$GITHUB_REF" == "refs/heads/main" ] || [ -f ./force_release ]; then + export YARN_BUILD_CMD="release" + else + export YARN_BUILD_CMD="dist" + fi - if [ "$RUNNER_OS" == "Linux" ]; then - if [ "$PLATFORM" == "linux" ]; then - #mkdir -p plugins-linux; - #pushd plugins-linux; - #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/libpepflashplayer.so"; - #popd; + if [ "$RUNNER_OS" == "Linux" ]; then + if [ "$PLATFORM" == "linux" ]; then + #mkdir -p plugins-linux; + #pushd plugins-linux; + #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/libpepflashplayer.so"; + #popd; - docker run --rm \ - -e GH_TOKEN=${GH_TOKEN} \ - -e YARN_BUILD_CMD=${YARN_BUILD_CMD} \ - -v ${PWD}:/project \ - -v ~/.cache/electron:/root/.cache/electron \ - -v ~/.cache/electron-builder:/root/.cache/electron-builder \ - electronuserland/builder:16-wine \ - /bin/bash -c "yarn --link-duplicates --pure-lockfile --ignore-engines install && yarn run $YARN_BUILD_CMD --linux --x64" - else - #mkdir -p plugins-win; - #pushd plugins-win; - #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/pepflashplayer-x86_64.dll"; - #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/pepflashplayer-x86.dll"; - #popd; + docker run --rm \ + -e GH_TOKEN=${GH_TOKEN} \ + -e YARN_BUILD_CMD=${YARN_BUILD_CMD} \ + -v ${PWD}:/project \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder:16-wine \ + /bin/bash -c "yarn --link-duplicates --pure-lockfile --ignore-engines install && yarn run $YARN_BUILD_CMD --linux --x64" + else + #mkdir -p plugins-win; + #pushd plugins-win; + #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/pepflashplayer-x86_64.dll"; + #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/pepflashplayer-x86.dll"; + #popd; - docker run --rm \ - -e GH_TOKEN=${GH_TOKEN} \ - -e WIN_CSC_LINK=${WIN_CSC_LINK} \ - -e WIN_CSC_KEY_PASSWORD=${WIN_CSC_KEY_PASSWORD} \ - -e YARN_BUILD_CMD=${YARN_BUILD_CMD} \ - -v ${PWD}:/project \ - -v ~/.cache/electron:/root/.cache/electron \ - -v ~/.cache/electron-builder:/root/.cache/electron-builder \ - electronuserland/builder:16-wine \ - /bin/bash -c "yarn --link-duplicates --pure-lockfile --ignore-engines install && yarn run $YARN_BUILD_CMD --win --x64 --ia32" - fi - else - #mkdir -p plugins-mac; - #pushd plugins-mac; - #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/PepperFlashPlayer.plugin.zip"; - #unzip PepperFlashPlayer.plugin.zip; - #rm PepperFlashPlayer.plugin.zip; - #popd; - yarn --link-duplicates --pure-lockfile --ignore-engines install - yarn run $YARN_BUILD_CMD - fi - + docker run --rm \ + -e GH_TOKEN=${GH_TOKEN} \ + -e WIN_CSC_LINK=${WIN_CSC_LINK} \ + -e WIN_CSC_KEY_PASSWORD=${WIN_CSC_KEY_PASSWORD} \ + -e YARN_BUILD_CMD=${YARN_BUILD_CMD} \ + -v ${PWD}:/project \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder:16-wine \ + /bin/bash -c "yarn --link-duplicates --pure-lockfile --ignore-engines install && yarn run $YARN_BUILD_CMD --win --x64 --ia32" + fi + else + #mkdir -p plugins-mac; + #pushd plugins-mac; + #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/PepperFlashPlayer.plugin.zip"; + #unzip PepperFlashPlayer.plugin.zip; + #rm PepperFlashPlayer.plugin.zip; + #popd; + yarn --link-duplicates --pure-lockfile --ignore-engines install + yarn run $YARN_BUILD_CMD + fi diff --git a/.github/workflows/buildext.yaml b/.github/workflows/buildext.yaml index f70b3be8..b3670af4 100644 --- a/.github/workflows/buildext.yaml +++ b/.github/workflows/buildext.yaml @@ -16,8 +16,8 @@ jobs: - name: Install Node.js, NPM and Yarn uses: actions/setup-node@v3 with: - node-version: '18.x' - cache: 'yarn' + node-version: "18.x" + cache: "yarn" - name: Yarn Install run: yarn install --frozen-lockfile diff --git a/.github/workflows/npm-release.yaml b/.github/workflows/npm-release.yaml index ef8eff10..4275b9d5 100644 --- a/.github/workflows/npm-release.yaml +++ b/.github/workflows/npm-release.yaml @@ -10,9 +10,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '18.x' - registry-url: 'https://registry.npmjs.org' - cache: 'yarn' + node-version: "18.x" + registry-url: "https://registry.npmjs.org" + cache: "yarn" - name: Yarn Install run: yarn install --frozen-lockfile diff --git a/.gitignore b/.gitignore index 9970119c..4fc3fa59 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ !examples/*.warc **/node_modules .DS_Store -!dist/embed/* - +dist diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..5bd9d366 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +LICENSE.md +static/* diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..19cd6950 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "runem.lit-plugin", + "streetsidesoftware.code-spell-checker" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..581d90d5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,67 @@ +{ + "cSpell.languageSettings": [ + { + "languageId": "typescript", + "allowCompoundWords": true, + "dictionaries": ["typescript", "node", "html", "fonts", "css"] + }, + { + "languageId": "javascript", + "allowCompoundWords": true, + "dictionaries": ["typescript", "node", "html", "fonts", "css"] + }, + { + "languageId": "markdown", + "allowCompoundWords": true, + "dictionaries": ["typescript", "node", "html", "fonts", "css"] + } + ], + "cSpell.words": [ + "authed", + "autoipfs", + "browsertrix", + "btrix", + "Bulma", + "canonicalization", + "cdxj", + "Collec", + "colls", + "consts", + "electronuserland", + "flexsearch", + "gapi", + "gauth", + "gdrive", + "iframes", + "indexeddb", + "inited", + "ipfs", + "ival", + "kiwix", + "ndjson", + "pmarsceill", + "popd", + "pushd", + "pywb", + "reauth", + "recalc", + "replaybase", + "replayweb.page", + "sesh", + "Strs", + "surt", + "svgs", + "swmanager", + "swonly", + "Unfullscreen", + "unrewriting", + "unsharing", + "wabac", + "WACZ", + "WARC", + "warcio", + "webrecorder", + "wrlogo" + ], + "cSpell.ignorePaths": ["node_modules", ".git", "*.lock", "package.json"] +} diff --git a/README.md b/README.md index 154f47ac..ca50d6db 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Downloads for the desktop are are available on the [GitHub Releases page](https: ## Architecture -The extension makes use of the Chrome debugging protocol to capture and save network traffic, and extends the [ReplayWeb.page](https://github.com/webrecorder/replayweb.page) UI and the [wabac.js](https://github.com/ikreymer/wabac.js) service worker system for replay and storage. +The extension makes use of the Chrome debugging protocol to capture and save network traffic, and extends the [ReplayWeb.page](https://github.com/webrecorder/replayweb.page) UI and the [wabac.js](https://github.com/webrecorder/wabac.js) service worker system for replay and storage. The codebase for the extension and Electron app is shared, but they can both be deployed in different ways. @@ -30,19 +30,19 @@ For development, the extension can be built locally and loaded as an unpacked ex 1. Clone this repo. Run `yarn install; yarn build-dev`. (You can also run `yarn build` to build the production version but it may be harder to debug). -3. Open the Chrome Extensions page ([chrome://extensions](chrome://extensions)). +2. Open the Chrome Extensions page ([chrome://extensions](chrome://extensions)). -4. Choose 'Load Unpacked Extension' and point to the `./dist/ext` directory in your local copy of this repo. +3. Choose 'Load Unpacked Extension' and point to the `./dist/ext` directory in your local copy of this repo. -5. Click the extension icon to show the extension popup, start archiving, etc... +4. Click the extension icon to show the extension popup, start archiving, etc... ### Development Workflow (Extension) For development, it is recommended to use the dev build of the extension: -1. Run ``yarn install`` and then ``yarn run build-dev`` +1. Run `yarn install` and then `yarn run build-dev` -2. Run ``yarn run start-ext`` -- this will ensure the `dist/ext` directory is rebuilt after any changes to the source. +2. Run `yarn run start-ext` -- this will ensure the `dist/ext` directory is rebuilt after any changes to the source. 3. After making changes, the extension still needs to be reloaded in the browser. From the Chrome extensions page, click the reload button to load the latest version. @@ -54,20 +54,20 @@ To run the Electron app development build: 1. Clone this repo. -2. Run ``yarn install`` and then ``yarn run build-dev`` +2. Run `yarn install` and then `yarn run build-dev` -3. Run ``yarn run start-electron`` to start the app. +3. Run `yarn run start-electron` to start the app. The Electron App version will open recording in a new window. It is is designed to support Flash, better support for IPFS sharing. ### Development workflow (Electron App) -After making changes, rerun ``yarn run build-dev`` and ``yarn run start-electron`` to load the app. +After making changes, rerun `yarn run build-dev` and `yarn run start-electron` to load the app. ## Standalone Build To create a platform-specific binary, run: -``yarn run pack`` +`yarn run pack` The standalone app will then be available in the `./dist/` directory. diff --git a/build/notarize.js b/build/notarize.js index 78d2386d..c3df500e 100644 --- a/build/notarize.js +++ b/build/notarize.js @@ -1,34 +1,32 @@ /*eslint-env node */ -const { notarize } = require('electron-notarize'); +const { notarize } = require("electron-notarize"); exports.default = async function notarizing(context) { const { electronPlatformName, appOutDir } = context; - if (electronPlatformName !== 'darwin') { + if (electronPlatformName !== "darwin") { return; } if (process.env.CSC_IDENTITY_AUTO_DISCOVERY === "false") { - console.log('Skipped signing and notarizing'); + console.log("Skipped signing and notarizing"); return; } if (!process.env.APPLE_ID || !process.env.APPLE_ID_PASSWORD) { - console.log('Notarize credentials missing, skipping'); + console.log("Notarize credentials missing, skipping"); return; } - console.log('Notarizing...'); + console.log("Notarizing..."); const appName = context.packager.appInfo.productFilename; return await notarize({ - tool: 'notarytool', + tool: "notarytool", teamId: process.env.APPLE_TEAM_ID, - appBundleId: 'net.webrecorder.archiveweb.page', + appBundleId: "net.webrecorder.archiveweb.page", appPath: `${appOutDir}/${appName}.app`, appleId: process.env.APPLE_ID, appleIdPassword: process.env.APPLE_ID_PASSWORD, }); }; - - diff --git a/index.js b/index.js deleted file mode 100644 index 632b13d6..00000000 --- a/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { ArchiveWebApp } from './src/ui/app.js'; -export { RecordEmbed } from './src/ui/recordembed.js'; - diff --git a/package.json b/package.json index bd5f1a1b..cfcc9cb1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@webrecorder/archivewebpage", "productName": "ArchiveWeb.page", - "version": "0.12.8", + "version": "0.13.0", "main": "index.js", "description": "Create Web Archives directly in your browser", "repository": "https://github.com/webrecorder/archiveweb.page", @@ -10,8 +10,8 @@ "dependencies": { "@fortawesome/fontawesome-free": "^5.13.0", "@ipld/car": "^5.3.1", - "@webrecorder/awp-sw": "^0.4.4", - "@webrecorder/wabac": "^2.19.9", + "@webrecorder/awp-sw": "^0.5.0", + "@webrecorder/wabac": "^2.20.0", "auto-js-ipfs": "^2.3.0", "browsertrix-behaviors": "^0.6.4", "btoa": "^1.2.1", @@ -21,35 +21,44 @@ "http-status-codes": "^2.1.4", "keyword-mark-element": "^0.1.2", "node-fetch": "2.6.7", + "pdfjs-dist": "2.2.228", "pretty-bytes": "^5.6.0", - "replaywebpage": "1.8.17", + "replaywebpage": "^2.2.0", "stream-browserify": "^3.0.0", + "tsconfig-paths-webpack-plugin": "^4.1.0", "unused-filename": "^4.0.1", "uuid": "^8.3.2", "warcio": "^2.3.1" }, - "resolutions": { - "@webrecorder/wabac": "^2.19.9", - "replaywebpage": "1.8.17" - }, "devDependencies": { + "@typescript-eslint/eslint-plugin": "^6.15.0", + "@typescript-eslint/parser": "^6.15.0", "copy-webpack-plugin": "^9.0.1", "css-loader": "^6.2.0", - "electron": "^30.0.9", + "electron": "^32.2.0", "electron-builder": "^24.13.3", "electron-notarize": "^1.2.2", "eslint": "^8.28.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-lit": "^1.11.0", + "eslint-plugin-prettier": "^5.1.0", + "eslint-plugin-wc": "^2.0.4", "generate-json-webpack-plugin": "^2.0.0", "mini-css-extract-plugin": "^2.3.0", - "node-sass": "^8.0.0", + "prettier": "^3.1.1", "raw-loader": "^4.0.2", + "sass": "^1.77.6", "sass-loader": "^12.1.0", "svg-inline-loader": "^0.8.2", "terser-webpack-plugin": "^5.2.4", "to-string-loader": "^1.1.6", + "ts-loader": "^9.5.1", + "ts-migrate": "^0.1.35", + "typescript": "^5.3.3", "webpack": "^5.91.0", "webpack-cli": "^5.1.4", - "webpack-dev-server": "^5.0.4" + "webpack-dev-server": "^5.0.4", + "webpack-extension-reloader": "^1.1.4" }, "files": [ "src/", @@ -67,7 +76,8 @@ "dist": "yarn run build && yarn run pack", "dist-dev": "yarn run build-dev && yarn run pack", "release": "yarn run build && electron-builder", - "lint": "eslint ./src/ webpack.config.js" + "lint": "eslint ./src/ webpack.config.js", + "format": "prettier --write ./" }, "build": { "afterSign": "build/notarize.js", diff --git a/ruffle/download-latest-ruffle.sh b/ruffle/download-latest-ruffle.sh index c9f3a9a9..efce7b42 100755 --- a/ruffle/download-latest-ruffle.sh +++ b/ruffle/download-latest-ruffle.sh @@ -1,9 +1,9 @@ #!/bin/bash -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) RUFFLE_DIR=$SCRIPT_DIR -SELFHOST_URL=$(curl "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url') +SELFHOST_URL=$(curl "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r 'first(.[].assets[] | select(.name | contains("selfhosted"))) | .browser_download_url') echo "$SELFHOST_URL" diff --git a/src/consts.js b/src/consts.ts similarity index 82% rename from src/consts.js rename to src/consts.ts index f41dd9e3..62ccd2b1 100644 --- a/src/consts.js +++ b/src/consts.ts @@ -1,6 +1,5 @@ - export const BEHAVIOR_WAIT_LOAD = "wait_load"; export const BEHAVIOR_READY_START = "ready"; export const BEHAVIOR_PAUSED = "paused"; export const BEHAVIOR_RUNNING = "running"; -export const BEHAVIOR_DONE = "done"; \ No newline at end of file +export const BEHAVIOR_DONE = "done"; diff --git a/src/electron/app-popup.js b/src/electron/app-popup.ts similarity index 61% rename from src/electron/app-popup.js rename to src/electron/app-popup.ts index 10c7c731..022d2c8d 100644 --- a/src/electron/app-popup.js +++ b/src/electron/app-popup.ts @@ -1,25 +1,17 @@ //import { ipcRenderer } from "electron"; import { RecPopup } from "../popup"; -import { CollectionLoader } from "@webrecorder/wabac/src/loaders"; +import { CollectionLoader } from "@webrecorder/wabac/swlib"; import { listAllMsg } from "../utils"; import { setLocalOption } from "../localstorage"; - +import { type PropertyValues } from "lit"; // =========================================================================== -class AppRecPopup extends RecPopup -{ - constructor() { - super(); - - this.collLoader = new CollectionLoader(); - - //this.tabId = 0;//window.location.hash && Number(window.location.hash.slice(1)); - - this.allowCreate = false; - - this.msg = null; - } +class AppRecPopup extends RecPopup { + collLoader = new CollectionLoader(); + allowCreated = false; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + msg: any = null; static get properties() { return { @@ -28,18 +20,18 @@ class AppRecPopup extends RecPopup }; } - firstUpdated() { - super.firstUpdated(); - + firstUpdated(): Promise { listAllMsg(this.collLoader).then((msg) => { this.onMessage(msg); }); + + return super.firstUpdated(); } - updated(changedProperties) { + updated(changedProperties: PropertyValues) { super.updated(changedProperties); - if (changedProperties.has("msg")) { + if (changedProperties.has("msg") && this.msg) { this.onMessage(this.msg); } } @@ -50,6 +42,7 @@ class AppRecPopup extends RecPopup // }); } + // @ts-expect-error - TS7006 - Parameter 'message' implicitly has an 'any' type. sendMessage(message) { if (message.type === "newColl") { this.makeNewColl(message); @@ -57,11 +50,12 @@ class AppRecPopup extends RecPopup } //ipcRenderer.send("popup-msg-" + this.tabId, message); - this.dispatchEvent(new CustomEvent("send-msg", {detail: message})); + this.dispatchEvent(new CustomEvent("send-msg", { detail: message })); } + // @ts-expect-error - TS7006 - Parameter 'message' implicitly has an 'any' type. async makeNewColl(message) { - const newColl = await this.collLoader.initNewColl({title: message.title}); + const newColl = await this.collLoader.initNewColl({ title: message.title }); await setLocalOption("defaultCollId", newColl.name); diff --git a/src/electron/electron-rec-main.js b/src/electron/electron-rec-main.ts similarity index 58% rename from src/electron/electron-rec-main.js rename to src/electron/electron-rec-main.ts index b1db438f..ab2ce5bf 100644 --- a/src/electron/electron-rec-main.js +++ b/src/electron/electron-rec-main.ts @@ -3,14 +3,14 @@ import { ElectronRecorderApp } from "./electron-recorder-app"; import path from "path"; +// @ts-expect-error - TS7016 - Could not find a declaration file for module 'btoa'. '/Users/emma/Work/Webrecorder/archiveweb.page/node_modules/btoa/index.js' implicitly has an 'any' type. import btoa from "btoa"; global.btoa = btoa; - // =========================================================================== const recorderApp = new ElectronRecorderApp({ staticPath: path.join(__dirname, "./"), - profileName: process.env.AWP_PROFILE_NAME || "archivewebpage" + profileName: process.env.AWP_PROFILE_NAME || "archivewebpage", }); recorderApp.init(); diff --git a/src/electron/electron-rec-preload.js b/src/electron/electron-rec-preload.ts similarity index 71% rename from src/electron/electron-rec-preload.js rename to src/electron/electron-rec-preload.ts index f3974b0d..996103b5 100644 --- a/src/electron/electron-rec-preload.js +++ b/src/electron/electron-rec-preload.ts @@ -8,25 +8,29 @@ import { loader, getDB } from "replaywebpage/src/electron-preload"; const { ipcRenderer, contextBridge } = require("electron"); +// @ts-expect-error - TS7034 - Variable 'downloadCallback' implicitly has type 'any' in some locations where its type cannot be determined. let downloadCallback; - // =========================================================================== -contextBridge.exposeInMainWorld("archivewebpage", { +const globalAPI = { + // @ts-expect-error - TS7006 - Parameter 'opts' implicitly has an 'any' type. record: (opts) => { ipcRenderer.send("start-rec", opts); }, + // @ts-expect-error - TS7006 - Parameter 'callback' implicitly has an 'any' type. setDownloadCallback: (callback) => { downloadCallback = callback; }, + // @ts-expect-error - TS7006 - Parameter 'dlprogress' implicitly has an 'any' type. downloadCancel: (dlprogress) => { ipcRenderer.send("dlcancel:" + dlprogress.origFilename); - } - -}); + }, +} as const; +export type GlobalAPI = typeof globalAPI; +contextBridge.exposeInMainWorld("archivewebpage", globalAPI); // =========================================================================== ipcRenderer.on("add-resource", async (event, data, collId) => { @@ -55,7 +59,6 @@ ipcRenderer.on("add-resource", async (event, data, collId) => { } }); - // =========================================================================== ipcRenderer.on("add-page", async (event, pageInfo, collId) => { const db = await getDB(collId); @@ -64,25 +67,23 @@ ipcRenderer.on("add-page", async (event, pageInfo, collId) => { //console.log("add-page", pageInfo); }); - // =========================================================================== -ipcRenderer.on("inc-sizes", async (event, totalSize, writtenSize, collId) => { +ipcRenderer.on("inc-sizes", (event, totalSize, writtenSize, collId) => { if (totalSize > 0) { loader.updateSize(collId, totalSize, writtenSize); } }); - // =========================================================================== -ipcRenderer.on("download-progress", async (event, progress) => { +ipcRenderer.on("download-progress", (event, progress) => { + // @ts-expect-error - TS7005 - Variable 'downloadCallback' implicitly has an 'any' type. if (downloadCallback) { downloadCallback(progress); } }); // =========================================================================== -async function main() -{ +async function main() { await ensureDefaultColl(loader); } diff --git a/src/electron/electron-recorder-app.js b/src/electron/electron-recorder-app.ts similarity index 50% rename from src/electron/electron-recorder-app.js rename to src/electron/electron-recorder-app.ts index b8da32b0..44f1ea27 100644 --- a/src/electron/electron-recorder-app.js +++ b/src/electron/electron-recorder-app.ts @@ -1,9 +1,20 @@ /*eslint-env node */ -import {app, session, BrowserWindow, ipcMain, dialog } from "electron"; +import { + app, + session, + BrowserWindow, + ipcMain, + dialog, + type HandlerDetails, + type WindowOpenHandlerResponse, +} from "electron"; import { ElectronRecorder } from "./electron-recorder"; -import { ElectronReplayApp, STATIC_PREFIX } from "replaywebpage/src/electron-replay-app"; +import { + ElectronReplayApp, + STATIC_PREFIX, +} from "replaywebpage/src/electron-replay-app"; import path from "path"; @@ -11,24 +22,26 @@ import { unusedFilenameSync } from "unused-filename"; app.commandLine.appendSwitch("disable-features", "CrossOriginOpenerPolicy"); - // =========================================================================== -class ElectronRecorderApp extends ElectronReplayApp -{ +class ElectronRecorderApp extends ElectronReplayApp { + // @ts-expect-error - TS7006 - Parameter 'opts' implicitly has an 'any' type. constructor(opts) { super(opts); + // @ts-expect-error - TS2339 - Property 'userAgent' does not exist on type 'ElectronRecorderApp'. this.userAgent = null; + // @ts-expect-error - TS2339 - Property 'recorders' does not exist on type 'ElectronRecorderApp'. this.recorders = new Map(); } + // @ts-expect-error - TS2416 - Property 'mainWindowWebPreferences' in type 'ElectronRecorderApp' is not assignable to the same property in base type 'ElectronReplayApp'. get mainWindowWebPreferences() { return { plugins: true, preload: path.join(__dirname, "preload.js"), contextIsolation: true, - sandbox: false + sandbox: false, }; } @@ -43,18 +56,20 @@ class ElectronRecorderApp extends ElectronReplayApp const { url, responseHeaders, method } = details; // Allow access to Browsertrix APIs - if (url.indexOf("/api") >= 0) { + if (url.indexOf("/api") >= 0 && responseHeaders) { let { statusLine } = details; if (method === "OPTIONS") { statusLine = "HTTP/1.1 200 OK"; - responseHeaders["Access-Control-Allow-Headers"] = "Authorization, Content-Type"; - responseHeaders["Access-Control-Allow-Methods"] = "GET, PUT, POST"; + responseHeaders["Access-Control-Allow-Headers"] = [ + "Authorization, Content-Type", + ]; + responseHeaders["Access-Control-Allow-Methods"] = ["GET, PUT, POST"]; } - responseHeaders["Access-Control-Allow-Origin"] = "*"; - callback({responseHeaders, statusLine}); + responseHeaders["Access-Control-Allow-Origin"] = ["*"]; + callback({ responseHeaders, statusLine }); } else { - callback({responseHeaders}); + callback({ responseHeaders }); } }); @@ -63,10 +78,14 @@ class ElectronRecorderApp extends ElectronReplayApp console.log(`will-download: ${origFilename}`); - item.setSavePath(unusedFilenameSync(path.join(app.getPath("downloads"), origFilename))); + item.setSavePath( + unusedFilenameSync(path.join(app.getPath("downloads"), origFilename)), + ); ipcMain.on("dlcancel:" + origFilename, () => { - console.log(`Canceled download for ${origFilename} to ${item.getSavePath()}`); + console.log( + `Canceled download for ${origFilename} to ${item.getSavePath()}`, + ); item.cancel(); }); @@ -92,7 +111,7 @@ class ElectronRecorderApp extends ElectronReplayApp item.once("done", (event, state) => { const dlprogress = { origFilename, - state + state, }; try { webContents.send("download-progress", dlprogress); @@ -100,13 +119,14 @@ class ElectronRecorderApp extends ElectronReplayApp console.log("download update failed", e); } }); - }); super.onAppReady(); + // @ts-expect-error - TS2339 - Property 'userAgent' does not exist on type 'ElectronRecorderApp'. | TS2531 - Object is possibly 'null'. this.userAgent = this.origUA.replace(/ Electron[^\s]+/, ""); + // @ts-expect-error - TS2339 - Property 'userAgent' does not exist on type 'ElectronRecorderApp'. app.userAgentFallback = this.userAgent; } @@ -114,12 +134,15 @@ class ElectronRecorderApp extends ElectronReplayApp return "index.html"; } + // @ts-expect-error - TS7006 - Parameter 'argv' implicitly has an 'any' type. createMainWindow(argv) { const theWindow = super.createMainWindow(argv); - theWindow.on("close", async (event) => { + theWindow.on("close", (event) => { + // @ts-expect-error - TS2339 - Property 'recorders' does not exist on type 'ElectronRecorderApp'. if (this.recorders.size) { event.preventDefault(); + // @ts-expect-error - TS2339 - Property 'returnValue' does not exist on type '{ preventDefault: () => void; readonly defaultPrevented: boolean; }'. event.returnValue = false; this.handleClose(theWindow); return false; @@ -129,6 +152,7 @@ class ElectronRecorderApp extends ElectronReplayApp return theWindow; } + // @ts-expect-error - TS7006 - Parameter 'theWindow' implicitly has an 'any' type. async handleClose(theWindow) { const res = await dialog.showMessageBox(theWindow, { type: "question", @@ -136,7 +160,8 @@ class ElectronRecorderApp extends ElectronReplayApp defaultId: 1, cancelId: 0, title: "Stop Archiving and Quit", - message: `There are still ${this.recorders.size} active archiving sessions. Stop all and quit?` + // @ts-expect-error - TS2339 - Property 'recorders' does not exist on type 'ElectronRecorderApp'. + message: `There are still ${this.recorders.size} active archiving sessions. Stop all and quit?`, }); // not closing @@ -146,6 +171,7 @@ class ElectronRecorderApp extends ElectronReplayApp const promises = []; + // @ts-expect-error - TS2339 - Property 'recorders' does not exist on type 'ElectronRecorderApp'. for (const rec of this.recorders.values()) { promises.push(rec.shutdownPromise); //rec.detach(); @@ -157,9 +183,12 @@ class ElectronRecorderApp extends ElectronReplayApp app.exit(0); } - createRecordWindow({url, collId = "", startRec = true, autorun = false} = {}) { - console.log("start rec window: " + url); - + createRecordWindow({ + url = "", + collId = "", + startRec = true, + autorun = false, + } = {}) { const recWindow = new BrowserWindow({ width: this.screenSize.width, height: this.screenSize.height, @@ -168,8 +197,8 @@ class ElectronRecorderApp extends ElectronReplayApp webPreferences: { contextIsolation: true, webviewTag: true, - preload: path.join(__dirname, "rec-preload.js") - } + preload: path.join(__dirname, "rec-preload.js"), + }, }); recWindow.webContents.on("did-attach-webview", (event, contents) => { @@ -181,62 +210,92 @@ class ElectronRecorderApp extends ElectronReplayApp return recWindow; } - async initRecorder(recWindow, recWebContents, url, collId, startRec, autorun, popupView = null) { + async initRecorder( + // @ts-expect-error - TS7006 - Parameter 'recWindow' implicitly has an 'any' type. + recWindow, + // @ts-expect-error - TS7006 - Parameter 'recWebContents' implicitly has an 'any' type. + recWebContents, + // @ts-expect-error - TS7006 - Parameter 'url' implicitly has an 'any' type. + url, + // @ts-expect-error - TS7006 - Parameter 'collId' implicitly has an 'any' type. + collId, + // @ts-expect-error - TS7006 - Parameter 'startRec' implicitly has an 'any' type. + startRec, + // @ts-expect-error - TS7006 - Parameter 'autorun' implicitly has an 'any' type. + autorun, + //popupView = null, + ) { const id = recWebContents.id; const recorder = new ElectronRecorder({ recWC: recWebContents, + // @ts-expect-error - TS2531 - Object is possibly 'null'. appWC: this.mainWindow.webContents, recWindow, collId, autorun, - popup: popupView, + popup: null, staticPrefix: this.staticContentPath, + // @ts-expect-error - TS2339 - Property 'userAgent' does not exist on type 'ElectronRecorderApp'. userAgent: this.userAgent, }); + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. recWindow.on("close", (event) => { console.log("closing..."); event.preventDefault(); recorder.shutdown().then(() => { + // @ts-expect-error - TS2339 - Property 'recorders' does not exist on type 'ElectronRecorderApp'. this.recorders.delete(id); }); }); - const newWinContents = popupView ? popupView.webContents : recWindow.webContents; + const newWinContents = recWindow.webContents; - newWinContents.on("new-window", (event, url) => { - event.preventDefault(); + newWinContents.setWindowOpenHandler((details: HandlerDetails) => { + const { url } = details; if (url.startsWith(STATIC_PREFIX)) { - this.mainWindow.loadURL(url); - this.mainWindow.show(); + this.mainWindow!.loadURL(url); + this.mainWindow!.show(); + return { action: "deny" }; } + + return { action: "allow" }; }); ipcMain.on("popup-msg-" + id, async (event, msg) => { switch (msg.type) { - case "startRecording": - await recorder.attach(); - recWebContents.reload(); - break; - - case "stopRecording": - await recorder.detach(); - break; - - case "toggleBehaviors": - await recorder.toggleBehaviors(); - break; + case "startRecording": + await recorder.attach(); + recWebContents.reload(); + break; + + case "stopRecording": + await recorder.detach(); + break; + + case "toggleBehaviors": + await recorder.toggleBehaviors(); + break; } }); - recWebContents.on("new-window", (event, url, frameName, disposition, options, additionalFeatures, referrer) => { - event.preventDefault(); - event.newGuest = this.createRecordWindow({url, collId, startRec}); - console.log("new-window", url, frameName, disposition, options, additionalFeatures, referrer); - }); + recWebContents.setWindowOpenHandler( + (details: HandlerDetails): WindowOpenHandlerResponse => { + const { url } = details; + return { + action: "allow", + outlivesOpener: true, + createWindow: () => { + const win = this.createRecordWindow({ url, collId, startRec }); + return win.webContents; + }, + }; + }, + ); recWebContents.on("destroyed", () => { + // @ts-expect-error - TS2339 - Property 'recorders' does not exist on type 'ElectronRecorderApp'. this.recorders.delete(id); }); @@ -244,6 +303,7 @@ class ElectronRecorderApp extends ElectronReplayApp recWebContents.clearHistory(); + // @ts-expect-error - TS2339 - Property 'recorders' does not exist on type 'ElectronRecorderApp'. this.recorders.set(id, recorder); if (startRec) { await recorder.attach(); @@ -252,7 +312,7 @@ class ElectronRecorderApp extends ElectronReplayApp type: "status", recording: false, collId, - pageUrl: url + pageUrl: url, }); } @@ -268,5 +328,4 @@ class ElectronRecorderApp extends ElectronReplayApp } } - export { ElectronRecorderApp }; diff --git a/src/electron/electron-recorder.js b/src/electron/electron-recorder.js deleted file mode 100644 index b1ff93ed..00000000 --- a/src/electron/electron-recorder.js +++ /dev/null @@ -1,256 +0,0 @@ -/*eslint-env node */ - -import { Recorder } from "../recorder"; - -import path from "path"; -import fs from "fs"; -import mime from "mime-types"; - -const DEBUG = false; - -const PROXY_URL = "https://proxy.archiveweb.page/"; - - -// =========================================================================== -class ElectronRecorder extends Recorder -{ - constructor({recWC, appWC, collId, staticPrefix, recWindow, popup, autorun, userAgent}) { - super(); - this.appWC = appWC; - this.collId = collId; - - this.popup = popup; - - this.staticPrefix = staticPrefix; - - this.recWC = recWC; - this.debugger = recWC.debugger; - - this.recWindow = recWindow; - this.frameWC = recWindow.webContents; - - this.flatMode = true; - - this.autorun = autorun; - - this.defaultFetchOpts.headers = { - "User-Agent": userAgent - }; - - this.shutdownPromise = new Promise((resolve) => this._shutdownResolve = resolve); - - this.recWC.on("did-navigate", (event, url) => { - this.didNavigateInitPage(url); - }); - - this.appWC.on("ipc-message", (event, channel, size) => { - if (channel === "inc-size") { - this.sizeNew += size; - this._cacheSessionNew += size; - } - }); - - this.debugger.on("detach", (event, reason) => { - console.log("detached", reason); - this._stop(); - }); - - this.debugger.on("message", (event, message, params, sessionId) => { - if (DEBUG) { - console.log(" <= ", message); - } - const sessions = sessionId ? [sessionId] : []; - this.processMessage(message, params, sessions); - }); - - this.recWC.on("page-favicon-updated", (event, favicons) => { - this.favicons = favicons; - for (const icon of favicons) { - //this.recWC.send("async-fetch", {url: icon}); - this.doAsyncFetch({url: icon}); - } - }); - } - - async shutdown() { - await this.detach(); - this.recWindow.destroy(); - this._shutdownResolve(); - } - - getExternalInjectURL(path) { - return PROXY_URL + path; - } - - // Electron seems to not always pass through Page.frameNavigated events, so handle via 'did-navigate' instead - didNavigateInitPage(url) { - if (!this.running || url === "about:blank") { - return; - } - - if (this.nextFrameId) { - if (this.nextFrameId != this.frameId) { - this.historyMap = {}; - } - - this.frameId = this.nextFrameId; - this.nextFrameId = null; - } - - this._initNewPage(url, ""); - } - - initPage(/*params, sessions*/) { - // not called consistently, so just using didNavigateInitPage - return false; - } - - async processMessage(method, params, sessions) { - if (await super.processMessage(method, params, sessions)) { - return true; - } - - switch (method) { - case "Page.frameStartedLoading": - this.nextFrameId = params.frameId; - break; - - case "Page.frameStoppedLoading": - this.nextFrameId = null; - break; - } - } - - async handlePaused(params, sessions) { - if (!params.request.url.startsWith(PROXY_URL)) { - return await super.handlePaused(params, sessions); - } - - this.removeReqResp(params.networkId || params.requestId); - - //console.log(params.request.method + " " + params.request.url); - const headers = new Headers(params.request.headers); - - // try serve static file from app dir - let filename = params.request.url.slice(PROXY_URL.length).split("?", 1)[0]; - filename = filename.split("#", 1)[0]; - - let ext = path.extname(filename); - if (!ext) { - ext = ".html"; - filename += ext; - } - - const fullPath = path.join(this.staticPrefix, filename); - - const data = await fs.promises.readFile(fullPath); - - const base64Str = data.toString("base64"); - - const responseHeaders = []; - - const origin = headers.get("origin"); - - const mimeType = mime.contentType(ext); - - console.log("PROXY (not recording): " + fullPath); - - if (origin) { - responseHeaders.push({name: "Access-Control-Allow-Origin", value: origin}); - } - - if (mimeType) { - responseHeaders.push({name: "Content-Type", value: mimeType}); - } - - try { - await this.send("Fetch.fulfillRequest", - {"requestId": params.requestId, - "responseCode": 200, - "responseHeaders": responseHeaders, - "body": base64Str - }, sessions); - } catch (e) { - console.warn(e); - } - } - - _doDetach() { - try { - this.debugger.detach(); - } catch (e) { - console.warn(e); - } - - return Promise.resolve(); - } - - _doAttach() { - this.debugger.attach("1.3"); - this.started = this.start(); - - return this.started; - } - - _doStop() { - // send msg - this.doUpdateStatus(); - } - - doUpdateStatus() { - const stats = this.getStatusMsg(); - //console.log(stats); - if (this.frameWC) { - this.frameWC.send("stats", stats); - } - if (this.popup && this.popup.webContents) { - this.popup.webContents.send("popup", stats); - } - } - - getFavIcon() { - return this.favicons && this.favicons.length ? this.favicons[0] : null; - } - - async _doAddResource(data) { - // if (data.url.startsWith(PROXY_URL)) { - // return 0; - // } - - //console.log("res", data.url); - - // size updated asynchronously via 'inc-size' event - this.appWC.send("add-resource", data, this.collId); - return 0; - } - - _doAddPage() { - this.appWC.send("add-page", this.pageInfo, this.collId); - } - - _doIncSizes(totalSize, writtenSize) { - this.appWC.send("inc-sizes", totalSize, writtenSize, this.collId); - } - - _doSendCommand(method, params, promise) { - if (DEBUG) { - console.log(" => ", method, params); - } - try { - const p = this.debugger.sendCommand(method, params); - return promise ? promise : p; - } catch (e) { - console.warn(e); - } - } - - _doSendCommandFlat(method, params, sessionId) { - try { - return this.debugger.sendCommand(method, params, sessionId); - } catch(e) { - console.warn(e); - } - } -} - -export { ElectronRecorder }; diff --git a/src/electron/electron-recorder.ts b/src/electron/electron-recorder.ts new file mode 100644 index 00000000..36c7323d --- /dev/null +++ b/src/electron/electron-recorder.ts @@ -0,0 +1,337 @@ +/*eslint-env node */ + +import { Recorder } from "../recorder"; + +import path from "path"; +import fs from "fs"; +// @ts-expect-error - TS7016 - Could not find a declaration file for module 'mime-types'. '/Users/emma/Work/Webrecorder/archiveweb.page/node_modules/mime-types/index.js' implicitly has an 'any' type. +import mime from "mime-types"; + +const DEBUG = false; + +const PROXY_URL = "https://proxy.archiveweb.page/"; + +// =========================================================================== +class ElectronRecorder extends Recorder { + constructor({ + // @ts-expect-error - TS7031 - Binding element 'recWC' implicitly has an 'any' type. + recWC, + // @ts-expect-error - TS7031 - Binding element 'appWC' implicitly has an 'any' type. + appWC, + // @ts-expect-error - TS7031 - Binding element 'collId' implicitly has an 'any' type. + collId, + // @ts-expect-error - TS7031 - Binding element 'staticPrefix' implicitly has an 'any' type. + staticPrefix, + // @ts-expect-error - TS7031 - Binding element 'recWindow' implicitly has an 'any' type. + recWindow, + // @ts-expect-error - TS7031 - Binding element 'popup' implicitly has an 'any' type. + popup, + // @ts-expect-error - TS7031 - Binding element 'autorun' implicitly has an 'any' type. + autorun, + // @ts-expect-error - TS7031 - Binding element 'userAgent' implicitly has an 'any' type. + userAgent, + }) { + super(); + // @ts-expect-error - TS2339 - Property 'appWC' does not exist on type 'ElectronRecorder'. + this.appWC = appWC; + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'ElectronRecorder'. + this.collId = collId; + + // @ts-expect-error - TS2339 - Property 'popup' does not exist on type 'ElectronRecorder'. + this.popup = popup; + + // @ts-expect-error - TS2339 - Property 'staticPrefix' does not exist on type 'ElectronRecorder'. + this.staticPrefix = staticPrefix; + + // @ts-expect-error - TS2339 - Property 'recWC' does not exist on type 'ElectronRecorder'. + this.recWC = recWC; + // @ts-expect-error - TS2339 - Property 'debugger' does not exist on type 'ElectronRecorder'. + this.debugger = recWC.debugger; + + // @ts-expect-error - TS2339 - Property 'recWindow' does not exist on type 'ElectronRecorder'. + this.recWindow = recWindow; + // @ts-expect-error - TS2339 - Property 'frameWC' does not exist on type 'ElectronRecorder'. + this.frameWC = recWindow.webContents; + + // @ts-expect-error - TS2339 - Property 'flatMode' does not exist on type 'ElectronRecorder'. + this.flatMode = true; + + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'ElectronRecorder'. + this.autorun = autorun; + + // @ts-expect-error - TS2339 - Property 'defaultFetchOpts' does not exist on type 'ElectronRecorder'. + this.defaultFetchOpts.headers = { + "User-Agent": userAgent, + }; + + // @ts-expect-error - TS2339 - Property 'shutdownPromise' does not exist on type 'ElectronRecorder'. + this.shutdownPromise = new Promise( + // @ts-expect-error - TS2339 - Property '_shutdownResolve' does not exist on type 'ElectronRecorder'. + (resolve) => (this._shutdownResolve = resolve), + ); + + // @ts-expect-error - TS2339 - Property 'recWC' does not exist on type 'ElectronRecorder'. + this.recWC.on("did-navigate", (event, url) => { + this.didNavigateInitPage(url); + }); + + // @ts-expect-error - TS2339 - Property 'appWC' does not exist on type 'ElectronRecorder'. + this.appWC.on("ipc-message", (event, channel, size) => { + if (channel === "inc-size") { + // @ts-expect-error - TS2339 - Property 'sizeNew' does not exist on type 'ElectronRecorder'. + this.sizeNew += size; + // @ts-expect-error - TS2339 - Property '_cacheSessionNew' does not exist on type 'ElectronRecorder'. + this._cacheSessionNew += size; + } + }); + + // @ts-expect-error - TS2339 - Property 'debugger' does not exist on type 'ElectronRecorder'. + this.debugger.on("detach", (event, reason) => { + console.log("detached", reason); + this._stop(); + }); + + // @ts-expect-error - TS2339 - Property 'debugger' does not exist on type 'ElectronRecorder'. + this.debugger.on("message", (event, message, params, sessionId) => { + if (DEBUG) { + console.log(" <= ", message); + } + const sessions = sessionId ? [sessionId] : []; + this.processMessage(message, params, sessions); + }); + + // @ts-expect-error - TS2339 - Property 'recWC' does not exist on type 'ElectronRecorder'. + this.recWC.on("page-favicon-updated", (event, favicons) => { + // @ts-expect-error - TS2339 - Property 'favicons' does not exist on type 'ElectronRecorder'. + this.favicons = favicons; + for (const icon of favicons) { + //this.recWC.send("async-fetch", {url: icon}); + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 1. + this.doAsyncFetch({ url: icon }); + } + }); + } + + async shutdown() { + await this.detach(); + // @ts-expect-error - TS2339 - Property 'recWindow' does not exist on type 'ElectronRecorder'. + this.recWindow.destroy(); + // @ts-expect-error - TS2339 - Property '_shutdownResolve' does not exist on type 'ElectronRecorder'. + this._shutdownResolve(); + } + + // @ts-expect-error - TS7006 - Parameter 'path' implicitly has an 'any' type. + getExternalInjectURL(path) { + return PROXY_URL + path; + } + + // Electron seems to not always pass through Page.frameNavigated events, so handle via 'did-navigate' instead + // @ts-expect-error - TS7006 - Parameter 'url' implicitly has an 'any' type. + didNavigateInitPage(url) { + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'ElectronRecorder'. + if (!this.running || url === "about:blank") { + return; + } + + // @ts-expect-error - TS2339 - Property 'nextFrameId' does not exist on type 'ElectronRecorder'. + if (this.nextFrameId) { + // @ts-expect-error - TS2339 - Property 'nextFrameId' does not exist on type 'ElectronRecorder'. | TS2339 - Property 'frameId' does not exist on type 'ElectronRecorder'. + if (this.nextFrameId != this.frameId) { + // @ts-expect-error - TS2339 - Property 'historyMap' does not exist on type 'ElectronRecorder'. + this.historyMap = {}; + } + + // @ts-expect-error - TS2339 - Property 'frameId' does not exist on type 'ElectronRecorder'. | TS2339 - Property 'nextFrameId' does not exist on type 'ElectronRecorder'. + this.frameId = this.nextFrameId; + // @ts-expect-error - TS2339 - Property 'nextFrameId' does not exist on type 'ElectronRecorder'. + this.nextFrameId = null; + } + + this._initNewPage(url, ""); + } + + initPage(/*params, sessions*/) { + // not called consistently, so just using didNavigateInitPage + return false; + } + + // @ts-expect-error - TS7006 - Parameter 'method' implicitly has an 'any' type. | TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async processMessage(method, params, sessions) { + if (await super.processMessage(method, params, sessions)) { + return true; + } + + switch (method) { + case "Page.frameStartedLoading": + // @ts-expect-error - TS2339 - Property 'nextFrameId' does not exist on type 'ElectronRecorder'. + this.nextFrameId = params.frameId; + break; + + case "Page.frameStoppedLoading": + // @ts-expect-error - TS2339 - Property 'nextFrameId' does not exist on type 'ElectronRecorder'. + this.nextFrameId = null; + break; + } + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async handlePaused(params, sessions) { + if (!params.request.url.startsWith(PROXY_URL)) { + return await super.handlePaused(params, sessions); + } + + this.removeReqResp(params.networkId || params.requestId); + + //console.log(params.request.method + " " + params.request.url); + const headers = new Headers(params.request.headers); + + // try serve static file from app dir + let filename = params.request.url.slice(PROXY_URL.length).split("?", 1)[0]; + filename = filename.split("#", 1)[0]; + + let ext = path.extname(filename); + if (!ext) { + ext = ".html"; + filename += ext; + } + + // @ts-expect-error - TS2339 - Property 'staticPrefix' does not exist on type 'ElectronRecorder'. + const fullPath = path.join(this.staticPrefix, filename); + + const data = await fs.promises.readFile(fullPath); + + const base64Str = data.toString("base64"); + + const responseHeaders: { name: string; value: string }[] = []; + + const origin = headers.get("origin"); + + const mimeType = mime.contentType(ext); + + console.log("PROXY (not recording): " + fullPath); + + if (origin) { + responseHeaders.push({ + name: "Access-Control-Allow-Origin", + value: origin, + }); + } + + if (mimeType) { + responseHeaders.push({ name: "Content-Type", value: mimeType }); + } + + try { + await this.send( + "Fetch.fulfillRequest", + // @ts-expect-error - TS2345 - Argument of type '{ requestId: any; responseCode: number; responseHeaders: never[]; body: string; }' is not assignable to parameter of type 'null | undefined'. + { + requestId: params.requestId, + responseCode: 200, + responseHeaders: responseHeaders, + body: base64Str, + }, + sessions, + ); + } catch (e) { + console.warn(e); + } + } + + _doDetach() { + try { + // @ts-expect-error - TS2339 - Property 'debugger' does not exist on type 'ElectronRecorder'. + this.debugger.detach(); + } catch (e) { + console.warn(e); + } + + return Promise.resolve(); + } + + _doAttach() { + // @ts-expect-error - TS2339 - Property 'debugger' does not exist on type 'ElectronRecorder'. + this.debugger.attach("1.3"); + // @ts-expect-error - TS2551 - Property 'started' does not exist on type 'ElectronRecorder'. Did you mean 'start'? + this.started = this.start(); + + // @ts-expect-error - TS2551 - Property 'started' does not exist on type 'ElectronRecorder'. Did you mean 'start'? + return this.started; + } + + _doStop() { + // send msg + this.doUpdateStatus(); + } + + doUpdateStatus() { + const stats = this.getStatusMsg(); + //console.log(stats); + // @ts-expect-error - TS2339 - Property 'frameWC' does not exist on type 'ElectronRecorder'. + if (this.frameWC) { + // @ts-expect-error - TS2339 - Property 'frameWC' does not exist on type 'ElectronRecorder'. + this.frameWC.send("stats", stats); + } + // @ts-expect-error - TS2339 - Property 'popup' does not exist on type 'ElectronRecorder'. | TS2339 - Property 'popup' does not exist on type 'ElectronRecorder'. + if (this.popup?.webContents) { + // @ts-expect-error - TS2339 - Property 'popup' does not exist on type 'ElectronRecorder'. + this.popup.webContents.send("popup", stats); + } + } + + getFavIcon() { + // @ts-expect-error - TS2339 - Property 'favicons' does not exist on type 'ElectronRecorder'. | TS2339 - Property 'favicons' does not exist on type 'ElectronRecorder'. | TS2339 - Property 'favicons' does not exist on type 'ElectronRecorder'. + return this.favicons?.length ? this.favicons[0] : null; + } + + // @ts-expect-error - TS7006 - Parameter 'data' implicitly has an 'any' type. + _doAddResource(data) { + // if (data.url.startsWith(PROXY_URL)) { + // return 0; + // } + + //console.log("res", data.url); + + // size updated asynchronously via 'inc-size' event + // @ts-expect-error - TS2339 - Property 'appWC' does not exist on type 'ElectronRecorder'. | TS2339 - Property 'collId' does not exist on type 'ElectronRecorder'. + this.appWC.send("add-resource", data, this.collId); + return 0; + } + + _doAddPage() { + // @ts-expect-error - TS2339 - Property 'appWC' does not exist on type 'ElectronRecorder'. | TS2339 - Property 'pageInfo' does not exist on type 'ElectronRecorder'. | TS2339 - Property 'collId' does not exist on type 'ElectronRecorder'. + this.appWC.send("add-page", this.pageInfo, this.collId); + } + + // @ts-expect-error - TS7006 - Parameter 'totalSize' implicitly has an 'any' type. | TS7006 - Parameter 'writtenSize' implicitly has an 'any' type. + _doIncSizes(totalSize, writtenSize) { + // @ts-expect-error - TS2339 - Property 'appWC' does not exist on type 'ElectronRecorder'. | TS2339 - Property 'collId' does not exist on type 'ElectronRecorder'. + this.appWC.send("inc-sizes", totalSize, writtenSize, this.collId); + } + + // @ts-expect-error - TS7006 - Parameter 'method' implicitly has an 'any' type. | TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'promise' implicitly has an 'any' type. + _doSendCommand(method, params, promise) { + if (DEBUG) { + console.log(" => ", method, params); + } + try { + // @ts-expect-error - TS2339 - Property 'debugger' does not exist on type 'ElectronRecorder'. + const p = this.debugger.sendCommand(method, params); + return promise ? promise : p; + } catch (e) { + console.warn(e); + } + } + + // @ts-expect-error - TS7006 - Parameter 'method' implicitly has an 'any' type. | TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessionId' implicitly has an 'any' type. + _doSendCommandFlat(method, params, sessionId) { + try { + // @ts-expect-error - TS2339 - Property 'debugger' does not exist on type 'ElectronRecorder'. + return this.debugger.sendCommand(method, params, sessionId); + } catch (e) { + console.warn(e); + } + } +} + +export { ElectronRecorder }; diff --git a/src/electron/rec-preload.js b/src/electron/rec-preload.ts similarity index 56% rename from src/electron/rec-preload.js rename to src/electron/rec-preload.ts index e78ac55c..cac7b278 100644 --- a/src/electron/rec-preload.js +++ b/src/electron/rec-preload.ts @@ -3,12 +3,12 @@ const { ipcRenderer, contextBridge } = require("electron"); ipcRenderer.on("stats", (event, stats) => { - window.postMessage({stats}, window.location.origin); + window.postMessage({ stats }, window.location.origin); }); contextBridge.exposeInMainWorld("archivewebpage", { + // @ts-expect-error - TS7006 - Parameter 'id' implicitly has an 'any' type. | TS7006 - Parameter 'msg' implicitly has an 'any' type. sendMsg: (id, msg) => { ipcRenderer.send("popup-msg-" + id, msg); - } + }, }); - diff --git a/src/electron/rec-window.html b/src/electron/rec-window.html index edb5def5..a539de0d 100644 --- a/src/electron/rec-window.html +++ b/src/electron/rec-window.html @@ -1,19 +1,21 @@ - + - - - - - - - + + + + + + + + diff --git a/src/electron/rec-window.js b/src/electron/rec-window.js deleted file mode 100644 index aee3524a..00000000 --- a/src/electron/rec-window.js +++ /dev/null @@ -1,337 +0,0 @@ -import { LitElement, html, css, wrapCss, clickOnSpacebarPress } from "replaywebpage/src/misc"; - -import fasRefresh from "@fortawesome/fontawesome-free/svgs/solid/redo-alt.svg"; -//import fasFullscreen from '@fortawesome/fontawesome-free/svgs/solid/desktop.svg'; -//import fasUnfullscreen from '@fortawesome/fontawesome-free/svgs/solid/compress-arrows-alt.svg'; - -import fasLeft from "@fortawesome/fontawesome-free/svgs/solid/arrow-left.svg"; -import fasRight from "@fortawesome/fontawesome-free/svgs/solid/arrow-right.svg"; -//import fasMenuV from '@fortawesome/fontawesome-free/svgs/solid/ellipsis-v.svg'; - -import awpLogo from "../assets/brand/archivewebpage-icon-color.svg"; - -import "./app-popup"; -import { BEHAVIOR_RUNNING } from "../consts"; - -class RecWindowUI extends LitElement -{ - constructor() { - super(); - this.url = "about:blank"; - this.isLoading = false; - this.favIconUrl = null; - this.favIcons = null; - - this.canGoBack = false; - this.canGoForward = false; - - this.showPopup = false; - - this.initStats(); - } - - initStats() { - this.stats = null; - this.numPending = 0; - - window.addEventListener("message", (event) => { - if (event.data.stats) { - this.stats = event.data.stats; - this.recording = this.stats.recording; - this.numPending = this.stats.numPending; - this.autorun = this.stats.behaviorState === BEHAVIOR_RUNNING; - } - }); - } - - static get properties() { - return { - isLoading: { type: Boolean }, - favIconUrl: { type: String }, - url: { type: String }, - - canGoBack: { type: Boolean }, - canGoForward: { type: Boolean }, - - stats: { type: Object }, - numPending: { type: Number }, - recording: { type: Boolean }, - autorun: { type: Boolean }, - - showPopup: { type: Boolean }, - wcId: { type: Number } - }; - } - - static get styles() { - return wrapCss(css` - :host { - width: 100%; - height: 100%; - } - - webview { - width: 100%; - height: 100%; - } - - wr-app-popup { - z-index: 200; - width: 400px; - background: white; - position: fixed; - height: fit-content; - box-sizing: content-box; - top: 50px; - right: 0px; - padding: 8px; - border: 1px grey; - box-shadow: grey 1px 1px 4px; - } - - .location-bar { - margin: 4px 4px 0px 0px; - padding-bottom: 4px; - width: 100%; - background-color: white; - border-bottom: solid .1rem #97989A; - } - - .is-borderless { - border: 0px; - } - - input#url { - border-radius: 4px; - } - - a.button.is-borderless { - padding: 0.8em; - } - - .favicon img { - width: 20px; - height: 20px; - filter: drop-shadow(1px 1px 2px grey); - } - - form { - width: 100%; - margin: 0px 8px; - } - - .grey-disabled { - --fa-icon-fill-color: lightgrey; - color: lightgrey; - } - - #wr-button.button { - padding: 0 1.5em 0 1.0em; - } - - #wr-button .icon { - position: relative; - } - - .overlay { - position: absolute; - z-index: 20; - width: 16px; - height: 16px; - bottom: 0px; - right: 0px; - margin-right: -4px; - margin-bottom: -3px; - border: 2px solid white; - border-radius: 4px; - font-size: 9px; - color: white; - } - - .overlay-idle { - background-color: #4D7C0F; - } - - .overlay-waiting { - background-color: #C5A802; - } - - .overlay-auto { - background-color: #0891B2; - } - - `); - } - - render() { - return html` - - ${this.renderWebView()} - ${this.renderPopup()} - `; - } - - renderWebView() { - return html` - - `; - } - - renderPopup() { - if (!this.showPopup) { - return; - } - - return html` - - - `; - } - - onSendMsg(event) { - const msg = event.detail; - - const webview = this.renderRoot.querySelector("webview"); - - if (webview && window.archivewebpage.sendMsg) { - window.archivewebpage.sendMsg(webview.getWebContentsId(), msg); - } - } - - onFaviconUpdated(event) { - this.favIcons = event.favicons; - this.tryNextIcon(); - } - - onWillNavigate(event) { - this.url = event.url; - - this.canGoBack = event.currentTarget.canGoBack(); - this.canGoForward = event.currentTarget.canGoForward(); - } - - onDidNavigate(event) { - this.url = event.url; - - this.canGoBack = event.currentTarget.canGoBack(); - this.canGoForward = event.currentTarget.canGoForward(); - this.isLoading = false; - } - - onDidNavigateInPage(event) { - this.url = event.url; - - this.canGoBack = event.currentTarget.canGoBack(); - this.canGoForward = event.currentTarget.canGoForward(); - } - - onTogglePopup() { - //ipcRenderer.send("popup-toggle-" + this.wcId); - this.showPopup = !this.showPopup; - } - - async tryNextIcon() { - this.favIconUrl = (this.favIcons && this.favIcons.length) ? this.favIcons.shift() : null; - } - - onGoBack() { - const webview = this.renderRoot.querySelector("webview"); - if (webview && this.canGoBack) { - webview.goBack(); - } - } - - onGoForward() { - const webview = this.renderRoot.querySelector("webview"); - if (webview && this.canGoForward) { - webview.goForward(); - } - } - - onRefresh() { - const webview = this.renderRoot.querySelector("webview"); - if (webview) { - webview.reload(); - } - } - - onSubmit(event) { - event.preventDefault(); - const input = this.renderRoot.querySelector("input"); - const webview = this.renderRoot.querySelector("webview"); - - if (webview && input.value) { - webview.loadURL(input.value); - } else { - input.value = this.url; - } - } - - onKeyDown(event) { - if (event.key === "Esc" || event.key === "Escape") { - event.preventDefault(); - event.currentTarget.value = this.url; - } - } - - onLostFocus(event) { - if (!event.currentTarget.value) { - event.currentTarget.value = this.url; - } - } -} - -customElements.define("wr-rec-ui", RecWindowUI); - -export { RecWindowUI }; diff --git a/src/electron/rec-window.ts b/src/electron/rec-window.ts new file mode 100644 index 00000000..c46918d4 --- /dev/null +++ b/src/electron/rec-window.ts @@ -0,0 +1,505 @@ +import { + LitElement, + html, + css, + wrapCss, + clickOnSpacebarPress, +} from "replaywebpage"; + +import fasRefresh from "@fortawesome/fontawesome-free/svgs/solid/redo-alt.svg"; +//import fasFullscreen from '@fortawesome/fontawesome-free/svgs/solid/desktop.svg'; +//import fasUnfullscreen from '@fortawesome/fontawesome-free/svgs/solid/compress-arrows-alt.svg'; + +import fasLeft from "@fortawesome/fontawesome-free/svgs/solid/arrow-left.svg"; +import fasRight from "@fortawesome/fontawesome-free/svgs/solid/arrow-right.svg"; +//import fasMenuV from '@fortawesome/fontawesome-free/svgs/solid/ellipsis-v.svg'; + +import awpLogo from "../assets/brand/archivewebpage-icon-color.svg"; + +import "./app-popup"; +import { BEHAVIOR_RUNNING } from "../consts"; + +class RecWindowUI extends LitElement { + constructor() { + super(); + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RecWindowUI'. + this.url = "about:blank"; + // @ts-expect-error - TS2339 - Property 'isLoading' does not exist on type 'RecWindowUI'. + this.isLoading = false; + // @ts-expect-error - TS2339 - Property 'favIconUrl' does not exist on type 'RecWindowUI'. + this.favIconUrl = null; + // @ts-expect-error - TS2339 - Property 'favIcons' does not exist on type 'RecWindowUI'. + this.favIcons = null; + + // @ts-expect-error - TS2551 - Property 'canGoBack' does not exist on type 'RecWindowUI'. Did you mean 'onGoBack'? + this.canGoBack = false; + // @ts-expect-error - TS2551 - Property 'canGoForward' does not exist on type 'RecWindowUI'. Did you mean 'onGoForward'? + this.canGoForward = false; + + // @ts-expect-error - TS2339 - Property 'showPopup' does not exist on type 'RecWindowUI'. + this.showPopup = false; + + this.initStats(); + } + + initStats() { + // @ts-expect-error - TS2339 - Property 'stats' does not exist on type 'RecWindowUI'. + this.stats = null; + // @ts-expect-error - TS2339 - Property 'numPending' does not exist on type 'RecWindowUI'. + this.numPending = 0; + + window.addEventListener("message", (event) => { + if (event.data.stats) { + // @ts-expect-error - TS2339 - Property 'stats' does not exist on type 'RecWindowUI'. + this.stats = event.data.stats; + // @ts-expect-error - TS2339 - Property 'recording' does not exist on type 'RecWindowUI'. | TS2339 - Property 'stats' does not exist on type 'RecWindowUI'. + this.recording = this.stats.recording; + // @ts-expect-error - TS2339 - Property 'numPending' does not exist on type 'RecWindowUI'. | TS2339 - Property 'stats' does not exist on type 'RecWindowUI'. + this.numPending = this.stats.numPending; + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'RecWindowUI'. | TS2339 - Property 'stats' does not exist on type 'RecWindowUI'. + this.autorun = this.stats.behaviorState === BEHAVIOR_RUNNING; + } + }); + } + + static get properties() { + return { + isLoading: { type: Boolean }, + favIconUrl: { type: String }, + url: { type: String }, + + canGoBack: { type: Boolean }, + canGoForward: { type: Boolean }, + + stats: { type: Object }, + numPending: { type: Number }, + recording: { type: Boolean }, + autorun: { type: Boolean }, + + showPopup: { type: Boolean }, + wcId: { type: Number }, + }; + } + + static get styles() { + return wrapCss(css` + :host { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + } + + webview { + width: 100%; + height: 100%; + } + + wr-app-popup { + z-index: 200; + width: 400px; + background: white; + position: fixed; + height: fit-content; + box-sizing: content-box; + top: 50px; + right: 0px; + padding: 8px; + border: 1px grey; + box-shadow: grey 1px 1px 4px; + } + + .location-bar { + margin: 4px 4px 0px 0px; + padding-bottom: 4px; + width: 100%; + background-color: white; + border-bottom: solid 0.1rem #97989a; + } + + .is-borderless { + border: 0px; + } + + input#url { + border-radius: 4px; + } + + a.button.is-borderless { + padding: 0.8em; + } + + .favicon img { + width: 20px; + height: 20px; + filter: drop-shadow(1px 1px 2px grey); + } + + form { + width: 100%; + margin: 0px 8px; + } + + .grey-disabled { + --fa-icon-fill-color: lightgrey; + color: lightgrey; + } + + #wr-button.button { + padding: 0 1.5em 0 1em; + } + + #wr-button .icon { + position: relative; + } + + .overlay { + position: absolute; + z-index: 20; + width: 16px; + height: 16px; + bottom: 0px; + right: 0px; + margin-right: -4px; + margin-bottom: -3px; + border: 2px solid white; + border-radius: 4px; + font-size: 9px; + color: white; + } + + .overlay-idle { + background-color: #4d7c0f; + } + + .overlay-waiting { + background-color: #c5a802; + } + + .overlay-auto { + background-color: #0891b2; + } + `); + } + + render() { + return html` + + ${this.renderWebView()} ${this.renderPopup()} + `; + } + + renderWebView() { + return html` + `; + } + + renderPopup() { + // @ts-expect-error - TS2339 - Property 'showPopup' does not exist on type 'RecWindowUI'. + if (!this.showPopup) { + return; + } + + return html` + + + `; + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onSendMsg(event) { + const msg = event.detail; + + const webview = this.renderRoot.querySelector("webview"); + + // @ts-expect-error - TS2339 - Property 'archivewebpage' does not exist on type 'Window & typeof globalThis'. + if (webview && window.archivewebpage.sendMsg) { + // @ts-expect-error - TS2339 - Property 'archivewebpage' does not exist on type 'Window & typeof globalThis'. | TS2339 - Property 'getWebContentsId' does not exist on type 'Element'. + window.archivewebpage.sendMsg(webview.getWebContentsId(), msg); + } + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onFaviconUpdated(event) { + // @ts-expect-error - TS2339 - Property 'favIcons' does not exist on type 'RecWindowUI'. + this.favIcons = event.favicons; + this.tryNextIcon(); + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onWillNavigate(event) { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RecWindowUI'. + this.url = event.url; + + // @ts-expect-error - TS2551 - Property 'canGoBack' does not exist on type 'RecWindowUI'. Did you mean 'onGoBack'? + this.canGoBack = event.currentTarget.canGoBack(); + // @ts-expect-error - TS2551 - Property 'canGoForward' does not exist on type 'RecWindowUI'. Did you mean 'onGoForward'? + this.canGoForward = event.currentTarget.canGoForward(); + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onDidNavigate(event) { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RecWindowUI'. + this.url = event.url; + + // @ts-expect-error - TS2551 - Property 'canGoBack' does not exist on type 'RecWindowUI'. Did you mean 'onGoBack'? + this.canGoBack = event.currentTarget.canGoBack(); + // @ts-expect-error - TS2551 - Property 'canGoForward' does not exist on type 'RecWindowUI'. Did you mean 'onGoForward'? + this.canGoForward = event.currentTarget.canGoForward(); + // @ts-expect-error - TS2339 - Property 'isLoading' does not exist on type 'RecWindowUI'. + this.isLoading = false; + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onDidNavigateInPage(event) { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RecWindowUI'. + this.url = event.url; + + // @ts-expect-error - TS2551 - Property 'canGoBack' does not exist on type 'RecWindowUI'. Did you mean 'onGoBack'? + this.canGoBack = event.currentTarget.canGoBack(); + // @ts-expect-error - TS2551 - Property 'canGoForward' does not exist on type 'RecWindowUI'. Did you mean 'onGoForward'? + this.canGoForward = event.currentTarget.canGoForward(); + } + + onTogglePopup() { + //ipcRenderer.send("popup-toggle-" + this.wcId); + // @ts-expect-error - TS2339 - Property 'showPopup' does not exist on type 'RecWindowUI'. | TS2339 - Property 'showPopup' does not exist on type 'RecWindowUI'. + this.showPopup = !this.showPopup; + } + + tryNextIcon() { + // @ts-expect-error - TS2339 - Property 'favIconUrl' does not exist on type 'RecWindowUI'. + this.favIconUrl = + // @ts-expect-error - TS2339 - Property 'favIcons' does not exist on type 'RecWindowUI'. | TS2339 - Property 'favIcons' does not exist on type 'RecWindowUI'. | TS2339 - Property 'favIcons' does not exist on type 'RecWindowUI'. + this.favIcons?.length ? this.favIcons.shift() : null; + } + + onGoBack() { + const webview = this.renderRoot.querySelector("webview"); + // @ts-expect-error - TS2551 - Property 'canGoBack' does not exist on type 'RecWindowUI'. Did you mean 'onGoBack'? + if (webview && this.canGoBack) { + // @ts-expect-error - TS2339 - Property 'goBack' does not exist on type 'Element'. + webview.goBack(); + } + } + + onGoForward() { + const webview = this.renderRoot.querySelector("webview"); + // @ts-expect-error - TS2551 - Property 'canGoForward' does not exist on type 'RecWindowUI'. Did you mean 'onGoForward'? + if (webview && this.canGoForward) { + // @ts-expect-error - TS2339 - Property 'goForward' does not exist on type 'Element'. + webview.goForward(); + } + } + + onRefresh() { + const webview = this.renderRoot.querySelector("webview"); + if (webview) { + // @ts-expect-error - TS2339 - Property 'reload' does not exist on type 'Element'. + webview.reload(); + } + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onSubmit(event) { + event.preventDefault(); + const input = this.renderRoot.querySelector("input"); + const webview = this.renderRoot.querySelector("webview"); + + // @ts-expect-error - TS2531 - Object is possibly 'null'. + if (webview && input.value) { + // @ts-expect-error - TS2339 - Property 'loadURL' does not exist on type 'Element'. | TS2531 - Object is possibly 'null'. + webview.loadURL(input.value); + } else { + // @ts-expect-error - TS2531 - Object is possibly 'null'. | TS2339 - Property 'url' does not exist on type 'RecWindowUI'. + input.value = this.url; + } + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onKeyDown(event) { + if (event.key === "Esc" || event.key === "Escape") { + event.preventDefault(); + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RecWindowUI'. + event.currentTarget.value = this.url; + } + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onLostFocus(event) { + if (!event.currentTarget.value) { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RecWindowUI'. + event.currentTarget.value = this.url; + } + } +} + +customElements.define("wr-rec-ui", RecWindowUI); + +export { RecWindowUI }; diff --git a/src/embed.html b/src/embed.html index e2646c18..4095f3fb 100644 --- a/src/embed.html +++ b/src/embed.html @@ -1,24 +1,30 @@ - - - - - - - + + + + + + + + diff --git a/src/ext/bg-types.d.ts b/src/ext/bg-types.d.ts new file mode 100644 index 00000000..6f62f141 --- /dev/null +++ b/src/ext/bg-types.d.ts @@ -0,0 +1,11 @@ +import "../globals"; + +import type { BrowserRecorder } from "./browser-recorder"; + +declare global { + interface Window { + recorders: Record; + newRecId: string | null; + } + let chrome: TODOFixMe; +} diff --git a/src/ext/bg.js b/src/ext/bg.js deleted file mode 100644 index 5ab94c8a..00000000 --- a/src/ext/bg.js +++ /dev/null @@ -1,302 +0,0 @@ -import { BrowserRecorder } from "./browser-recorder"; - -import { CollectionLoader } from "@webrecorder/wabac/src/loaders"; - -import { listAllMsg } from "../utils"; - -import { getLocalOption, removeLocalOption, setLocalOption } from "../localstorage"; - - -// =========================================================================== -self.recorders = {}; -self.newRecId = null; - -let newRecUrl = null; -let newRecCollId = null; - -let defaultCollId = null; -let autorun = false; - -const openWinMap = new Map(); - -const collLoader = new CollectionLoader(); - -const disabledCSPTabs = new Set(); - - -// =========================================================================== - -function main() { - chrome.action.setBadgeBackgroundColor({color: "#4D7C0F"}); - - chrome.contextMenus.create({"id": "toggle-rec", "title": "Start Recording", "contexts": ["browser_action"]}); - chrome.contextMenus.create({"id": "view-rec", "title": "View Web Archives", "contexts": ["all"]}); -} - -chrome.runtime.onConnect.addListener((port) => { - switch (port.name) { - case "popup-port": - popupHandler(port); - break; - } -}); - -function popupHandler(port) { - if (!port.sender || port.sender.url !== chrome.runtime.getURL("popup.html")) { - return; - } - - let tabId = null; - - port.onMessage.addListener(async (message) => { - switch (message.type) { - case "startUpdates": - tabId = message.tabId; - if (self.recorders[tabId]) { - self.recorders[tabId].port = port; - self.recorders[tabId].doUpdateStatus(); - } - port.postMessage(await listAllMsg(collLoader)); - break; - - case "startRecording": { - const {collId, autorun} = message; - startRecorder(tabId, {collId, port, autorun}, message.url); - break; - } - - case "stopRecording": - stopRecorder(tabId); - break; - - case "toggleBehaviors": - toggleBehaviors(tabId); - break; - - case "newColl": { - const { name } = await collLoader.initNewColl({title: message.title}); - defaultCollId = name; - port.postMessage(await listAllMsg(collLoader, {defaultCollId})); - await setLocalOption("defaultCollId", defaultCollId); - break; - } - } - }); - - port.onDisconnect.addListener(() => { - if (self.recorders[tabId]) { - self.recorders[tabId].port = null; - } - }); -} - - -// =========================================================================== -chrome.debugger.onDetach.addListener((tab, reason) => { - // target closed, delete recorder as this tab will not be used again - if (reason === "target_closed") { - delete self.recorders[tab.id]; - } -}); - -// =========================================================================== -chrome.tabs.onCreated.addListener((tab) => { - if (!tab.id) { - return; - } - - let openUrl = null; - let start = false; - let waitForTabUpdate = true; - let collId = null; - - // start recording from extension in new tab use case - if (newRecUrl && tab.pendingUrl === "about:blank") { - start = true; - openUrl = newRecUrl; - collId = newRecCollId || defaultCollId; - newRecUrl = null; - newRecCollId = null; - } else if (tab.openerTabId && (!tab.pendingUrl || isValidUrl(tab.pendingUrl)) && - self.recorders[tab.openerTabId] && self.recorders[tab.openerTabId].running) { - collId = self.recorders[tab.openerTabId].collId; - - start = true; - if (tab.pendingUrl) { - waitForTabUpdate = false; - openUrl = tab.pendingUrl; - } - } - - if (start) { - if (openUrl && !isValidUrl(openUrl)) { - return; - } - startRecorder(tab.id, {waitForTabUpdate, collId, openUrl, autorun}, openUrl); - } -}); - -// =========================================================================== -chrome.tabs.onUpdated.addListener((tabId, changeInfo) => { - if (tabId && self.recorders[tabId]) { - const recorder = self.recorders[tabId]; - if (changeInfo.url) { - recorder.failureMsg = null; - } - - if (changeInfo.url && openWinMap.has(changeInfo.url)) { - openWinMap.delete(changeInfo.url); - } - - if (recorder.waitForTabUpdate) { - if (isValidUrl(changeInfo.url)) { - recorder.attach(); - } else { - recorder.waitForTabUpdate = false; - delete self.recorders[tabId]; - return; - } - } - - } else if (changeInfo.url && openWinMap.has(changeInfo.url)) { - const collId = openWinMap.get(changeInfo.url); - openWinMap.delete(changeInfo.url); - if (!tabId || !isValidUrl(changeInfo.url)) { - return; - } - startRecorder(tabId, {collId, autorun}, changeInfo.url); - } -}); - -// =========================================================================== -chrome.tabs.onRemoved.addListener((tabId) => { - delete self.recorders[tabId]; - removeLocalOption(`${tabId}-collId`); -}); - -// =========================================================================== -chrome.contextMenus.onClicked.addListener((info, tab) => { - switch (info.menuItemId) { - case "view-rec": - chrome.tabs.create({ url: chrome.runtime.getURL("index.html") }); - break; - - case "toggle-rec": - if (!isRecording(tab.id)) { - if (isValidUrl(tab.url)) { - startRecorder(tab.id); - } - } else { - stopRecorder(tab.id); - } - break; - } -}); - -// =========================================================================== -async function startRecorder(tabId, opts) { - if (!self.recorders[tabId]) { - opts.collLoader = collLoader; - opts.openWinMap = openWinMap; - self.recorders[tabId] = new BrowserRecorder({tabId}, opts); - } else { - self.recorders[tabId].setAutoRunBehavior(opts.autorun); - } - - let err = null; - - const {waitForTabUpdate} = opts; - - if (!waitForTabUpdate && !self.recorders[tabId].running) { - try { - self.recorders[tabId].setCollId(opts.collId); - await self.recorders[tabId].attach(); - } catch(e) { - console.warn(e); - err = e; - } - return err; - } -} - -// =========================================================================== -function stopRecorder(tabId) { - if (self.recorders[tabId]) { - self.recorders[tabId].detach(); - return true; - } - - return false; -} - -// =========================================================================== -function toggleBehaviors(tabId) { - if (self.recorders[tabId]) { - self.recorders[tabId].toggleBehaviors(); - return true; - } - - return false; -} - -// =========================================================================== -function isRecording(tabId) { - return self.recorders[tabId] && self.recorders[tabId].running; -} - -// =========================================================================== -function isValidUrl(url) { - return url && (url === "about:blank" || url.startsWith("https:") || url.startsWith("http:")); -} - -// =========================================================================== -chrome.runtime.onMessage.addListener(async (message, /*sender, sendResponse*/) => { - switch (message.msg) { - case "startNew": - newRecUrl = message.url; - newRecCollId = message.collId; - autorun = message.autorun; - defaultCollId = await getLocalOption("defaultCollId"); - chrome.tabs.create({url: "about:blank"}); - break; - - case "disableCSP": - disableCSPForTab(message.tabId); - break; - } -}); - -// =========================================================================== -async function disableCSPForTab(tabId) { - if (disabledCSPTabs.has(tabId)) { - return; - } - - await new Promise((resolve) => { - chrome.debugger.attach({tabId}, "1.3", () => { resolve(); }); - }); - - await new Promise((resolve) => { - chrome.debugger.sendCommand({tabId}, "Page.setBypassCSP", {enabled: true}, (resp) => resolve(resp)); - }); - - disabledCSPTabs.add(tabId); - - // hacky: don't detach if any recorders are running, otherwise will disconnect - for (const rec of Object.values(self.recorders)) { - if (rec.running) { - return; - } - } - - await new Promise((resolve) => { - chrome.debugger.detach({tabId}, () => { resolve();}); - }); -} - -// =========================================================================== -chrome.runtime.onInstalled.addListener(main); - -if (self.importScripts) { - self.importScripts("sw.js"); -} diff --git a/src/ext/bg.ts b/src/ext/bg.ts new file mode 100644 index 00000000..4dcaa982 --- /dev/null +++ b/src/ext/bg.ts @@ -0,0 +1,374 @@ +import { BrowserRecorder } from "./browser-recorder"; + +import { CollectionLoader } from "@webrecorder/wabac/swlib"; + +import { listAllMsg } from "../utils"; + +import { + getLocalOption, + removeLocalOption, + setLocalOption, +} from "../localstorage"; + +// =========================================================================== +self.recorders = {}; +self.newRecId = null; + +// @ts-expect-error - TS7034 - Variable 'newRecUrl' implicitly has type 'any' in some locations where its type cannot be determined. +let newRecUrl = null; +// @ts-expect-error - TS7034 - Variable 'newRecCollId' implicitly has type 'any' in some locations where its type cannot be determined. +let newRecCollId = null; + +// @ts-expect-error - TS7034 - Variable 'defaultCollId' implicitly has type 'any' in some locations where its type cannot be determined. +let defaultCollId = null; +let autorun = false; + +const openWinMap = new Map(); + +const collLoader = new CollectionLoader(); + +const disabledCSPTabs = new Set(); + +// =========================================================================== + +function main() { + chrome.action.setBadgeBackgroundColor({ color: "#4d7c0f" }); + + chrome.contextMenus.create({ + id: "toggle-rec", + title: "Start Recording", + contexts: ["browser_action"], + }); + chrome.contextMenus.create({ + id: "view-rec", + title: "View Web Archives", + contexts: ["all"], + }); +} + +// @ts-expect-error - TS7006 - Parameter 'port' implicitly has an 'any' type. +chrome.runtime.onConnect.addListener((port) => { + switch (port.name) { + case "popup-port": + popupHandler(port); + break; + } +}); + +// @ts-expect-error - TS7006 - Parameter 'port' implicitly has an 'any' type. +function popupHandler(port) { + if (!port.sender || port.sender.url !== chrome.runtime.getURL("popup.html")) { + return; + } + + // @ts-expect-error - TS7034 - Variable 'tabId' implicitly has type 'any' in some locations where its type cannot be determined. + let tabId = null; + + // @ts-expect-error - TS7006 - Parameter 'message' implicitly has an 'any' type. + port.onMessage.addListener(async (message) => { + switch (message.type) { + case "startUpdates": + tabId = message.tabId; + if (self.recorders[tabId]) { + // @ts-expect-error - TS2339 - Property 'port' does not exist on type 'BrowserRecorder'. + self.recorders[tabId].port = port; + self.recorders[tabId].doUpdateStatus(); + } + port.postMessage(await listAllMsg(collLoader)); + break; + + case "startRecording": { + const { collId, autorun } = message; + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 3. + startRecorder(tabId, { collId, port, autorun }, message.url); + break; + } + + case "stopRecording": + // @ts-expect-error - TS7005 - Variable 'tabId' implicitly has an 'any' type. + stopRecorder(tabId); + break; + + case "toggleBehaviors": + // @ts-expect-error - TS7005 - Variable 'tabId' implicitly has an 'any' type. + toggleBehaviors(tabId); + break; + + case "newColl": { + const { name } = await collLoader.initNewColl({ title: message.title }); + defaultCollId = name; + port.postMessage(await listAllMsg(collLoader, { defaultCollId })); + await setLocalOption("defaultCollId", defaultCollId); + break; + } + } + }); + + port.onDisconnect.addListener(() => { + // @ts-expect-error - TS2538 - Type 'null' cannot be used as an index type. + if (self.recorders[tabId]) { + // @ts-expect-error - TS2538 - Type 'null' cannot be used as an index type. + self.recorders[tabId].port = null; + } + }); +} + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'tab' implicitly has an 'any' type. | TS7006 - Parameter 'reason' implicitly has an 'any' type. +chrome.debugger.onDetach.addListener((tab, reason) => { + // target closed, delete recorder as this tab will not be used again + if (reason === "target_closed") { + delete self.recorders[tab.id]; + } +}); + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'tab' implicitly has an 'any' type. +chrome.tabs.onCreated.addListener((tab) => { + if (!tab.id) { + return; + } + + let openUrl = null; + let start = false; + let waitForTabUpdate = true; + let collId = null; + + // start recording from extension in new tab use case + // @ts-expect-error - TS7005 - Variable 'newRecUrl' implicitly has an 'any' type. + if (newRecUrl && tab.pendingUrl === "about:blank") { + start = true; + openUrl = newRecUrl; + // @ts-expect-error - TS7005 - Variable 'newRecCollId' implicitly has an 'any' type. | TS7005 - Variable 'defaultCollId' implicitly has an 'any' type. + collId = newRecCollId || defaultCollId; + newRecUrl = null; + newRecCollId = null; + } else if ( + tab.openerTabId && + (!tab.pendingUrl || isValidUrl(tab.pendingUrl)) && + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'BrowserRecorder'. + self.recorders[tab.openerTabId]?.running + ) { + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'BrowserRecorder'. + collId = self.recorders[tab.openerTabId].collId; + + start = true; + if (tab.pendingUrl) { + waitForTabUpdate = false; + openUrl = tab.pendingUrl; + } + } + + if (start) { + if (openUrl && !isValidUrl(openUrl)) { + return; + } + startRecorder( + tab.id, + { waitForTabUpdate, collId, openUrl, autorun }, + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 3. + openUrl, + ); + } +}); + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'tabId' implicitly has an 'any' type. | TS7006 - Parameter 'changeInfo' implicitly has an 'any' type. +chrome.tabs.onUpdated.addListener((tabId, changeInfo) => { + if (tabId && self.recorders[tabId]) { + const recorder = self.recorders[tabId]; + if (changeInfo.url) { + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'BrowserRecorder'. + recorder.failureMsg = null; + } + + if (changeInfo.url && openWinMap.has(changeInfo.url)) { + openWinMap.delete(changeInfo.url); + } + + // @ts-expect-error - TS2339 - Property 'waitForTabUpdate' does not exist on type 'BrowserRecorder'. + if (recorder.waitForTabUpdate) { + if (isValidUrl(changeInfo.url)) { + recorder.attach(); + } else { + // @ts-expect-error - TS2339 - Property 'waitForTabUpdate' does not exist on type 'BrowserRecorder'. + recorder.waitForTabUpdate = false; + delete self.recorders[tabId]; + return; + } + } + } else if (changeInfo.url && openWinMap.has(changeInfo.url)) { + const collId = openWinMap.get(changeInfo.url); + openWinMap.delete(changeInfo.url); + if (!tabId || !isValidUrl(changeInfo.url)) { + return; + } + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 3. + startRecorder(tabId, { collId, autorun }, changeInfo.url); + } +}); + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'tabId' implicitly has an 'any' type. +chrome.tabs.onRemoved.addListener((tabId) => { + delete self.recorders[tabId]; + removeLocalOption(`${tabId}-collId`); +}); + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'info' implicitly has an 'any' type. | TS7006 - Parameter 'tab' implicitly has an 'any' type. +chrome.contextMenus.onClicked.addListener((info, tab) => { + switch (info.menuItemId) { + case "view-rec": + chrome.tabs.create({ url: chrome.runtime.getURL("index.html") }); + break; + + case "toggle-rec": + if (!isRecording(tab.id)) { + if (isValidUrl(tab.url)) { + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 1. + startRecorder(tab.id); + } + } else { + stopRecorder(tab.id); + } + break; + } +}); + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'tabId' implicitly has an 'any' type. | TS7006 - Parameter 'opts' implicitly has an 'any' type. +async function startRecorder(tabId, opts) { + if (!self.recorders[tabId]) { + opts.collLoader = collLoader; + opts.openWinMap = openWinMap; + self.recorders[tabId] = new BrowserRecorder({ tabId }, opts); + } else { + self.recorders[tabId].setAutoRunBehavior(opts.autorun); + } + + let err = null; + + const { waitForTabUpdate } = opts; + + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'BrowserRecorder'. + if (!waitForTabUpdate && !self.recorders[tabId].running) { + try { + self.recorders[tabId].setCollId(opts.collId); + await self.recorders[tabId].attach(); + } catch (e) { + console.warn(e); + err = e; + } + return err; + } +} + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'tabId' implicitly has an 'any' type. +function stopRecorder(tabId) { + if (self.recorders[tabId]) { + self.recorders[tabId].detach(); + return true; + } + + return false; +} + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'tabId' implicitly has an 'any' type. +function toggleBehaviors(tabId) { + if (self.recorders[tabId]) { + self.recorders[tabId].toggleBehaviors(); + return true; + } + + return false; +} + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'tabId' implicitly has an 'any' type. +function isRecording(tabId) { + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'BrowserRecorder'. + return self.recorders[tabId]?.running; +} + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'url' implicitly has an 'any' type. +function isValidUrl(url) { + return ( + url && + (url === "about:blank" || + url.startsWith("https:") || + url.startsWith("http:")) + ); +} + +// =========================================================================== +chrome.runtime.onMessage.addListener( + // @ts-expect-error - TS7006 - Parameter 'message' implicitly has an 'any' type. + async (message /*sender, sendResponse*/) => { + switch (message.msg) { + case "startNew": + newRecUrl = message.url; + newRecCollId = message.collId; + autorun = message.autorun; + defaultCollId = await getLocalOption("defaultCollId"); + chrome.tabs.create({ url: "about:blank" }); + break; + + case "disableCSP": + disableCSPForTab(message.tabId); + break; + } + }, +); + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'tabId' implicitly has an 'any' type. +async function disableCSPForTab(tabId) { + if (disabledCSPTabs.has(tabId)) { + return; + } + + await new Promise((resolve) => { + chrome.debugger.attach({ tabId }, "1.3", () => { + // @ts-expect-error - TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? + resolve(); + }); + }); + + await new Promise((resolve) => { + chrome.debugger.sendCommand( + { tabId }, + "Page.setBypassCSP", + { enabled: true }, + // @ts-expect-error - TS7006 - Parameter 'resp' implicitly has an 'any' type. + (resp) => resolve(resp), + ); + }); + + disabledCSPTabs.add(tabId); + + // hacky: don't detach if any recorders are running, otherwise will disconnect + for (const rec of Object.values(self.recorders)) { + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'BrowserRecorder'. + if (rec.running) { + return; + } + } + + await new Promise((resolve) => { + chrome.debugger.detach({ tabId }, () => { + // @ts-expect-error - TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? + resolve(); + }); + }); +} + +// =========================================================================== +chrome.runtime.onInstalled.addListener(main); + +if (self.importScripts) { + self.importScripts("sw.js"); +} diff --git a/src/ext/browser-recorder.js b/src/ext/browser-recorder.js deleted file mode 100644 index b27b9b9d..00000000 --- a/src/ext/browser-recorder.js +++ /dev/null @@ -1,320 +0,0 @@ -"use strict"; - -import { BEHAVIOR_RUNNING } from "../consts"; -import { getLocalOption } from "../localstorage"; -import { Recorder } from "../recorder"; - - -// =========================================================================== -const DEBUG = false; - -const IS_AGREGORE = navigator.userAgent.includes("agregore-browser"); - - -// =========================================================================== -class BrowserRecorder extends Recorder { - constructor(debuggee, {collId, collLoader, waitForTabUpdate = false, openUrl = null, port = null, - openWinMap = null, autorun = false}) { - super(); - - this.openUrl = openUrl; - this.waitForTabUpdate = waitForTabUpdate; - this.debuggee = debuggee; - this.tabId = debuggee.tabId; - this.openWinMap = openWinMap; - this.autorun = autorun; - this.isAttached = false; - - this.flatMode = IS_AGREGORE; - - this.collLoader = collLoader; - this.setCollId(collId); - - this.port = port; - - this.recordStorage = false; - getLocalOption("recordStorage").then((res) => this.recordStorage = !!res); - - this._onDetached = (tab, reason) => { - if (tab && this.tabId !== tab.tabId) { - return; - } - - this.isAttached = false; - - if (reason === "target_closed") { - this.tabId = 0; - } - - this._stop(); - }; - - this._onCanceled = (details) => { - if (details && details.tabId == this.tabId) { - this.detach(); - } - }; - - this._onEvent = async (tab, message, params, sessionId) => { - if (this.tabId === tab.tabId) { - try { - const sessions = sessionId ? [sessionId] : []; - await this.processMessage(message, params, sessions); - } catch (e) { - console.warn(e); - console.log(message); - console.log(params); - } - } - }; - } - - getExternalInjectURL(path) { - return chrome.runtime.getURL(path); - } - - setCollId(collId) { - if (collId !== this.collId || !this.db) { - this.collId = collId; - this.db = null; - this._initDB = this.collLoader.loadColl(this.collId); - } - } - - _doDetach() { - let numOtherRecorders = 0; - for (const rec of Object.values(self.recorders)) { - if (rec.tabId !== this.tabId && rec.running) { - numOtherRecorders++; - } - } - - if (numOtherRecorders > 0) { - console.log(`closing session, not detaching, ${numOtherRecorders} other recording tab(s) left`); - return this.sessionClose([]); - } else { - console.log("detaching debugger, already tabs stopped"); - } - - return new Promise((resolve) => { - chrome.debugger.detach(this.debuggee, () => { - if (chrome.runtime.lastError) { - console.warn(chrome.runtime.lastError.message); - } - this.isAttached = false; - resolve(); - }); - }); - } - - _doStop() { - //chrome.tabs.sendMessage(this.tabId, {"msg": "stopRecord"}); - - if (!this.isAttached) { - chrome.debugger.onDetach.removeListener(this._onDetached); - } - chrome.debugger.onEvent.removeListener(this._onEvent); - - if (this.db) { - this.db.close(); - this.db = null; - this._initDB = null; - } - - if (!this.tabId) { - return; - } - - this.doUpdateStatus(); - } - - async _doAttach() { - this.waitForTabUpdate = false; - - if (!this.isAttached) { - chrome.debugger.onDetach.addListener(this._onDetached); - } - chrome.debugger.onEvent.addListener(this._onEvent); - - const coll = await this._initDB; - if (!coll) { - throw new Error("Collection Not Found"); - } - - this.db = coll.store; - - try { - if (!this.isAttached) { - await new Promise((resolve, reject) => { - chrome.debugger.attach(this.debuggee, "1.3", async () => { - if (chrome.runtime.lastError) { - reject(chrome.runtime.lastError.message); - } - this.isAttached = true; - resolve(); - }); - }); - } - - await this.start(); - this.failureMsg = null; - - if (this.openUrl) { - await this.send("Page.navigate", { - url: this.openUrl, - }); - } else { - await this.send("Page.reload", { - ignoreCache: true, - scriptToEvaluateOnLoad: this.getInjectScript() - }); - } - - this.doUpdateStatus(); - - } catch (msg) { - this.failureMsg = chrome.runtime.lastError ? chrome.runtime.lastError.message : msg; - this.doUpdateStatus(); - throw msg; - } - } - - doUpdateStatus() { - let title, color, text; - const tabId = this.tabId; - - if (this.running) { - if (this.behaviorState === BEHAVIOR_RUNNING) { - title = "Archiving: Autopilot Running!"; - color = "#0891B2"; - text = ""; - - } else if (this.numPending === 0) { - title = "Archiving: No URLs pending, can continue"; - color = "#4D7C0F"; - text = "✓"; - - } else { - title = `Archiving: ${this.numPending} URLs pending, please wait`; - color = "#C5A802"; - text = "" + this.numPending; - } - } else if (this.failureMsg) { - title = "Error: Can't Archive this page"; - text = "X"; - color = "#D30808"; - } else { - title = "Not Archiving"; - text = ""; - color = "#4D7C0F"; - } - - chrome.action.setTitle({title, tabId}); - chrome.action.setBadgeBackgroundColor({color, tabId}); - chrome.action.setBadgeText({text, tabId}); - - if (this.port) { - const status = this.getStatusMsg(); - this.port.postMessage(status); - } - } - - getFavIcon() { - return new Promise((resolve) => { - chrome.tabs.get(this.tabId, (tab) => { - resolve(tab.favIconUrl); - }); - }); - } - - async _doAddResource(data) { - //console.log(`Commit ${url} @ ${ts}, cookie: ${cookie}, sw: ${reqresp.fromServiceWorker}`); - let writtenSize = 0; - const payloadSize = data.payload.length; - - try { - await this.db.initing; - - if (await this.db.addResource(data)) { - writtenSize = payloadSize; - } - } catch (e) { - console.warn(`Commit error for ${data.url} @ ${data.ts} ${data.mime}`); - console.warn(e); - return; - } - - // TODO: more accurate size calc? - //const headerSize = 0;//JSON.stringify(data.respHeaders).length + JSON.stringify(data.reqHeaders).length; - - // increment size counter only if committed - //incrArchiveSize('dedup', writtenSize); - //incrArchiveSize('total', payloadSize); - // this.collLoader.updateSize(this.collId, payloadSize, writtenSize); - - // increment page size - // await this._doAddPage(this.pageInfo); - - return writtenSize; - } - - _doAddPage(pageInfo) { - if (!pageInfo.url) { - console.warn("Empty Page, Skipping"); - return; - } - if (this.db) { - return this.db.addPage(pageInfo); - } - } - - _doIncSizes(totalSize, writtenSize) { - this.collLoader.updateSize(this.collId, totalSize, writtenSize); - } - - _doSendCommand(method, params, promise) { - let prr; - const p = new Promise((resolve, reject) => { - prr = {resolve, reject, method}; - }); - - if (!promise) { - promise = p; - } - - const callback = (res) => { - if (res) { - prr.resolve(res); - } else { - prr.reject(chrome.runtime.lastError ? chrome.runtime.lastError.message : ""); - } - }; - - if (DEBUG) { - console.log("SEND " + JSON.stringify({command: method, params})); - } - - chrome.debugger.sendCommand(this.debuggee, method, params, callback); - return promise; - } - - _doSendCommandFlat(method, params, sessionId) { - if (DEBUG) { - console.log("SEND " + JSON.stringify({command: method, params})); - } - - try { - return chrome.debugger.sendCommand(this.debuggee, method, params, sessionId); - } catch(e) { - console.warn(e); - } - } - - - handleWindowOpen(url, sessions) { - super.handleWindowOpen(url, sessions); - this.openWinMap.set(url, this.collId); - } -} - -export { BrowserRecorder }; diff --git a/src/ext/browser-recorder.ts b/src/ext/browser-recorder.ts new file mode 100644 index 00000000..28f541bd --- /dev/null +++ b/src/ext/browser-recorder.ts @@ -0,0 +1,420 @@ +"use strict"; + +import { BEHAVIOR_RUNNING } from "../consts"; +import { getLocalOption } from "../localstorage"; +import { Recorder } from "../recorder"; + +// =========================================================================== +const DEBUG = false; + +const IS_AGREGORE = navigator.userAgent.includes("agregore-browser"); + +// =========================================================================== +class BrowserRecorder extends Recorder { + constructor( + // @ts-expect-error - TS7006 - Parameter 'debuggee' implicitly has an 'any' type. + debuggee, + { + // @ts-expect-error - TS7031 - Binding element 'collId' implicitly has an 'any' type. + collId, + // @ts-expect-error - TS7031 - Binding element 'collLoader' implicitly has an 'any' type. + collLoader, + waitForTabUpdate = false, + openUrl = null, + port = null, + openWinMap = null, + autorun = false, + }, + ) { + super(); + + // @ts-expect-error - TS2339 - Property 'openUrl' does not exist on type 'BrowserRecorder'. + this.openUrl = openUrl; + // @ts-expect-error - TS2339 - Property 'waitForTabUpdate' does not exist on type 'BrowserRecorder'. + this.waitForTabUpdate = waitForTabUpdate; + // @ts-expect-error - TS2339 - Property 'debuggee' does not exist on type 'BrowserRecorder'. + this.debuggee = debuggee; + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. + this.tabId = debuggee.tabId; + // @ts-expect-error - TS2339 - Property 'openWinMap' does not exist on type 'BrowserRecorder'. + this.openWinMap = openWinMap; + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'BrowserRecorder'. + this.autorun = autorun; + // @ts-expect-error - TS2339 - Property 'isAttached' does not exist on type 'BrowserRecorder'. + this.isAttached = false; + + // @ts-expect-error - TS2339 - Property 'flatMode' does not exist on type 'BrowserRecorder'. + this.flatMode = IS_AGREGORE; + + // @ts-expect-error - TS2339 - Property 'collLoader' does not exist on type 'BrowserRecorder'. + this.collLoader = collLoader; + this.setCollId(collId); + + // @ts-expect-error - TS2339 - Property 'port' does not exist on type 'BrowserRecorder'. + this.port = port; + + // @ts-expect-error - TS2339 - Property 'recordStorage' does not exist on type 'BrowserRecorder'. + this.recordStorage = false; + // @ts-expect-error - TS2339 - Property 'recordStorage' does not exist on type 'BrowserRecorder'. + getLocalOption("recordStorage").then((res) => (this.recordStorage = !!res)); + + // @ts-expect-error - TS2551 - Property '_onDetached' does not exist on type 'BrowserRecorder'. Did you mean '_doDetach'? + this._onDetached = (tab, reason) => { + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. + if (tab && this.tabId !== tab.tabId) { + return; + } + + // @ts-expect-error - TS2339 - Property 'isAttached' does not exist on type 'BrowserRecorder'. + this.isAttached = false; + + if (reason === "target_closed") { + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. + this.tabId = 0; + } + + this._stop(); + }; + + // @ts-expect-error - TS2339 - Property '_onCanceled' does not exist on type 'BrowserRecorder'. + this._onCanceled = (details) => { + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. + if (details && details.tabId == this.tabId) { + this.detach(); + } + }; + + // @ts-expect-error - TS2339 - Property '_onEvent' does not exist on type 'BrowserRecorder'. + this._onEvent = async (tab, message, params, sessionId) => { + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. + if (this.tabId === tab.tabId) { + try { + const sessions = sessionId ? [sessionId] : []; + await this.processMessage(message, params, sessions); + } catch (e) { + console.warn(e); + console.log(message); + console.log(params); + } + } + }; + } + + // @ts-expect-error - TS7006 - Parameter 'path' implicitly has an 'any' type. + getExternalInjectURL(path) { + return chrome.runtime.getURL(path); + } + + // @ts-expect-error - TS7006 - Parameter 'collId' implicitly has an 'any' type. + setCollId(collId) { + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'BrowserRecorder'. | TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + if (collId !== this.collId || !this.db) { + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'BrowserRecorder'. + this.collId = collId; + // @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + this.db = null; + // @ts-expect-error - TS2339 - Property '_initDB' does not exist on type 'BrowserRecorder'. | TS2339 - Property 'collLoader' does not exist on type 'BrowserRecorder'. | TS2339 - Property 'collId' does not exist on type 'BrowserRecorder'. + this._initDB = this.collLoader.loadColl(this.collId); + } + } + + _doDetach() { + let numOtherRecorders = 0; + for (const rec of Object.values(self.recorders)) { + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. | TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. | TS2339 - Property 'running' does not exist on type 'BrowserRecorder'. + if (rec.tabId !== this.tabId && rec.running) { + numOtherRecorders++; + } + } + + if (numOtherRecorders > 0) { + console.log( + `closing session, not detaching, ${numOtherRecorders} other recording tab(s) left`, + ); + return this.sessionClose([]); + } else { + console.log("detaching debugger, already tabs stopped"); + } + + return new Promise((resolve) => { + // @ts-expect-error - TS2339 - Property 'debuggee' does not exist on type 'BrowserRecorder'. + chrome.debugger.detach(this.debuggee, () => { + if (chrome.runtime.lastError) { + console.warn(chrome.runtime.lastError.message); + } + // @ts-expect-error - TS2339 - Property 'isAttached' does not exist on type 'BrowserRecorder'. + this.isAttached = false; + // @ts-expect-error - TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? + resolve(); + }); + }); + } + + _doStop() { + //chrome.tabs.sendMessage(this.tabId, {"msg": "stopRecord"}); + + // @ts-expect-error - TS2339 - Property 'isAttached' does not exist on type 'BrowserRecorder'. + if (!this.isAttached) { + // @ts-expect-error - TS2551 - Property '_onDetached' does not exist on type 'BrowserRecorder'. Did you mean '_doDetach'? + chrome.debugger.onDetach.removeListener(this._onDetached); + } + // @ts-expect-error - TS2339 - Property '_onEvent' does not exist on type 'BrowserRecorder'. + chrome.debugger.onEvent.removeListener(this._onEvent); + + // @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + if (this.db) { + // @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + this.db.close(); + // @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + this.db = null; + // @ts-expect-error - TS2339 - Property '_initDB' does not exist on type 'BrowserRecorder'. + this._initDB = null; + } + + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. + if (!this.tabId) { + return; + } + + this.doUpdateStatus(); + } + + async _doAttach() { + // @ts-expect-error - TS2339 - Property 'waitForTabUpdate' does not exist on type 'BrowserRecorder'. + this.waitForTabUpdate = false; + + // @ts-expect-error - TS2339 - Property 'isAttached' does not exist on type 'BrowserRecorder'. + if (!this.isAttached) { + // @ts-expect-error - TS2551 - Property '_onDetached' does not exist on type 'BrowserRecorder'. Did you mean '_doDetach'? + chrome.debugger.onDetach.addListener(this._onDetached); + } + // @ts-expect-error - TS2339 - Property '_onEvent' does not exist on type 'BrowserRecorder'. + chrome.debugger.onEvent.addListener(this._onEvent); + + // @ts-expect-error - TS2339 - Property '_initDB' does not exist on type 'BrowserRecorder'. + const coll = await this._initDB; + if (!coll) { + throw new Error("Collection Not Found"); + } + + // @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + this.db = coll.store; + + try { + // @ts-expect-error - TS2339 - Property 'isAttached' does not exist on type 'BrowserRecorder'. + if (!this.isAttached) { + await new Promise((resolve, reject) => { + // @ts-expect-error - TS2339 - Property 'debuggee' does not exist on type 'BrowserRecorder'. + chrome.debugger.attach(this.debuggee, "1.3", () => { + if (chrome.runtime.lastError) { + reject(chrome.runtime.lastError.message); + } + // @ts-expect-error - TS2339 - Property 'isAttached' does not exist on type 'BrowserRecorder'. + this.isAttached = true; + // @ts-expect-error - TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? + resolve(); + }); + }); + } + + await this.start(); + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'BrowserRecorder'. + this.failureMsg = null; + + // @ts-expect-error - TS2339 - Property 'openUrl' does not exist on type 'BrowserRecorder'. + if (this.openUrl) { + // @ts-expect-error - TS2345 - Argument of type '{ url: any; }' is not assignable to parameter of type 'null | undefined'. + await this.send("Page.navigate", { + // @ts-expect-error - TS2339 - Property 'openUrl' does not exist on type 'BrowserRecorder'. + url: this.openUrl, + }); + } else { + // @ts-expect-error - TS2345 - Argument of type '{ ignoreCache: boolean; scriptToEvaluateOnLoad: string; }' is not assignable to parameter of type 'null | undefined'. + await this.send("Page.reload", { + ignoreCache: true, + scriptToEvaluateOnLoad: this.getInjectScript(), + }); + } + + this.doUpdateStatus(); + } catch (msg) { + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'BrowserRecorder'. + this.failureMsg = chrome.runtime.lastError + ? chrome.runtime.lastError.message + : msg; + this.doUpdateStatus(); + throw msg; + } + } + + doUpdateStatus() { + let title, color, text; + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. + const tabId = this.tabId; + + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'BrowserRecorder'. + if (this.running) { + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'BrowserRecorder'. + if (this.behaviorState === BEHAVIOR_RUNNING) { + title = "Archiving: Autopilot Running!"; + color = "#0891b2"; + text = ""; + // @ts-expect-error - TS2339 - Property 'numPending' does not exist on type 'BrowserRecorder'. + } else if (this.numPending === 0) { + title = "Archiving: No URLs pending, can continue"; + color = "#4d7c0f"; + text = "✓"; + } else { + // @ts-expect-error - TS2339 - Property 'numPending' does not exist on type 'BrowserRecorder'. + title = `Archiving: ${this.numPending} URLs pending, please wait`; + color = "#c5a802"; + // @ts-expect-error - TS2339 - Property 'numPending' does not exist on type 'BrowserRecorder'. + text = "" + this.numPending; + } + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'BrowserRecorder'. + } else if (this.failureMsg) { + title = "Error: Can't Archive this page"; + text = "X"; + color = "#d30808"; + } else { + title = "Not Archiving"; + text = ""; + color = "#4d7c0f"; + } + + chrome.action.setTitle({ title, tabId }); + chrome.action.setBadgeBackgroundColor({ color, tabId }); + chrome.action.setBadgeText({ text, tabId }); + + // @ts-expect-error - TS2339 - Property 'port' does not exist on type 'BrowserRecorder'. + if (this.port) { + const status = this.getStatusMsg(); + // @ts-expect-error - TS2339 - Property 'port' does not exist on type 'BrowserRecorder'. + this.port.postMessage(status); + } + } + + getFavIcon() { + return new Promise((resolve) => { + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'BrowserRecorder'. + chrome.tabs.get(this.tabId, (tab) => { + resolve(tab.favIconUrl); + }); + }); + } + + // @ts-expect-error - TS7006 - Parameter 'data' implicitly has an 'any' type. + async _doAddResource(data) { + //console.log(`Commit ${url} @ ${ts}, cookie: ${cookie}, sw: ${reqresp.fromServiceWorker}`); + let writtenSize = 0; + const payloadSize = data.payload.length; + + try { + // @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + await this.db.initing; + + // @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + if (await this.db.addResource(data)) { + writtenSize = payloadSize; + } + } catch (e) { + console.warn(`Commit error for ${data.url} @ ${data.ts} ${data.mime}`); + console.warn(e); + return; + } + + // TODO: more accurate size calc? + //const headerSize = 0;//JSON.stringify(data.respHeaders).length + JSON.stringify(data.reqHeaders).length; + + // increment size counter only if committed + //incrArchiveSize('dedup', writtenSize); + //incrArchiveSize('total', payloadSize); + // this.collLoader.updateSize(this.collId, payloadSize, writtenSize); + + // increment page size + // await this._doAddPage(this.pageInfo); + + return writtenSize; + } + + // @ts-expect-error - TS7006 - Parameter 'pageInfo' implicitly has an 'any' type. + _doAddPage(pageInfo) { + if (!pageInfo.url) { + console.warn("Empty Page, Skipping"); + return; + } + // @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + if (this.db) { + // @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'. + return this.db.addPage(pageInfo); + } + } + + // @ts-expect-error - TS7006 - Parameter 'totalSize' implicitly has an 'any' type. | TS7006 - Parameter 'writtenSize' implicitly has an 'any' type. + _doIncSizes(totalSize, writtenSize) { + // @ts-expect-error - TS2339 - Property 'collLoader' does not exist on type 'BrowserRecorder'. | TS2339 - Property 'collId' does not exist on type 'BrowserRecorder'. + this.collLoader.updateSize(this.collId, totalSize, writtenSize); + } + + // @ts-expect-error - TS7006 - Parameter 'method' implicitly has an 'any' type. | TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'promise' implicitly has an 'any' type. + _doSendCommand(method, params, promise) { + // @ts-expect-error - TS7034 - Variable 'prr' implicitly has type 'any' in some locations where its type cannot be determined. + let prr; + const p = new Promise((resolve, reject) => { + prr = { resolve, reject, method }; + }); + + if (!promise) { + promise = p; + } + + // @ts-expect-error - TS7006 - Parameter 'res' implicitly has an 'any' type. + const callback = (res) => { + if (res) { + // @ts-expect-error - TS7005 - Variable 'prr' implicitly has an 'any' type. + prr.resolve(res); + } else { + // @ts-expect-error - TS7005 - Variable 'prr' implicitly has an 'any' type. + prr.reject( + chrome.runtime.lastError ? chrome.runtime.lastError.message : "", + ); + } + }; + + if (DEBUG) { + console.log("SEND " + JSON.stringify({ command: method, params })); + } + + // @ts-expect-error - TS2339 - Property 'debuggee' does not exist on type 'BrowserRecorder'. + chrome.debugger.sendCommand(this.debuggee, method, params, callback); + return promise; + } + + // @ts-expect-error - TS7006 - Parameter 'method' implicitly has an 'any' type. | TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessionId' implicitly has an 'any' type. + _doSendCommandFlat(method, params, sessionId) { + if (DEBUG) { + console.log("SEND " + JSON.stringify({ command: method, params })); + } + + try { + return chrome.debugger.sendCommand( + // @ts-expect-error - TS2339 - Property 'debuggee' does not exist on type 'BrowserRecorder'. + this.debuggee, + method, + params, + sessionId, + ); + } catch (e) { + console.warn(e); + } + } + + // @ts-expect-error - TS7006 - Parameter 'url' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + handleWindowOpen(url, sessions) { + super.handleWindowOpen(url, sessions); + // @ts-expect-error - TS2339 - Property 'openWinMap' does not exist on type 'BrowserRecorder'. | TS2339 - Property 'collId' does not exist on type 'BrowserRecorder'. + this.openWinMap.set(url, this.collId); + } +} + +export { BrowserRecorder }; diff --git a/src/ext/manifest.json b/src/ext/manifest.json index 52d29c96..b51c1540 100644 --- a/src/ext/manifest.json +++ b/src/ext/manifest.json @@ -2,9 +2,17 @@ "name": "Webrecorder ArchiveWeb.page", "description": "Create high-fidelity web archives directly in your browser", "version": "$VERSION", - "permissions": ["debugger", "contextMenus", "tabs", "activeTab", "storage", "unlimitedStorage", "webRequest"], + "permissions": [ + "debugger", + "contextMenus", + "tabs", + "activeTab", + "storage", + "unlimitedStorage", + "webRequest" + ], "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", - "background": { + "background": { "service_worker": "bg.js" }, "icons": { @@ -18,13 +26,12 @@ "default_title": "Webrecorder ArchiveWeb.page", "default_popup": "popup.html" }, - "web_accessible_resources": [{ - "resources": [ - "pdf/*", - "ruffle/*" - ], - "matches": ["*://*/*"] - }], + "web_accessible_resources": [ + { + "resources": ["pdf/*", "ruffle/*"], + "matches": ["*://*/*"] + } + ], "host_permissions": ["*://*/*"], "content_security_policy": { "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'" diff --git a/src/globals.d.ts b/src/globals.d.ts new file mode 100644 index 00000000..09d30615 --- /dev/null +++ b/src/globals.d.ts @@ -0,0 +1,21 @@ +declare module "*.svg"; +declare module "*.html"; +declare module "*.scss"; +declare module "*.sass"; +declare module "@/static/extractPDF.js"; +declare const __SW_NAME__: string; +declare const __HELPER_PROXY__: string; +declare const __GDRIVE_CLIENT_ID__: string; +declare const __AWP_VERSION__: string; +declare const __VERSION__: string; +declare const __WEB3_STORAGE_TOKEN__: string; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +declare type TODOFixMe = any; + +declare const pdfjsLib: TODOFixMe; + +interface Window { + // eslint-disable-next-line @typescript-eslint/consistent-type-imports + archivewebpage?: import("./electron/electron-rec-preload").GlobalAPI; +} diff --git a/src/localstorage.js b/src/localstorage.js deleted file mode 100644 index 7d41e3b5..00000000 --- a/src/localstorage.js +++ /dev/null @@ -1,50 +0,0 @@ -export function setLocalOption(name, value) -{ - if (self.chrome && self.chrome.storage) { - return new Promise(resolve => { - const data = {}; - data[name] = value; - self.chrome.storage.local.set(data, () => resolve()); - }); - } - - if (self.localStorage) { - return Promise.resolve(localStorage.setItem(name, value)); - } - - return Promise.reject(); -} - -// =========================================================================== -export function getLocalOption(name) { - if (self.chrome && self.chrome.storage) { - return new Promise(resolve => { - self.chrome.storage.local.get(name, (res) => { - resolve(res[name]); - }); - }); - } - - if (self.localStorage) { - return Promise.resolve(localStorage.getItem(name)); - } - - return Promise.reject(); -} - -// =========================================================================== -export function removeLocalOption(name) { - if (self.chrome && self.chrome.storage) { - return new Promise(resolve => { - self.chrome.storage.local.remove(name, () => { - resolve(); - }); - }); - } - - if (self.localStorage) { - return Promise.resolve(localStorage.removeItem(name)); - } - - return Promise.reject(); -} diff --git a/src/localstorage.ts b/src/localstorage.ts new file mode 100644 index 00000000..669840f8 --- /dev/null +++ b/src/localstorage.ts @@ -0,0 +1,60 @@ +// @ts-expect-error - TS7006 - Parameter 'name' implicitly has an 'any' type. | TS7006 - Parameter 'value' implicitly has an 'any' type. +export function setLocalOption(name, value) { + // @ts-expect-error - TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. | TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. + if (self.chrome?.storage) { + return new Promise((resolve) => { + const data = {}; + // @ts-expect-error - TS7053 - Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{}'. + data[name] = value; + // @ts-expect-error - TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. | TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? + self.chrome.storage.local.set(data, () => resolve()); + }); + } + + if (self.localStorage) { + return Promise.resolve(localStorage.setItem(name, value)); + } + + return Promise.reject(); +} + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'name' implicitly has an 'any' type. +export function getLocalOption(name) { + // @ts-expect-error - TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. | TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. + if (self.chrome?.storage) { + return new Promise((resolve) => { + // @ts-expect-error - TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. + self.chrome.storage.local.get(name, (res) => { + resolve(res[name]); + }); + }); + } + + if (self.localStorage) { + return Promise.resolve(localStorage.getItem(name)); + } + + return Promise.reject(); +} + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'name' implicitly has an 'any' type. +export function removeLocalOption(name) { + // @ts-expect-error - TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. | TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. + if (self.chrome?.storage) { + return new Promise((resolve) => { + // @ts-expect-error - TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. + self.chrome.storage.local.remove(name, () => { + // @ts-expect-error - TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? + resolve(); + }); + }); + } + + if (self.localStorage) { + return Promise.resolve(localStorage.removeItem(name)); + } + + return Promise.reject(); +} diff --git a/src/popup.js b/src/popup.js deleted file mode 100644 index 41c30d94..00000000 --- a/src/popup.js +++ /dev/null @@ -1,664 +0,0 @@ -import { LitElement, html, css, unsafeCSS } from "lit"; -import { unsafeSVG } from "lit/directives/unsafe-svg.js"; -import bulma from "bulma/bulma.sass"; - -import fasPlus from "@fortawesome/fontawesome-free/svgs/solid/plus.svg"; -import fasBox from "@fortawesome/fontawesome-free/svgs/solid/square.svg"; -import fasPlay from "@fortawesome/fontawesome-free/svgs/solid/play.svg"; -import fasPause from "@fortawesome/fontawesome-free/svgs/solid/pause.svg"; -import fasHome from "@fortawesome/fontawesome-free/svgs/solid/home.svg"; -import fasQ from "@fortawesome/fontawesome-free/svgs/solid/question.svg"; -import fasCheck from "@fortawesome/fontawesome-free/svgs/solid/check.svg"; -import fasX from "@fortawesome/fontawesome-free/svgs/solid/times.svg"; -import fasCaretDown from "@fortawesome/fontawesome-free/svgs/solid/caret-down.svg"; - -import wrRec from "./assets/icons/recLogo.svg"; - -import prettyBytes from "pretty-bytes"; - -import { getLocalOption, removeLocalOption, setLocalOption } from "./localstorage"; - -import { - BEHAVIOR_WAIT_LOAD, - BEHAVIOR_READY_START, - BEHAVIOR_RUNNING, - BEHAVIOR_PAUSED, - BEHAVIOR_DONE } from "./consts"; - -const allCss = unsafeCSS(bulma); -function wrapCss(custom) { - return [allCss, custom]; -} - -// =========================================================================== -class RecPopup extends LitElement -{ - constructor() { - super(); - - this.collections = []; - this.collTitle = ""; - this.collId = ""; - - this.tabId = 0; - this.recording = false; - this.status = null; - - this.port = null; - - this.pageUrl = ""; - this.pageTs = 0; - this.replayUrl = ""; - - this.canRecord = false; - this.failureMsg = null; - - this.collDrop = ""; - - this.allowCreate = true; - - this.waitingForStart = false; - this.waitingForStop = false; - this.behaviorState = BEHAVIOR_WAIT_LOAD; - this.behaviorMsg = ""; - this.autorun = false; - } - - static get properties() { - return { - collections: { type: Array }, - collId: { type: String }, - collTitle: { type: String }, - collDrop: { type: String }, - - recording: { type: Boolean }, - status: { type: Object }, - waitingForStart: { type: Boolean }, - - replayUrl: { type: String }, - pageUrl: { type: String }, - pageTs: { type: Number }, - - canRecord: { type: Boolean }, - failureMsg: { type: String }, - - behaviorState: { type: String }, - behaviorResults: { type: Object }, - behaviorMsg: { type: String }, - autorun: { type: Boolean } - }; - } - - async firstUpdated() { - document.addEventListener("click", () => { - if (this.collDrop === "show") { - this.collDrop = ""; - } - }); - - this.autorun = await getLocalOption("autorunBehaviors") === "1"; - - this.registerMessages(); - } - - registerMessages() { - this.port = chrome.runtime.connect({name: "popup-port"}); - - chrome.tabs.query({active: true, currentWindow: true}, (tabs) => { - if (tabs.length) { - this.tabId = tabs[0].id; - this.pageUrl = tabs[0].url; - chrome.action.getTitle({tabId: this.tabId}, (result) => { - this.recording = (result.indexOf("Recording:") >= 0); - }); - - this.sendMessage({tabId: this.tabId, type: "startUpdates"}); - } - }); - - this.port.onMessage.addListener((message) => { - this.onMessage(message); - }); - } - - sendMessage(message) { - this.port.postMessage(message); - } - - async onMessage(message) { - switch (message.type) { - case "status": - this.recording = message.recording; - if (this.waitingForStart && message.firstPageStarted) { - this.waitingForStart = false; - } - if (this.waitingForStop && !message.recording && !message.stopping) { - this.waitingForStop = false; - } - this.status = message; - this.behaviorState = message.behaviorState; - this.behaviorMsg = message.behaviorData && message.behaviorData.msg || "Starting..."; - this.behaviorResults = message.behaviorData && message.behaviorData.state; - this.autorun = message.autorun; - if (message.pageUrl) { - this.pageUrl = message.pageUrl; - } - if (message.pageTs) { - this.pageTs = message.pageTs; - } - this.failureMsg = message.failureMsg; - if (this.collId !== message.collId) { - this.collId = message.collId; - this.collTitle = this.findTitleFor(this.collId); - await setLocalOption(`${this.tabId}-collId`, this.collId); - } - break; - - case "collections": - this.collections = message.collections; - this.collId = await getLocalOption(`${this.tabId}-collId`); - this.collTitle = ""; - if (this.collId) { - this.collTitle = this.findTitleFor(this.collId); - } - // may no longer be valid, try default id - if (!this.collTitle) { - this.collId = message.collId; - this.collTitle = this.findTitleFor(this.collId); - } - if (!this.collTitle) { - this.collTitle = "[No Title]"; - } - break; - } - } - - findTitleFor(match) { - if (!match) { - return ""; - } - for (const coll of this.collections) { - if (coll.id === this.collId) { - return coll.title; - } - } - - return ""; - } - - updated(changedProperties) { - if (this.pageUrl && this.pageTs && - (changedProperties.has("pageUrl") || changedProperties.has("pageTs") || changedProperties.has("recording") || - changedProperties.has("collId"))) { - - const params = new URLSearchParams(); - params.set("url", this.pageUrl); - params.set("ts", new Date(this.pageTs).toISOString().replace(/[-:TZ.]/g, "")); - params.set("view", "pages"); - - this.replayUrl = this.getCollPage() + "#" + params.toString(); - } - - if (changedProperties.has("pageUrl") || changedProperties.has("failureMsg")) { - this.canRecord = this.pageUrl && (this.pageUrl === "about:blank" || this.pageUrl.startsWith("http:") || this.pageUrl.startsWith("https:")); - } - } - - getHomePage() { - return chrome.runtime.getURL("index.html"); - } - - get extRoot() { - return chrome.runtime.getURL(""); - } - - getCollPage() { - const sourceParams = new URLSearchParams(); - sourceParams.set("source", "local://" + this.collId); - - return this.getHomePage() + "?" + sourceParams.toString(); - } - - get notRecordingMessage() { - return "Not Archiving this Tab"; - } - - static get styles() { - return wrapCss(css` - :host { - width: 100%; - height: 100%; - font-size: initial !important; - } - - .button { - height: 1.5em !important; - background-color: aliceblue; - } - - .smallest.button { - margin: 0.25em; - background-color: initial; - padding: 6px 12px; - } - - .rec-state { - margin-right: 1.0em; - flex: auto; - } - - .status-row { - display: flex; - flex-direction: row; - align-items: center; - padding-bottom: 0.5em; - border-bottom: 1px solid lightgrey; - } - - .view-row { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - margin-top: 0.5em; - font-size: 1.1em; - } - - .autopilot { - justify-content: center; - } - - .coll-select { - align-items: center; - } - - .dropdown-item { - width: initial !important; - } - - .coll.button { - max-width: 120px; - } - - .coll.button span { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } - - .flex-form { - display: flex; - flex-direction: row; - align-items: center; - width: 100%; - } - - .flex-form * { - padding: 0.5em; - } - - .session-head { - font-style: italic; - } - - .underline { - margin-top: 1.0em; - border-bottom: 1px gray solid; - margin-bottom: 0.5em; - } - - .status th { - padding-left: 0.5em; - } - - .status { - font-variant-caps: all-small-caps; - } - - .status-sep { - border-bottom: 1px solid black; - width: 100%; - height: 10px; - } - - .status-ready { - color: #459558; - font-style: italic; - } - - .status-autopilot { - color: #3298dc; - max-width: 330px; - text-overflow: wrap; - word-break: break-all; - } - - .status-pending { - color: #bb9f08; - font-style: italic; - } - .error { - font-size: 12px; - color: maroon; - } - - .error p { - margin-bottom: 1em; - } - - .error-msg { - font-family: monospace; - font-style: italic; - } - `); - } - - renderStatus() { - if (this.behaviorState === BEHAVIOR_RUNNING) { - return html`Auto Recording, ${this.behaviorMsg}`; - } - - if (this.recording) { - return html`${this.waitingForStop ? "Finishing " : ""} Archiving: ${this.status && this.status.numPending ? html` - ${this.status.numPending} URLs pending${this.waitingForStop ? "." : ", please wait before loading a new page."} - ` : - html` - Idle, Continue Browsing`}`; - } - - if (this.failureMsg) { - return html` -
-

Sorry, there was an error starting archiving on this page. Please try again or try a different page.

-

Error Details: ${this.failureMsg}

-

If the error persists, check the Common Errors and Issues page in the guide for - known issues and possible solutions. -

-
- `; - } - - if (!this.canRecord) { - if (this.pageUrl && this.pageUrl.startsWith(this.extRoot)) { - return html` -

This page is part of the extension. You can view existing archived items from here. - To start a new archiving session, click the - Start Archiving button and enter a new URL. -

- `; - } - - return html`Can't archive this page.`; - } - - if (this.waitingForStart) { - return html`Archiving will start after the page reloads...`; - } - - return html`${this.notRecordingMessage}`; - } - - renderCollDropdown() { - return html` -
-
${this.recording ? "Currently archiving" : "Save"} to: 
- -
- `; - } - - renderStartOpt() { - if (!this.canRecord || this.recording) { - return ""; - } - - return html` -
- -
- `; - } - - renderCollCreate() { - if (this.collDrop !== "create") { - return ""; - } - - return html` -
-
-
- -
- -
- - -
-
-
- `; - } - - render() { - return html` -
-
-

- ${this.renderStatus()} -

- - - - - - - - - - -
-
- ${this.canRecord ? html` - ${this.renderCollDropdown()} - - ` : ""} -
- ${this.renderCollCreate()} -
-
- ${this.canRecord ? html` -

View Archived Pages

` : ""} -
- ${this.renderStartOpt()} -
- - ${this.recording ? html` -
- -
- ` : ""} - - ${this.status && this.status.sizeTotal ? html` -
-
Archived in this tab
- ${this.replayUrl ? - html`Replay Current Page` : ""} -
-
- - - - - - - ${this.behaviorResults && this.behaviorState !== BEHAVIOR_WAIT_LOAD - && this.behaviorState !== BEHAVIOR_READY_START ? html` - - ${Object.entries(this.behaviorResults).map(([name, value]) => html` - ` - )}` : ""} - -
Size Stored:${prettyBytes(this.status.sizeNew)}
Size Loaded:${prettyBytes(this.status.sizeTotal)}
Pages:${this.status.numPages}
URLs:${this.status.numUrls}
${name}${value}
-
- ` : html``} -
- `; - } - - get actionButtonDisabled() { - if (this.collDrop === "create") { - return true; - } - - return !this.recording ? this.waitingForStart : this.waitingForStop; - } - - get behaviorsButtonLabel() { - switch (this.behaviorState) { - - case BEHAVIOR_READY_START: - return html` - -  Start Autopilot!`; - - case BEHAVIOR_RUNNING: - return html` - -  Pause Autopilot`; - - case BEHAVIOR_PAUSED: - return html` - -  Unpause Autopilot`; - - case BEHAVIOR_DONE: - return html` - -  Autopilot Done`; - - case BEHAVIOR_WAIT_LOAD: - default: - return "Autopilot: Waiting for page to load..."; - } - } - - onStart() { - this.sendMessage({type: "startRecording", collId: this.collId, url: this.pageUrl, autorun: this.autorun}); - this.waitingForStart = true; - this.waitingForStop = false; - } - - onStop() { - this.sendMessage({type: "stopRecording"}); - this.waitingForStart = false; - this.waitingForStop = true; - } - - async onToggleAutoRun(event) { - this.autorun = event.currentTarget.checked; - await setLocalOption("autorunBehaviors", this.autorun ? "1" : "0"); - } - - async onSelectColl(event) { - this.collId = event.currentTarget.getAttribute("data-id"); - this.collTitle = event.currentTarget.getAttribute("data-title"); - this.collDrop = ""; - - await setLocalOption(`${this.tabId}-collId`, this.collId); - await setLocalOption("defaultCollId", this.collId); - } - - onBehaviorToggle() { - this.sendMessage({type: "toggleBehaviors"}); - } - - onShowDrop(event) { - this.collDrop = "show"; - event.stopPropagation(); - event.preventDefault(); - } - - onNewColl() { - const title = this.renderRoot.querySelector("#new-name").value; - - this.sendMessage({ - tabId: this.tabId, - type: "newColl", - title - }); - removeLocalOption(`${this.tabId}-collId`); - this.collDrop = ""; - } -} - -// =========================================================================== -class WrIcon extends LitElement -{ - constructor() { - super(); - this.size = "0.9em"; - } - - static get properties() { - return { - src: { type: Object }, - size: { type: String } - }; - } - - render() { - return html` - ${unsafeSVG(this.src)} - `; - } -} - -customElements.define("wr-icon", WrIcon); -customElements.define("wr-popup-viewer", RecPopup); - -export { RecPopup }; diff --git a/src/popup.ts b/src/popup.ts new file mode 100644 index 00000000..a11a4c2b --- /dev/null +++ b/src/popup.ts @@ -0,0 +1,1052 @@ +import { LitElement, html, css, unsafeCSS } from "lit"; +import { unsafeSVG } from "lit/directives/unsafe-svg.js"; +import bulma from "bulma/bulma.sass"; + +import fasPlus from "@fortawesome/fontawesome-free/svgs/solid/plus.svg"; +import fasBox from "@fortawesome/fontawesome-free/svgs/solid/square.svg"; +import fasPlay from "@fortawesome/fontawesome-free/svgs/solid/play.svg"; +import fasPause from "@fortawesome/fontawesome-free/svgs/solid/pause.svg"; +import fasHome from "@fortawesome/fontawesome-free/svgs/solid/home.svg"; +import fasQ from "@fortawesome/fontawesome-free/svgs/solid/question.svg"; +import fasCheck from "@fortawesome/fontawesome-free/svgs/solid/check.svg"; +import fasX from "@fortawesome/fontawesome-free/svgs/solid/times.svg"; +import fasCaretDown from "@fortawesome/fontawesome-free/svgs/solid/caret-down.svg"; + +import wrRec from "./assets/icons/recLogo.svg"; + +import prettyBytes from "pretty-bytes"; + +import { + getLocalOption, + removeLocalOption, + setLocalOption, +} from "./localstorage"; + +import { + BEHAVIOR_WAIT_LOAD, + BEHAVIOR_READY_START, + BEHAVIOR_RUNNING, + BEHAVIOR_PAUSED, + BEHAVIOR_DONE, +} from "./consts"; + +const allCss = unsafeCSS(bulma); +// @ts-expect-error - TS7006 - Parameter 'custom' implicitly has an 'any' type. +function wrapCss(custom) { + return [allCss, custom]; +} + +// =========================================================================== +class RecPopup extends LitElement { + constructor() { + super(); + + // @ts-expect-error - TS2339 - Property 'collections' does not exist on type 'RecPopup'. + this.collections = []; + // @ts-expect-error - TS2339 - Property 'collTitle' does not exist on type 'RecPopup'. + this.collTitle = ""; + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + this.collId = ""; + + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'RecPopup'. + this.tabId = 0; + // @ts-expect-error - TS2339 - Property 'recording' does not exist on type 'RecPopup'. + this.recording = false; + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RecPopup'. + this.status = null; + + // @ts-expect-error - TS2339 - Property 'port' does not exist on type 'RecPopup'. + this.port = null; + + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + this.pageUrl = ""; + // @ts-expect-error - TS2339 - Property 'pageTs' does not exist on type 'RecPopup'. + this.pageTs = 0; + // @ts-expect-error - TS2339 - Property 'replayUrl' does not exist on type 'RecPopup'. + this.replayUrl = ""; + + // @ts-expect-error - TS2339 - Property 'canRecord' does not exist on type 'RecPopup'. + this.canRecord = false; + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'RecPopup'. + this.failureMsg = null; + + // @ts-expect-error - TS2339 - Property 'collDrop' does not exist on type 'RecPopup'. + this.collDrop = ""; + + // @ts-expect-error - TS2339 - Property 'allowCreate' does not exist on type 'RecPopup'. + this.allowCreate = true; + + // @ts-expect-error - TS2339 - Property 'waitingForStart' does not exist on type 'RecPopup'. + this.waitingForStart = false; + // @ts-expect-error - TS2339 - Property 'waitingForStop' does not exist on type 'RecPopup'. + this.waitingForStop = false; + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'RecPopup'. + this.behaviorState = BEHAVIOR_WAIT_LOAD; + // @ts-expect-error - TS2339 - Property 'behaviorMsg' does not exist on type 'RecPopup'. + this.behaviorMsg = ""; + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'RecPopup'. + this.autorun = false; + } + + static get properties() { + return { + collections: { type: Array }, + collId: { type: String }, + collTitle: { type: String }, + collDrop: { type: String }, + + recording: { type: Boolean }, + status: { type: Object }, + waitingForStart: { type: Boolean }, + + replayUrl: { type: String }, + pageUrl: { type: String }, + pageTs: { type: Number }, + + canRecord: { type: Boolean }, + failureMsg: { type: String }, + + behaviorState: { type: String }, + behaviorResults: { type: Object }, + behaviorMsg: { type: String }, + autorun: { type: Boolean }, + }; + } + + async firstUpdated() { + document.addEventListener("click", () => { + // @ts-expect-error - TS2339 - Property 'collDrop' does not exist on type 'RecPopup'. + if (this.collDrop === "show") { + // @ts-expect-error - TS2339 - Property 'collDrop' does not exist on type 'RecPopup'. + this.collDrop = ""; + } + }); + + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'RecPopup'. + this.autorun = (await getLocalOption("autorunBehaviors")) === "1"; + + this.registerMessages(); + } + + registerMessages() { + // @ts-expect-error - TS2339 - Property 'port' does not exist on type 'RecPopup'. + this.port = chrome.runtime.connect({ name: "popup-port" }); + + // @ts-expect-error - TS7006 - Parameter 'tabs' implicitly has an 'any' type. + chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { + if (tabs.length) { + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'RecPopup'. + this.tabId = tabs[0].id; + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + this.pageUrl = tabs[0].url; + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'RecPopup'. | TS7006 - Parameter 'result' implicitly has an 'any' type. + chrome.action.getTitle({ tabId: this.tabId }, (result) => { + // @ts-expect-error - TS2339 - Property 'recording' does not exist on type 'RecPopup'. + this.recording = result.indexOf("Recording:") >= 0; + }); + + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'RecPopup'. + this.sendMessage({ tabId: this.tabId, type: "startUpdates" }); + } + }); + + // @ts-expect-error - TS2339 - Property 'port' does not exist on type 'RecPopup'. + this.port.onMessage.addListener((message) => { + this.onMessage(message); + }); + } + + // @ts-expect-error - TS7006 - Parameter 'message' implicitly has an 'any' type. + sendMessage(message) { + // @ts-expect-error - TS2339 - Property 'port' does not exist on type 'RecPopup'. + this.port.postMessage(message); + } + + // @ts-expect-error - TS7006 - Parameter 'message' implicitly has an 'any' type. + async onMessage(message) { + switch (message.type) { + case "status": + // @ts-expect-error - TS2339 - Property 'recording' does not exist on type 'RecPopup'. + this.recording = message.recording; + // @ts-expect-error - TS2339 - Property 'waitingForStart' does not exist on type 'RecPopup'. + if (this.waitingForStart && message.firstPageStarted) { + // @ts-expect-error - TS2339 - Property 'waitingForStart' does not exist on type 'RecPopup'. + this.waitingForStart = false; + } + // @ts-expect-error - TS2339 - Property 'waitingForStop' does not exist on type 'RecPopup'. + if (this.waitingForStop && !message.recording && !message.stopping) { + // @ts-expect-error - TS2339 - Property 'waitingForStop' does not exist on type 'RecPopup'. + this.waitingForStop = false; + } + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RecPopup'. + this.status = message; + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'RecPopup'. + this.behaviorState = message.behaviorState; + // @ts-expect-error - TS2339 - Property 'behaviorMsg' does not exist on type 'RecPopup'. + this.behaviorMsg = message.behaviorData?.msg || "Starting..."; + // @ts-expect-error - TS2339 - Property 'behaviorResults' does not exist on type 'RecPopup'. + this.behaviorResults = message.behaviorData?.state; + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'RecPopup'. + this.autorun = message.autorun; + if (message.pageUrl) { + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + this.pageUrl = message.pageUrl; + } + if (message.pageTs) { + // @ts-expect-error - TS2339 - Property 'pageTs' does not exist on type 'RecPopup'. + this.pageTs = message.pageTs; + } + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'RecPopup'. + this.failureMsg = message.failureMsg; + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + if (this.collId !== message.collId) { + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + this.collId = message.collId; + // @ts-expect-error - TS2339 - Property 'collTitle' does not exist on type 'RecPopup'. | TS2339 - Property 'collId' does not exist on type 'RecPopup'. + this.collTitle = this.findTitleFor(this.collId); + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'RecPopup'. | TS2339 - Property 'collId' does not exist on type 'RecPopup'. + await setLocalOption(`${this.tabId}-collId`, this.collId); + } + break; + + case "collections": + // @ts-expect-error - TS2339 - Property 'collections' does not exist on type 'RecPopup'. + this.collections = message.collections; + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. | TS2339 - Property 'tabId' does not exist on type 'RecPopup'. + this.collId = await getLocalOption(`${this.tabId}-collId`); + // @ts-expect-error - TS2339 - Property 'collTitle' does not exist on type 'RecPopup'. + this.collTitle = ""; + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + if (this.collId) { + // @ts-expect-error - TS2339 - Property 'collTitle' does not exist on type 'RecPopup'. | TS2339 - Property 'collId' does not exist on type 'RecPopup'. + this.collTitle = this.findTitleFor(this.collId); + } + // may no longer be valid, try default id + // @ts-expect-error - TS2339 - Property 'collTitle' does not exist on type 'RecPopup'. + if (!this.collTitle) { + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + this.collId = message.collId; + // @ts-expect-error - TS2339 - Property 'collTitle' does not exist on type 'RecPopup'. | TS2339 - Property 'collId' does not exist on type 'RecPopup'. + this.collTitle = this.findTitleFor(this.collId); + } + // @ts-expect-error - TS2339 - Property 'collTitle' does not exist on type 'RecPopup'. + if (!this.collTitle) { + // @ts-expect-error - TS2339 - Property 'collTitle' does not exist on type 'RecPopup'. + this.collTitle = "[No Title]"; + } + break; + } + } + + // @ts-expect-error - TS7006 - Parameter 'match' implicitly has an 'any' type. + findTitleFor(match) { + if (!match) { + return ""; + } + // @ts-expect-error - TS2339 - Property 'collections' does not exist on type 'RecPopup'. + for (const coll of this.collections) { + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + if (coll.id === this.collId) { + return coll.title; + } + } + + return ""; + } + + // @ts-expect-error - TS7006 - Parameter 'changedProperties' implicitly has an 'any' type. + updated(changedProperties) { + if ( + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + this.pageUrl && + // @ts-expect-error - TS2339 - Property 'pageTs' does not exist on type 'RecPopup'. + this.pageTs && + (changedProperties.has("pageUrl") || + changedProperties.has("pageTs") || + changedProperties.has("recording") || + changedProperties.has("collId")) + ) { + const params = new URLSearchParams(); + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + params.set("url", this.pageUrl); + params.set( + "ts", + // @ts-expect-error - TS2339 - Property 'pageTs' does not exist on type 'RecPopup'. + new Date(this.pageTs).toISOString().replace(/[-:TZ.]/g, ""), + ); + params.set("view", "pages"); + + // @ts-expect-error - TS2339 - Property 'replayUrl' does not exist on type 'RecPopup'. + this.replayUrl = this.getCollPage() + "#" + params.toString(); + } + + if ( + changedProperties.has("pageUrl") || + changedProperties.has("failureMsg") + ) { + // @ts-expect-error - TS2339 - Property 'canRecord' does not exist on type 'RecPopup'. + this.canRecord = + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + this.pageUrl && + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + (this.pageUrl === "about:blank" || + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + this.pageUrl.startsWith("http:") || + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + this.pageUrl.startsWith("https:")); + } + } + + getHomePage() { + return chrome.runtime.getURL("index.html"); + } + + get extRoot() { + return chrome.runtime.getURL(""); + } + + getCollPage() { + const sourceParams = new URLSearchParams(); + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + sourceParams.set("source", "local://" + this.collId); + + return this.getHomePage() + "?" + sourceParams.toString(); + } + + get notRecordingMessage() { + return "Not Archiving this Tab"; + } + + static get styles() { + return wrapCss(css` + :host { + width: 100%; + height: 100%; + font-size: initial !important; + } + + .button { + height: 1.5em !important; + background-color: aliceblue; + } + + .smallest.button { + margin: 0.25em; + background-color: initial; + padding: 6px 12px; + } + + .rec-state { + margin-right: 1em; + flex: auto; + } + + .status-row { + display: flex; + flex-direction: row; + align-items: center; + padding-bottom: 0.5em; + border-bottom: 1px solid lightgrey; + } + + .view-row { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + margin-top: 0.5em; + font-size: 1.1em; + } + + .autopilot { + justify-content: center; + } + + .coll-select { + align-items: center; + } + + .dropdown-item { + width: initial !important; + } + + .coll.button { + max-width: 120px; + } + + .coll.button span { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + + .flex-form { + display: flex; + flex-direction: row; + align-items: center; + width: 100%; + } + + .flex-form * { + padding: 0.5em; + } + + .session-head { + font-style: italic; + } + + .underline { + margin-top: 1em; + border-bottom: 1px gray solid; + margin-bottom: 0.5em; + } + + .status th { + padding-left: 0.5em; + } + + .status { + font-variant-caps: all-small-caps; + } + + .status-sep { + border-bottom: 1px solid black; + width: 100%; + height: 10px; + } + + .status-ready { + color: #459558; + font-style: italic; + } + + .status-autopilot { + color: #3298dc; + max-width: 330px; + text-overflow: wrap; + word-break: break-all; + } + + .status-pending { + color: #bb9f08; + font-style: italic; + } + .error { + font-size: 12px; + color: maroon; + } + + .error p { + margin-bottom: 1em; + } + + .error-msg { + font-family: monospace; + font-style: italic; + } + `); + } + + renderStatus() { + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'RecPopup'. + if (this.behaviorState === BEHAVIOR_RUNNING) { + return html`Auto Recording, + ${ + // @ts-expect-error - TS2339 - Property 'behaviorMsg' does not exist on type 'RecPopup'. + this.behaviorMsg + }`; + } + + // @ts-expect-error - TS2339 - Property 'recording' does not exist on type 'RecPopup'. + if (this.recording) { + return html`${ + // @ts-expect-error - TS2339 - Property 'waitingForStop' does not exist on type 'RecPopup'. + this.waitingForStop ? "Finishing " : "" + } + Archiving: ${ + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RecPopup'. | TS2339 - Property 'status' does not exist on type 'RecPopup'. + this.status?.numPending + ? html` + ${ + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RecPopup'. + this.status.numPending + } + URLs + pending${ + // @ts-expect-error - TS2339 - Property 'waitingForStop' does not exist on type 'RecPopup'. + this.waitingForStop + ? "." + : ", please wait before loading a new page." + } + ` + : html` Idle, Continue Browsing` + }`; + } + + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'RecPopup'. + if (this.failureMsg) { + return html` +
+

+ Sorry, there was an error starting archiving on this page. Please + try again or try a different page. +

+

+ Error Details: + ${ + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'RecPopup'. + this.failureMsg + } +

+

+ If the error persists, check the + Common Errors and Issues + page in the guide for known issues and possible solutions. +

+
+ `; + } + + // @ts-expect-error - TS2339 - Property 'canRecord' does not exist on type 'RecPopup'. + if (!this.canRecord) { + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. | TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + if (this.pageUrl?.startsWith(this.extRoot)) { + return html` +

+ This page is part of the extension. You can view existing archived + items from here. To start a new archiving session, click the + Start Archiving button and enter + a new URL. +

+ `; + } + + return html`Can't archive this page.`; + } + + // @ts-expect-error - TS2339 - Property 'waitingForStart' does not exist on type 'RecPopup'. + if (this.waitingForStart) { + return html`Archiving will start after the page reloads...`; + } + + return html`${this.notRecordingMessage}`; + } + + renderCollDropdown() { + return html` +
+
+ ${ + // @ts-expect-error - TS2339 - Property 'recording' does not exist on type 'RecPopup'. + this.recording ? "Currently archiving" : "Save" + } + to:  +
+ +
+ `; + } + + renderStartOpt() { + // @ts-expect-error - TS2339 - Property 'canRecord' does not exist on type 'RecPopup'. | TS2339 - Property 'recording' does not exist on type 'RecPopup'. + if (!this.canRecord || this.recording) { + return ""; + } + + return html` +
+ +
+ `; + } + + renderCollCreate() { + // @ts-expect-error - TS2339 - Property 'collDrop' does not exist on type 'RecPopup'. + if (this.collDrop !== "create") { + return ""; + } + + return html` +
+
+
+ +
+ +
+ + +
+
+
+ `; + } + + render() { + return html` +
+
+

${this.renderStatus()}

+ + + + + + + + + + +
+
+ ${ + // @ts-expect-error - TS2339 - Property 'canRecord' does not exist on type 'RecPopup'. + this.canRecord + ? html` + ${this.renderCollDropdown()} + + ` + : "" + } +
+ ${this.renderCollCreate()} +
+
+ ${ + // @ts-expect-error - TS2339 - Property 'canRecord' does not exist on type 'RecPopup'. + this.canRecord + ? html`

+ View Archived Pages +

` + : "" + } +
+ ${this.renderStartOpt()} +
+ + ${ + // @ts-expect-error - TS2339 - Property 'recording' does not exist on type 'RecPopup'. + this.recording + ? html` +
+ +
+ ` + : "" + } + ${ + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RecPopup'. | TS2339 - Property 'status' does not exist on type 'RecPopup'. + this.status?.sizeTotal + ? html` +
+
Archived in this tab
+ ${ + // @ts-expect-error - TS2339 - Property 'replayUrl' does not exist on type 'RecPopup'. + this.replayUrl + ? html`Replay Current Page` + : "" + } +
+
+ + + + + + + + + + + + + + + + + + + ${ + // @ts-expect-error - TS2339 - Property 'behaviorResults' does not exist on type 'RecPopup'. + this.behaviorResults && + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'RecPopup'. + this.behaviorState !== BEHAVIOR_WAIT_LOAD && + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'RecPopup'. + this.behaviorState !== BEHAVIOR_READY_START + ? html` + + + + ${ + // @ts-expect-error - TS2339 - Property 'behaviorResults' does not exist on type 'RecPopup'. + Object.entries(this.behaviorResults).map( + ([name, value]) => + html` + + + `, + ) + }` + : "" + } +
Size Stored: + ${ + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RecPopup'. + prettyBytes(this.status.sizeNew) + } +
Size Loaded: + ${ + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RecPopup'. + prettyBytes(this.status.sizeTotal) + } +
Pages: + ${ + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RecPopup'. + this.status.numPages + } +
URLs: + ${ + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RecPopup'. + this.status.numUrls + } +
${name}${value}
+
+ ` + : html`` + } +
+ `; + } + + get actionButtonDisabled() { + // @ts-expect-error - TS2339 - Property 'collDrop' does not exist on type 'RecPopup'. + if (this.collDrop === "create") { + return true; + } + + // @ts-expect-error - TS2339 - Property 'recording' does not exist on type 'RecPopup'. | TS2339 - Property 'waitingForStart' does not exist on type 'RecPopup'. | TS2339 - Property 'waitingForStop' does not exist on type 'RecPopup'. + return !this.recording ? this.waitingForStart : this.waitingForStop; + } + + get behaviorsButtonLabel() { + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'RecPopup'. + switch (this.behaviorState) { + case BEHAVIOR_READY_START: + return html` +  Start Autopilot!`; + + case BEHAVIOR_RUNNING: + return html` +  Pause Autopilot`; + + case BEHAVIOR_PAUSED: + return html` +  Unpause Autopilot`; + + case BEHAVIOR_DONE: + return html` +  Autopilot Done`; + + case BEHAVIOR_WAIT_LOAD: + default: + return "Autopilot: Waiting for page to load..."; + } + } + + onStart() { + this.sendMessage({ + type: "startRecording", + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + collId: this.collId, + // @ts-expect-error - TS2339 - Property 'pageUrl' does not exist on type 'RecPopup'. + url: this.pageUrl, + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'RecPopup'. + autorun: this.autorun, + }); + // @ts-expect-error - TS2339 - Property 'waitingForStart' does not exist on type 'RecPopup'. + this.waitingForStart = true; + // @ts-expect-error - TS2339 - Property 'waitingForStop' does not exist on type 'RecPopup'. + this.waitingForStop = false; + } + + onStop() { + this.sendMessage({ type: "stopRecording" }); + // @ts-expect-error - TS2339 - Property 'waitingForStart' does not exist on type 'RecPopup'. + this.waitingForStart = false; + // @ts-expect-error - TS2339 - Property 'waitingForStop' does not exist on type 'RecPopup'. + this.waitingForStop = true; + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + async onToggleAutoRun(event) { + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'RecPopup'. + this.autorun = event.currentTarget.checked; + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'RecPopup'. + await setLocalOption("autorunBehaviors", this.autorun ? "1" : "0"); + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + async onSelectColl(event) { + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + this.collId = event.currentTarget.getAttribute("data-id"); + // @ts-expect-error - TS2339 - Property 'collTitle' does not exist on type 'RecPopup'. + this.collTitle = event.currentTarget.getAttribute("data-title"); + // @ts-expect-error - TS2339 - Property 'collDrop' does not exist on type 'RecPopup'. + this.collDrop = ""; + + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'RecPopup'. | TS2339 - Property 'collId' does not exist on type 'RecPopup'. + await setLocalOption(`${this.tabId}-collId`, this.collId); + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'RecPopup'. + await setLocalOption("defaultCollId", this.collId); + } + + onBehaviorToggle() { + this.sendMessage({ type: "toggleBehaviors" }); + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onShowDrop(event) { + // @ts-expect-error - TS2339 - Property 'collDrop' does not exist on type 'RecPopup'. + this.collDrop = "show"; + event.stopPropagation(); + event.preventDefault(); + } + + onNewColl() { + // @ts-expect-error - TS2531 - Object is possibly 'null'. | TS2339 - Property 'value' does not exist on type 'Element'. + const title = this.renderRoot.querySelector("#new-name").value; + + this.sendMessage({ + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'RecPopup'. + tabId: this.tabId, + type: "newColl", + title, + }); + // @ts-expect-error - TS2339 - Property 'tabId' does not exist on type 'RecPopup'. + removeLocalOption(`${this.tabId}-collId`); + // @ts-expect-error - TS2339 - Property 'collDrop' does not exist on type 'RecPopup'. + this.collDrop = ""; + } +} + +// =========================================================================== +class WrIcon extends LitElement { + constructor() { + super(); + // @ts-expect-error - TS2339 - Property 'size' does not exist on type 'WrIcon'. + this.size = "0.9em"; + } + + static get properties() { + return { + src: { type: Object }, + size: { type: String }, + }; + } + + render() { + return html` + + + ${ + // @ts-expect-error - TS2339 - Property 'src' does not exist on type 'WrIcon'. + unsafeSVG(this.src) + } + + + `; + } +} + +customElements.define("wr-icon", WrIcon); +customElements.define("wr-popup-viewer", RecPopup); + +export { RecPopup }; diff --git a/src/recorder.js b/src/recorder.js deleted file mode 100644 index ab4ac3b4..00000000 --- a/src/recorder.js +++ /dev/null @@ -1,1564 +0,0 @@ -import { RequestResponseInfo } from "./requestresponseinfo.js"; - -import { getCustomRewriter } from "@webrecorder/wabac/src/rewrite"; -import { rewriteDASH, rewriteHLS } from "@webrecorder/wabac/src/rewrite/rewriteVideo"; -import { Buffer } from "buffer"; - -import behaviors from "browsertrix-behaviors/dist/behaviors.js"; -import extractPDF from "./extractPDF"; - -import { - BEHAVIOR_WAIT_LOAD, - BEHAVIOR_READY_START, - BEHAVIOR_RUNNING, - BEHAVIOR_PAUSED, - BEHAVIOR_DONE } from "./consts"; - -const encoder = new TextEncoder("utf-8"); - -const MAX_CONCURRENT_FETCH = 6; - -const MAIN_INJECT_URL = "__awp_main_inject__"; - -const IFRAME_INJECT_URL = "__awp_iframe_inject__"; - -const BEHAVIOR_LOG_FUNC = "__bx_log"; - -// =========================================================================== -function sleep(time) { - return new Promise((resolve) => setTimeout(() => resolve(), time)); -} - -// =========================================================================== -class Recorder { - constructor() { - this.flatMode = false; - - this.collId = ""; - - this.pendingRequests = {}; - this.numPending = 0; - - this.running = false; - this.stopping = false; - - this.frameId = null; - this.pageInfo = {size: 0}; - this.firstPageStarted = false; - - this.sizeNew = 0; - this.sizeTotal = 0; - this.numPages = 0; - this.numUrls = 0; - - this.historyMap = {}; - - this._promises = {}; - - this._fetchPending = new Map(); - this._fetchQueue = []; - this._fetchUrls = new Set(); - - this._bindings = {}; - - this.pdfLoadURL = null; - - this.pixelRatio = 1; - - this.failureMsg = null; - - this.id = 1; - this.sessionSet = new Set(); - - this._cachePageInfo = null; - this._cacheSessionNew = 0; - this._cacheSessionTotal = 0; - - this.behaviorInitStr = JSON.stringify({ - autofetch: true, - autoplay: true, - autoscroll: true, - siteSpecific: true, - log: BEHAVIOR_LOG_FUNC - }); - - this.behaviorState = BEHAVIOR_WAIT_LOAD; - this.behaviorData = null; - this.autorun = false; - - this.defaultFetchOpts = { - redirect: "manual" - }; - } - - setAutoRunBehavior(autorun) { - this.autorun = autorun; - } - - addExternalInject(path) { - return ` - (function () { - window.addEventListener("DOMContentLoaded", () => { - const e = document.createElement("script"); - e.src = "${this.getExternalInjectURL(path)}"; - document.head.appendChild(e); - }); - })(); - `; - } - - getInjectScript() { - return behaviors + `; - self.__bx_behaviors.init(${this.behaviorInitStr}); - - window.addEventListener("beforeunload", () => {});` + this.getFlashInjectScript(); - } - - getFlashInjectScript() { - return ` - (() => { - const description = "Shockwave Flash 32.0 r0"; - const enabledPlugin = { description }; - navigator.plugins["Shockwave Flash"] = { description }; - function addPlugin(type, suffixes) { - const mime = { enabledPlugin, description: "", type, suffixes}; - navigator.mimeTypes[type] = mime; - navigator.mimeTypes[navigator.mimeTypes.length] = mime; - } - addPlugin("application/futuresplash", "sp1"); - addPlugin("application/x-shockwave-flash2-preview", "swf"); - addPlugin("application/x-shockwave-flash", "swf"); - addPlugin("application/vnd.adobe.flash-movie", "swf"); - })(); - ` + this.addExternalInject("ruffle/ruffle.js"); - } - - async detach() { - if (!this.running) { - return; - } - - this.stopping = true; - - const domSnapshot = await this.getFullText(true); - - if (this.behaviorState === BEHAVIOR_RUNNING) { - this.toggleBehaviors(); - } - - try { - await Promise.race([ - Promise.all(this._fetchPending.values()), - sleep(15000) - ]); - } catch(e) { - console.log(e); - } - - try { - await this._doDetach(); - } catch (e) { - console.log(e); - } - - await this._stop(domSnapshot); - } - - async _stop(domSnapshot = null) { - clearInterval(this._updateStatusId); - clearInterval(this._loopId); - clearInterval(this._bgFetchId); - - this.flushPending(); - this.running = false; - this.pendingRequests = {}; - this.numPending = 0; - - await this.commitPage(this.pageInfo, domSnapshot, true); - - if (this._cleaningUp) { - await this._cleanupStaleWait; - } else { - await this.doUpdateLoop(); - } - - this._doStop(); - } - - async attach() { - if (this.running) { - console.warn("Already Attached!"); - return; - } - - await this._doAttach(); - - this.running = true; - this.stopping = false; - - this._cachePageInfo = null; - this._cacheSessionNew = 0; - this._cacheSessionTotal = 0; - this._cleaningUp = false; - this._cleanupStaleWait = null; - - this._updateStatusId = setInterval(() => this.updateStatus(), 1000); - - this._loopId = setInterval(() => this.updateLoop(), 10000); - - this._bgFetchId = setInterval(() => this.doBackgroundFetch(), 10000); - } - - updateLoop() { - if (!this._cleaningUp) { - this._cleanupStaleWait = this.doUpdateLoop(); - } - } - - async doUpdateLoop() { - this._cleaningUp = true; - - try { - for (const key of Object.keys(this.pendingRequests)) { - const reqresp = this.pendingRequests[key]; - - if (!reqresp) { - continue; - } - - if ((new Date() - reqresp._created) > 20000) { - if (this.noResponseForStatus(reqresp.status)) { - console.log("Dropping stale: " + key); - } else if (!reqresp.awaitingPayload) { - console.log(`Committing stale ${reqresp.status} ${reqresp.url}`); - await this.fullCommit(reqresp, []); - } else { - console.log(`Waiting for payload for ${reqresp.url}`); - continue; - } - delete this.pendingRequests[key]; - } - } - - if (this._cachePageInfo) { - await this._doAddPage(this._cachePageInfo); - this._cachePageInfo = null; - } - - if (this._cacheSessionTotal > 0) { - await this._doIncSizes(this._cacheSessionTotal, this._cacheSessionNew); - this._cacheSessionTotal = 0; - this._cacheSessionNew = 0; - } - - } finally { - this._cleaningUp = false; - } - } - - updateStatus() { - const networkPending = Object.keys(this.pendingRequests).length; - this.numPending = networkPending + this._fetchPending.size; - - if (networkPending === 0 && this._loadedDoneResolve) { - this._loadedDoneResolve(); - } - - this.doUpdateStatus(); - } - - getStatusMsg() { - return { - recording: this.running, - firstPageStarted: this.firstPageStarted, - behaviorState: this.behaviorState, - behaviorData: this.behaviorData, - autorun: this.autorun, - sizeTotal: this.sizeTotal, - sizeNew: this.sizeNew, - numUrls: this.numUrls, - numPages: this.numPages, - numPending: this.numPending, - pageUrl: this.pageInfo.url, - pageTs: this.pageInfo.ts, - failureMsg: this.failureMsg, - collId: this.collId, - stopping: this.stopping, - type: "status" - }; - } - - async _doInjectTopFrame() { - await this.newDocEval(MAIN_INJECT_URL, this.getInjectScript()); - - await this.exposeFunction(BEHAVIOR_LOG_FUNC, ({data, type}) => { - switch (type) { - case "info": - this.behaviorData = data; - //console.log("bx log", JSON.stringify(data)); - this.updateStatus(); - break; - } - }); - } - - async newDocEval(name, source) { - source += "\n\n//# sourceURL=" + name; - await this.send("Page.addScriptToEvaluateOnNewDocument", {source}); - } - - pageEval(name, expression, sessions = []) { - expression += "\n\n//# sourceURL=" + name; - return this.send("Runtime.evaluate", { - expression, - userGesture: true, - includeCommandLineAPI: true, - allowUnsafeEvalBlockedByCSP: true, - //replMode: true, - awaitPromise: true, - //returnByValue: true, - }, - sessions); - } - - async _doInjectIframe(sessions) { - try { - //console.log("inject to: " + sessions[0]); - await this.pageEval(IFRAME_INJECT_URL, this.getInjectScript(), sessions); - - } catch (e) { - console.warn(e); - } - } - - async toggleBehaviors() { - switch (this.behaviorState) { - case BEHAVIOR_WAIT_LOAD: - case BEHAVIOR_DONE: - break; - - case BEHAVIOR_READY_START: - this.pageEval("__awp_behavior_run__", "self.__bx_behaviors.run();").then(() => this.behaviorState = BEHAVIOR_DONE); - this.behaviorState = BEHAVIOR_RUNNING; - break; - - case BEHAVIOR_RUNNING: - this.pageEval("__awp_behavior_unpause__", "self.__bx_behaviors.pause();"); - this.behaviorState = BEHAVIOR_PAUSED; - break; - - case BEHAVIOR_PAUSED: - this.pageEval("__awp_behavior_unpause__", "self.__bx_behaviors.unpause();"); - this.behaviorState = BEHAVIOR_RUNNING; - break; - } - - this.updateStatus(); - } - - async exposeFunction(name, func, sessions = []) - { - this._bindings[name] = func; - await this.send("Runtime.addBinding", {name}, sessions); - - //await this.newDocEval("__awp_binding_wrap__", ` - //self._${name} = (args) => self.${name}(JSON.stringify(args));`, sessions); - } - - loaded() { - this._loaded = new Promise(resolve => this._loadedDoneResolve = resolve); - return this._loaded; - } - - async start() { - this.firstPageStarted = false; - - await this.send("Page.enable"); - - await this.send("Runtime.enable"); - - await this.send("DOMSnapshot.enable"); - - await this.initPixRatio(); - - await this._doInjectTopFrame(); - - await this.sessionInit([]); - - this.failureMsg = null; - } - - async initPixRatio() { - const {result} = await this.pageEval("__awp_get_pix_ratio", "window.devicePixelRatio"); - if (result && result.type === "number") { - this.pixelRatio = result.value; - } - } - - async sessionInit(sessions) { - try { - await this.send("Network.enable", null, sessions); - - try { - await this.send("Fetch.enable", {patterns: [{urlPattern: "*", requestStage: "Response"}]}, sessions); - } catch(e) { - console.log("No Fetch Available", e); - } - - try { - await this.send("Media.enable", null, sessions); - } catch(e) { - console.log("No media events available"); - } - - await this.send("Target.setAutoAttach", {autoAttach: true, waitForDebuggerOnStart: true, flatten: this.flatMode }, sessions); - - // disable cache for now? - await this.send("Network.setCacheDisabled", {cacheDisabled: true}, sessions); - await this.send("Network.setBypassServiceWorker", {bypass: true}, sessions); - // another option: clear cache, but don't disable - await this.send("Network.clearBrowserCache", null, sessions); - } catch (e) { - console.warn("Session Init Error: "); - console.log(e); - } - } - - async sessionClose(sessions = []) { - await this.send("Page.disable"); - await this.send("Runtime.disable"); - await this.send("DOMSnapshot.disable"); - - await this.send("Debugger.disable"); - - await this.send("Network.disable", null, sessions); - - await this.send("Fetch.disable", null, sessions); - - try { - await this.send("Media.disable", null, sessions); - } catch(e) { - // ignore - } - - await this.send("Target.setAutoAttach", {autoAttach: false, waitForDebuggerOnStart: false}); - - await this.send("Network.setBypassServiceWorker", {bypass: false}, sessions); - } - - pendingReqResp(requestId, reuseOnly = false) { - if (!this.pendingRequests[requestId]) { - if (reuseOnly || !requestId) { - return null; - } - this.pendingRequests[requestId] = new RequestResponseInfo(requestId); - } else if (requestId !== this.pendingRequests[requestId].requestId) { - console.error("Wrong Req Id!"); - } - - return this.pendingRequests[requestId]; - } - - removeReqResp(requestId) { - const reqresp = this.pendingRequests[requestId]; - delete this.pendingRequests[requestId]; - return reqresp; - } - - async processMessage(method, params, sessions) { - switch (method) { - case "Target.attachedToTarget": - sessions.push(params.sessionId); - - try { - this.sessionSet.add(params.sessionId); - - const type = params.targetInfo.type; - - const allowAttach = type !== "service_worker"; - - if (allowAttach) { - await this.sessionInit(sessions); - } - - if (params.waitingForDebugger) { - await this.send("Runtime.runIfWaitingForDebugger", null, sessions); - } - - if (allowAttach) { - console.log("Target Attached: " + type + " " + params.targetInfo.url + " " + params.sessionId); - - if (type === "page" || type === "iframe") { - await this._doInjectIframe(sessions); - } - } else { - console.log("Not allowed attach for: " + type + " " + params.targetInfo.url + " " + params.sessionId); - - const params2 = this.flatMode ? {sessionId: params.sessionId} : {targetId: params.targetInfo.targetId}; - await this.send("Runtime.runIfWaitingForDebugger", params2, sessions); - } - - } catch (e) { - console.log(e); - console.warn("Error attaching target: " + params.targetInfo.type + " " + params.targetInfo.url); - } - break; - - case "Target.detachedFromTarget": - console.log("Detaching from: " + params.sessionId); - this.sessionSet.delete(params.sessionId); - break; - - case "Target.receivedMessageFromTarget": - if (!this.sessionSet.has(params.sessionId)) { - console.warn("no such session: " + params.sessionId); - console.warn(params); - return; - } - sessions.push(params.sessionId); - this.receiveMessageFromTarget(params, sessions); - break; - - case "Network.responseReceived": - if (params.response) { - const reqresp = this.pendingReqResp(params.requestId, true); - if (reqresp) { - reqresp.fillResponseReceived(params); - } - } - break; - - case "Network.loadingFinished": - await this.handleLoadingFinished(params, sessions); - break; - - case "Network.loadingFailed": - { - const reqresp = this.removeReqResp(params.requestId); - if (reqresp && reqresp.status !== 206) { - // check if this is a false positive -- a valid download that's already been fetched - // the abort is just for page, but download will succeed - if (params.type === "Document" && - params.errorText === "net::ERR_ABORTED" && - reqresp.isValidBinary()) { - this.fullCommit(reqresp, sessions); - } else { - console.log(`Loading Failed for: ${reqresp.url} ${params.errorText}`); - } - } - break; - } - - case "Network.requestServedFromCache": - this.removeReqResp(params.requestId); - break; - - case "Network.responseReceivedExtraInfo": - { - const reqresp = this.pendingReqResp(params.requestId, true); - if (reqresp) { - reqresp.fillResponseReceivedExtraInfo(params); - } - } - break; - - case "Network.requestWillBeSent": - await this.handleRequestWillBeSent(params); - break; - - case "Network.requestWillBeSentExtraInfo": - if (!this.shouldSkip(null, params.headers, null)) { - this.pendingReqResp(params.requestId).requestHeaders = params.headers; - } - break; - - case "Fetch.requestPaused": - await this.handlePaused(params, sessions); - break; - - case "Page.frameNavigated": - this.initPage(params, sessions); - break; - - case "Page.loadEventFired": - await this.updatePage(sessions); - break; - - case "Page.navigatedWithinDocument": - await this.updateHistory(sessions); - break; - - case "Page.windowOpen": - this.handleWindowOpen(params.url, sessions); - break; - - case "Page.javascriptDialogOpening": - if (this.behaviorState === BEHAVIOR_RUNNING) { - await this.send("Page.handleJavaScriptDialog", {accept: false}); - } - break; - - case "Debugger.paused": - // only unpause for beforeunload event - // could be paused for regular breakpoint if debugging via devtools - if (params.data && params.data.eventName === "listener:beforeunload") { - await this.unpauseAndFinish(params); - } - break; - - case "Media.playerEventsAdded": - this.parseMediaEventsAdded(params, sessions); - break; - - case "Runtime.bindingCalled": - if (this._bindings[params.name]) { - this._bindings[params.name](JSON.parse(params.payload)); - } - break; - - default: - //if (method.startsWith("Target.")) { - // console.log(method, params); - //} - return false; - } - - return true; - } - - handleWindowOpen(url, sessions) { - const headers = {"Referer": this.pageInfo.url}; - this.doAsyncFetch({url, headers, redirectOnly: true}, sessions); - } - - isPagePDF() { - return this.pageInfo.mime === "application/pdf"; - } - - async extractPDFText() { - let success = false; - console.log("pdfLoadURL", this.pdfLoadURL); - if (this.pdfLoadURL) { - const res = await this.pageEval("__awp_pdf_extract__", ` - ${extractPDF}; - - extractPDF("${this.pdfLoadURL}", "${this.getExternalInjectURL("")}"); - `); - - if (res.result) { - const {type, value} = res.result; - if (type === "string") { - this.pageInfo.text = value; - success = true; - } - } - } - - return success; - } - - async getFullText(finishing = false) { - if (!this.pageInfo || !this.pageInfo.url) { - return null; - } - - if (this.isPagePDF() && !finishing) { - await this.extractPDFText(); - return null; - } - - try { - // wait upto 10s for getDocument, otherwise proceed - return await Promise.race([ - //this.send("DOM.getDocument", {"depth": -1, "pierce": true}), - this.send("DOMSnapshot.captureSnapshot", {computedStyles: []}), - sleep(10000) - ]); - } catch(e) { - console.log(e); - return null; - } - } - - async unpauseAndFinish(params) { - let domSnapshot = null; - - // determine if this is the unload from the injected content script - // if not, unpause but don't extract full text - const ourUnload = (params.callFrames[0].url === MAIN_INJECT_URL); - - if (ourUnload && this.behaviorState !== BEHAVIOR_WAIT_LOAD) { - domSnapshot = await this.getFullText(true); - } - - const currPage = this.pageInfo; - - try { - await this.send("Debugger.resume"); - } catch(e) { - console.warn(e); - } - - if (this.behaviorState === BEHAVIOR_RUNNING) { - await this.toggleBehaviors(); - } - - if (ourUnload && this.behaviorState !== BEHAVIOR_WAIT_LOAD) { - this.flushPending(); - - await this.commitPage(currPage, domSnapshot, true); - } - } - - commitPage(currPage, domSnapshot, finished) { - if (!currPage || !currPage.url || !currPage.ts || currPage.url === "about:blank") { - return; - } - - if (domSnapshot) { - currPage.text = this.parseTextFromDOMSnapshot(domSnapshot); - } else if (!currPage.text) { - console.warn("No Full Text Update"); - } - - currPage.finished = finished; - - const res = this._doAddPage(currPage); - if (currPage === this._cachePageInfo) { - this._cachePageInfo = null; - } - return res; - } - - async commitResource(data, pageInfo) { - const payloadSize = data.payload.length; - pageInfo = pageInfo || this.pageInfo; - pageInfo.size += payloadSize; - - this.sizeTotal += payloadSize; - this.numUrls++; - - const writtenSize = await this._doAddResource(data); - - this.sizeNew += writtenSize; - - this._cachePageInfo = pageInfo; - this._cacheSessionTotal += payloadSize; - this._cacheSessionNew += writtenSize; - } - - receiveMessageFromTarget(params, sessions) { - const nestedParams = JSON.parse(params.message); - - if (nestedParams.id != undefined) { - const promise = this._promises[nestedParams.id]; - if (promise) { - //if (DEBUG) { - // console.log("RECV " + promise.method + " " + params.message); - //} - if (nestedParams.error) { - promise.reject(nestedParams.error); - } else { - promise.resolve(nestedParams.result); - } - delete this._promises[nestedParams.id]; - } - } else if (nestedParams.params != undefined) { - //console.log("RECV MSG " + nestedParams.method + " " + nestedParams.message); - this.processMessage(nestedParams.method, nestedParams.params, sessions); - } - } - - //from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript - newPageId() { - return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); - } - - initPage(params, sessions) { - if (params.frame.parentId) { - return false; - } - - //console.log("Page.frameNavigated: " + params.frame.url + " " + params.frame.id); - if (this.frameId != params.frame.id) { - this.historyMap = {}; - } - - this.frameId = params.frame.id; - this.loaderId = params.frame.loaderId; - - this._initNewPage(params.frame.url, params.frame.mimeType); - - const reqresp = this.removeReqResp(this.loaderId); - if (reqresp) { - this.fullCommit(reqresp, sessions); - } - - return true; - } - - async initFirstPage() { - // Disable debugger intercept due to occasional crashes on some pages - // Enable unload pause only on first full page that is being recorded - //await this.send("Debugger.enable"); - //await this.send("DOMDebugger.setEventListenerBreakpoint", {"eventName": "beforeunload"}); - this.updateStatus(); - this.firstPageStarted = true; - } - - _initNewPage(url, mime) { - this.pageInfo = { - id: this.newPageId(), - url, - ts: 0, - title: "", - text: "", - size: 0, - finished: false, - favIconUrl: "", - mime, - }; - - this.pdfLoadURL = null; - - this.behaviorState = BEHAVIOR_WAIT_LOAD; - this.behaviorData = null; - - this.numPages++; - - this._fetchUrls.clear(); - - if (!this.firstPageStarted) { - this.initFirstPage(); - } - - this.behaviorState = BEHAVIOR_WAIT_LOAD; - } - - loadFavIcon(favIconUrl, sessions) { - if (favIconUrl && this.pageInfo && this.pageInfo.favIconUrl != favIconUrl) { - this.pageInfo.favIconUrl = favIconUrl; - - this.doAsyncFetch({url: favIconUrl}, sessions); - } - } - - async updatePage(sessions) { - //console.log("updatePage", this.pageInfo); - - if (!this.pageInfo) { - console.warn("no page info!"); - } - - const result = await this.send("Page.getNavigationHistory"); - const id = result.currentIndex; - - // allow duplicate pages for now - //if (id !== result.entries.length - 1 || this.historyMap[id] === result.entries[id].url) { - // return; - //} - - //await this.addText(false); - - this.historyMap[id] = result.entries[id].url; - - this.pageInfo.title = result.entries[id].title || result.entries[id].url; - - const pageInfo = this.pageInfo; - - const [domSnapshot, favIcon] = await Promise.all([ - this.getFullText(), - this.getFavIcon(), - ]); - - if (favIcon) { - this.loadFavIcon(favIcon, sessions); - } - - await this.commitPage(this.pageInfo, domSnapshot, false); - - this.updateStatus(); - - await this.loaded(); - - // don't mark as ready if page changed - if (pageInfo === this.pageInfo) { - this.behaviorState = BEHAVIOR_READY_START; - - if (this.autorun) { - await this.toggleBehaviors(); - } - } - } - - async updateHistory(sessions) { - if (sessions.length) { - return; - } - - const result = await this.send("Page.getNavigationHistory", null, sessions); - const id = result.currentIndex; - if (id === result.entries.length - 1 && this.historyMap[id] !== result.entries[id].url) { - //console.log("New History Entry: " + JSON.stringify(result.entries[id])); - this.historyMap[id] = result.entries[id].url; - } - } - - shouldSkip(method, headers, resourceType) { - if (headers && !method) { - method = headers[":method"]; - } - - if (method === "OPTIONS" || method === "HEAD") { - return true; - } - - if (["EventSource", "WebSocket", "Ping"].includes(resourceType)) { - return true; - } - - // beacon - if (resourceType === "Other" && method === "POST") { - return true; - } - - // skip eventsource, resourceType may not be set correctly - if (headers && (headers["accept"] === "text/event-stream" || headers["Accept"] === "text/event-stream")) { - return true; - } - - return false; - } - - async handlePaused(params, sessions) { - let continued = false; - let reqresp = null; - - let skip = false; - - if (this.shouldSkip(params.request.method, params.request.headers, params.resourceType)) { - skip = true; - } else if (!params.responseStatusCode && !params.responseErrorReason) { - skip = true; - } - - try { - if (!skip) { - reqresp = await this.handleFetchResponse(params, sessions); - - try { - if (reqresp && reqresp.payload) { - continued = await this.rewriteResponse(params, reqresp, sessions); - } - } catch (e) { - console.error("Fetch rewrite failed for: " + params.request.url); - console.error(e); - } - } - } catch(e) { - console.warn(e); - } - - if (!continued) { - try { - await this.send("Fetch.continueResponse", {requestId: params.requestId }, sessions); - } catch(e) { - console.warn("Continue failed for: " + params.request.url, e); - } - } - - // if finished and matches current frameId, commit right away - if (reqresp && reqresp.payload && reqresp.payload.length && params.frameId === this.frameId && !isNaN(Number(reqresp.requestId))) { - this.removeReqResp(reqresp.requestId); - this.fullCommit(reqresp, sessions); - } - } - - async rewriteResponse(params, reqresp, sessions) { - if (!reqresp || !reqresp.payload) { - return false; - } - - const payload = reqresp.payload; - - if (!payload.length) { - return false; - } - - let newString = null; - let string = null; - - const { url, extraOpts } = reqresp; - - const ct = this._getContentType(params.responseHeaders); - - switch (ct) { - case "application/x-mpegURL": - case "application/vnd.apple.mpegurl": - string = payload.toString("utf-8"); - newString = rewriteHLS(string, {save: reqresp.extraOpts}); - break; - - case "application/dash+xml": - string = payload.toString("utf-8"); - newString = rewriteDASH(string, {save: reqresp.extraOpts}); - break; - - case "text/html": - case "application/json": - case "text/javascript": - case "application/javascript": - case "application/x-javascript": { - const rw = getCustomRewriter(url, ct === "text/html"); - - if (rw) { - string = payload.toString(); - newString = rw.rewrite(string, {live: true, save: extraOpts}); - } - } - } - - if (!newString) { - return false; - } - - if (newString !== string) { - reqresp.extraOpts.rewritten = 1; - reqresp.payload = encoder.encode(newString); - - console.log("Rewritten Response for: " + params.request.url); - } - - const base64Str = Buffer.from(newString).toString("base64"); - - try { - await this.send("Fetch.fulfillRequest", - {"requestId": params.requestId, - "responseCode": params.responseStatusCode, - "responseHeaders": params.responseHeaders, - "body": base64Str - }, sessions); - //console.log("Replace succeeded? for: " + params.request.url); - return true; - } catch (e) { - console.warn("Fulfill Failed for: " + params.request.url + " " + e); - } - - return false; - } - - _getContentType(headers) { - for (let header of headers) { - if (header.name.toLowerCase() === "content-type") { - return header.value.split(";")[0]; - } - } - - return null; - } - - noResponseForStatus(status) { - return (!status || status === 204 || (status >= 300 && status < 400)); - } - - isValidUrl(url) { - return url && (url.startsWith("https:") || url.startsWith("http:")); - } - - async handleLoadingFinished(params, sessions) { - const reqresp = this.removeReqResp(params.requestId); - - if (!reqresp || !reqresp.url) { - //console.log("unknown request finished: " + params.requestId); - return; - } - - if (!this.isValidUrl(reqresp.url)) { - return; - } - - let payload = reqresp.payload; - - if (!reqresp.fetch && !payload) { - // empty response, don't attempt to store it - if (params.encodedDataLength) { - payload = await this.fetchPayloads(params, reqresp, sessions, "Network.getResponseBody"); - } - if (!payload || !payload.length) { - return; - } - reqresp.payload = payload; - } - - this.fullCommit(reqresp, sessions); - } - - async fullCommit(reqresp, sessions) { - //const requestId = reqresp.requestId; - - // let doneResolve; - - // const pending = new Promise((resolve) => { - // doneResolve = resolve; - // }); - - //this._fetchPending.set(requestId, pending); - - try { - const data = reqresp.toDBRecord(reqresp.payload, this.pageInfo); - - // top-level URL is a non-GET request - if (data && data.requestUrl && data.requestUrl === this.pageInfo.url && !sessions.length) { - this.pageInfo.url = data.url; - } - - // top-level page resource - if (data && !sessions.length && reqresp.url === this.pageInfo.url) { - this.pageInfo.ts = reqresp.ts; - - if (data.mime === "application/pdf" && reqresp.payload && this.pageInfo) { - // ensure set for electron - this.pageInfo.mime = "application/pdf"; - this.pdfLoadURL = reqresp.url; - } else { - if (!data.extraOpts) { - data.extraOpts = {}; - } - - data.extraOpts.pixelRatio = this.pixelRatio; - - // handle storage - const storage = await this.getStorage(reqresp.url); - - if (storage) { - data.extraOpts.storage = storage; - } - } - } - - if (data) { - await this.commitResource(data); - } - - } catch(e) { - console.log("error committing", e); - } - - //doneResolve(); - //delete this._fetchPending[requestId]; - } - - async getStorage(url) { - // check if recording storage is allowed - if (!this.recordStorage) { - return null; - } - - const securityOrigin = new URL(url).origin; - const storageId = {securityOrigin, isLocalStorage: true}; - - const local = await this.send("DOMStorage.getDOMStorageItems", {storageId}); - storageId.isLocalStorage = false; - - const session = await this.send("DOMStorage.getDOMStorageItems", {storageId}); - - return JSON.stringify({local: local.entries, session: session.entries}); - } - - async handleRequestWillBeSent(params) { - if (this.shouldSkip(params.request.method, params.request.headers, params.type)) { - this.removeReqResp(params.requestId); - return; - } - - const reqresp = this.pendingReqResp(params.requestId); - - let data = null; - - if (params.redirectResponse) { - - if (reqresp.isSelfRedirect()) { - console.warn(`Skip self redirect: ${reqresp.url}`); - this.removeReqResp(params.requestId); - return; - } - - reqresp.fillResponseRedirect(params); - data = reqresp.toDBRecord(null, this.pageInfo); - } - - reqresp.fillRequest(params); - - // commit redirect response, if any - if (data) { - await this.commitResource(data); - } - } - - async handleFetchResponse(params, sessions) { - if (!params.networkId) { - //console.warn(`No networkId for ${params.request.url} ${params.resourceType}`); - } - - if (this.pdfLoadURL && params.request.url === this.pdfLoadURL) { - return null; - } - - const id = params.networkId || params.requestId; - - const reqresp = this.pendingReqResp(id); - - reqresp.fillFetchRequestPaused(params); - - reqresp.payload = await this.fetchPayloads(params, reqresp, sessions, "Fetch.getResponseBody"); - - if (reqresp.status === 206) { - this.removeReqResp(id); - } - - return reqresp; - } - - parseMediaEventsAdded(params, sessions) { - if (!this.pageInfo.id) { - return; - } - - for (const {value} of params.events) { - if (value.indexOf("\"kLoad\"") > 0) { - const {url} = JSON.parse(value); - this.doAsyncFetch({url}, sessions); - break; - } - } - } - - async attemptFetchRedirect(request, resp) { - if (request.redirectOnly && resp.type === "opaqueredirect") { - const abort = new AbortController(); - resp = await fetch(request.url, {abort}); - abort.abort(); - - if (resp.redirected) { - console.warn(`Adding synthetic redirect ${request.url} -> ${resp.url}`); - return Response.redirect(resp.url, 302); - } - } - - console.warn(`async fetch error ${resp.status}, opaque due to redirect, retrying in browser`); - await this.doAsyncFetchInBrowser(request, request.sessions, true); - return null; - } - - async doAsyncFetchInBrowser(request, sessions) { - this._fetchUrls.add(request.url); - - const expression = `self.__bx_behaviors.doAsyncFetch("${request.url}")`; - - console.log("Start Async Load: " + request.url); - - await this.pageEval("__awp_async_fetch__", expression, sessions); - //console.log("Async Fetch Result: " + JSON.stringify(result)); - } - - async doAsyncFetch(request, sessions) { - if (!request || !this.isValidUrl(request.url)) { - return; - } - - if (this._fetchUrls.has(request.url)) { - console.log("Skipping, already fetching: " + request.url); - return; - } - - request.pageInfo = this.pageInfo; - request.sessions = sessions; - - this._fetchQueue.push(request); - - this.doBackgroundFetch(); - } - - async doBackgroundFetch() { - if (!this._fetchQueue.length || this._fetchPending.size >= MAX_CONCURRENT_FETCH || this.stopping) { - return; - } - - const request = this._fetchQueue.shift(); - - if (this._fetchUrls.has(request.url)) { - console.log("Skipping, already fetching: " + request.url); - return; - } - - let doneResolve; - const fetchId = "fetch-" + this.newPageId(); - - try { - console.log("Start Async Load: " + request.url); - - this._fetchUrls.add(request.url); - - const pending = new Promise((resolve) => { - doneResolve = resolve; - }); - - this._fetchPending.set(fetchId, pending); - - const opts = {...this.defaultFetchOpts}; - - if (request.getRequestHeadersDict) { - opts.headers = request.getRequestHeadersDict().headers; - opts.headers.delete("range"); - } else if (request.headers) { - opts.headers = request.headers; - } - - let resp = await fetch(request.url, opts); - if (resp.status === 0) { - resp = await this.attemptFetchRedirect(request, resp); - if (!resp) { - return; - } - } else if (resp.status >= 400) { - console.warn(`async fetch error ${resp.status}, retrying without headers`); - resp = await fetch(request.url, this.defaultFetchOpts); - if (resp.status >= 400) { - console.warn(`async fetch returned: ${resp.status}, trying in-browser fetch`); - await this.doAsyncFetchInBrowser(request, request.sessions, true); - return; - } - } - - const payload = await resp.arrayBuffer(); - - const reqresp = new RequestResponseInfo(fetchId); - reqresp.status = resp.status; - reqresp.statusText = resp.statusText; - reqresp.responseHeaders = Object.fromEntries(resp.headers); - - reqresp.method = "GET"; - reqresp.url = request.url; - reqresp.payload = new Uint8Array(payload); - - const data = reqresp.toDBRecord(reqresp.payload, request.pageInfo); - - if (data) { - await this.commitResource(data, request.pageInfo); - console.log(`Done Async Load (${resp.status}) ${request.url}`); - - if (this.pageInfo !== request.pageInfo) { - await this.commitPage(request.pageInfo); - } - - } else { - console.warn("No Data Committed for: " + request.url + " Status: " + resp.status); - } - - } catch(e) { - console.log(e); - this._fetchUrls.delete(request.url); - } finally { - doneResolve(); - this._fetchPending.delete(fetchId); - } - } - - async fetchPayloads(params, reqresp, sessions, method) { - let payload; - - if (reqresp.status === 206) { - sleep(500).then(() => this.doAsyncFetch(reqresp, sessions)); - reqresp.payload = null; - return null; - } - - if (!this.noResponseForStatus(reqresp.status)) { - try { - reqresp.awaitingPayload = true; - payload = await this.send(method, {requestId: params.requestId}, sessions); - - if (payload.base64Encoded) { - payload = Buffer.from(payload.body, "base64"); - } else { - payload = Buffer.from(payload.body, "utf-8"); - } - - } catch (e) { - console.warn("no buffer for: " + reqresp.url + " " + reqresp.status + " " + reqresp.requestId + " " + method); - console.warn(e); - return null; - } finally { - reqresp.awaitingPayload = false; - } - } else { - payload = Buffer.from([]); - } - - if (reqresp.hasPostData && !reqresp.postData) { - try { - let postRes = await this.send("Network.getRequestPostData", {requestId: reqresp.requestId}, sessions); - reqresp.postData = Buffer.from(postRes.postData, "utf-8"); - } catch(e) { - console.warn("Error getting POST data: " + e); - } - } - - reqresp.payload = payload; - return payload; - } - - flushPending() { - const oldPendingReqs = this.pendingRequests; - const pageInfo = this.pageInfo; - this.pendingRequests = {}; - - if (!oldPendingReqs) { - return; - } - - for (const [id, reqresp] of Object.entries(oldPendingReqs)) { - if (reqresp.payload) { - console.log(`Committing Finished ${id} - ${reqresp.url}`); - - const data = reqresp.toDBRecord(reqresp.payload, pageInfo); - - if (data) { - this.commitResource(data); - } - - // top-level page resource - if (data && reqresp.url === pageInfo.url) { - pageInfo.ts = reqresp.ts; - } - - } else { - console.log(`Discarding Payload-less ${reqresp.url}`); - } - } - } - - send(method, params = null, sessions = []) { - let promise = null; - - if (this.flatMode && sessions.length) { - return this._doSendCommandFlat(method, params, sessions[sessions.length - 1]); - } - - for (let i = sessions.length - 1; i >= 0; i--) { - const id = this.id++; - - const p = new Promise((resolve, reject) => { - this._promises[id] = {resolve, reject, method}; - }); - - if (!promise) { - promise = p; - } - - //let message = params ? {id, method, params} : {id, method}; - const message = JSON.stringify({id, method, params}); - - //const sessionId = sessions[sessions.length - 1 - i]; - const sessionId = sessions[i]; - - params = {sessionId, message}; - method = "Target.sendMessageToTarget"; - } - - return this._doSendCommand(method, params, promise); - } - - parseTextFromDOMSnapshot(result) { - const TEXT_NODE = 3; - const ELEMENT_NODE = 1; - - const SKIPPED_NODES = ["SCRIPT", "STYLE", "HEADER", "FOOTER", "BANNER-DIV", "NOSCRIPT"]; - - const {strings, documents} = result; - - const accum = []; - - for (const doc of documents) { - const nodeValues = doc.nodes.nodeValue; - const nodeNames = doc.nodes.nodeName; - const nodeTypes = doc.nodes.nodeType; - const parentIndex = doc.nodes.parentIndex; - - for (let i = 0; i < nodeValues.length; i++) { - if (nodeValues[i] === -1) { - continue; - } - - if (nodeTypes[i] === TEXT_NODE) { - const pi = parentIndex[i]; - if (pi >= 0 && nodeTypes[pi] === ELEMENT_NODE) { - const name = strings[nodeNames[pi]]; - - if (!SKIPPED_NODES.includes(name)) { - const value = strings[nodeValues[i]].trim(); - if (value) { - accum.push(value); - } - } - } - } - } - - return accum.join("\n"); - } - } - - // parseTextFromDom(dom) { - // const accum = []; - // const metadata = {}; - - // this._parseText(dom.root, metadata, accum); - - // return accum.join("\n"); - // } - - // _parseText(node, metadata, accum) { - // const SKIPPED_NODES = ["script", "style", "header", "footer", "banner-div", "noscript"]; - // const EMPTY_LIST = []; - // const TEXT = "#text"; - // const TITLE = "title"; - - // const name = node.nodeName.toLowerCase(); - - // if (SKIPPED_NODES.includes(name)) { - // return; - // } - - // const children = node.children || EMPTY_LIST; - - // if (name === TEXT) { - // const value = node.nodeValue ? node.nodeValue.trim() : ""; - // if (value) { - // accum.push(value); - // } - // } else if (name === TITLE) { - // const title = []; - - // for (let child of children) { - // this._parseText(child, null, title); - // } - - // if (metadata) { - // metadata.title = title.join(" "); - // } else { - // accum.push(title.join(" ")); - // } - // } else { - // for (let child of children) { - // this._parseText(child, metadata, accum); - // } - - // if (node.contentDocument) { - // this._parseText(node.contentDocument, null, accum); - // } - // } - // } -} - -export { Recorder }; diff --git a/src/recorder.ts b/src/recorder.ts new file mode 100644 index 00000000..40583e32 --- /dev/null +++ b/src/recorder.ts @@ -0,0 +1,2038 @@ +import { RequestResponseInfo } from "./requestresponseinfo"; + +import { getCustomRewriter, rewriteDASH, rewriteHLS } from "@webrecorder/wabac"; + +import { Buffer } from "buffer"; + +// @ts-expect-error - Missing types +import behaviors from "browsertrix-behaviors/dist/behaviors.js"; +import extractPDF from "@/static/extractPDF.js"; + +import { + BEHAVIOR_WAIT_LOAD, + BEHAVIOR_READY_START, + BEHAVIOR_RUNNING, + BEHAVIOR_PAUSED, + BEHAVIOR_DONE, +} from "./consts"; + +// @ts-expect-error - TS2554 - Expected 0 arguments, but got 1. +const encoder = new TextEncoder("utf-8"); + +const MAX_CONCURRENT_FETCH = 6; + +const MAIN_INJECT_URL = "__awp_main_inject__"; + +const IFRAME_INJECT_URL = "__awp_iframe_inject__"; + +const BEHAVIOR_LOG_FUNC = "__bx_log"; + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'time' implicitly has an 'any' type. +function sleep(time) { + // @ts-expect-error - TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? + return new Promise((resolve) => setTimeout(() => resolve(), time)); +} + +// =========================================================================== +class Recorder { + constructor() { + // @ts-expect-error - TS2339 - Property 'flatMode' does not exist on type 'Recorder'. + this.flatMode = false; + + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'Recorder'. + this.collId = ""; + + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + this.pendingRequests = {}; + // @ts-expect-error - TS2339 - Property 'numPending' does not exist on type 'Recorder'. + this.numPending = 0; + + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'Recorder'. + this.running = false; + // @ts-expect-error - TS2339 - Property 'stopping' does not exist on type 'Recorder'. + this.stopping = false; + + // @ts-expect-error - TS2339 - Property 'frameId' does not exist on type 'Recorder'. + this.frameId = null; + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + this.pageInfo = { size: 0 }; + // @ts-expect-error - TS2339 - Property 'firstPageStarted' does not exist on type 'Recorder'. + this.firstPageStarted = false; + + // @ts-expect-error - TS2339 - Property 'sizeNew' does not exist on type 'Recorder'. + this.sizeNew = 0; + // @ts-expect-error - TS2339 - Property 'sizeTotal' does not exist on type 'Recorder'. + this.sizeTotal = 0; + // @ts-expect-error - TS2339 - Property 'numPages' does not exist on type 'Recorder'. + this.numPages = 0; + // @ts-expect-error - TS2339 - Property 'numUrls' does not exist on type 'Recorder'. + this.numUrls = 0; + + // @ts-expect-error - TS2339 - Property 'historyMap' does not exist on type 'Recorder'. + this.historyMap = {}; + + // @ts-expect-error - TS2339 - Property '_promises' does not exist on type 'Recorder'. + this._promises = {}; + + // @ts-expect-error - TS2339 - Property '_fetchPending' does not exist on type 'Recorder'. + this._fetchPending = new Map(); + // @ts-expect-error - TS2339 - Property '_fetchQueue' does not exist on type 'Recorder'. + this._fetchQueue = []; + // @ts-expect-error - TS2339 - Property '_fetchUrls' does not exist on type 'Recorder'. + this._fetchUrls = new Set(); + + // @ts-expect-error - TS2339 - Property '_bindings' does not exist on type 'Recorder'. + this._bindings = {}; + + // @ts-expect-error - TS2339 - Property 'pdfLoadURL' does not exist on type 'Recorder'. + this.pdfLoadURL = null; + + // @ts-expect-error - TS2339 - Property 'pixelRatio' does not exist on type 'Recorder'. + this.pixelRatio = 1; + + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'Recorder'. + this.failureMsg = null; + + // @ts-expect-error - TS2339 - Property 'id' does not exist on type 'Recorder'. + this.id = 1; + // @ts-expect-error - TS2551 - Property 'sessionSet' does not exist on type 'Recorder'. Did you mean 'sessionClose'? + this.sessionSet = new Set(); + + // @ts-expect-error - TS2339 - Property '_cachePageInfo' does not exist on type 'Recorder'. + this._cachePageInfo = null; + // @ts-expect-error - TS2339 - Property '_cacheSessionNew' does not exist on type 'Recorder'. + this._cacheSessionNew = 0; + // @ts-expect-error - TS2339 - Property '_cacheSessionTotal' does not exist on type 'Recorder'. + this._cacheSessionTotal = 0; + + // @ts-expect-error - TS2339 - Property 'behaviorInitStr' does not exist on type 'Recorder'. + this.behaviorInitStr = JSON.stringify({ + autofetch: true, + autoplay: true, + autoscroll: true, + siteSpecific: true, + log: BEHAVIOR_LOG_FUNC, + }); + + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + this.behaviorState = BEHAVIOR_WAIT_LOAD; + // @ts-expect-error - TS2339 - Property 'behaviorData' does not exist on type 'Recorder'. + this.behaviorData = null; + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'Recorder'. + this.autorun = false; + + // @ts-expect-error - TS2339 - Property 'defaultFetchOpts' does not exist on type 'Recorder'. + this.defaultFetchOpts = { + redirect: "manual", + }; + } + + // @ts-expect-error - TS7006 - Parameter 'autorun' implicitly has an 'any' type. + setAutoRunBehavior(autorun) { + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'Recorder'. + this.autorun = autorun; + } + + // @ts-expect-error - TS7006 - Parameter 'path' implicitly has an 'any' type. + addExternalInject(path) { + return ` + (function () { + window.addEventListener("DOMContentLoaded", () => { + const e = document.createElement("script"); + e.src = "${ + // @ts-expect-error - TS2339 - Property 'getExternalInjectURL' does not exist on type 'Recorder'. + this.getExternalInjectURL(path) + }"; + document.head.appendChild(e); + }); + })(); + `; + } + + getInjectScript() { + return ( + behaviors + + `; + self.__bx_behaviors.init(${ + // @ts-expect-error - TS2339 - Property 'behaviorInitStr' does not exist on type 'Recorder'. + this.behaviorInitStr + }); + + window.addEventListener("beforeunload", () => {});` + + this.getFlashInjectScript() + ); + } + + getFlashInjectScript() { + return ( + ` + (() => { + const description = "Shockwave Flash 32.0 r0"; + const enabledPlugin = { description }; + navigator.plugins["Shockwave Flash"] = { description }; + function addPlugin(type, suffixes) { + const mime = { enabledPlugin, description: "", type, suffixes}; + navigator.mimeTypes[type] = mime; + navigator.mimeTypes[navigator.mimeTypes.length] = mime; + } + addPlugin("application/futuresplash", "sp1"); + addPlugin("application/x-shockwave-flash2-preview", "swf"); + addPlugin("application/x-shockwave-flash", "swf"); + addPlugin("application/vnd.adobe.flash-movie", "swf"); + })(); + ` + this.addExternalInject("ruffle/ruffle.js") + ); + } + + async detach() { + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'Recorder'. + if (!this.running) { + return; + } + + // @ts-expect-error - TS2339 - Property 'stopping' does not exist on type 'Recorder'. + this.stopping = true; + + const domSnapshot = await this.getFullText(true); + + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + if (this.behaviorState === BEHAVIOR_RUNNING) { + this.toggleBehaviors(); + } + + try { + await Promise.race([ + // @ts-expect-error - TS2339 - Property '_fetchPending' does not exist on type 'Recorder'. + Promise.all(this._fetchPending.values()), + sleep(15000), + ]); + } catch (e) { + console.log(e); + } + + try { + // @ts-expect-error - TS2339 - Property '_doDetach' does not exist on type 'Recorder'. + await this._doDetach(); + } catch (e) { + console.log(e); + } + + await this._stop(domSnapshot); + } + + async _stop(domSnapshot = null) { + // @ts-expect-error - TS2339 - Property '_updateStatusId' does not exist on type 'Recorder'. + clearInterval(this._updateStatusId); + // @ts-expect-error - TS2339 - Property '_loopId' does not exist on type 'Recorder'. + clearInterval(this._loopId); + // @ts-expect-error - TS2339 - Property '_bgFetchId' does not exist on type 'Recorder'. + clearInterval(this._bgFetchId); + + this.flushPending(); + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'Recorder'. + this.running = false; + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + this.pendingRequests = {}; + // @ts-expect-error - TS2339 - Property 'numPending' does not exist on type 'Recorder'. + this.numPending = 0; + + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + await this.commitPage(this.pageInfo, domSnapshot, true); + + // @ts-expect-error - TS2339 - Property '_cleaningUp' does not exist on type 'Recorder'. + if (this._cleaningUp) { + // @ts-expect-error - TS2339 - Property '_cleanupStaleWait' does not exist on type 'Recorder'. + await this._cleanupStaleWait; + } else { + await this.doUpdateLoop(); + } + + // @ts-expect-error - TS2551 - Property '_doStop' does not exist on type 'Recorder'. Did you mean '_stop'? + this._doStop(); + } + + async attach() { + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'Recorder'. + if (this.running) { + console.warn("Already Attached!"); + return; + } + + // @ts-expect-error - TS2339 - Property '_doAttach' does not exist on type 'Recorder'. + await this._doAttach(); + + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'Recorder'. + this.running = true; + // @ts-expect-error - TS2339 - Property 'stopping' does not exist on type 'Recorder'. + this.stopping = false; + + // @ts-expect-error - TS2339 - Property '_cachePageInfo' does not exist on type 'Recorder'. + this._cachePageInfo = null; + // @ts-expect-error - TS2339 - Property '_cacheSessionNew' does not exist on type 'Recorder'. + this._cacheSessionNew = 0; + // @ts-expect-error - TS2339 - Property '_cacheSessionTotal' does not exist on type 'Recorder'. + this._cacheSessionTotal = 0; + // @ts-expect-error - TS2339 - Property '_cleaningUp' does not exist on type 'Recorder'. + this._cleaningUp = false; + // @ts-expect-error - TS2339 - Property '_cleanupStaleWait' does not exist on type 'Recorder'. + this._cleanupStaleWait = null; + + // @ts-expect-error - TS2339 - Property '_updateStatusId' does not exist on type 'Recorder'. + this._updateStatusId = setInterval(() => this.updateStatus(), 1000); + + // @ts-expect-error - TS2339 - Property '_loopId' does not exist on type 'Recorder'. + this._loopId = setInterval(() => this.updateLoop(), 10000); + + // @ts-expect-error - TS2339 - Property '_bgFetchId' does not exist on type 'Recorder'. + this._bgFetchId = setInterval(() => this.doBackgroundFetch(), 10000); + } + + updateLoop() { + // @ts-expect-error - TS2339 - Property '_cleaningUp' does not exist on type 'Recorder'. + if (!this._cleaningUp) { + // @ts-expect-error - TS2339 - Property '_cleanupStaleWait' does not exist on type 'Recorder'. + this._cleanupStaleWait = this.doUpdateLoop(); + } + } + + async doUpdateLoop() { + // @ts-expect-error - TS2339 - Property '_cleaningUp' does not exist on type 'Recorder'. + this._cleaningUp = true; + + try { + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + for (const key of Object.keys(this.pendingRequests)) { + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + const reqresp = this.pendingRequests[key]; + + if (!reqresp) { + continue; + } + + // @ts-expect-error - TS2362 - The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + if (new Date() - reqresp._created > 20000) { + if (this.noResponseForStatus(reqresp.status)) { + console.log("Dropping stale: " + key); + } else if (!reqresp.awaitingPayload) { + console.log(`Committing stale ${reqresp.status} ${reqresp.url}`); + await this.fullCommit(reqresp, []); + } else { + console.log(`Waiting for payload for ${reqresp.url}`); + continue; + } + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + delete this.pendingRequests[key]; + } + } + + // @ts-expect-error - TS2339 - Property '_cachePageInfo' does not exist on type 'Recorder'. + if (this._cachePageInfo) { + // @ts-expect-error - TS2339 - Property '_doAddPage' does not exist on type 'Recorder'. | TS2339 - Property '_cachePageInfo' does not exist on type 'Recorder'. + await this._doAddPage(this._cachePageInfo); + // @ts-expect-error - TS2339 - Property '_cachePageInfo' does not exist on type 'Recorder'. + this._cachePageInfo = null; + } + + // @ts-expect-error - TS2339 - Property '_cacheSessionTotal' does not exist on type 'Recorder'. + if (this._cacheSessionTotal > 0) { + // @ts-expect-error - TS2339 - Property '_doIncSizes' does not exist on type 'Recorder'. | TS2339 - Property '_cacheSessionTotal' does not exist on type 'Recorder'. | TS2339 - Property '_cacheSessionNew' does not exist on type 'Recorder'. + await this._doIncSizes(this._cacheSessionTotal, this._cacheSessionNew); + // @ts-expect-error - TS2339 - Property '_cacheSessionTotal' does not exist on type 'Recorder'. + this._cacheSessionTotal = 0; + // @ts-expect-error - TS2339 - Property '_cacheSessionNew' does not exist on type 'Recorder'. + this._cacheSessionNew = 0; + } + } finally { + // @ts-expect-error - TS2339 - Property '_cleaningUp' does not exist on type 'Recorder'. + this._cleaningUp = false; + } + } + + updateStatus() { + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + const networkPending = Object.keys(this.pendingRequests).length; + // @ts-expect-error - TS2339 - Property 'numPending' does not exist on type 'Recorder'. | TS2339 - Property '_fetchPending' does not exist on type 'Recorder'. + this.numPending = networkPending + this._fetchPending.size; + + // @ts-expect-error - TS2339 - Property '_loadedDoneResolve' does not exist on type 'Recorder'. + if (networkPending === 0 && this._loadedDoneResolve) { + // @ts-expect-error - TS2339 - Property '_loadedDoneResolve' does not exist on type 'Recorder'. + this._loadedDoneResolve(); + } + + // @ts-expect-error - TS2551 - Property 'doUpdateStatus' does not exist on type 'Recorder'. Did you mean 'updateStatus'? + this.doUpdateStatus(); + } + + getStatusMsg() { + return { + // @ts-expect-error - TS2339 - Property 'running' does not exist on type 'Recorder'. + recording: this.running, + // @ts-expect-error - TS2339 - Property 'firstPageStarted' does not exist on type 'Recorder'. + firstPageStarted: this.firstPageStarted, + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + behaviorState: this.behaviorState, + // @ts-expect-error - TS2339 - Property 'behaviorData' does not exist on type 'Recorder'. + behaviorData: this.behaviorData, + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'Recorder'. + autorun: this.autorun, + // @ts-expect-error - TS2339 - Property 'sizeTotal' does not exist on type 'Recorder'. + sizeTotal: this.sizeTotal, + // @ts-expect-error - TS2339 - Property 'sizeNew' does not exist on type 'Recorder'. + sizeNew: this.sizeNew, + // @ts-expect-error - TS2339 - Property 'numUrls' does not exist on type 'Recorder'. + numUrls: this.numUrls, + // @ts-expect-error - TS2339 - Property 'numPages' does not exist on type 'Recorder'. + numPages: this.numPages, + // @ts-expect-error - TS2339 - Property 'numPending' does not exist on type 'Recorder'. + numPending: this.numPending, + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + pageUrl: this.pageInfo.url, + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + pageTs: this.pageInfo.ts, + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'Recorder'. + failureMsg: this.failureMsg, + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type 'Recorder'. + collId: this.collId, + // @ts-expect-error - TS2339 - Property 'stopping' does not exist on type 'Recorder'. + stopping: this.stopping, + type: "status", + }; + } + + async _doInjectTopFrame() { + await this.newDocEval(MAIN_INJECT_URL, this.getInjectScript()); + + // @ts-expect-error - TS7031 - Binding element 'data' implicitly has an 'any' type. | TS7031 - Binding element 'type' implicitly has an 'any' type. + await this.exposeFunction(BEHAVIOR_LOG_FUNC, ({ data, type }) => { + switch (type) { + case "info": + // @ts-expect-error - TS2339 - Property 'behaviorData' does not exist on type 'Recorder'. + this.behaviorData = data; + //console.log("bx log", JSON.stringify(data)); + this.updateStatus(); + break; + } + }); + } + + // @ts-expect-error - TS7006 - Parameter 'name' implicitly has an 'any' type. | TS7006 - Parameter 'source' implicitly has an 'any' type. + async newDocEval(name, source) { + source += "\n\n//# sourceURL=" + name; + // @ts-expect-error - TS2345 - Argument of type '{ source: any; }' is not assignable to parameter of type 'null | undefined'. + await this.send("Page.addScriptToEvaluateOnNewDocument", { source }); + } + + // @ts-expect-error - TS7006 - Parameter 'name' implicitly has an 'any' type. | TS7006 - Parameter 'expression' implicitly has an 'any' type. + pageEval(name, expression, sessions = []) { + expression += "\n\n//# sourceURL=" + name; + return this.send( + "Runtime.evaluate", + // @ts-expect-error - TS2345 - Argument of type '{ expression: any; userGesture: boolean; includeCommandLineAPI: boolean; allowUnsafeEvalBlockedByCSP: boolean; awaitPromise: boolean; }' is not assignable to parameter of type 'null | undefined'. + { + expression, + userGesture: true, + includeCommandLineAPI: true, + allowUnsafeEvalBlockedByCSP: true, + //replMode: true, + awaitPromise: true, + //returnByValue: true, + }, + sessions, + ); + } + + // @ts-expect-error - TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async _doInjectIframe(sessions) { + try { + //console.log("inject to: " + sessions[0]); + await this.pageEval(IFRAME_INJECT_URL, this.getInjectScript(), sessions); + } catch (e) { + console.warn(e); + } + } + + toggleBehaviors() { + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + switch (this.behaviorState) { + case BEHAVIOR_WAIT_LOAD: + case BEHAVIOR_DONE: + break; + + case BEHAVIOR_READY_START: + this.pageEval( + "__awp_behavior_run__", + "self.__bx_behaviors.run();", + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + ).then(() => (this.behaviorState = BEHAVIOR_DONE)); + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + this.behaviorState = BEHAVIOR_RUNNING; + break; + + case BEHAVIOR_RUNNING: + this.pageEval( + "__awp_behavior_unpause__", + "self.__bx_behaviors.pause();", + ); + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + this.behaviorState = BEHAVIOR_PAUSED; + break; + + case BEHAVIOR_PAUSED: + this.pageEval( + "__awp_behavior_unpause__", + "self.__bx_behaviors.unpause();", + ); + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + this.behaviorState = BEHAVIOR_RUNNING; + break; + } + + this.updateStatus(); + } + + // @ts-expect-error - TS7006 - Parameter 'name' implicitly has an 'any' type. | TS7006 - Parameter 'func' implicitly has an 'any' type. + async exposeFunction(name, func, sessions = []) { + // @ts-expect-error - TS2339 - Property '_bindings' does not exist on type 'Recorder'. + this._bindings[name] = func; + // @ts-expect-error - TS2345 - Argument of type '{ name: any; }' is not assignable to parameter of type 'null | undefined'. + await this.send("Runtime.addBinding", { name }, sessions); + + //await this.newDocEval("__awp_binding_wrap__", ` + //self._${name} = (args) => self.${name}(JSON.stringify(args));`, sessions); + } + + loaded() { + // @ts-expect-error - TS2551 - Property '_loaded' does not exist on type 'Recorder'. Did you mean 'loaded'? + this._loaded = new Promise( + // @ts-expect-error - TS2339 - Property '_loadedDoneResolve' does not exist on type 'Recorder'. + (resolve) => (this._loadedDoneResolve = resolve), + ); + // @ts-expect-error - TS2551 - Property '_loaded' does not exist on type 'Recorder'. Did you mean 'loaded'? + return this._loaded; + } + + async start() { + // @ts-expect-error - TS2339 - Property 'firstPageStarted' does not exist on type 'Recorder'. + this.firstPageStarted = false; + + await this.send("Page.enable"); + + await this.send("Runtime.enable"); + + await this.send("DOMSnapshot.enable"); + + await this.initPixRatio(); + + await this._doInjectTopFrame(); + + await this.sessionInit([]); + + // @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'Recorder'. + this.failureMsg = null; + } + + async initPixRatio() { + const { result } = await this.pageEval( + "__awp_get_pix_ratio", + "window.devicePixelRatio", + ); + if (result && result.type === "number") { + // @ts-expect-error - TS2339 - Property 'pixelRatio' does not exist on type 'Recorder'. + this.pixelRatio = result.value; + } + } + + // @ts-expect-error - TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async sessionInit(sessions) { + try { + await this.send("Network.enable", null, sessions); + + try { + await this.send( + "Fetch.enable", + // @ts-expect-error - TS2345 - Argument of type '{ patterns: { urlPattern: string; requestStage: string; }[]; }' is not assignable to parameter of type 'null | undefined'. + { patterns: [{ urlPattern: "*", requestStage: "Response" }] }, + sessions, + ); + } catch (e) { + console.log("No Fetch Available", e); + } + + try { + await this.send("Media.enable", null, sessions); + } catch (e) { + console.log("No media events available"); + } + + await this.send( + "Target.setAutoAttach", + // @ts-expect-error - TS2345 - Argument of type '{ autoAttach: boolean; waitForDebuggerOnStart: boolean; flatten: any; }' is not assignable to parameter of type 'null | undefined'. + { + autoAttach: true, + waitForDebuggerOnStart: true, + // @ts-expect-error - TS2339 - Property 'flatMode' does not exist on type 'Recorder'. + flatten: this.flatMode, + }, + sessions, + ); + + // disable cache for now? + await this.send( + "Network.setCacheDisabled", + // @ts-expect-error - TS2345 - Argument of type '{ cacheDisabled: boolean; }' is not assignable to parameter of type 'null | undefined'. + { cacheDisabled: true }, + sessions, + ); + await this.send( + "Network.setBypassServiceWorker", + // @ts-expect-error - TS2345 - Argument of type '{ bypass: boolean; }' is not assignable to parameter of type 'null | undefined'. + { bypass: true }, + sessions, + ); + // another option: clear cache, but don't disable + await this.send("Network.clearBrowserCache", null, sessions); + } catch (e) { + console.warn("Session Init Error: "); + console.log(e); + } + } + + async sessionClose(sessions = []) { + await this.send("Page.disable"); + await this.send("Runtime.disable"); + await this.send("DOMSnapshot.disable"); + + await this.send("Debugger.disable"); + + await this.send("Network.disable", null, sessions); + + await this.send("Fetch.disable", null, sessions); + + try { + await this.send("Media.disable", null, sessions); + } catch (e) { + // ignore + } + + // @ts-expect-error - TS2345 - Argument of type '{ autoAttach: boolean; waitForDebuggerOnStart: boolean; }' is not assignable to parameter of type 'null | undefined'. + await this.send("Target.setAutoAttach", { + autoAttach: false, + waitForDebuggerOnStart: false, + }); + + await this.send( + "Network.setBypassServiceWorker", + // @ts-expect-error - TS2345 - Argument of type '{ bypass: boolean; }' is not assignable to parameter of type 'null | undefined'. + { bypass: false }, + sessions, + ); + } + + // @ts-expect-error - TS7006 - Parameter 'requestId' implicitly has an 'any' type. + pendingReqResp(requestId, reuseOnly = false) { + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + if (!this.pendingRequests[requestId]) { + if (reuseOnly || !requestId) { + return null; + } + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + this.pendingRequests[requestId] = new RequestResponseInfo(requestId); + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + } else if (requestId !== this.pendingRequests[requestId].requestId) { + console.error("Wrong Req Id!"); + } + + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + return this.pendingRequests[requestId]; + } + + // @ts-expect-error - TS7006 - Parameter 'requestId' implicitly has an 'any' type. + removeReqResp(requestId) { + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + const reqresp = this.pendingRequests[requestId]; + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + delete this.pendingRequests[requestId]; + return reqresp; + } + + // @ts-expect-error - TS7006 - Parameter 'method' implicitly has an 'any' type. | TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async processMessage(method, params, sessions) { + switch (method) { + case "Target.attachedToTarget": + sessions.push(params.sessionId); + + try { + // @ts-expect-error - TS2551 - Property 'sessionSet' does not exist on type 'Recorder'. Did you mean 'sessionClose'? + this.sessionSet.add(params.sessionId); + + const type = params.targetInfo.type; + + const allowAttach = type !== "service_worker"; + + if (allowAttach) { + await this.sessionInit(sessions); + } + + if (params.waitingForDebugger) { + await this.send("Runtime.runIfWaitingForDebugger", null, sessions); + } + + if (allowAttach) { + console.log( + "Target Attached: " + + type + + " " + + params.targetInfo.url + + " " + + params.sessionId, + ); + + if (type === "page" || type === "iframe") { + await this._doInjectIframe(sessions); + } + } else { + console.log( + "Not allowed attach for: " + + type + + " " + + params.targetInfo.url + + " " + + params.sessionId, + ); + + // @ts-expect-error - TS2339 - Property 'flatMode' does not exist on type 'Recorder'. + const params2 = this.flatMode + ? { sessionId: params.sessionId } + : { targetId: params.targetInfo.targetId }; + await this.send( + "Runtime.runIfWaitingForDebugger", + // @ts-expect-error - TS2345 - Argument of type '{ sessionId: any; targetId?: undefined; } | { targetId: any; sessionId?: undefined; }' is not assignable to parameter of type 'null | undefined'. + params2, + sessions, + ); + } + } catch (e) { + console.log(e); + console.warn( + "Error attaching target: " + + params.targetInfo.type + + " " + + params.targetInfo.url, + ); + } + break; + + case "Target.detachedFromTarget": + console.log("Detaching from: " + params.sessionId); + // @ts-expect-error - TS2551 - Property 'sessionSet' does not exist on type 'Recorder'. Did you mean 'sessionClose'? + this.sessionSet.delete(params.sessionId); + break; + + case "Target.receivedMessageFromTarget": + // @ts-expect-error - TS2551 - Property 'sessionSet' does not exist on type 'Recorder'. Did you mean 'sessionClose'? + if (!this.sessionSet.has(params.sessionId)) { + console.warn("no such session: " + params.sessionId); + console.warn(params); + return; + } + sessions.push(params.sessionId); + this.receiveMessageFromTarget(params, sessions); + break; + + case "Network.responseReceived": + if (params.response) { + const reqresp = this.pendingReqResp(params.requestId, true); + if (reqresp) { + reqresp.fillResponseReceived(params); + } + } + break; + + case "Network.loadingFinished": + await this.handleLoadingFinished(params, sessions); + break; + + case "Network.loadingFailed": { + const reqresp = this.removeReqResp(params.requestId); + if (reqresp && reqresp.status !== 206) { + // check if this is a false positive -- a valid download that's already been fetched + // the abort is just for page, but download will succeed + if ( + params.type === "Document" && + params.errorText === "net::ERR_ABORTED" && + reqresp.isValidBinary() + ) { + this.fullCommit(reqresp, sessions); + } else { + console.log( + `Loading Failed for: ${reqresp.url} ${params.errorText}`, + ); + } + } + break; + } + + case "Network.requestServedFromCache": + this.removeReqResp(params.requestId); + break; + + case "Network.responseReceivedExtraInfo": + { + const reqresp = this.pendingReqResp(params.requestId, true); + if (reqresp) { + reqresp.fillResponseReceivedExtraInfo(params); + } + } + break; + + case "Network.requestWillBeSent": + await this.handleRequestWillBeSent(params); + break; + + case "Network.requestWillBeSentExtraInfo": + if (!this.shouldSkip(null, params.headers, null)) { + this.pendingReqResp(params.requestId).requestHeaders = params.headers; + } + break; + + case "Fetch.requestPaused": + await this.handlePaused(params, sessions); + break; + + case "Page.frameNavigated": + this.initPage(params, sessions); + break; + + case "Page.loadEventFired": + await this.updatePage(sessions); + break; + + case "Page.navigatedWithinDocument": + await this.updateHistory(sessions); + break; + + case "Page.windowOpen": + this.handleWindowOpen(params.url, sessions); + break; + + case "Page.javascriptDialogOpening": + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + if (this.behaviorState === BEHAVIOR_RUNNING) { + // @ts-expect-error - TS2345 - Argument of type '{ accept: boolean; }' is not assignable to parameter of type 'null | undefined'. + await this.send("Page.handleJavaScriptDialog", { accept: false }); + } + break; + + case "Debugger.paused": + // only unpause for beforeunload event + // could be paused for regular breakpoint if debugging via devtools + if (params.data && params.data.eventName === "listener:beforeunload") { + await this.unpauseAndFinish(params); + } + break; + + case "Media.playerEventsAdded": + this.parseMediaEventsAdded(params, sessions); + break; + + case "Runtime.bindingCalled": + // @ts-expect-error - TS2339 - Property '_bindings' does not exist on type 'Recorder'. + if (this._bindings[params.name]) { + // @ts-expect-error - TS2339 - Property '_bindings' does not exist on type 'Recorder'. + this._bindings[params.name](JSON.parse(params.payload)); + } + break; + + default: + //if (method.startsWith("Target.")) { + // console.log(method, params); + //} + return false; + } + + return true; + } + + // @ts-expect-error - TS7006 - Parameter 'url' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + handleWindowOpen(url, sessions) { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + const headers = { Referer: this.pageInfo.url }; + this.doAsyncFetch({ url, headers, redirectOnly: true }, sessions); + } + + isPagePDF() { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + return this.pageInfo.mime === "application/pdf"; + } + + async extractPDFText() { + let success = false; + // @ts-expect-error - TS2339 - Property 'pdfLoadURL' does not exist on type 'Recorder'. + console.log("pdfLoadURL", this.pdfLoadURL); + // @ts-expect-error - TS2339 - Property 'pdfLoadURL' does not exist on type 'Recorder'. + if (this.pdfLoadURL) { + const res = await this.pageEval( + "__awp_pdf_extract__", + ` + ${extractPDF}; + + extractPDF("${ + // @ts-expect-error - TS2339 - Property 'pdfLoadURL' does not exist on type 'Recorder'. + this.pdfLoadURL + }", "${ + // @ts-expect-error - TS2339 - Property 'getExternalInjectURL' does not exist on type 'Recorder'. + this.getExternalInjectURL("") + }"); + `, + ); + + if (res.result) { + const { type, value } = res.result; + if (type === "string") { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + this.pageInfo.text = value; + success = true; + } + } + } + + return success; + } + + async getFullText(finishing = false) { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. | TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + if (!this.pageInfo?.url) { + return null; + } + + if (this.isPagePDF() && !finishing) { + await this.extractPDFText(); + return null; + } + + try { + // wait upto 10s for getDocument, otherwise proceed + return await Promise.race([ + //this.send("DOM.getDocument", {"depth": -1, "pierce": true}), + // @ts-expect-error - TS2345 - Argument of type '{ computedStyles: never[]; }' is not assignable to parameter of type 'null | undefined'. + this.send("DOMSnapshot.captureSnapshot", { computedStyles: [] }), + sleep(10000), + ]); + } catch (e) { + console.log(e); + return null; + } + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. + async unpauseAndFinish(params) { + let domSnapshot = null; + + // determine if this is the unload from the injected content script + // if not, unpause but don't extract full text + const ourUnload = params.callFrames[0].url === MAIN_INJECT_URL; + + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + if (ourUnload && this.behaviorState !== BEHAVIOR_WAIT_LOAD) { + domSnapshot = await this.getFullText(true); + } + + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + const currPage = this.pageInfo; + + try { + await this.send("Debugger.resume"); + } catch (e) { + console.warn(e); + } + + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + if (this.behaviorState === BEHAVIOR_RUNNING) { + await this.toggleBehaviors(); + } + + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + if (ourUnload && this.behaviorState !== BEHAVIOR_WAIT_LOAD) { + this.flushPending(); + + await this.commitPage(currPage, domSnapshot, true); + } + } + + // @ts-expect-error - TS7006 - Parameter 'currPage' implicitly has an 'any' type. | TS7006 - Parameter 'domSnapshot' implicitly has an 'any' type. | TS7006 - Parameter 'finished' implicitly has an 'any' type. + commitPage(currPage, domSnapshot, finished) { + if (!currPage?.url || !currPage.ts || currPage.url === "about:blank") { + return; + } + + if (domSnapshot) { + currPage.text = this.parseTextFromDOMSnapshot(domSnapshot); + } else if (!currPage.text) { + console.warn("No Full Text Update"); + } + + currPage.finished = finished; + + // @ts-expect-error - TS2339 - Property '_doAddPage' does not exist on type 'Recorder'. + const res = this._doAddPage(currPage); + // @ts-expect-error - TS2339 - Property '_cachePageInfo' does not exist on type 'Recorder'. + if (currPage === this._cachePageInfo) { + // @ts-expect-error - TS2339 - Property '_cachePageInfo' does not exist on type 'Recorder'. + this._cachePageInfo = null; + } + return res; + } + + // @ts-expect-error - TS7006 - Parameter 'data' implicitly has an 'any' type. | TS7006 - Parameter 'pageInfo' implicitly has an 'any' type. + async commitResource(data, pageInfo) { + const payloadSize = data.payload.length; + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + pageInfo = pageInfo || this.pageInfo; + pageInfo.size += payloadSize; + + // @ts-expect-error - TS2339 - Property 'sizeTotal' does not exist on type 'Recorder'. + this.sizeTotal += payloadSize; + // @ts-expect-error - TS2339 - Property 'numUrls' does not exist on type 'Recorder'. + this.numUrls++; + + // @ts-expect-error - TS2339 - Property '_doAddResource' does not exist on type 'Recorder'. + const writtenSize = await this._doAddResource(data); + + // @ts-expect-error - TS2339 - Property 'sizeNew' does not exist on type 'Recorder'. + this.sizeNew += writtenSize; + + // @ts-expect-error - TS2339 - Property '_cachePageInfo' does not exist on type 'Recorder'. + this._cachePageInfo = pageInfo; + // @ts-expect-error - TS2339 - Property '_cacheSessionTotal' does not exist on type 'Recorder'. + this._cacheSessionTotal += payloadSize; + // @ts-expect-error - TS2339 - Property '_cacheSessionNew' does not exist on type 'Recorder'. + this._cacheSessionNew += writtenSize; + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + receiveMessageFromTarget(params, sessions) { + const nestedParams = JSON.parse(params.message); + + if (nestedParams.id != undefined) { + // @ts-expect-error - TS2339 - Property '_promises' does not exist on type 'Recorder'. + const promise = this._promises[nestedParams.id]; + if (promise) { + //if (DEBUG) { + // console.log("RECV " + promise.method + " " + params.message); + //} + if (nestedParams.error) { + promise.reject(nestedParams.error); + } else { + promise.resolve(nestedParams.result); + } + // @ts-expect-error - TS2339 - Property '_promises' does not exist on type 'Recorder'. + delete this._promises[nestedParams.id]; + } + } else if (nestedParams.params != undefined) { + //console.log("RECV MSG " + nestedParams.method + " " + nestedParams.message); + this.processMessage(nestedParams.method, nestedParams.params, sessions); + } + } + + //from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript + newPageId() { + return ( + Math.random().toString(36).substring(2, 15) + + Math.random().toString(36).substring(2, 15) + ); + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + initPage(params, sessions) { + if (params.frame.parentId) { + return false; + } + + //console.log("Page.frameNavigated: " + params.frame.url + " " + params.frame.id); + // @ts-expect-error - TS2339 - Property 'frameId' does not exist on type 'Recorder'. + if (this.frameId != params.frame.id) { + // @ts-expect-error - TS2339 - Property 'historyMap' does not exist on type 'Recorder'. + this.historyMap = {}; + } + + // @ts-expect-error - TS2339 - Property 'frameId' does not exist on type 'Recorder'. + this.frameId = params.frame.id; + // @ts-expect-error - TS2551 - Property 'loaderId' does not exist on type 'Recorder'. Did you mean 'loaded'? + this.loaderId = params.frame.loaderId; + + this._initNewPage(params.frame.url, params.frame.mimeType); + + // @ts-expect-error - TS2551 - Property 'loaderId' does not exist on type 'Recorder'. Did you mean 'loaded'? + const reqresp = this.removeReqResp(this.loaderId); + if (reqresp) { + this.fullCommit(reqresp, sessions); + } + + return true; + } + + initFirstPage() { + // Disable debugger intercept due to occasional crashes on some pages + // Enable unload pause only on first full page that is being recorded + //await this.send("Debugger.enable"); + //await this.send("DOMDebugger.setEventListenerBreakpoint", {"eventName": "beforeunload"}); + this.updateStatus(); + // @ts-expect-error - TS2339 - Property 'firstPageStarted' does not exist on type 'Recorder'. + this.firstPageStarted = true; + } + + // @ts-expect-error - TS7006 - Parameter 'url' implicitly has an 'any' type. | TS7006 - Parameter 'mime' implicitly has an 'any' type. + _initNewPage(url, mime) { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + this.pageInfo = { + id: this.newPageId(), + url, + ts: 0, + title: "", + text: "", + size: 0, + finished: false, + favIconUrl: "", + mime, + }; + + // @ts-expect-error - TS2339 - Property 'pdfLoadURL' does not exist on type 'Recorder'. + this.pdfLoadURL = null; + + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + this.behaviorState = BEHAVIOR_WAIT_LOAD; + // @ts-expect-error - TS2339 - Property 'behaviorData' does not exist on type 'Recorder'. + this.behaviorData = null; + + // @ts-expect-error - TS2339 - Property 'numPages' does not exist on type 'Recorder'. + this.numPages++; + + // @ts-expect-error - TS2339 - Property '_fetchUrls' does not exist on type 'Recorder'. + this._fetchUrls.clear(); + + // @ts-expect-error - TS2339 - Property 'firstPageStarted' does not exist on type 'Recorder'. + if (!this.firstPageStarted) { + this.initFirstPage(); + } + + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + this.behaviorState = BEHAVIOR_WAIT_LOAD; + } + + // @ts-expect-error - TS7006 - Parameter 'favIconUrl' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + loadFavIcon(favIconUrl, sessions) { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. | TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + if (favIconUrl && this.pageInfo && this.pageInfo.favIconUrl != favIconUrl) { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + this.pageInfo.favIconUrl = favIconUrl; + + this.doAsyncFetch({ url: favIconUrl }, sessions); + } + } + + // @ts-expect-error - TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async updatePage(sessions) { + //console.log("updatePage", this.pageInfo); + + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + if (!this.pageInfo) { + console.warn("no page info!"); + } + + const result = await this.send("Page.getNavigationHistory"); + const id = result.currentIndex; + + // allow duplicate pages for now + //if (id !== result.entries.length - 1 || this.historyMap[id] === result.entries[id].url) { + // return; + //} + + //await this.addText(false); + + // @ts-expect-error - TS2339 - Property 'historyMap' does not exist on type 'Recorder'. + this.historyMap[id] = result.entries[id].url; + + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + this.pageInfo.title = result.entries[id].title || result.entries[id].url; + + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + const pageInfo = this.pageInfo; + + const [domSnapshot, favIcon] = await Promise.all([ + this.getFullText(), + // @ts-expect-error - TS2339 - Property 'getFavIcon' does not exist on type 'Recorder'. + this.getFavIcon(), + ]); + + if (favIcon) { + this.loadFavIcon(favIcon, sessions); + } + + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + await this.commitPage(this.pageInfo, domSnapshot, false); + + this.updateStatus(); + + await this.loaded(); + + // don't mark as ready if page changed + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + if (pageInfo === this.pageInfo) { + // @ts-expect-error - TS2339 - Property 'behaviorState' does not exist on type 'Recorder'. + this.behaviorState = BEHAVIOR_READY_START; + + // @ts-expect-error - TS2339 - Property 'autorun' does not exist on type 'Recorder'. + if (this.autorun) { + await this.toggleBehaviors(); + } + } + } + + // @ts-expect-error - TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async updateHistory(sessions) { + if (sessions.length) { + return; + } + + const result = await this.send("Page.getNavigationHistory", null, sessions); + const id = result.currentIndex; + if ( + id === result.entries.length - 1 && + // @ts-expect-error - TS2339 - Property 'historyMap' does not exist on type 'Recorder'. + this.historyMap[id] !== result.entries[id].url + ) { + //console.log("New History Entry: " + JSON.stringify(result.entries[id])); + // @ts-expect-error - TS2339 - Property 'historyMap' does not exist on type 'Recorder'. + this.historyMap[id] = result.entries[id].url; + } + } + + // @ts-expect-error - TS7006 - Parameter 'method' implicitly has an 'any' type. | TS7006 - Parameter 'headers' implicitly has an 'any' type. | TS7006 - Parameter 'resourceType' implicitly has an 'any' type. + shouldSkip(method, headers, resourceType) { + if (headers && !method) { + method = headers[":method"]; + } + + if (method === "OPTIONS" || method === "HEAD") { + return true; + } + + if (["EventSource", "WebSocket", "Ping"].includes(resourceType)) { + return true; + } + + // beacon + if (resourceType === "Other" && method === "POST") { + return true; + } + + // skip eventsource, resourceType may not be set correctly + if ( + headers && + (headers["accept"] === "text/event-stream" || + headers["Accept"] === "text/event-stream") + ) { + return true; + } + + return false; + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async handlePaused(params, sessions) { + let continued = false; + let reqresp: TODOFixMe = null; + + let skip = false; + + if ( + this.shouldSkip( + params.request.method, + params.request.headers, + params.resourceType, + ) + ) { + skip = true; + } else if (!params.responseStatusCode && !params.responseErrorReason) { + skip = true; + } + + try { + if (!skip) { + reqresp = await this.handleFetchResponse(params, sessions); + + try { + if (reqresp?.payload) { + continued = await this.rewriteResponse(params, reqresp, sessions); + } + } catch (e) { + console.error("Fetch rewrite failed for: " + params.request.url); + console.error(e); + } + } + } catch (e) { + console.warn(e); + } + + if (!continued) { + try { + await this.send( + "Fetch.continueResponse", + // @ts-expect-error - TS2345 - Argument of type '{ requestId: any; }' is not assignable to parameter of type 'null | undefined'. + { requestId: params.requestId }, + sessions, + ); + } catch (e) { + console.warn("Continue failed for: " + params.request.url, e); + } + } + + // if finished and matches current frameId, commit right away + if ( + reqresp?.payload?.length && + // @ts-expect-error - TS2339 - Property 'frameId' does not exist on type 'Recorder'. + params.frameId === this.frameId && + !isNaN(Number(reqresp.requestId)) + ) { + this.removeReqResp(reqresp.requestId); + this.fullCommit(reqresp, sessions); + } + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'reqresp' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async rewriteResponse(params, reqresp, sessions) { + if (!reqresp?.payload) { + return false; + } + + const payload = reqresp.payload; + + if (!payload.length) { + return false; + } + + let newString = null; + let string = null; + + const { url, extraOpts } = reqresp; + + const ct = this._getContentType(params.responseHeaders); + + switch (ct) { + case "application/x-mpegURL": + case "application/vnd.apple.mpegurl": + string = payload.toString("utf-8"); + newString = rewriteHLS(string, { save: reqresp.extraOpts }); + break; + + case "application/dash+xml": + string = payload.toString("utf-8"); + newString = rewriteDASH(string, { save: reqresp.extraOpts }); + break; + + case "text/html": + case "application/json": + case "text/javascript": + case "application/javascript": + case "application/x-javascript": { + const rw = getCustomRewriter(url, ct === "text/html"); + + if (rw) { + string = payload.toString(); + newString = rw.rewrite(string, { live: true, save: extraOpts }); + } + } + } + + if (!newString) { + return false; + } + + if (newString !== string) { + reqresp.extraOpts.rewritten = 1; + reqresp.payload = encoder.encode(newString); + + console.log("Rewritten Response for: " + params.request.url); + } + + const base64Str = Buffer.from(newString).toString("base64"); + + try { + await this.send( + "Fetch.fulfillRequest", + // @ts-expect-error - TS2345 - Argument of type '{ requestId: any; responseCode: any; responseHeaders: any; body: string; }' is not assignable to parameter of type 'null | undefined'. + { + requestId: params.requestId, + responseCode: params.responseStatusCode, + responseHeaders: params.responseHeaders, + body: base64Str, + }, + sessions, + ); + //console.log("Replace succeeded? for: " + params.request.url); + return true; + } catch (e) { + console.warn("Fulfill Failed for: " + params.request.url + " " + e); + } + + return false; + } + + // @ts-expect-error - TS7006 - Parameter 'headers' implicitly has an 'any' type. + _getContentType(headers) { + for (const header of headers) { + if (header.name.toLowerCase() === "content-type") { + return header.value.split(";")[0]; + } + } + + return null; + } + + // @ts-expect-error - TS7006 - Parameter 'status' implicitly has an 'any' type. + noResponseForStatus(status) { + return !status || status === 204 || (status >= 300 && status < 400); + } + + // @ts-expect-error - TS7006 - Parameter 'url' implicitly has an 'any' type. + isValidUrl(url) { + return url && (url.startsWith("https:") || url.startsWith("http:")); + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async handleLoadingFinished(params, sessions) { + const reqresp = this.removeReqResp(params.requestId); + + if (!reqresp?.url) { + //console.log("unknown request finished: " + params.requestId); + return; + } + + if (!this.isValidUrl(reqresp.url)) { + return; + } + + let payload = reqresp.payload; + + if (!reqresp.fetch && !payload) { + // empty response, don't attempt to store it + if (params.encodedDataLength) { + payload = await this.fetchPayloads( + params, + reqresp, + sessions, + "Network.getResponseBody", + ); + } + if (!payload?.length) { + return; + } + reqresp.payload = payload; + } + + this.fullCommit(reqresp, sessions); + } + + // @ts-expect-error - TS7006 - Parameter 'reqresp' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async fullCommit(reqresp, sessions) { + //const requestId = reqresp.requestId; + + // let doneResolve; + + // const pending = new Promise((resolve) => { + // doneResolve = resolve; + // }); + + //this._fetchPending.set(requestId, pending); + + try { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + const data = reqresp.toDBRecord(reqresp.payload, this.pageInfo); + + // top-level URL is a non-GET request + if ( + data?.requestUrl && + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + data.requestUrl === this.pageInfo.url && + !sessions.length + ) { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + this.pageInfo.url = data.url; + } + + // top-level page resource + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + if (data && !sessions.length && reqresp.url === this.pageInfo.url) { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + this.pageInfo.ts = reqresp.ts; + + if ( + data.mime === "application/pdf" && + reqresp.payload && + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + this.pageInfo + ) { + // ensure set for electron + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + this.pageInfo.mime = "application/pdf"; + // @ts-expect-error - TS2339 - Property 'pdfLoadURL' does not exist on type 'Recorder'. + this.pdfLoadURL = reqresp.url; + } else { + if (!data.extraOpts) { + data.extraOpts = {}; + } + + // @ts-expect-error - TS2339 - Property 'pixelRatio' does not exist on type 'Recorder'. + data.extraOpts.pixelRatio = this.pixelRatio; + + // handle storage + const storage = await this.getStorage(reqresp.url); + + if (storage) { + data.extraOpts.storage = storage; + } + } + } + + if (data) { + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 1. + await this.commitResource(data); + } + } catch (e) { + console.log("error committing", e); + } + + //doneResolve(); + //delete this._fetchPending[requestId]; + } + + // @ts-expect-error - TS7006 - Parameter 'url' implicitly has an 'any' type. + async getStorage(url) { + // check if recording storage is allowed + // @ts-expect-error - TS2339 - Property 'recordStorage' does not exist on type 'Recorder'. + if (!this.recordStorage) { + return null; + } + + const securityOrigin = new URL(url).origin; + const storageId = { securityOrigin, isLocalStorage: true }; + + // @ts-expect-error - TS2345 - Argument of type '{ storageId: { securityOrigin: string; isLocalStorage: boolean; }; }' is not assignable to parameter of type 'null | undefined'. + const local = await this.send("DOMStorage.getDOMStorageItems", { + storageId, + }); + storageId.isLocalStorage = false; + + // @ts-expect-error - TS2345 - Argument of type '{ storageId: { securityOrigin: string; isLocalStorage: boolean; }; }' is not assignable to parameter of type 'null | undefined'. + const session = await this.send("DOMStorage.getDOMStorageItems", { + storageId, + }); + + return JSON.stringify({ local: local.entries, session: session.entries }); + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. + async handleRequestWillBeSent(params) { + if ( + this.shouldSkip( + params.request.method, + params.request.headers, + params.type, + ) + ) { + this.removeReqResp(params.requestId); + return; + } + + const reqresp = this.pendingReqResp(params.requestId); + + let data = null; + + if (params.redirectResponse) { + if (reqresp.isSelfRedirect()) { + console.warn(`Skip self redirect: ${reqresp.url}`); + this.removeReqResp(params.requestId); + return; + } + + reqresp.fillResponseRedirect(params); + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + data = reqresp.toDBRecord(null, this.pageInfo); + } + + reqresp.fillRequest(params); + + // commit redirect response, if any + if (data) { + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 1. + await this.commitResource(data); + } + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async handleFetchResponse(params, sessions) { + if (!params.networkId) { + //console.warn(`No networkId for ${params.request.url} ${params.resourceType}`); + } + + // @ts-expect-error - TS2339 - Property 'pdfLoadURL' does not exist on type 'Recorder'. | TS2339 - Property 'pdfLoadURL' does not exist on type 'Recorder'. + if (this.pdfLoadURL && params.request.url === this.pdfLoadURL) { + return null; + } + + const id = params.networkId || params.requestId; + + const reqresp = this.pendingReqResp(id); + + reqresp.fillFetchRequestPaused(params); + + reqresp.payload = await this.fetchPayloads( + params, + reqresp, + sessions, + "Fetch.getResponseBody", + ); + + if (reqresp.status === 206) { + this.removeReqResp(id); + } + + return reqresp; + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + parseMediaEventsAdded(params, sessions) { + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + if (!this.pageInfo.id) { + return; + } + + for (const { value } of params.events) { + if (value.indexOf('"kLoad"') > 0) { + const { url } = JSON.parse(value); + this.doAsyncFetch({ url }, sessions); + break; + } + } + } + + // @ts-expect-error - TS7006 - Parameter 'request' implicitly has an 'any' type. | TS7006 - Parameter 'resp' implicitly has an 'any' type. + async attemptFetchRedirect(request, resp) { + if (request.redirectOnly && resp.type === "opaqueredirect") { + const abort = new AbortController(); + // @ts-expect-error - TS2345 - Argument of type '{ abort: AbortController; }' is not assignable to parameter of type 'RequestInit'. + resp = await fetch(request.url, { abort }); + abort.abort(); + + if (resp.redirected) { + console.warn(`Adding synthetic redirect ${request.url} -> ${resp.url}`); + return Response.redirect(resp.url, 302); + } + } + + console.warn( + `async fetch error ${resp.status}, opaque due to redirect, retrying in browser`, + ); + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 3. + await this.doAsyncFetchInBrowser(request, request.sessions, true); + return null; + } + + // @ts-expect-error - TS7006 - Parameter 'request' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + async doAsyncFetchInBrowser(request, sessions) { + // @ts-expect-error - TS2339 - Property '_fetchUrls' does not exist on type 'Recorder'. + this._fetchUrls.add(request.url); + + const expression = `self.__bx_behaviors.doAsyncFetch("${request.url}")`; + + console.log("Start Async Load: " + request.url); + + await this.pageEval("__awp_async_fetch__", expression, sessions); + //console.log("Async Fetch Result: " + JSON.stringify(result)); + } + + // @ts-expect-error - TS7006 - Parameter 'request' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. + doAsyncFetch(request, sessions) { + if (!request || !this.isValidUrl(request.url)) { + return; + } + + // @ts-expect-error - TS2339 - Property '_fetchUrls' does not exist on type 'Recorder'. + if (this._fetchUrls.has(request.url)) { + console.log("Skipping, already fetching: " + request.url); + return; + } + + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + request.pageInfo = this.pageInfo; + request.sessions = sessions; + + // @ts-expect-error - TS2339 - Property '_fetchQueue' does not exist on type 'Recorder'. + this._fetchQueue.push(request); + + this.doBackgroundFetch(); + } + + async doBackgroundFetch() { + if ( + // @ts-expect-error - TS2339 - Property '_fetchQueue' does not exist on type 'Recorder'. + !this._fetchQueue.length || + // @ts-expect-error - TS2339 - Property '_fetchPending' does not exist on type 'Recorder'. + this._fetchPending.size >= MAX_CONCURRENT_FETCH || + // @ts-expect-error - TS2339 - Property 'stopping' does not exist on type 'Recorder'. + this.stopping + ) { + return; + } + + // @ts-expect-error - TS2339 - Property '_fetchQueue' does not exist on type 'Recorder'. + const request = this._fetchQueue.shift(); + + // @ts-expect-error - TS2339 - Property '_fetchUrls' does not exist on type 'Recorder'. + if (this._fetchUrls.has(request.url)) { + console.log("Skipping, already fetching: " + request.url); + return; + } + + let doneResolve; + const fetchId = "fetch-" + this.newPageId(); + + try { + console.log("Start Async Load: " + request.url); + + // @ts-expect-error - TS2339 - Property '_fetchUrls' does not exist on type 'Recorder'. + this._fetchUrls.add(request.url); + + const pending = new Promise((resolve) => { + doneResolve = resolve; + }); + + // @ts-expect-error - TS2339 - Property '_fetchPending' does not exist on type 'Recorder'. + this._fetchPending.set(fetchId, pending); + + // @ts-expect-error - TS2339 - Property 'defaultFetchOpts' does not exist on type 'Recorder'. + const opts = { ...this.defaultFetchOpts }; + + if (request.getRequestHeadersDict) { + opts.headers = request.getRequestHeadersDict().headers; + opts.headers.delete("range"); + } else if (request.headers) { + opts.headers = request.headers; + } + + let resp = await fetch(request.url, opts); + if (resp.status === 0) { + // @ts-expect-error - TS2322 - Type 'Response | null' is not assignable to type 'Response'. + resp = await this.attemptFetchRedirect(request, resp); + if (!resp) { + return; + } + } else if (resp.status >= 400) { + console.warn( + `async fetch error ${resp.status}, retrying without headers`, + ); + // @ts-expect-error - TS2339 - Property 'defaultFetchOpts' does not exist on type 'Recorder'. + resp = await fetch(request.url, this.defaultFetchOpts); + if (resp.status >= 400) { + console.warn( + `async fetch returned: ${resp.status}, trying in-browser fetch`, + ); + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 3. + await this.doAsyncFetchInBrowser(request, request.sessions, true); + return; + } + } + + const payload = await resp.arrayBuffer(); + + const reqresp = new RequestResponseInfo(fetchId); + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + reqresp.status = resp.status; + // @ts-expect-error - TS2339 - Property 'statusText' does not exist on type 'RequestResponseInfo'. + reqresp.statusText = resp.statusText; + // @ts-expect-error - TS2339 - Property 'responseHeaders' does not exist on type 'RequestResponseInfo'. + reqresp.responseHeaders = Object.fromEntries(resp.headers); + + // @ts-expect-error - TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. + reqresp.method = "GET"; + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + reqresp.url = request.url; + // @ts-expect-error - TS2339 - Property 'payload' does not exist on type 'RequestResponseInfo'. + reqresp.payload = new Uint8Array(payload); + + // @ts-expect-error - TS2339 - Property 'payload' does not exist on type 'RequestResponseInfo'. + const data = reqresp.toDBRecord(reqresp.payload, request.pageInfo); + + if (data) { + await this.commitResource(data, request.pageInfo); + console.log(`Done Async Load (${resp.status}) ${request.url}`); + + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + if (this.pageInfo !== request.pageInfo) { + // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1. + await this.commitPage(request.pageInfo); + } + } else { + console.warn( + "No Data Committed for: " + request.url + " Status: " + resp.status, + ); + } + } catch (e) { + console.log(e); + // @ts-expect-error - TS2339 - Property '_fetchUrls' does not exist on type 'Recorder'. + this._fetchUrls.delete(request.url); + } finally { + // @ts-expect-error - TS2722 - Cannot invoke an object which is possibly 'undefined'. + doneResolve(); + // @ts-expect-error - TS2339 - Property '_fetchPending' does not exist on type 'Recorder'. + this._fetchPending.delete(fetchId); + } + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. | TS7006 - Parameter 'reqresp' implicitly has an 'any' type. | TS7006 - Parameter 'sessions' implicitly has an 'any' type. | TS7006 - Parameter 'method' implicitly has an 'any' type. + async fetchPayloads(params, reqresp, sessions, method) { + let payload; + + if (reqresp.status === 206) { + sleep(500).then(() => this.doAsyncFetch(reqresp, sessions)); + reqresp.payload = null; + return null; + } + + if (!this.noResponseForStatus(reqresp.status)) { + try { + reqresp.awaitingPayload = true; + payload = await this.send( + method, + // @ts-expect-error - TS2345 - Argument of type '{ requestId: any; }' is not assignable to parameter of type 'null | undefined'. + { requestId: params.requestId }, + sessions, + ); + + if (payload.base64Encoded) { + payload = Buffer.from(payload.body, "base64"); + } else { + payload = Buffer.from(payload.body, "utf-8"); + } + } catch (e) { + console.warn( + "no buffer for: " + + reqresp.url + + " " + + reqresp.status + + " " + + reqresp.requestId + + " " + + method, + ); + console.warn(e); + return null; + } finally { + reqresp.awaitingPayload = false; + } + } else { + payload = Buffer.from([]); + } + + if (reqresp.hasPostData && !reqresp.postData) { + try { + const postRes = await this.send( + "Network.getRequestPostData", + // @ts-expect-error - TS2345 - Argument of type '{ requestId: any; }' is not assignable to parameter of type 'null | undefined'. + { requestId: reqresp.requestId }, + sessions, + ); + reqresp.postData = Buffer.from(postRes.postData, "utf-8"); + } catch (e) { + console.warn("Error getting POST data: " + e); + } + } + + reqresp.payload = payload; + return payload; + } + + flushPending() { + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + const oldPendingReqs = this.pendingRequests; + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. + const pageInfo = this.pageInfo; + // @ts-expect-error - TS2551 - Property 'pendingRequests' does not exist on type 'Recorder'. Did you mean 'pendingReqResp'? + this.pendingRequests = {}; + + if (!oldPendingReqs) { + return; + } + + for (const [id, reqresp] of Object.entries(oldPendingReqs)) { + // @ts-expect-error - TS2571 - Object is of type 'unknown'. + if (reqresp.payload) { + // @ts-expect-error - TS2571 - Object is of type 'unknown'. + console.log(`Committing Finished ${id} - ${reqresp.url}`); + + // @ts-expect-error - TS2571 - Object is of type 'unknown'. | TS2571 - Object is of type 'unknown'. + const data = reqresp.toDBRecord(reqresp.payload, pageInfo); + + if (data) { + // @ts-expect-error - TS2554 - Expected 2 arguments, but got 1. + this.commitResource(data); + } + + // top-level page resource + // @ts-expect-error - TS2571 - Object is of type 'unknown'. + if (data && reqresp.url === pageInfo.url) { + // @ts-expect-error - TS2571 - Object is of type 'unknown'. + pageInfo.ts = reqresp.ts; + } + } else { + // @ts-expect-error - TS2571 - Object is of type 'unknown'. + console.log(`Discarding Payload-less ${reqresp.url}`); + } + } + } + + // @ts-expect-error - TS7006 - Parameter 'method' implicitly has an 'any' type. + send(method, params = null, sessions = []) { + let promise = null; + + // @ts-expect-error - TS2339 - Property 'flatMode' does not exist on type 'Recorder'. + if (this.flatMode && sessions.length) { + // @ts-expect-error - TS2339 - Property '_doSendCommandFlat' does not exist on type 'Recorder'. + return this._doSendCommandFlat( + method, + params, + sessions[sessions.length - 1], + ); + } + + for (let i = sessions.length - 1; i >= 0; i--) { + // @ts-expect-error - TS2339 - Property 'id' does not exist on type 'Recorder'. + const id = this.id++; + + const p = new Promise((resolve, reject) => { + // @ts-expect-error - TS2339 - Property '_promises' does not exist on type 'Recorder'. + this._promises[id] = { resolve, reject, method }; + }); + + if (!promise) { + promise = p; + } + + //let message = params ? {id, method, params} : {id, method}; + const message = JSON.stringify({ id, method, params }); + + //const sessionId = sessions[sessions.length - 1 - i]; + const sessionId = sessions[i]; + + // @ts-expect-error - TS2322 - Type '{ sessionId: never; message: string; }' is not assignable to type 'null'. + params = { sessionId, message }; + method = "Target.sendMessageToTarget"; + } + + // @ts-expect-error - TS2339 - Property '_doSendCommand' does not exist on type 'Recorder'. + return this._doSendCommand(method, params, promise); + } + + // @ts-expect-error - TS7006 - Parameter 'result' implicitly has an 'any' type. + parseTextFromDOMSnapshot(result) { + const TEXT_NODE = 3; + const ELEMENT_NODE = 1; + + const SKIPPED_NODES = [ + "SCRIPT", + "STYLE", + "HEADER", + "FOOTER", + "BANNER-DIV", + "NOSCRIPT", + ]; + + const { strings, documents } = result; + + const accum = []; + + for (const doc of documents) { + const nodeValues = doc.nodes.nodeValue; + const nodeNames = doc.nodes.nodeName; + const nodeTypes = doc.nodes.nodeType; + const parentIndex = doc.nodes.parentIndex; + + for (let i = 0; i < nodeValues.length; i++) { + if (nodeValues[i] === -1) { + continue; + } + + if (nodeTypes[i] === TEXT_NODE) { + const pi = parentIndex[i]; + if (pi >= 0 && nodeTypes[pi] === ELEMENT_NODE) { + const name = strings[nodeNames[pi]]; + + if (!SKIPPED_NODES.includes(name)) { + const value = strings[nodeValues[i]].trim(); + if (value) { + accum.push(value); + } + } + } + } + } + + return accum.join("\n"); + } + } + + // parseTextFromDom(dom) { + // const accum = []; + // const metadata = {}; + + // this._parseText(dom.root, metadata, accum); + + // return accum.join("\n"); + // } + + // _parseText(node, metadata, accum) { + // const SKIPPED_NODES = ["script", "style", "header", "footer", "banner-div", "noscript"]; + // const EMPTY_LIST = []; + // const TEXT = "#text"; + // const TITLE = "title"; + + // const name = node.nodeName.toLowerCase(); + + // if (SKIPPED_NODES.includes(name)) { + // return; + // } + + // const children = node.children || EMPTY_LIST; + + // if (name === TEXT) { + // const value = node.nodeValue ? node.nodeValue.trim() : ""; + // if (value) { + // accum.push(value); + // } + // } else if (name === TITLE) { + // const title = []; + + // for (let child of children) { + // this._parseText(child, null, title); + // } + + // if (metadata) { + // metadata.title = title.join(" "); + // } else { + // accum.push(title.join(" ")); + // } + // } else { + // for (let child of children) { + // this._parseText(child, metadata, accum); + // } + + // if (node.contentDocument) { + // this._parseText(node.contentDocument, null, accum); + // } + // } + // } +} + +export { Recorder }; diff --git a/src/requestresponseinfo.js b/src/requestresponseinfo.js deleted file mode 100644 index 167979a0..00000000 --- a/src/requestresponseinfo.js +++ /dev/null @@ -1,360 +0,0 @@ -"use strict"; - -import { getCustomRewriter } from "@webrecorder/wabac/src/rewrite"; -import { getStatusText } from "@webrecorder/wabac/src/utils"; - -import { postToGetUrl } from "warcio"; - -// max URL length for post/put payload-converted URLs -const MAX_URL_LENGTH = 4096; - -// max length for single query arg for post/put converted URLs -const MAX_ARG_LEN = 512; - -const CONTENT_LENGTH = "content-length"; -const CONTENT_TYPE = "content-type"; -const EXCLUDE_HEADERS = ["content-encoding", "transfer-encoding"]; - -const encoder = new TextEncoder(); - - -// =========================================================================== -class RequestResponseInfo -{ - constructor(requestId) { - this._created = new Date(); - - this.requestId = requestId; - - this.ts = null; - - // request data - this.method = null; - this.url = null; - this.protocol = "HTTP/1.1"; - - this.requestHeaders = null; - this.requestHeadersText = null; - - this.postData = null; - this.hasPostData = false; - - // response data - this.status = 0; - this.statusText = null; - - this.responseHeaders = null; - this.responseHeadersList = null; - this.responseHeadersText = null; - - this.payload = null; - - this.fromServiceWorker = false; - - this.fetch = false; - - this.resourceType = null; - - this.extraOpts = {}; - } - - fillRequest(params) { - this.url = params.request.url; - this.method = params.request.method; - if (!this.requestHeaders) { - this.requestHeaders = params.request.headers; - } - this.postData = params.request.postData; - this.hasPostData = params.request.hasPostData; - - if (params.type) { - this.resourceType = params.type; - } - - //this.loaderId = params.loaderId; - } - - fillFetchRequestPaused(params) { - this.fillRequest(params); - - this.status = params.responseStatusCode; - this.statusText = getStatusText(this.status); - - this.responseHeadersList = params.responseHeaders; - - this.fetch = true; - this.resourceType = params.resourceType; - } - - fillResponseRedirect(params) { - this._fillResponse(params.redirectResponse); - } - - isSelfRedirect() { - if (this.status < 300 || this.status >= 400 || this.status === 304) { - return false; - } - try { - const redirUrl = new URL(this.responseHeaders["location"], this.url).href; - return this.url === redirUrl; - } catch (e) { - return false; - } - } - - fillResponseReceived(params) { - const response = params.response; - - // if initial fetch was a 200, but now replacing with 304, don't! - if (response.status == 304 && this.status && this.status != 304 && this.url) { - return; - } - - this.url = response.url.split("#")[0]; - - this._fillResponse(response); - } - - _fillResponse(response) { - this.status = response.status; - this.statusText = response.statusText || getStatusText(this.status); - - this.protocol = response.protocol; - - if (response.requestHeaders) { - this.requestHeaders = response.requestHeaders; - } - if (response.requestHeadersText) { - this.requestHeadersText = response.requestHeadersText; - } - - this.responseHeaders = response.headers; - - if (response.headersText) { - this.responseHeadersText = response.headersText; - } - - this.fromServiceWorker = !!response.fromServiceWorker; - - if (response.securityDetails) { - const issuer = response.securityDetails.issuer || ""; - const ctc = response.securityDetails.certificateTransparencyCompliance === "compliant" ? "1" : "0"; - this.extraOpts.cert = {issuer, ctc}; - } - } - - fillResponseReceivedExtraInfo(params) { - this.responseHeaders = params.headers; - if (params.headersText) { - this.responseHeadersText = params.headersText; - } - } - - toDBRecord(payload, pageInfo) { - // don't save 304 (todo: turn into 'revisit' style entry?) - // extra check for 206, should already be skipped - if (this.method === "OPTIONS" || this.method === "HEAD" || this.status == 304 || this.status === 206) { - return null; - } - - if (!this.url || (!this.url.startsWith("https:") && !this.url.startsWith("http:"))) { - return; - } - - if (!pageInfo.id) { - console.log("Skipping No Page Id for: " + this.url); - return null; - } - - if (!payload) { - payload = new Uint8Array([]); - } - - this.ts = new Date().getTime(); - - const respHeaders = this.getResponseHeadersDict(payload.length); - const reqHeaders = this.getRequestHeadersDict(); - - const mime = (respHeaders.headers.get(CONTENT_TYPE) || "").split(";")[0]; - const cookie = reqHeaders.headers.get("cookie"); - - if (cookie) { - respHeaders.headersDict["x-wabac-preset-cookie"] = cookie; - } - - const reqUrl = this.url; - - if (this.method && this.method !== "GET") { - const convData = { - url: this.url, - headers: reqHeaders.headers, - method: this.method, - postData: this.postData || "", - }; - if (postToGetUrl(convData)) { - // if URL for custom rewriting, keep as is, otherwise truncate to avoid extra long URLs - if (getCustomRewriter(this.url, mime === "text/html")) { - this.url = convData.url; - } else { - try { - const url = new URL(convData.url); - for (const [key, value] of url.searchParams.entries()) { - if (value && value.length > MAX_ARG_LEN) { - url.searchParams.set(key, value.slice(0, MAX_ARG_LEN)); - } - } - convData.url = url.href; - } catch (e) { - //ignore - } - this.url = convData.url.slice(0, MAX_URL_LENGTH); - } - } - } - - const data = { - url: this.url, - ts: this.ts, - status: this.status, - statusText:this.statusText, - pageId: pageInfo.id, - payload, - mime, - respHeaders: respHeaders.headersDict, - reqHeaders: reqHeaders.headersDict, - extraOpts: this.extraOpts - }; - - if (this.method !== "GET") { - data.method = this.method; - if (this.postData) { - if (typeof(this.postData) === "string") { - data.requestBody = encoder.encode(this.postData); - } else { - data.requestBody = this.postData; - } - data.requestUrl = reqUrl; - } - } - - return data; - } - - fillFromDBRecord(record) { - this.url = record.url; - this.ts = record.ts; - - this.status = record.status; - this.statusText = record.statusText; - - this.payload = record.payload; - this.requestHeaders = record.reqHeaders || {}; - this.responseHeaders = record.respHeaders || {}; - } - - getResponseHeadersText() { - let headers = `${this.protocol} ${this.status} ${this.statusText}\r\n`; - - for (const header of Object.keys(this.responseHeaders)) { - headers += `${header}: ${this.responseHeaders[header].replace(/\n/g, ", ")}\r\n`; - } - headers += "\r\n"; - return headers; - } - - hasRequest() { - return this.method && (this.requestHeaders || this.requestHeadersText); - } - - getRequestHeadersDict() { - return this._getHeadersDict(this.requestHeaders, null); - } - - getResponseHeadersDict(length) { - return this._getHeadersDict(this.responseHeaders, this.responseHeadersList, length); - } - - _getHeadersDict(headersDict, headersList, actualContentLength) { - if (!headersDict && headersList) { - headersDict = {}; - - for (const header of headersList) { - const headerName = header.name.toLowerCase(); - if (EXCLUDE_HEADERS.includes(headerName)) { - continue; - } - if (actualContentLength && headerName === CONTENT_LENGTH) { - headersDict[headerName] = "" + actualContentLength; - continue; - } - headersDict[headerName] = header.value.replace(/\n/g, ", "); - } - } - - let headers = null; - - if (!headersDict) { - return {headers: new Headers(), headersDict: {}}; - } - - try { - headers = new Headers(headersDict); - } catch (e) { - for (const key of Object.keys(headersDict)) { - if (key[0] === ":") { - delete headersDict[key]; - continue; - } - const keyLower = key.toLowerCase(); - if (EXCLUDE_HEADERS.includes(keyLower)) { - continue; - } - if (actualContentLength && keyLower === CONTENT_LENGTH) { - headersDict[key] = "" + actualContentLength; - continue; - } - headersDict[key] = headersDict[key].replace(/\n/g, ", "); - } - try { - headers = new Headers(headersDict); - } catch (e) { - console.warn(e); - headers = new Headers(); - } - } - - return {headers, headersDict}; - } - - isValidBinary() { - if (!this.payload) { - return false; - } - - const length = this.payload.length; - - const { headers } = this.getResponseHeadersDict(); - const contentType = headers.get(CONTENT_TYPE); - const contentLength = headers.get(CONTENT_LENGTH); - - if (Number(contentLength) !== length) { - return false; - } - - if (contentType && contentType.startsWith("text/html")) { - return false; - } - - return true; - } -} - - -//function formatHeadersText(headersText) { -// condense any headers containing newlines -// return headersText.replace(/(\n[^:\n]+)+(?=\r\n)/g, function(value) { return value.replace(/\r?\n/g, ", ");}); -//} - - - -export { RequestResponseInfo }; diff --git a/src/requestresponseinfo.ts b/src/requestresponseinfo.ts new file mode 100644 index 00000000..3dae0da9 --- /dev/null +++ b/src/requestresponseinfo.ts @@ -0,0 +1,482 @@ +import { getCustomRewriter, getStatusText } from "@webrecorder/wabac"; + +import { postToGetUrl } from "warcio"; + +// max URL length for post/put payload-converted URLs +const MAX_URL_LENGTH = 4096; + +// max length for single query arg for post/put converted URLs +const MAX_ARG_LEN = 512; + +const CONTENT_LENGTH = "content-length"; +const CONTENT_TYPE = "content-type"; +const EXCLUDE_HEADERS = ["content-encoding", "transfer-encoding"]; + +const encoder = new TextEncoder(); + +// =========================================================================== +class RequestResponseInfo { + // @ts-expect-error - TS7006 - Parameter 'requestId' implicitly has an 'any' type. + constructor(requestId) { + // @ts-expect-error - TS2339 - Property '_created' does not exist on type 'RequestResponseInfo'. + this._created = new Date(); + + // @ts-expect-error - TS2339 - Property 'requestId' does not exist on type 'RequestResponseInfo'. + this.requestId = requestId; + + // @ts-expect-error - TS2339 - Property 'ts' does not exist on type 'RequestResponseInfo'. + this.ts = null; + + // request data + // @ts-expect-error - TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. + this.method = null; + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + this.url = null; + // @ts-expect-error - TS2339 - Property 'protocol' does not exist on type 'RequestResponseInfo'. + this.protocol = "HTTP/1.1"; + + // @ts-expect-error - TS2339 - Property 'requestHeaders' does not exist on type 'RequestResponseInfo'. + this.requestHeaders = null; + // @ts-expect-error - TS2339 - Property 'requestHeadersText' does not exist on type 'RequestResponseInfo'. + this.requestHeadersText = null; + + // @ts-expect-error - TS2339 - Property 'postData' does not exist on type 'RequestResponseInfo'. + this.postData = null; + // @ts-expect-error - TS2339 - Property 'hasPostData' does not exist on type 'RequestResponseInfo'. + this.hasPostData = false; + + // response data + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.status = 0; + // @ts-expect-error - TS2339 - Property 'statusText' does not exist on type 'RequestResponseInfo'. + this.statusText = null; + + // @ts-expect-error - TS2339 - Property 'responseHeaders' does not exist on type 'RequestResponseInfo'. + this.responseHeaders = null; + // @ts-expect-error - TS2339 - Property 'responseHeadersList' does not exist on type 'RequestResponseInfo'. + this.responseHeadersList = null; + // @ts-expect-error - TS2339 - Property 'responseHeadersText' does not exist on type 'RequestResponseInfo'. + this.responseHeadersText = null; + + // @ts-expect-error - TS2339 - Property 'payload' does not exist on type 'RequestResponseInfo'. + this.payload = null; + + // @ts-expect-error - TS2339 - Property 'fromServiceWorker' does not exist on type 'RequestResponseInfo'. + this.fromServiceWorker = false; + + // @ts-expect-error - TS2339 - Property 'fetch' does not exist on type 'RequestResponseInfo'. + this.fetch = false; + + // @ts-expect-error - TS2339 - Property 'resourceType' does not exist on type 'RequestResponseInfo'. + this.resourceType = null; + + // @ts-expect-error - TS2339 - Property 'extraOpts' does not exist on type 'RequestResponseInfo'. + this.extraOpts = {}; + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. + fillRequest(params) { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + this.url = params.request.url; + // @ts-expect-error - TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. + this.method = params.request.method; + // @ts-expect-error - TS2339 - Property 'requestHeaders' does not exist on type 'RequestResponseInfo'. + if (!this.requestHeaders) { + // @ts-expect-error - TS2339 - Property 'requestHeaders' does not exist on type 'RequestResponseInfo'. + this.requestHeaders = params.request.headers; + } + // @ts-expect-error - TS2339 - Property 'postData' does not exist on type 'RequestResponseInfo'. + this.postData = params.request.postData; + // @ts-expect-error - TS2339 - Property 'hasPostData' does not exist on type 'RequestResponseInfo'. + this.hasPostData = params.request.hasPostData; + + if (params.type) { + // @ts-expect-error - TS2339 - Property 'resourceType' does not exist on type 'RequestResponseInfo'. + this.resourceType = params.type; + } + + //this.loaderId = params.loaderId; + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. + fillFetchRequestPaused(params) { + this.fillRequest(params); + + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.status = params.responseStatusCode; + // @ts-expect-error - TS2339 - Property 'statusText' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.statusText = getStatusText(this.status); + + // @ts-expect-error - TS2339 - Property 'responseHeadersList' does not exist on type 'RequestResponseInfo'. + this.responseHeadersList = params.responseHeaders; + + // @ts-expect-error - TS2339 - Property 'fetch' does not exist on type 'RequestResponseInfo'. + this.fetch = true; + // @ts-expect-error - TS2339 - Property 'resourceType' does not exist on type 'RequestResponseInfo'. + this.resourceType = params.resourceType; + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. + fillResponseRedirect(params) { + this._fillResponse(params.redirectResponse); + } + + isSelfRedirect() { + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + if (this.status < 300 || this.status >= 400 || this.status === 304) { + return false; + } + try { + // @ts-expect-error - TS2339 - Property 'responseHeaders' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + const redirUrl = new URL(this.responseHeaders["location"], this.url).href; + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + return this.url === redirUrl; + } catch (e) { + return false; + } + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. + fillResponseReceived(params) { + const response = params.response; + + // if initial fetch was a 200, but now replacing with 304, don't! + if ( + response.status == 304 && + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.status && + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.status != 304 && + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + this.url + ) { + return; + } + + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + this.url = response.url.split("#")[0]; + + this._fillResponse(response); + } + + // @ts-expect-error - TS7006 - Parameter 'response' implicitly has an 'any' type. + _fillResponse(response) { + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.status = response.status; + // @ts-expect-error - TS2339 - Property 'statusText' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.statusText = response.statusText || getStatusText(this.status); + + // @ts-expect-error - TS2339 - Property 'protocol' does not exist on type 'RequestResponseInfo'. + this.protocol = response.protocol; + + if (response.requestHeaders) { + // @ts-expect-error - TS2339 - Property 'requestHeaders' does not exist on type 'RequestResponseInfo'. + this.requestHeaders = response.requestHeaders; + } + if (response.requestHeadersText) { + // @ts-expect-error - TS2339 - Property 'requestHeadersText' does not exist on type 'RequestResponseInfo'. + this.requestHeadersText = response.requestHeadersText; + } + + // @ts-expect-error - TS2339 - Property 'responseHeaders' does not exist on type 'RequestResponseInfo'. + this.responseHeaders = response.headers; + + if (response.headersText) { + // @ts-expect-error - TS2339 - Property 'responseHeadersText' does not exist on type 'RequestResponseInfo'. + this.responseHeadersText = response.headersText; + } + + // @ts-expect-error - TS2339 - Property 'fromServiceWorker' does not exist on type 'RequestResponseInfo'. + this.fromServiceWorker = !!response.fromServiceWorker; + + if (response.securityDetails) { + const issuer = response.securityDetails.issuer || ""; + const ctc = + response.securityDetails.certificateTransparencyCompliance === + "compliant" + ? "1" + : "0"; + // @ts-expect-error - TS2339 - Property 'extraOpts' does not exist on type 'RequestResponseInfo'. + this.extraOpts.cert = { issuer, ctc }; + } + } + + // @ts-expect-error - TS7006 - Parameter 'params' implicitly has an 'any' type. + fillResponseReceivedExtraInfo(params) { + // @ts-expect-error - TS2339 - Property 'responseHeaders' does not exist on type 'RequestResponseInfo'. + this.responseHeaders = params.headers; + if (params.headersText) { + // @ts-expect-error - TS2339 - Property 'responseHeadersText' does not exist on type 'RequestResponseInfo'. + this.responseHeadersText = params.headersText; + } + } + + // @ts-expect-error - TS7006 - Parameter 'payload' implicitly has an 'any' type. | TS7006 - Parameter 'pageInfo' implicitly has an 'any' type. + toDBRecord(payload, pageInfo) { + // don't save 304 (todo: turn into 'revisit' style entry?) + // extra check for 206, should already be skipped + if ( + // @ts-expect-error - TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. + this.method === "OPTIONS" || + // @ts-expect-error - TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. + this.method === "HEAD" || + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.status == 304 || + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.status === 206 + ) { + return null; + } + + if ( + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + !this.url || + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + (!this.url.startsWith("https:") && !this.url.startsWith("http:")) + ) { + return; + } + + if (!pageInfo.id) { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + console.log("Skipping No Page Id for: " + this.url); + return null; + } + + if (!payload) { + payload = new Uint8Array([]); + } + + // @ts-expect-error - TS2339 - Property 'ts' does not exist on type 'RequestResponseInfo'. + this.ts = new Date().getTime(); + + const respHeaders = this.getResponseHeadersDict(payload.length); + const reqHeaders = this.getRequestHeadersDict(); + + const mime = (respHeaders.headers.get(CONTENT_TYPE) || "").split(";")[0]; + const cookie = reqHeaders.headers.get("cookie"); + + if (cookie) { + respHeaders.headersDict["x-wabac-preset-cookie"] = cookie; + } + + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + const reqUrl = this.url; + + // @ts-expect-error - TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. + if (this.method && this.method !== "GET") { + const convData = { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + url: this.url, + headers: reqHeaders.headers, + // @ts-expect-error - TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. + method: this.method, + // @ts-expect-error - TS2339 - Property 'postData' does not exist on type 'RequestResponseInfo'. + postData: this.postData || "", + }; + if (postToGetUrl(convData)) { + // if URL for custom rewriting, keep as is, otherwise truncate to avoid extra long URLs + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + if (getCustomRewriter(this.url, mime === "text/html")) { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + this.url = convData.url; + } else { + try { + const url = new URL(convData.url); + for (const [key, value] of url.searchParams.entries()) { + if (value && value.length > MAX_ARG_LEN) { + url.searchParams.set(key, value.slice(0, MAX_ARG_LEN)); + } + } + convData.url = url.href; + } catch (e) { + //ignore + } + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + this.url = convData.url.slice(0, MAX_URL_LENGTH); + } + } + } + + const data = { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + url: this.url, + // @ts-expect-error - TS2339 - Property 'ts' does not exist on type 'RequestResponseInfo'. + ts: this.ts, + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + status: this.status, + // @ts-expect-error - TS2339 - Property 'statusText' does not exist on type 'RequestResponseInfo'. + statusText: this.statusText, + pageId: pageInfo.id, + payload, + mime, + respHeaders: respHeaders.headersDict, + reqHeaders: reqHeaders.headersDict, + // @ts-expect-error - TS2339 - Property 'extraOpts' does not exist on type 'RequestResponseInfo'. + extraOpts: this.extraOpts, + }; + + // @ts-expect-error - TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. + if (this.method !== "GET") { + // @ts-expect-error - TS2339 - Property 'method' does not exist on type '{ url: any; ts: any; status: any; statusText: any; pageId: any; payload: any; mime: string; respHeaders: any; reqHeaders: any; extraOpts: any; }'. | TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. + data.method = this.method; + // @ts-expect-error - TS2339 - Property 'postData' does not exist on type 'RequestResponseInfo'. + if (this.postData) { + // @ts-expect-error - TS2339 - Property 'postData' does not exist on type 'RequestResponseInfo'. + if (typeof this.postData === "string") { + // @ts-expect-error - TS2339 - Property 'requestBody' does not exist on type '{ url: any; ts: any; status: any; statusText: any; pageId: any; payload: any; mime: string; respHeaders: any; reqHeaders: any; extraOpts: any; }'. | TS2339 - Property 'postData' does not exist on type 'RequestResponseInfo'. + data.requestBody = encoder.encode(this.postData); + } else { + // @ts-expect-error - TS2339 - Property 'requestBody' does not exist on type '{ url: any; ts: any; status: any; statusText: any; pageId: any; payload: any; mime: string; respHeaders: any; reqHeaders: any; extraOpts: any; }'. | TS2339 - Property 'postData' does not exist on type 'RequestResponseInfo'. + data.requestBody = this.postData; + } + // @ts-expect-error - TS2339 - Property 'requestUrl' does not exist on type '{ url: any; ts: any; status: any; statusText: any; pageId: any; payload: any; mime: string; respHeaders: any; reqHeaders: any; extraOpts: any; }'. + data.requestUrl = reqUrl; + } + } + + return data; + } + + // @ts-expect-error - TS7006 - Parameter 'record' implicitly has an 'any' type. + fillFromDBRecord(record) { + // @ts-expect-error - TS2339 - Property 'url' does not exist on type 'RequestResponseInfo'. + this.url = record.url; + // @ts-expect-error - TS2339 - Property 'ts' does not exist on type 'RequestResponseInfo'. + this.ts = record.ts; + + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. + this.status = record.status; + // @ts-expect-error - TS2339 - Property 'statusText' does not exist on type 'RequestResponseInfo'. + this.statusText = record.statusText; + + // @ts-expect-error - TS2339 - Property 'payload' does not exist on type 'RequestResponseInfo'. + this.payload = record.payload; + // @ts-expect-error - TS2339 - Property 'requestHeaders' does not exist on type 'RequestResponseInfo'. + this.requestHeaders = record.reqHeaders || {}; + // @ts-expect-error - TS2339 - Property 'responseHeaders' does not exist on type 'RequestResponseInfo'. + this.responseHeaders = record.respHeaders || {}; + } + + getResponseHeadersText() { + // @ts-expect-error - TS2339 - Property 'protocol' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'status' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'statusText' does not exist on type 'RequestResponseInfo'. + let headers = `${this.protocol} ${this.status} ${this.statusText}\r\n`; + + // @ts-expect-error - TS2339 - Property 'responseHeaders' does not exist on type 'RequestResponseInfo'. + for (const header of Object.keys(this.responseHeaders)) { + // @ts-expect-error - TS2339 - Property 'responseHeaders' does not exist on type 'RequestResponseInfo'. + headers += `${header}: ${this.responseHeaders[header].replace( + /\n/g, + ", ", + )}\r\n`; + } + headers += "\r\n"; + return headers; + } + + hasRequest() { + // @ts-expect-error - TS2339 - Property 'method' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'requestHeaders' does not exist on type 'RequestResponseInfo'. | TS2339 - Property 'requestHeadersText' does not exist on type 'RequestResponseInfo'. + return this.method && (this.requestHeaders || this.requestHeadersText); + } + + getRequestHeadersDict() { + // @ts-expect-error - TS2554 - Expected 3 arguments, but got 2. | TS2339 - Property 'requestHeaders' does not exist on type 'RequestResponseInfo'. + return this._getHeadersDict(this.requestHeaders, null); + } + + // @ts-expect-error - TS7006 - Parameter 'length' implicitly has an 'any' type. + getResponseHeadersDict(length) { + return this._getHeadersDict( + // @ts-expect-error - TS2339 - Property 'responseHeaders' does not exist on type 'RequestResponseInfo'. + this.responseHeaders, + // @ts-expect-error - TS2339 - Property 'responseHeadersList' does not exist on type 'RequestResponseInfo'. + this.responseHeadersList, + length, + ); + } + + // @ts-expect-error - TS7006 - Parameter 'headersDict' implicitly has an 'any' type. | TS7006 - Parameter 'headersList' implicitly has an 'any' type. | TS7006 - Parameter 'actualContentLength' implicitly has an 'any' type. + _getHeadersDict(headersDict, headersList, actualContentLength) { + if (!headersDict && headersList) { + headersDict = {}; + + for (const header of headersList) { + const headerName = header.name.toLowerCase(); + if (EXCLUDE_HEADERS.includes(headerName)) { + continue; + } + if (actualContentLength && headerName === CONTENT_LENGTH) { + headersDict[headerName] = "" + actualContentLength; + continue; + } + headersDict[headerName] = header.value.replace(/\n/g, ", "); + } + } + + let headers = null; + + if (!headersDict) { + return { headers: new Headers(), headersDict: {} }; + } + + try { + headers = new Headers(headersDict); + } catch (e) { + for (const key of Object.keys(headersDict)) { + if (key.startsWith(":")) { + delete headersDict[key]; + continue; + } + const keyLower = key.toLowerCase(); + if (EXCLUDE_HEADERS.includes(keyLower)) { + continue; + } + if (actualContentLength && keyLower === CONTENT_LENGTH) { + headersDict[key] = "" + actualContentLength; + continue; + } + headersDict[key] = headersDict[key].replace(/\n/g, ", "); + } + try { + headers = new Headers(headersDict); + } catch (e) { + console.warn(e); + headers = new Headers(); + } + } + + return { headers, headersDict }; + } + + isValidBinary() { + // @ts-expect-error - TS2339 - Property 'payload' does not exist on type 'RequestResponseInfo'. + if (!this.payload) { + return false; + } + + // @ts-expect-error - TS2339 - Property 'payload' does not exist on type 'RequestResponseInfo'. + const length = this.payload.length; + + // @ts-expect-error - TS2554 - Expected 1 arguments, but got 0. + const { headers } = this.getResponseHeadersDict(); + const contentType = headers.get(CONTENT_TYPE); + const contentLength = headers.get(CONTENT_LENGTH); + + if (Number(contentLength) !== length) { + return false; + } + + if (contentType && contentType.startsWith("text/html")) { + return false; + } + + return true; + } +} + +//function formatHeadersText(headersText) { +// condense any headers containing newlines +// return headersText.replace(/(\n[^:\n]+)+(?=\r\n)/g, function(value) { return value.replace(/\r?\n/g, ", ");}); +//} + +export { RequestResponseInfo }; diff --git a/src/sw/main.js b/src/sw/main.js deleted file mode 100644 index 146cf5bb..00000000 --- a/src/sw/main.js +++ /dev/null @@ -1,35 +0,0 @@ -import { SWReplay } from "@webrecorder/wabac/src/swmain"; - -import { ExtAPI, RecordingCollections } from "@webrecorder/awp-sw"; - -import REC_INDEX_HTML from "../static/index.html"; -import RWP_INDEX_HTML from "replaywebpage/index.html"; - -import { WorkerLoader } from "@webrecorder/wabac/src/loaders"; - -if (self.registration) { - const defaultConfig = { - injectScripts: ["/ruffle/ruffle.js"], - baseUrlSourcePrefix: "/replay/index.html", - convertPostToGet: false - }; - - const staticData = new Map(); - - const prefix = self.registration.scope; - - // for backwards compatibility to support tag - staticData.set(prefix + "replay.html", {type: "text/html", content: RWP_INDEX_HTML}); - - // for use with tag - staticData.set(prefix + "record.html", {type: "text/html", content: REC_INDEX_HTML}); - - const ApiClass = ExtAPI; - const CollectionsClass = RecordingCollections; - - const autoipfsOpts = {}; - - self.sw = new SWReplay({ApiClass, staticData, autoipfsOpts, defaultConfig, CollectionsClass}); -} else { - new WorkerLoader(self); -} diff --git a/src/sw/main.ts b/src/sw/main.ts new file mode 100644 index 00000000..fcdf1fea --- /dev/null +++ b/src/sw/main.ts @@ -0,0 +1,49 @@ +import { SWReplay, WorkerLoader } from "@webrecorder/wabac/swlib"; + +import { ExtAPI, RecordingCollections } from "@webrecorder/awp-sw"; + +import REC_INDEX_HTML from "@/static/index.html"; +import RWP_INDEX_HTML from "replaywebpage/index.html"; + +declare let self: ServiceWorkerGlobalScope; + +if (self.registration) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const defaultConfig: Record = { + baseUrlSourcePrefix: "/replay/index.html", + convertPostToGet: false, + }; + + if (self.location.origin.startsWith("chrome-extension://")) { + defaultConfig["injectScripts"] = ["/ruffle/ruffle.js"]; + } + + const staticData = new Map(); + + const prefix = self.registration.scope; + + // for backwards compatibility to support tag + staticData.set(prefix + "replay.html", { + type: "text/html", + content: RWP_INDEX_HTML, + }); + + // for use with tag + staticData.set(prefix + "record.html", { + type: "text/html", + content: REC_INDEX_HTML, + }); + + const ApiClass = ExtAPI; + const CollectionsClass = RecordingCollections; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (self as any).sw = new SWReplay({ + ApiClass, + staticData, + defaultConfig, + CollectionsClass, + }); +} else { + new WorkerLoader(self); +} diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 00000000..d2617322 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,22 @@ +import { type ItemType } from "replaywebpage"; +import { type BtrixClient } from "./ui/upload"; + +type Identity = { [k in keyof T]: T[k] }; + +export type WrRecItem = Identity< + ItemType & { + uploadTime?: number; + mtime: number; + sourceUrl?: string; + ipfsPins?: { url: string }[]; + uploadId: string; + } +>; + +export type BtrixOpts = { + url: string; + username: string; + password: string; + orgName: string; + client?: BtrixClient; +}; diff --git a/src/ui/app.js b/src/ui/app.js deleted file mode 100644 index 2fe5e566..00000000 --- a/src/ui/app.js +++ /dev/null @@ -1,1003 +0,0 @@ -import { html, css, wrapCss, IS_APP, apiPrefix } from "replaywebpage/src/misc"; - -// replaywebpage imports -import { ReplayWebApp, Embed, Loader } from "replaywebpage"; - -import { SWManager } from "replaywebpage/src/swmanager"; - -import fasHelp from "@fortawesome/fontawesome-free/svgs/solid/question-circle.svg"; -import fasPlus from "@fortawesome/fontawesome-free/svgs/solid/plus.svg"; - -import fasUpload from "@fortawesome/fontawesome-free/svgs/solid/upload.svg"; -import fasCog from "@fortawesome/fontawesome-free/svgs/solid/cog.svg"; - -import "./coll"; -import "./coll-info"; -import "./coll-index"; -import "./recordembed"; - -import { BtrixClient } from "./upload"; - -import wrRec from "../assets/icons/recLogo.svg"; -import awpLogo from "../assets/brand/archivewebpage-icon-color.svg"; -import awpBrandLockupColor from "../assets/brand/archivewebpage-lockup-color.svg"; -import prettyBytes from "pretty-bytes"; - -import { create as createAutoIpfs, DaemonAPI, Web3StorageAPI } from "auto-js-ipfs"; -import { getLocalOption, setLocalOption } from "../localstorage"; - - -// eslint-disable-next-line no-undef -const VERSION = __AWP_VERSION__; - -const DEFAULT_GATEWAY_URL = "https://w3s.link/ipfs/"; - -const DEFAULT_BTRIX_URL = "https://app.browsertrix.com"; - - -//============================================================================ -class ArchiveWebApp extends ReplayWebApp -{ - constructor() { - super(); - - this.navMenuShown = false; - this.showCollDrop = false; - this.colls = []; - this.autorun = false; - - this.settingsError = ""; - - this.settingsTab = localStorage.getItem("settingsTab") || "browsertrix"; - - try { - const res = localStorage.getItem("ipfsOpts"); - this.ipfsOpts = JSON.parse(res); - } catch (e) { - // ignore empty - } - - this.ipfsOpts = this.ipfsOpts || { - daemonUrl: "", - message: "", - useCustom: false, - autoDetect: false, - gatewayUrl: DEFAULT_GATEWAY_URL - }; - - try { - const res = localStorage.getItem("btrixOpts"); - this.btrixOpts = JSON.parse(res); - this.doBtrixLogin(); - } catch (e) { - this.btrixOpts = null; - } - - getLocalOption("autorunBehaviors").then((res) => this.autorun = res === "1"); - - if (window.archivewebpage) { - window.archivewebpage.setDownloadCallback((progress) => this.onDownloadProgress(progress)); - } - } - - async doBtrixLogin() { - try { - this.btrixOpts.client = await BtrixClient.login(this.btrixOpts); - } catch (e) { - this.btrixOpts = null; - } - } - - get appName() { - return "ArchiveWeb.page"; - } - - static get properties() { - return { - ...ReplayWebApp.properties, - - showStartRecord: { type: Boolean }, - showCollDrop: { type: Boolean }, - colls: { type: Array }, - selCollId: { type: String }, - selCollTitle: { type: String }, - recordUrl: { type: String }, - autorun: { type: Boolean }, - - showNew: { type: String }, - showImport: { type: Boolean }, - isImportExisting: { type: Boolean }, - - loadedCollId: { type: String }, - - showDownloadProgress: { type: Boolean }, - download: { type: Object }, - - ipfsOpts: { type: Object }, - btrixOpts: { type: Object }, - - uploadCollOpts: { type: Object }, - - showSettings: {type: Boolean }, - settingsTab: { type: String }, - settingsError: { type: String }, - - showIpfsShareFailed: { type: Boolean }, - }; - } - - initRoute() { - const pageParams = new URLSearchParams(window.location.search); - - if (pageParams.has("config")) { - super.initRoute(); - - this.handleMessages(); - - } else { - this.inited = true; - this.sourceUrl = pageParams.get("source") || ""; - } - - if (!this.embed) { - this.checkIPFS(); - } - } - - async checkSW() { - const regs = await navigator.serviceWorker.getRegistrations(); - // Remove double SW - for (const reg of regs) { - if (reg.active && reg.active.scriptURL.endsWith("/replay/sw.js")) { - if (await reg.unregister()) { - self.location.reload(); - } - } - } - - // For App: If no SW, register here - if (IS_APP && !regs.length) { - this.swmanager = new SWManager({ name: this.swName, appName: this.appName }); - this.swmanager - .register() - .catch( - () => - (this.swErrorMsg = this.swmanager.renderErrorReport(this.mainLogo)), - ); - } - } - - firstUpdated() { - this.embed = this.pageParams.get("embed") || ""; - - if (this.embed) { - return super.firstUpdated(); - } - - this.checkSW(); - - this.initRoute(); - - window.addEventListener("popstate", () => { - this.initRoute(); - }); - } - - handleMessages() { - // support upload - window.addEventListener("message", async (event) => { - if (this.embed && this.loadedCollId && typeof(event.data) === "object" && event.data.msg_type === "downloadToBlob") { - const download = await fetch(`${apiPrefix}/c/${this.loadedCollId}/dl?format=wacz&pages=all`); - const blob = await download.blob(); - event.source.postMessage({msg_type: "downloadedBlob", coll: this.loadedCollId, url: URL.createObjectURL(blob)}); - } - }); - } - - onStartLoad(event) { - if (this.embed) { - return; - } - - this.showImport = false; - this.sourceUrl = event.detail.sourceUrl; - this.loadInfo = event.detail; - - if (this.isImportExisting && this.selCollId) { - this.loadInfo.importCollId = this.selCollId; - } - } - - onCollLoaded(event) { - if (this.loadInfo && this.loadInfo.importCollId) { - if (navigator.serviceWorker.controller) { - const msg = {"msg_type": "reload", "full": true, "name": this.loadInfo.importCollId}; - navigator.serviceWorker.controller.postMessage(msg); - } - } - - if (this.embed) { - this.loadedCollId = event.detail.collInfo && event.detail.collInfo.coll; - } - - super.onCollLoaded(event); - - if (!event.detail.alreadyLoaded && event.detail.sourceUrl && event.detail.sourceUrl !== this.sourceUrl) { - this.sourceUrl = event.detail.sourceUrl; - } - } - - getLoadInfo(sourceUrl) { - this.disableCSP(); - - if (this.loadInfo) { - return this.loadInfo; - } - - const customColl = sourceUrl.startsWith("local://") ? sourceUrl.slice("local://".length) : sourceUrl; - - return {customColl}; - } - - async disableCSP() { - // necessary for chrome 94> up due to new bug introduced - // - if (this.embed || (!self.chrome || !self.chrome.runtime)) { - return; - } - - const m = navigator.userAgent.match(/Chrome\/([\d]+)/); - if (!m || Number(m[1]) < 94) { - return; - } - - console.log("attempt to disable CSP to ensure replay works"); - let tabId = await new Promise((resolve) => { - chrome.tabs.getCurrent((msg) => resolve(msg.id)); - }); - - chrome.runtime.sendMessage({ - msg: "disableCSP", - tabId - }); - } - - static get styles() { - return wrapCss(ArchiveWebApp.appStyles); - } - - static get appStyles() { - return wrapCss(css` - :host { - font-size: initial; - overflow: auto; - } - - wr-rec-coll { - height: 100%; - width: 100%; - } - - .recorder .modal-background { - background-color: rgba(10, 10, 10, 0.50); - } - - .recorder .modal-card-head { - background-color: #97a1ff; - } - - .extra-padding { - padding: 1.0em; - } - - .less-padding { - padding-top: 1.0em; - padding-bottom: 1.0em; - } - - div.field.has-addons { - flex: auto; - } - - form { - flex-grow: 1; - flex-shrink: 0; - margin: 0px; - } - - .dropdown-row { - display: flex; - align-items: center; - margin-bottom: 0.5em; - } - - .infomsg { - max-width: 300px; - padding-right: 8px; - } - - .rightbar { - margin-left: auto; - display: flex; - } - - .dl-progress { - display: flex; - flex-direction: column; - } - - @media screen and (max-width: 768px) { - #url { - border-bottom-right-radius: 4px; - border-top-right-radius: 4px; - } - - .no-pad-mobile { - padding-right: 2px; - } - } - - ${ReplayWebApp.appStyles} - `); - } - - // HACK: returns the logo requested by ReplayWeb.page's nav as nothing now that the new logo includes both graphics and text. Probably best to refactor this behavior. - get mainLogo() { - return ""; - } - - renderNavEnd() { - return html` - -  User Guide - - About - `; - } - - renderNavBrand() { - return html` - `; - } - - renderHomeIndex() { - return html` -
-
-
-
- - - -
-
The ArchiveWeb.page ${IS_APP ? "App" : "Extension"} allows you to archive webpages directly in your browser!
- -
-
-
-
-
- - this.showIpfsShareFailed = true} - @do-upload=${(e) => this.uploadCollOpts = e.detail} - style="overflow: visible" - > - - `; - } - - render() { - return html` - ${this.showStartRecord ? this.renderStartModal() : ""} - ${this.showNew ? this.renderNewCollModal() : ""} - ${this.showImport ? this.renderImportModal() : ""} - ${this.showDownloadProgress && this.download ? this.renderDownloadModal() : ""} - ${this.showSettings ? this.renderSettingsModal() : ""} - ${this.showIpfsShareFailed ? this.renderIPFSShareFailedModal() : ""} - ${this.uploadCollOpts && this.btrixOpts ? this.renderBtrixUploadModal() : ""} - ${super.render()}`; - } - - renderColl() { - return html` - this.uploadCollOpts = e.detail} - @about-show=${() => this.showAbout = true}>`; - } - - renderCollList(text = "") { - return html` - - `; - } - - renderStartModal() { - return html` - - ${this.renderCollList("Save To:")} -
- -
- -
-
-

- -

-
- -
-
- ${IS_APP ? html` - ` : ""} -
-
`; - } - - renderNewCollModal() { - return html` - -
-
-

- -

-
- -
-
-
- - - -
-
- -
- ${this.isImportExisting ? this.renderCollList() : ""} -
- -
-

Sorry, IPFS sharing / unsharing failed as IPFS could not be reached.

-

(Check the IPFS settings and try again.)

-
- - `; - } - - renderDownloadModal() { - const renderDLStatus = () => { - switch (this.download.state) { - case "progressing": - return html` - - `; - - case "interrupted": - return html` -

The download was interrupted

- - `; - - case "cancelled": - return html` -

The download was canceled

- - `; - - case "completed": - return html` -

Download Completed!

- - `; - } - }; - - return html` - -
-
Downloading to: ${this.download.filename}
-
Size Downloaded: ${prettyBytes(this.download.currSize)}
-
Time Elapsed: ${Math.round((Date.now() / 1000) - this.download.startTime)} seconds
- -
- ${renderDLStatus()} -
-
-
`; - } - - onDownloadProgress(progress) { - if (progress.filename) { - this.showDownloadProgress = true; - this.download = progress; - } else if (this.download) { - this.download = {...this.download, state: progress.state}; - } - } - - onDownloadCancel() { - if (window.archivewebpage) { - if (this.download && this.download.state === "progressing") { - window.archivewebpage.downloadCancel(this.download); - } else { - this.showDownloadProgress = false; - } - } - } - - getDeployType() { - if (IS_APP) { - return "App"; - } - - if (this.embed) { - return "Embedded"; - } - - return "Extension"; - } - - renderAbout() { - return html` - - `; - } - - renderSettingsModal() { - return html` - - - -
- - ${this.settingsTab === "ipfs" ? html` -

Configure settings for sharing archived items to IPFS.

-
-
- Auto-Detect IPFS -
-
-

- IPFS Daemon URL (leave blank to auto-detect IPFS): - -

-
-
-

- IPFS Gateway URL: - -

-
-
` : ""} - - ${this.settingsTab === "browsertrix" ? html` -

Configure your credentials to upload archived items to Browsertrix.

-

Don't have a Browsertrix account? Visit https://browsertrix.com/ for more info.

-
-
-

- Browsertrix URL: - -

-
-
-

- Username - -

-
-
-

- Password - -

-
-
-

- Organization Name or Slug (Optional) - -

-
-
- ` : ""} -
${this.settingsError}
-
- - -
-
-
- `; - } - - async onNewColl(event) { - this.showNew = "loading"; - event.preventDefault(); - const title = this.renderRoot.querySelector("#new-title").value; - - const method = "POST"; - const body = JSON.stringify({"metadata": {title}}); - const resp = await fetch(`${apiPrefix}/c/create`, {method, body}); - await resp.json(); - - const index = this.renderRoot.querySelector("wr-rec-coll-index"); - if (index) { - index.loadColls(); - } - this.showNew = null; - } - - onSelectColl(event) { - //this.selCollId = event.currentTarget.getAttribute("data-id"); - //this.selCollTitle = event.currentTarget.getAttribute("data-title"); - //this.showCollDrop = false; - this.selCollId = event.currentTarget.value; - } - - async setDefaultColl() { - if (!this.selCollId) { - this.selCollId = await getLocalOption("defaultCollId"); - } - if (!this.selCollId && this.colls && this.colls.length) { - this.selCollId = this.colls[0].id; - } - // copy from localStorage to chrome.storage - if (self.chrome && self.chrome.storage && self.chrome.storage.local && self.localStorage) { - await setLocalOption("index:sortKey", localStorage.getItem("index:sortKey")); - await setLocalOption("index:sortDesc", localStorage.getItem("index:sortDesc")); - } - } - - _setCurrColl(event) { - if (!(event instanceof CustomEvent)) { - this.setDefaultColl(); - return; - } - const { detail } = event; - this.selCollId = detail.coll; - //this.selCollTitle = event.detail.title; - if (!this.colls || !this.colls.length) { - this.colls = [{ - id: detail.coll, - title: detail.title - }]; - } - } - - async onShowStart(event) { - this._setCurrColl(event); - this.recordUrl = event.detail.url || "https://example.com/"; - this.showStartRecord = true; - } - - onShowImport(event) { - this._setCurrColl(event); - this.showImport = true; - this.isImportExisting = true; - } - - onCollsLoaded(event) { - this.colls = event.detail.colls; - //this.selCollId = this.colls && this.colls.length ? this.colls[0].id: null; - this.setDefaultColl(); - } - - async onStartRecord(event) { - event.preventDefault(); - const url = this.renderRoot.querySelector("#url").value; - - const previewCheckbox = this.renderRoot.querySelector("#preview"); - const isPreview = previewCheckbox && previewCheckbox.checked; - - this.showStartRecord = false; - const autorun = this.autorun; - - const collId = this.selCollId; - - await setLocalOption("defaultCollId", collId); - await setLocalOption("autorunBehaviors", autorun ? "1" : "0"); - - if (self.chrome && self.chrome.runtime) { - chrome.runtime.sendMessage({ - msg: "startNew", - url, - collId, - autorun, - }); - } else if (window.archivewebpage && window.archivewebpage.record) { - const startRec = !isPreview; - window.archivewebpage.record({url, collId, startRec, autorun}); - } - return false; - } - - async onTitle(event) { - super.onTitle(event); - - if (this.embed && this.loadedCollId && event.detail.replayTitle && event.detail.title) { - try { - await fetch(`${apiPrefix}/c/${this.loadedCollId}/pageTitle`, {method: "POST", body: JSON.stringify(event.detail)}); - } catch (e) { - console.warn(e); - } - } - } - - async onSaveSettings(event) { - event.preventDefault(); - - // IPFS settings - const daemonUrlText = this.renderRoot.querySelector("#ipfsDaemonUrl"); - const gatewayUrlText = this.renderRoot.querySelector("#ipfsGatewayUrl"); - const autodetectCheck = this.renderRoot.querySelector("#ipfsAutoDetect"); - - if (daemonUrlText && gatewayUrlText) { - const daemonUrl = daemonUrlText.value; - const gatewayUrl = gatewayUrlText.value; - const autoDetect = autodetectCheck && autodetectCheck.checked; - - this.ipfsOpts = { - daemonUrl, useCustom: !!daemonUrl, gatewayUrl, - autoDetect - }; - - await this.checkIPFS(); - - localStorage.setItem("ipfsOpts", JSON.stringify(this.ipfsOpts)); - } - - // Browsertrix Settings - const btrixUrl = this.renderRoot.querySelector("#btrixUrl"); - const btrixUsername = this.renderRoot.querySelector("#btrixUsername"); - const btrixPassword = this.renderRoot.querySelector("#btrixPassword"); - const btrixOrgName = this.renderRoot.querySelector("#btrixOrgName"); - - if (btrixUrl && btrixUsername && btrixPassword) { - const url = btrixUrl.value; - const username = btrixUsername.value; - const password = btrixPassword.value; - const orgName = btrixOrgName && btrixOrgName.value || ""; - - if (url && username && password) { - const btrixOpts = { url, username, password, orgName }; - - let client; - - try { - client = await BtrixClient.login(btrixOpts); - this.settingsError = ""; - } catch (e) { - this.settingsError = "Unable to log in to Browsertrix. Check your credentials."; - return false; - } - - localStorage.setItem("btrixOpts", JSON.stringify(btrixOpts)); - this.btrixOpts = {...btrixOpts, client}; - } else { - this.btrixOpts = null; - localStorage.removeItem("btrixOpts"); - } - } - - localStorage.setItem("settingsTab", this.settingsTab); - - this.showSettings = false; - - return false; - } - - async onCancelSettings() { - this.settingsError = null; - this.showSettings = false; - } - - async checkIPFS() { - const ipfsOpts = this.ipfsOpts; - - // use auto-js-ipfs to get possible local daemon url (eg. for Brave) - // if so, send it to the service worker - if (ipfsOpts.useCustom && ipfsOpts.daemonUrl) { - ipfsOpts.message = "IPFS Access -- Custom IPFS Daemon"; - return; - } - - if (!ipfsOpts.daemonUrl && ipfsOpts.autoDetect) { - // eslint-disable-next-line no-undef - const autoipfs = await createAutoIpfs({web3StorageToken: __WEB3_STORAGE_TOKEN__}); - - if (autoipfs instanceof DaemonAPI) { - ipfsOpts.daemonUrl = autoipfs.url; - } - - ipfsOpts.useCustom = false; - - if (autoipfs instanceof Web3StorageAPI) { - ipfsOpts.message = "Sharing via remote web3.storage"; - } else if (!ipfsOpts.daemonUrl) { - ipfsOpts.message = "IPFS Access Unknown - Sharing Not Available"; - } else if (ipfsOpts.daemonUrl.startsWith("http://localhost:45")) { - ipfsOpts.message = "Sharing via Brave IPFS node"; - } else if (ipfsOpts.daemonUrl.startsWith("http://localhost")) { - ipfsOpts.message = "Sharing via local IPFS node"; - } else { - ipfsOpts.message = ""; - } - } - } -} - -customElements.define("archive-web-page-app", ArchiveWebApp); - -export { ArchiveWebApp, Loader, Embed }; diff --git a/src/ui/app.ts b/src/ui/app.ts new file mode 100644 index 00000000..a929a161 --- /dev/null +++ b/src/ui/app.ts @@ -0,0 +1,1543 @@ +import { html, css, wrapCss, IS_APP, apiPrefix } from "replaywebpage"; + +// replaywebpage imports +import { ReplayWebApp, Embed, Loader } from "replaywebpage"; + +import { SWManager } from "replaywebpage"; + +import fasHelp from "@fortawesome/fontawesome-free/svgs/solid/question-circle.svg"; +import fasPlus from "@fortawesome/fontawesome-free/svgs/solid/plus.svg"; + +import fasUpload from "@fortawesome/fontawesome-free/svgs/solid/upload.svg"; +import fasCog from "@fortawesome/fontawesome-free/svgs/solid/cog.svg"; + +import "./coll"; +import "./coll-info"; +import "./recordembed"; +import "./coll-index"; + +import { BtrixClient } from "./upload"; + +import wrRec from "../assets/icons/recLogo.svg"; +import awpLogo from "../assets/brand/archivewebpage-icon-color.svg"; +import awpBrandLockupColor from "../assets/brand/archivewebpage-lockup-color.svg"; +import prettyBytes from "pretty-bytes"; + +import { + create as createAutoIpfs, + DaemonAPI, + Web3StorageAPI, + // @ts-expect-error - TS7016 - Could not find a declaration file for module 'auto-js-ipfs'. '/Users/emma/Work/Webrecorder/archiveweb.page/node_modules/auto-js-ipfs/index.js' implicitly has an 'any' type. +} from "auto-js-ipfs"; +import { getLocalOption, setLocalOption } from "../localstorage"; +import { type BtrixOpts } from "../types"; + +const VERSION = __AWP_VERSION__; + +const DEFAULT_GATEWAY_URL = "https://w3s.link/ipfs/"; + +const DEFAULT_BTRIX_URL = "https://app.browsertrix.com"; + +//============================================================================ +class ArchiveWebApp extends ReplayWebApp { + showCollDrop: boolean; + colls: { id: string; title?: string; loadUrl?: string }[]; + autorun: boolean; + settingsError: string; + settingsTab: string; + ipfsOpts: { + daemonUrl: string; + message?: string; + useCustom: boolean; + autoDetect: boolean; + gatewayUrl: string; + }; + btrixOpts: BtrixOpts | null; + loadedCollId?: string | null; + showImport?: boolean; + constructor() { + super(); + + this.navMenuShown = false; + this.showCollDrop = false; + this.colls = []; + this.autorun = false; + + this.settingsError = ""; + + this.settingsTab = localStorage.getItem("settingsTab") || "browsertrix"; + + try { + const res = localStorage.getItem("ipfsOpts"); + this.ipfsOpts = JSON.parse(res!); + } catch (e) { + // ignore empty + } + + this.ipfsOpts ||= { + daemonUrl: "", + message: "", + useCustom: false, + autoDetect: false, + gatewayUrl: DEFAULT_GATEWAY_URL, + }; + + try { + const res = localStorage.getItem("btrixOpts"); + // @ts-expect-error - TS2339 - Property 'btrixOpts' does not exist on type 'ArchiveWebApp'. | TS2345 - Argument of type 'string | null' is not assignable to parameter of type 'string'. + this.btrixOpts = JSON.parse(res); + this.doBtrixLogin(); + } catch (e) { + this.btrixOpts = null; + } + + getLocalOption("autorunBehaviors").then( + (res) => (this.autorun = res === "1"), + ); + + if (window.archivewebpage) { + // @ts-expect-error - TS7006 - Parameter 'progress' implicitly has an 'any' type. + window.archivewebpage.setDownloadCallback((progress) => + this.onDownloadProgress(progress), + ); + } + } + + async doBtrixLogin() { + try { + // @ts-expect-error - TS2531 - Object is possibly 'null'. | TS2345 - Argument of type 'BtrixOpts | null' is not assignable to parameter of type '{ url: any; username: any; password: any; orgName: any; }'. + this.btrixOpts.client = await BtrixClient.login(this.btrixOpts); + } catch (e) { + this.btrixOpts = null; + } + } + + get appName() { + return "ArchiveWeb.page"; + } + + static get properties() { + return { + ...ReplayWebApp.properties, + + showStartRecord: { type: Boolean }, + showCollDrop: { type: Boolean }, + colls: { type: Array }, + selCollId: { type: String }, + selCollTitle: { type: String }, + recordUrl: { type: String }, + autorun: { type: Boolean }, + + showNew: { type: String }, + showImport: { type: Boolean }, + isImportExisting: { type: Boolean }, + + loadedCollId: { type: String }, + + showDownloadProgress: { type: Boolean }, + download: { type: Object }, + + ipfsOpts: { type: Object }, + btrixOpts: { type: Object }, + + uploadCollOpts: { type: Object }, + + showSettings: { type: Boolean }, + settingsTab: { type: String }, + settingsError: { type: String }, + + showIpfsShareFailed: { type: Boolean }, + }; + } + + initRoute() { + const pageParams = new URLSearchParams(window.location.search); + + if (pageParams.has("config")) { + super.initRoute(); + + this.handleMessages(); + } else { + this.inited = true; + this.sourceUrl = pageParams.get("source") || ""; + } + + if (!this.embed) { + this.checkIPFS(); + } + } + + async checkSW() { + const regs = await navigator.serviceWorker.getRegistrations(); + // Remove double SW + for (const reg of regs) { + if (reg.active && reg.active.scriptURL.endsWith("/replay/sw.js")) { + if (await reg.unregister()) { + self.location.reload(); + } + } + } + + // For App: If no SW, register here + if (IS_APP && !regs.length) { + const qp = new URLSearchParams(); + qp.set("injectScripts", "ruffle/ruffle.js"); + + this.swmanager = new SWManager({ + name: this.swName + "?" + qp.toString(), + appName: this.appName, + }); + this.swmanager + .register() + .catch( + () => + (this.swErrorMsg = + this.swmanager?.renderErrorReport(this.mainLogo) || ""), + ); + } + } + + firstUpdated() { + this.embed = this.pageParams.get("embed") || ""; + + if (this.embed) { + return super.firstUpdated(); + } + + this.checkSW(); + + this.initRoute(); + + window.addEventListener("popstate", () => { + this.initRoute(); + }); + } + + handleMessages() { + // support upload + window.addEventListener("message", async (event) => { + if ( + this.embed && + this.loadedCollId && + typeof event.data === "object" && + event.data.msg_type === "downloadToBlob" + ) { + const download = await fetch( + `${apiPrefix}/c/${this.loadedCollId}/dl?format=wacz&pages=all`, + ); + const blob = await download.blob(); + event.source?.postMessage({ + msg_type: "downloadedBlob", + coll: this.loadedCollId, + url: URL.createObjectURL(blob), + }); + } + }); + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onStartLoad(event) { + if (this.embed) { + return; + } + + this.showImport = false; + this.sourceUrl = event.detail.sourceUrl; + this.loadInfo = event.detail; + + // @ts-expect-error - TS2339 - Property 'isImportExisting' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'selCollId' does not exist on type 'ArchiveWebApp'. + if (this.isImportExisting && this.selCollId) { + // @ts-expect-error - TS2339 - Property 'loadInfo' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'selCollId' does not exist on type 'ArchiveWebApp'. + this.loadInfo.importCollId = this.selCollId; + } + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onCollLoaded(event) { + if (this.loadInfo?.importCollId) { + if (navigator.serviceWorker.controller) { + const msg = { + msg_type: "reload", + full: true, + name: this.loadInfo.importCollId, + }; + navigator.serviceWorker.controller.postMessage(msg); + } + } + + if (this.embed) { + this.loadedCollId = event.detail.collInfo?.coll; + } + + super.onCollLoaded(event); + + if ( + !event.detail.alreadyLoaded && + event.detail.sourceUrl && + event.detail.sourceUrl !== this.sourceUrl + ) { + this.sourceUrl = event.detail.sourceUrl; + } + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + getLoadInfo(sourceUrl: string): any { + this.disableCSP(); + + if (this.loadInfo) { + return this.loadInfo; + } + + const customColl = sourceUrl.startsWith("local://") + ? sourceUrl.slice("local://".length) + : sourceUrl; + + return { customColl }; + } + + async disableCSP() { + // necessary for chrome 94> up due to new bug introduced + // + // @ts-expect-error - TS2339 - Property 'embed' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. | TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. + if (this.embed || !self.chrome?.runtime) { + return; + } + + const m = navigator.userAgent.match(/Chrome\/([\d]+)/); + if (!m || Number(m[1]) < 94) { + return; + } + + console.log("attempt to disable CSP to ensure replay works"); + const tabId = await new Promise((resolve) => { + // @ts-expect-error - TS7006 - Parameter 'msg' implicitly has an 'any' type. + chrome.tabs.getCurrent((msg) => resolve(msg.id)); + }); + + chrome.runtime.sendMessage({ + msg: "disableCSP", + tabId, + }); + } + + static get styles() { + return wrapCss(ArchiveWebApp.appStyles); + } + + static get appStyles() { + return wrapCss(css` + :host { + font-size: initial; + overflow: auto; + } + + wr-rec-coll { + height: 100%; + width: 100%; + } + + .recorder .modal-background { + background-color: rgba(10, 10, 10, 0.5); + } + + .recorder .modal-card-head { + background-color: #97a1ff; + } + + .extra-padding { + padding: 1em; + } + + .less-padding { + padding-top: 1em; + padding-bottom: 1em; + } + + div.field.has-addons { + flex: auto; + } + + form { + flex-grow: 1; + flex-shrink: 0; + margin: 0px; + } + + .dropdown-row { + display: flex; + align-items: center; + margin-bottom: 0.5em; + } + + .infomsg { + max-width: 300px; + padding-right: 8px; + } + + .rightbar { + margin-left: auto; + display: flex; + } + + .dl-progress { + display: flex; + flex-direction: column; + } + + @media screen and (max-width: 768px) { + #url { + border-bottom-right-radius: 4px; + border-top-right-radius: 4px; + } + + .no-pad-mobile { + padding-right: 2px; + } + } + + ${ReplayWebApp.appStyles} + `); + } + + // HACK: returns the logo requested by ReplayWeb.page's nav as nothing now that the new logo includes both graphics and text. Probably best to refactor this behavior. + get mainLogo() { + return ""; + } + + renderNavEnd() { + return html` +  User Guide + + About + `; + } + + renderNavBrand() { + return html` `; + } + + renderHomeIndex() { + return html` +
+
+
+
+ + + +
+
+ The ArchiveWeb.page ${IS_APP ? "App" : "Extension"} allows you + to archive webpages directly in your browser! +
+ +
+
+
+
+
+ + (this.showIpfsShareFailed = true) + } + @do-upload=${ + // @ts-expect-error - TS2339 - Property 'uploadCollOpts' does not exist on type 'ArchiveWebApp'. + (e) => (this.uploadCollOpts = e.detail) + } + style="overflow: visible" + > + + `; + } + + render() { + // @ts-expect-error - TS2551 - Property 'showStartRecord' does not exist on type 'ArchiveWebApp'. Did you mean 'onStartRecord'? + return html` ${this.showStartRecord ? this.renderStartModal() : ""} + ${ + // @ts-expect-error - TS2339 - Property 'showNew' does not exist on type 'ArchiveWebApp'. + this.showNew ? this.renderNewCollModal() : "" + } + ${this.showImport ? this.renderImportModal() : ""} + ${ + // @ts-expect-error - TS2551 - Property 'showDownloadProgress' does not exist on type 'ArchiveWebApp'. Did you mean 'onDownloadProgress'? | TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + this.showDownloadProgress && this.download + ? this.renderDownloadModal() + : "" + } + ${ + // @ts-expect-error - TS2339 - Property 'showSettings' does not exist on type 'ArchiveWebApp'. + this.showSettings ? this.renderSettingsModal() : "" + } + ${ + // @ts-expect-error - TS2339 - Property 'showIpfsShareFailed' does not exist on type 'ArchiveWebApp'. + this.showIpfsShareFailed ? this.renderIPFSShareFailedModal() : "" + } + ${ + // @ts-expect-error - TS2339 - Property 'uploadCollOpts' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'btrixOpts' does not exist on type 'ArchiveWebApp'. + this.uploadCollOpts && this.btrixOpts ? this.renderBtrixUploadModal() : "" + } + ${super.render()}`; + } + + renderColl() { + return html` (this.uploadCollOpts = e.detail) + } + @about-show=${() => (this.showAbout = true)} + >`; + } + + renderCollList(text = "") { + return html` + + `; + } + + renderStartModal() { + return html` + ${this.renderCollList("Save To:")} +
+ +
+ +
+
+

+ +

+
+ +
+
+ ${IS_APP + ? html` ` + : ""} +
+
`; + } + + renderNewCollModal() { + return html` +
+
+

+ +

+
+ +
+
+
+
`; + } + + renderImportModal() { + return html` + + +
+
+ +
+ ${ + // @ts-expect-error - TS2339 - Property 'isImportExisting' does not exist on type 'ArchiveWebApp'. + this.isImportExisting ? this.renderCollList() : "" + } +
+
`; + } + + renderIPFSShareFailedModal() { + return html` +
+

+ Sorry, IPFS sharing / unsharing failed as IPFS could not be reached. +

+

(Check the IPFS settings and try again.)

+
+
`; + } + + renderBtrixUploadModal() { + return html` + `; + } + + renderDownloadModal() { + const renderDLStatus = () => { + // @ts-expect-error - TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + switch (this.download.state) { + case "progressing": + return html` + + `; + + case "interrupted": + return html` +

+ The download was interrupted +

+ + `; + + case "cancelled": + return html` +

+ The download was canceled +

+ + `; + + case "completed": + return html` +

+ Download Completed! +

+ + `; + } + }; + + return html` +
+
+ Downloading to: + ${ + // @ts-expect-error - TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + this.download.filename + } +
+
+ Size Downloaded: + ${ + // @ts-expect-error - TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + prettyBytes(this.download.currSize) + } +
+
+ Time Elapsed: + ${ + // @ts-expect-error - TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + Math.round(Date.now() / 1000 - this.download.startTime) + } + seconds +
+ +
${renderDLStatus()}
+
+
`; + } + + // @ts-expect-error - TS7006 - Parameter 'progress' implicitly has an 'any' type. + onDownloadProgress(progress) { + if (progress.filename) { + // @ts-expect-error - TS2551 - Property 'showDownloadProgress' does not exist on type 'ArchiveWebApp'. Did you mean 'onDownloadProgress'? + this.showDownloadProgress = true; + // @ts-expect-error - TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + this.download = progress; + // @ts-expect-error - TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + } else if (this.download) { + // @ts-expect-error - TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + this.download = { ...this.download, state: progress.state }; + } + } + + onDownloadCancel() { + if (window.archivewebpage) { + // @ts-expect-error - TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + if (this.download && this.download.state === "progressing") { + // @ts-expect-error - TS2339 - Property 'archivewebpage' does not exist on type 'Window & typeof globalThis'. | TS2339 - Property 'download' does not exist on type 'ArchiveWebApp'. + window.archivewebpage.downloadCancel(this.download); + } else { + // @ts-expect-error - TS2551 - Property 'showDownloadProgress' does not exist on type 'ArchiveWebApp'. Did you mean 'onDownloadProgress'? + this.showDownloadProgress = false; + } + } + } + + getDeployType() { + if (IS_APP) { + return "App"; + } + + if (this.embed) { + return "Embedded"; + } + + return "Extension"; + } + + renderAbout() { + return html` + + `; + } + + renderSettingsModal() { + return html` + + + +
+ + ${ + this.settingsTab === "ipfs" + ? html`

+ Configure settings for sharing archived items to IPFS. +

+
+
+ Auto-Detect IPFS +
+
+

+ IPFS Daemon URL (leave blank to auto-detect IPFS): + +

+
+
+

+ IPFS Gateway URL: + +

+
+
` + : "" + } + + ${ + this.settingsTab === "browsertrix" + ? html` +

+ Configure your credentials to upload archived items to + Browsertrix. +

+

+ Don't have a Browsertrix account? Visit + https://browsertrix.com/ + for more info. +

+
+
+

+ Browsertrix URL: + +

+
+
+

+ Username + +

+
+
+

+ Password + +

+
+
+

+ Organization Name or Slug (Optional) + +

+
+
+ ` + : "" + } +
${ + this.settingsError + }
+
+ + +
+ + + ${ + this.settingsTab === "ipfs" + ? html`

+ Configure settings for sharing archived items to IPFS. +

+
+
+ Auto-Detect IPFS +
+
+

+ IPFS Daemon URL (leave blank to auto-detect IPFS): + +

+
+
+

+ IPFS Gateway URL: + +

+
+
` + : "" + } + ${ + this.settingsTab === "browsertrix" + ? html` +

+ Configure your credentials to upload archived items to + Browsertrix Cloud. +

+
+
+

+ Browsertrix Cloud URL: + +

+
+
+

+ Username + +

+
+
+

+ Password + +

+
+
+

+ Organization Name (Optional) + +

+
+
+ ` + : "" + } +
+ ${this.settingsError} +
+
+ + +
+
+
+ `; + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + async onNewColl(event) { + // @ts-expect-error - TS2339 - Property 'showNew' does not exist on type 'ArchiveWebApp'. + this.showNew = "loading"; + event.preventDefault(); + // @ts-expect-error - TS2339 - Property 'renderRoot' does not exist on type 'ArchiveWebApp'. + const title = this.renderRoot.querySelector("#new-title").value; + + const method = "POST"; + const body = JSON.stringify({ metadata: { title } }); + const resp = await fetch(`${apiPrefix}/c/create`, { method, body }); + await resp.json(); + + const index = this.renderRoot.querySelector("wr-rec-coll-index")!; + if (index) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (index as any).loadItems(); + } + // @ts-expect-error - TS2339 - Property 'showNew' does not exist on type 'ArchiveWebApp'. + this.showNew = null; + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onSelectColl(event) { + //this.selCollId = event.currentTarget.getAttribute("data-id"); + //this.selCollTitle = event.currentTarget.getAttribute("data-title"); + //this.showCollDrop = false; + // @ts-expect-error - TS2339 - Property 'selCollId' does not exist on type 'ArchiveWebApp'. + this.selCollId = event.currentTarget.value; + } + + async setDefaultColl() { + // @ts-expect-error - TS2339 - Property 'selCollId' does not exist on type 'ArchiveWebApp'. + if (!this.selCollId) { + // @ts-expect-error - TS2339 - Property 'selCollId' does not exist on type 'ArchiveWebApp'. + this.selCollId = await getLocalOption("defaultCollId"); + } + // @ts-expect-error - TS2339 - Property 'selCollId' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'colls' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'colls' does not exist on type 'ArchiveWebApp'. + if (!this.selCollId && this.colls?.length) { + // @ts-expect-error - TS2339 - Property 'selCollId' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'colls' does not exist on type 'ArchiveWebApp'. + this.selCollId = this.colls[0].id; + } + // copy from localStorage to chrome.storage + if ( + // @ts-expect-error - TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. + self.chrome?.storage?.local && + self.localStorage + ) { + await setLocalOption( + "index:sortKey", + localStorage.getItem("index:sortKey"), + ); + await setLocalOption( + "index:sortDesc", + localStorage.getItem("index:sortDesc"), + ); + } + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + _setCurrColl(event) { + if (!(event instanceof CustomEvent)) { + this.setDefaultColl(); + return; + } + const { detail } = event; + // @ts-expect-error - TS2339 - Property 'selCollId' does not exist on type 'ArchiveWebApp'. + this.selCollId = detail.coll; + //this.selCollTitle = event.detail.title; + if (!this.colls?.length) { + this.colls = [ + { + id: detail.coll, + title: detail.title, + }, + ]; + } + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onShowStart(event) { + this._setCurrColl(event); + // @ts-expect-error - TS2339 - Property 'recordUrl' does not exist on type 'ArchiveWebApp'. + this.recordUrl = event.detail.url || "https://example.com/"; + // @ts-expect-error - TS2551 - Property 'showStartRecord' does not exist on type 'ArchiveWebApp'. Did you mean 'onStartRecord'? + this.showStartRecord = true; + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onShowImport(event) { + this._setCurrColl(event); + this.showImport = true; + // @ts-expect-error - TS2339 - Property 'isImportExisting' does not exist on type 'ArchiveWebApp'. + this.isImportExisting = true; + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onCollsLoaded(event) { + this.colls = event.detail.colls; + //this.selCollId = this.colls && this.colls.length ? this.colls[0].id: null; + this.setDefaultColl(); + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + async onStartRecord(event) { + event.preventDefault(); + // @ts-expect-error - TS2339 - Property 'renderRoot' does not exist on type 'ArchiveWebApp'. + const url = this.renderRoot.querySelector("#url").value; + + const previewCheckbox = this.renderRoot.querySelector("#preview"); + // @ts-expect-error - TS2339 - Property 'checked' does not exist on type 'Element'. + const isPreview = previewCheckbox?.checked; + + // @ts-expect-error - TS2551 - Property 'showStartRecord' does not exist on type 'ArchiveWebApp'. Did you mean 'onStartRecord'? + this.showStartRecord = false; + const autorun = this.autorun; + + // @ts-expect-error - TS2339 - Property 'selCollId' does not exist on type 'ArchiveWebApp'. + const collId = this.selCollId; + + await setLocalOption("defaultCollId", collId); + await setLocalOption("autorunBehaviors", autorun ? "1" : "0"); + + // @ts-expect-error - TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. | TS2339 - Property 'chrome' does not exist on type 'Window & typeof globalThis'. + if (self.chrome?.runtime) { + chrome.runtime.sendMessage({ + msg: "startNew", + url, + collId, + autorun, + }); + } else if (window.archivewebpage?.record) { + const startRec = !isPreview; + window.archivewebpage.record({ url, collId, startRec, autorun }); + } + return false; + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + async onTitle(event) { + super.onTitle(event); + + if ( + this.embed && + this.loadedCollId && + event.detail.replayTitle && + event.detail.title + ) { + try { + await fetch(`${apiPrefix}/c/${this.loadedCollId}/pageTitle`, { + method: "POST", + body: JSON.stringify(event.detail), + }); + } catch (e) { + console.warn(e); + } + } + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + async onSaveSettings(event) { + event.preventDefault(); + + // IPFS settings + const daemonUrlText = this.renderRoot.querySelector("#ipfsDaemonUrl"); + const gatewayUrlText = this.renderRoot.querySelector("#ipfsGatewayUrl"); + const autodetectCheck = this.renderRoot.querySelector("#ipfsAutoDetect"); + + if (daemonUrlText && gatewayUrlText) { + // @ts-expect-error - TS2339 - Property 'value' does not exist on type 'Element'. + const daemonUrl = daemonUrlText.value; + // @ts-expect-error - TS2339 - Property 'value' does not exist on type 'Element'. + const gatewayUrl = gatewayUrlText.value; + // @ts-expect-error - TS2339 - Property 'checked' does not exist on type 'Element'. + const autoDetect = autodetectCheck?.checked; + + this.ipfsOpts = { + daemonUrl, + useCustom: !!daemonUrl, + gatewayUrl, + autoDetect, + }; + + await this.checkIPFS(); + + localStorage.setItem("ipfsOpts", JSON.stringify(this.ipfsOpts)); + } + + // Browsertrix Settings + const btrixUrl = this.renderRoot.querySelector("#btrixUrl"); + const btrixUsername = this.renderRoot.querySelector("#btrixUsername"); + const btrixPassword = this.renderRoot.querySelector("#btrixPassword"); + const btrixOrgName = this.renderRoot.querySelector("#btrixOrgName"); + + if (btrixUrl && btrixUsername && btrixPassword) { + // @ts-expect-error - TS2339 - Property 'value' does not exist on type 'Element'. + const url = btrixUrl.value; + // @ts-expect-error - TS2339 - Property 'value' does not exist on type 'Element'. + const username = btrixUsername.value; + // @ts-expect-error - TS2339 - Property 'value' does not exist on type 'Element'. + const password = btrixPassword.value; + // @ts-expect-error - TS2339 - Property 'value' does not exist on type 'Element'. + const orgName = btrixOrgName?.value || ""; + + if (url && username && password) { + const btrixOpts = { url, username, password, orgName }; + + let client; + + try { + client = await BtrixClient.login(btrixOpts); + this.settingsError = ""; + } catch (e) { + this.settingsError = + "Unable to log in to Browsertrix. Check your credentials."; + return false; + } + + localStorage.setItem("btrixOpts", JSON.stringify(btrixOpts)); + this.btrixOpts = { ...btrixOpts, client }; + } else { + this.btrixOpts = null; + localStorage.removeItem("btrixOpts"); + } + } + + localStorage.setItem("settingsTab", this.settingsTab); + + // @ts-expect-error - TS2339 - Property 'showSettings' does not exist on type 'ArchiveWebApp'. + this.showSettings = false; + + return false; + } + + onCancelSettings() { + // @ts-expect-error - TS2339 - Property 'settingsError' does not exist on type 'ArchiveWebApp'. + this.settingsError = null; + // @ts-expect-error - TS2339 - Property 'showSettings' does not exist on type 'ArchiveWebApp'. + this.showSettings = false; + } + + async checkIPFS() { + const ipfsOpts = this.ipfsOpts; + + // use auto-js-ipfs to get possible local daemon url (eg. for Brave) + // if so, send it to the service worker + if (ipfsOpts.useCustom && ipfsOpts.daemonUrl) { + ipfsOpts.message = "IPFS Access -- Custom IPFS Daemon"; + return; + } + + if (!ipfsOpts.daemonUrl && ipfsOpts.autoDetect) { + const autoipfs = await createAutoIpfs({ + web3StorageToken: __WEB3_STORAGE_TOKEN__, + }); + + if (autoipfs instanceof DaemonAPI) { + ipfsOpts.daemonUrl = autoipfs.url; + } + + ipfsOpts.useCustom = false; + + if (autoipfs instanceof Web3StorageAPI) { + ipfsOpts.message = "Sharing via remote web3.storage"; + } else if (!ipfsOpts.daemonUrl) { + ipfsOpts.message = "IPFS Access Unknown - Sharing Not Available"; + } else if (ipfsOpts.daemonUrl.startsWith("http://localhost:45")) { + ipfsOpts.message = "Sharing via Brave IPFS node"; + } else if (ipfsOpts.daemonUrl.startsWith("http://localhost")) { + ipfsOpts.message = "Sharing via local IPFS node"; + } else { + ipfsOpts.message = ""; + } + } + } +} + +customElements.define("archive-web-page-app", ArchiveWebApp); + +export { ArchiveWebApp, Loader, Embed }; diff --git a/src/ui/coll-index.js b/src/ui/coll-index.js deleted file mode 100644 index 568177bc..00000000 --- a/src/ui/coll-index.js +++ /dev/null @@ -1,138 +0,0 @@ -import { CollIndex } from "replaywebpage"; - -import { html } from "replaywebpage/src/misc"; - - -import prettyBytes from "pretty-bytes"; - - -//============================================================================ -class WrRecCollIndex extends CollIndex -{ - constructor() { - super(); - this.deleteConfirm = null; - this.ipfsSharePending = 0; - } - - get sortKeys() { - return [ - {key: "title", - name: "Title"}, - - {key: "ctime", - name: this.dateName}, - - {key: "mtime", - name: "Date Modified"}, - - {key: "size", - name: "Total Size"}, - - {key: "loadUrl", - name: "Source"}, - ]; - } - - firstUpdated() { - this.loadColls(); - - this._poll = setInterval(() => { - if (!this.ipfsSharePending) { - this.loadColls(); - } - }, 10000); - } - - updated(changedProperties) { - super.updated(changedProperties); - - if (changedProperties.has("sortedColls") && this.sortedColls && this.sortedColls.length) { - this.dispatchEvent(new CustomEvent("colls-updated", {detail: {colls: this.sortedColls}})); - } - } - - static get properties() { - return { - ...CollIndex.properties, - - deleteConfirm: { type: Object }, - shareOpts: { type: Object }, - }; - } - - renderCollInfo(coll) { - return html` - - `; - } - - render() { - return html` - ${super.render()} - ${this.renderDeleteConfirm()} - `; - } - - renderDeleteConfirm() { - if (!this.deleteConfirm) { - return null; - } - - return html` - -

Are you sure you want to permanentely delete the archive ${this.deleteConfirm.title} - (Size: ${prettyBytes(this.deleteConfirm.size)})

- - -
`; - } - - onIpfsShare(event) { - if (event.detail.pending) { - this.ipfsSharePending++; - } else { - this.ipfsSharePending--; - } - } - - onDeleteColl(event) { - event.preventDefault(); - event.stopPropagation(); - - if (!this.sortedColls) { - return; - } - - const index = Number(event.currentTarget.getAttribute("data-coll-index")); - - this.deleteConfirm = this.sortedColls[index]; - } - - async doDelete() { - if (!this.deleteConfirm) { - return; - } - - this._deleting[this.deleteConfirm.sourceUrl] = true; - this.requestUpdate(); - - const info = this.renderRoot.querySelector(`wr-rec-coll-info[data-coll="${this.deleteConfirm.id}"]`); - - if (info) { - await info.doDelete(); - } - - this.deleteConfirm = null; - } - - renderEmpty() { - return html`No archived items. Click "New Archiving Session" above to begin archiving pages!`; - } -} - -customElements.define("wr-rec-coll-index", WrRecCollIndex); diff --git a/src/ui/coll-index.ts b/src/ui/coll-index.ts new file mode 100644 index 00000000..5fd6f126 --- /dev/null +++ b/src/ui/coll-index.ts @@ -0,0 +1,145 @@ +import { ItemIndex, html } from "replaywebpage"; +import { property } from "lit/decorators.js"; + +import prettyBytes from "pretty-bytes"; +import { type WrRecCollInfo } from "./coll-info"; +import { type WrRecItem } from "../types"; + +import type { PropertyValues } from "lit"; + +//============================================================================ +export class WrRecCollIndex extends ItemIndex { + @property({ type: Object }) + deleteConfirm: WrRecItem | null = null; + ipfsSharePending = 0; + + private _poll?: number | NodeJS.Timer; + + sortedItems: WrRecItem[] = []; + + @property({ type: Object }) + shareOpts: unknown; + + get sortKeys() { + return [ + { key: "title", name: "Title" }, + + { key: "ctime", name: this.dateName }, + + { key: "mtime", name: "Date Modified" }, + + { key: "size", name: "Total Size" }, + + { key: "loadUrl", name: "Source" }, + ]; + } + + firstUpdated() { + this.loadItems(); + + this._poll = setInterval(() => { + if (!this.ipfsSharePending) { + this.loadItems(); + } + }, 10000); + } + + updated(changedProperties: PropertyValues) { + super.updated(changedProperties); + + if (changedProperties.has("sortedItems") && this.sortedItems?.length) { + this.dispatchEvent( + new CustomEvent("colls-updated", { + detail: { colls: this.sortedItems }, + }), + ); + } + } + + renderItemInfo(item: WrRecItem) { + return html` + `; + } + + render() { + return html` ${super.render()} ${this.renderDeleteConfirm()} `; + } + + renderDeleteConfirm() { + if (!this.deleteConfirm) { + return null; + } + + return html` +

+ Are you sure you want to permanentely delete the archive + ${this.deleteConfirm.title} + (Size: + ${prettyBytes(Number(this.deleteConfirm.size))}) +

+ + +
`; + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onIpfsShare(event) { + if (event.detail.pending) { + this.ipfsSharePending++; + } else { + this.ipfsSharePending--; + } + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onDeleteColl(event) { + event.preventDefault(); + event.stopPropagation(); + + if (!this.sortedItems) { + return; + } + + const index = Number(event.currentTarget.getAttribute("data-coll-index")); + + this.deleteConfirm = this.sortedItems[index]; + } + + async doDelete() { + if (!this.deleteConfirm) { + return; + } + + this._deleting[this.deleteConfirm.sourceUrl] = true; + this.requestUpdate(); + + const info = this.renderRoot.querySelector( + `wr-rec-coll-info[data-coll="${this.deleteConfirm.id}"]`, + ); + + if (info) { + await info.doDelete(); + } + + this.deleteConfirm = null; + } + + renderEmpty() { + return html`No archived items. Click "New Archiving Session" above to begin + archiving pages!`; + } +} + +customElements.define("wr-rec-coll-index", WrRecCollIndex); diff --git a/src/ui/coll-info.js b/src/ui/coll-info.js deleted file mode 100644 index e199f374..00000000 --- a/src/ui/coll-info.js +++ /dev/null @@ -1,504 +0,0 @@ -import { html, css, wrapCss, apiPrefix } from "replaywebpage/src/misc"; - -import prettyBytes from "pretty-bytes"; - -import fasDownload from "@fortawesome/fontawesome-free/svgs/solid/download.svg"; -import fasUpload from "@fortawesome/fontawesome-free/svgs/solid/upload.svg"; -import fasSync from "@fortawesome/fontawesome-free/svgs/solid/sync-alt.svg"; -import fasCheck from "@fortawesome/fontawesome-free/svgs/solid/check-circle.svg"; -import fasCopy from "@fortawesome/fontawesome-free/svgs/regular/copy.svg"; -import fasCaretUp from "@fortawesome/fontawesome-free/svgs/solid/caret-up.svg"; -import fasShare from "@fortawesome/fontawesome-free/svgs/solid/share.svg"; -import fasReshare from "@fortawesome/fontawesome-free/svgs/solid/retweet.svg"; -import fasX from "@fortawesome/fontawesome-free/svgs/solid/times.svg"; -import fasCloudArrowUp from "@fortawesome/fontawesome-free/svgs/solid/cloud-upload-alt.svg"; - -import { CollInfo } from "replaywebpage"; -import wrRec from "../assets/icons/recLogo.svg"; - -const REPLAY_URL = "https://replayweb.page/"; - - -//============================================================================ -class WrRecCollInfo extends CollInfo -{ - constructor() { - super(); - this.detailed = false; - this.ipfsURL = null; - this.shareWait = false; - this.showShareMenu = false; - this.shareWarn = false; - this.shareProgressSize = 0; - this.shareProgressTotalSize = 0; - } - - static get properties() { - return { - coll: { type: Object }, - detailed: { type: Boolean }, - ipfsURL: { type: String }, - shareWait: { type: Boolean }, - showShareMenu: { type: Boolean }, - shareWarn: { type: Boolean }, - shareProgressSize: { type: Number }, - shareProgressTotalSize: { type: Number }, - - isUploadNeeded: { type: Boolean }, - - shareOpts: { type: Object }, - btrixOpts: { type: Object }, - ipfsOpts: { type: Object }, - }; - } - - static get styles() { - return wrapCss(WrRecCollInfo.compStyles); - } - - static get compStyles() { - return css` - :host { - overflow: visible; - } - - .columns { - width: 100%; - } - .column { - word-break: break-word; - position: relative; - } - - :host { - width: 100%; - height: 100%; - min-width: 0px; - } - - :host(.is-list) .columns { - display: flex !important; - flex-direction: column; - } - - :host(.is-list) .column { - width: 100% !important; - } - - .minihead { - font-size: 10px; - font-weight: bold; - } - - .button-row { - align-items: center; - flex-wrap: wrap; - } - - .button-row *:not(:last-child) { - margin-right: 0.5em; - } - - .progress.is-small.mini { - height: 2px; - margin-top: 2px; - width: calc(100% - 0.5em); - } - - ${CollInfo.compStyles} - `; - } - - firstUpdated() { - this.renderRoot.addEventListener("click", () => this.showShareMenu = false); - - this.isUploadNeeded = (this.coll && this.coll.uploadTime && this.coll.mtime > this.coll.uploadTime); - } - - updated(changedProps) { - if (changedProps.has("shareOpts") && this.shareOpts) { - const { ipfsOpts, btrixOpts } = this.shareOpts; - this.ipfsOpts = ipfsOpts; - this.btrixOpts = btrixOpts; - } - - if (changedProps.has("coll") && this.coll) { - // Fix for loading single collection from previous versions - if (this.coll.id === "main.archive" && this.coll.sourceUrl !== "local://main.archive") { - this.coll = {...this.coll, sourceUrl: "local://main.archive"}; - } - - if (this.coll.ipfsPins && this.coll.ipfsPins.length) { - this.ipfsURL = this.coll.ipfsPins[this.coll.ipfsPins.length - 1].url; - } - - this.isUploadNeeded = (this.coll && this.coll.uploadTime && this.coll.mtime > this.coll.uploadTime); - } - } - - render() { - const coll = this.coll; - const detailed = this.detailed; - - const hasUpload = !!this.btrixOpts; - const hasIpfs = !!this.ipfsOpts && this.ipfsOpts.daemonUrl; - - return html` -
-
-

Name

- - ${detailed ? html` - ${coll.title} - ` : html` - ${coll.title}`} - -
- -

Date Created

${coll.ctime ? new Date(coll.ctime).toLocaleString() : ""}
-

Total Size

- ${prettyBytes(Number(coll.size || 0))} -
- -
-

Actions

-
- - - - - - - -
-
- - ${hasUpload ? html` -
-

Upload

-
- ${hasUpload ? this.renderBtrixUpload() : ""} -
- ` : html` -
-
- `} - - ${hasIpfs ? html` -
-
-

Share (via IPFS)

-
- ${hasIpfs ? this.renderIPFSSharing() : ""} -
-
- ` : ""} - - ${coll.loadUrl ? html` -
-

Imported From

- ${coll.loadUrl} - -
` : ""} -
- ${this.shareWarn ? this.renderShareWarn(): ""} - `; - } - - renderIPFSSharing() { - return this.ipfsURL ? html` -
- - -
- - - - `: html` - -
- - -
- `; - } - - renderBtrixUpload() { - const { uploadId, uploadTime } = this.coll; - - return html` -
- -
- `; - } - - renderShareWarn() { - return html` - -
-

- Do you want to share all the content in "${this.coll.title}" via IPFS, a peer-to-peer - distributed storage network? -

-

Your archiving session will have a unique link which can be shared with others to load and replay - on-demand in ReplayWeb.page. This feature is experimental and likely works best with smaller archives.

-

You can cancel sharing at any time. -

-

Once shared, this data leaves your computer and can be read by others.

-

If you do not wish to share this data, click Cancel.

-
-
- -
- - -
`; - } - - onShowImport() { - const coll = this.coll.id; - const title = this.coll.title; - this.dispatchEvent(new CustomEvent("show-import", {bubbles: true, composed: true, detail: {coll, title}})); - } - - async onShowShareMenu(event) { - event.preventDefault(); - event.stopPropagation(); - this.showShareMenu = !this.showShareMenu; - } - - onShowStart() { - const coll = this.coll.id; - const title = this.coll.title; - this.dispatchEvent(new CustomEvent("show-start", {bubbles: true, composed: true, detail: {coll, title}})); - } - - toggleShareWarn(event) { - localStorage.setItem("nosharewarn", event.currentTarget.checked ? "1" : "0"); - } - - onPinOrWarn() { - if (localStorage.getItem("nosharewarn") === "1") { - this.onPin(); - } else { - this.shareWarn = true; - } - } - - async onPin() { - this.shareWarn = false; - - this.shareWait = true; - - try { - const { ipfsURL } = await this.ipfsAdd(); - - this.ipfsURL = ipfsURL; - - this.onCopyGatewayLink(); - } catch (e) { - console.log("ipfs share failed"); - this.dispatchEvent(new CustomEvent("ipfs-share-failed", {bubbles: true, composed: true})); - } - - this.shareWait = false; - } - - async onUnpin() { - this.shareWait = true; - const { removed } = await this.ipfsRemove(); - - if (removed) { - this.ipfsURL = null; - } else { - this.dispatchEvent(new CustomEvent("ipfs-share-failed", {bubbles: true, composed: true})); - } - this.shareWait = false; - } - - ipfsAdd() { - this.dispatchEvent(new CustomEvent("ipfs-share", {detail: {pending: true}})); - - //let id = 0; - let pc; - - const p = new Promise((resolve, reject) => pc = {resolve, reject}); - - const listener = (event) => { - const { data } = event; - - if (!data || data.collId !== this.coll.id) { - return; - } - - switch (data.type) { - case "ipfsProgress": - this.shareProgressSize = data.size; - this.shareProgressTotalSize = data.totalSize || this.coll.size; - break; - - case "ipfsAdd": - this.shareProgressSize = 0; - this.shareProgressTotalSize = 0; - if (data.result) { - pc.resolve(data.result); - } else { - pc.reject(); - } - this.dispatchEvent(new CustomEvent("ipfs-share", {detail: {pending: false}})); - - navigator.serviceWorker.removeEventListener("message", listener); - break; - } - }; - - navigator.serviceWorker.addEventListener("message", listener); - - fetch(`${apiPrefix}/c/${this.coll.id}/ipfs`, { - method: "POST", - body: JSON.stringify({ - ipfsDaemonUrl: this.ipfsOpts.daemonUrl, - gzip: false, - customSplits: true, - }) - }).then((res) => { - if (!res.ok) { - pc.reject(); - } - }); - - return p; - } - - async ipfsRemove() { - const resp = await fetch(`${apiPrefix}/c/${this.coll.id}/ipfs`, { - method: "DELETE", - body: JSON.stringify({ - ipfsDaemonUrl: this.ipfsOpts.daemonUrl - }) - }); - - return await resp.json(); - } - - onCopyRWPLink() { - const params = new URLSearchParams(); - params.set("source", this.ipfsURL); - const url = REPLAY_URL + params.toString(); - - this.showShareMenu = false; - navigator.clipboard.writeText(url); - } - - onCopyGatewayLink() { - const hash = this.ipfsURL.split("/")[2]; - const url = this.ipfsOpts.gatewayUrl + hash + "/"; - - this.showShareMenu = false; - navigator.clipboard.writeText(url); - } - - onCopyIPFSLink() { - const ipfsPath = this.ipfsURL.slice(0, this.ipfsURL.lastIndexOf("/") + 1); - - this.showShareMenu = false; - navigator.clipboard.writeText(ipfsPath); - } - - onUpload() { - const detail = {coll: this.coll, isUploadNeeded: this.isUploadNeeded}; - this.dispatchEvent(new CustomEvent("do-upload", {bubbles: true, composed: true, detail})); - } - - async doDelete() { - if (this.coll.ipfsPins && this.coll.ipfsPins.length) { - await this.ipfsRemove(); - } - - const resp = await fetch(`${apiPrefix}/c/${this.coll.id}`, {method: "DELETE"}); - if (resp.status === 200) { - const json = await resp.json(); - this.colls = json.colls; - } - } -} - -customElements.define("wr-rec-coll-info", WrRecCollInfo); - -export { WrRecCollInfo, wrRec }; diff --git a/src/ui/coll-info.ts b/src/ui/coll-info.ts new file mode 100644 index 00000000..a3e7f26a --- /dev/null +++ b/src/ui/coll-info.ts @@ -0,0 +1,649 @@ +import { html, css, wrapCss, apiPrefix } from "replaywebpage"; + +import prettyBytes from "pretty-bytes"; + +import fasDownload from "@fortawesome/fontawesome-free/svgs/solid/download.svg"; +import fasUpload from "@fortawesome/fontawesome-free/svgs/solid/upload.svg"; +import fasSync from "@fortawesome/fontawesome-free/svgs/solid/sync-alt.svg"; +import fasCheck from "@fortawesome/fontawesome-free/svgs/solid/check-circle.svg"; +import fasCopy from "@fortawesome/fontawesome-free/svgs/regular/copy.svg"; +import fasCaretUp from "@fortawesome/fontawesome-free/svgs/solid/caret-up.svg"; +import fasShare from "@fortawesome/fontawesome-free/svgs/solid/share.svg"; +import fasReshare from "@fortawesome/fontawesome-free/svgs/solid/retweet.svg"; +import fasX from "@fortawesome/fontawesome-free/svgs/solid/times.svg"; +import fasCloudArrowUp from "@fortawesome/fontawesome-free/svgs/solid/cloud-upload-alt.svg"; + +import { ItemInfo } from "replaywebpage"; +import wrRec from "../assets/icons/recLogo.svg"; +import { type WrRecItem } from "../types"; + +const REPLAY_URL = "https://replayweb.page/"; + +//============================================================================ +class WrRecCollInfo extends ItemInfo { + ipfsURL: string | null = null; + shareWait = false; + showShareMenu = false; + shareWarn = false; + shareProgressSize = 0; + shareProgressTotalSize = 0; + + items?: WrRecItem[]; + item: WrRecItem | null = null; + isUploadNeeded?: boolean; + shareOpts: TODOFixMe; + ipfsOpts: TODOFixMe; + btrixOpts: TODOFixMe; + + static get properties() { + return { + item: { type: Object }, + detailed: { type: Boolean }, + ipfsURL: { type: String }, + shareWait: { type: Boolean }, + showShareMenu: { type: Boolean }, + shareWarn: { type: Boolean }, + shareProgressSize: { type: Number }, + shareProgressTotalSize: { type: Number }, + + isUploadNeeded: { type: Boolean }, + + shareOpts: { type: Object }, + btrixOpts: { type: Object }, + ipfsOpts: { type: Object }, + }; + } + + static get styles() { + return wrapCss(WrRecCollInfo.compStyles); + } + + static get compStyles() { + return css` + :host { + overflow: visible; + } + + .columns { + width: 100%; + } + .column { + word-break: break-word; + position: relative; + } + + :host { + width: 100%; + height: 100%; + min-width: 0px; + } + + :host(.is-list) .columns { + display: flex !important; + flex-direction: column; + } + + :host(.is-list) .column { + width: 100% !important; + } + + .minihead { + font-size: 10px; + font-weight: bold; + } + + .button-row { + align-items: center; + flex-wrap: wrap; + } + + .button-row *:not(:last-child) { + margin-right: 0.5em; + } + + .progress.is-small.mini { + height: 2px; + margin-top: 2px; + width: calc(100% - 0.5em); + } + + ${ItemInfo.compStyles} + `; + } + + firstUpdated() { + this.renderRoot.addEventListener( + "click", + () => (this.showShareMenu = false), + ); + + this.isUploadNeeded = Boolean( + this.item?.uploadTime && this.item.mtime > this.item.uploadTime, + ); + } + + // @ts-expect-error - TS7006 - Parameter 'changedProps' implicitly has an 'any' type. + updated(changedProps) { + if (changedProps.has("shareOpts") && this.shareOpts) { + const { ipfsOpts, btrixOpts } = this.shareOpts; + this.ipfsOpts = ipfsOpts; + this.btrixOpts = btrixOpts; + } + + if (changedProps.has("coll") && this.item) { + // Fix for loading single collection from previous versions + if ( + this.item.id === "main.archive" && + this.item.sourceUrl !== "local://main.archive" + ) { + this.item = { ...this.item, sourceUrl: "local://main.archive" }; + } + + if (this.item.ipfsPins?.length) { + this.ipfsURL = this.item.ipfsPins[this.item.ipfsPins.length - 1].url; + } + + this.isUploadNeeded = Boolean( + this.item?.uploadTime && this.item.mtime > this.item.uploadTime, + ); + } + } + + render() { + const coll = this.item; + const detailed = this.detailed; + + const hasUpload = !!this.btrixOpts; + const hasIpfs = !!this.ipfsOpts && this.ipfsOpts.daemonUrl; + + return html` +
+
+

Name

+ + ${detailed || coll?.sourceUrl == null + ? html` ${coll?.title} ` + : html` ${coll?.title}`} + +
+ +
+

Date Created

+ ${coll?.ctime ? new Date(coll.ctime).toLocaleString() : ""} +
+
+

Total Size

+ ${prettyBytes(Number(coll?.size || 0))} +
+ +
+

Actions

+
+ + + + + + + +
+
+ + ${hasUpload + ? html` +
+

Upload

+
+ ${hasUpload ? this.renderBtrixUpload() : ""} +
+
+ ` + : html`
`} + ${hasIpfs + ? html` +
+
+

Share (via IPFS)

+
+ ${hasIpfs ? this.renderIPFSSharing() : ""} +
+
+ ` + : ""} + ${coll?.loadUrl + ? html`
+

Imported From

+ ${coll.loadUrl} + +
` + : ""} + + ${this.shareWarn ? this.renderShareWarn() : ""} + `; + } + + renderIPFSSharing() { + return this.ipfsURL + ? html` +
+ + +
+ + + ` + : html` +
+ + +
+ `; + } + + renderBtrixUpload() { + const { uploadId, uploadTime } = this.item!; + + return html` +
+ +
+ `; + } + + renderShareWarn() { + return html` +
+

+ Do you want to share all the content in "${this.item?.title}" + via IPFS, a peer-to-peer distributed storage network? +

+

+ Your archiving session will have a unique link which can be shared + with others to load and replay on-demand in ReplayWeb.page. This + feature is experimental and likely works best with smaller archives. +

+

You can cancel sharing at any time.

+

+ Once shared, this data leaves your computer and can be read by + others. +

+

If you do not wish to share this data, click Cancel.

+
+
+ +
+ + +
`; + } + + onShowImport() { + const coll = this.item?.id; + const title = this.item?.title; + this.dispatchEvent( + new CustomEvent("show-import", { + bubbles: true, + composed: true, + detail: { coll, title }, + }), + ); + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + onShowShareMenu(event) { + event.preventDefault(); + event.stopPropagation(); + this.showShareMenu = !this.showShareMenu; + } + + onShowStart() { + const coll = this.item?.id; + const title = this.item?.title; + this.dispatchEvent( + new CustomEvent("show-start", { + bubbles: true, + composed: true, + detail: { coll, title }, + }), + ); + } + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + toggleShareWarn(event) { + localStorage.setItem( + "nosharewarn", + event.currentTarget.checked ? "1" : "0", + ); + } + + onPinOrWarn() { + if (localStorage.getItem("nosharewarn") === "1") { + this.onPin(); + } else { + this.shareWarn = true; + } + } + + async onPin() { + this.shareWarn = false; + + this.shareWait = true; + + try { + const { ipfsURL } = await this.ipfsAdd(); + + this.ipfsURL = ipfsURL; + + this.onCopyGatewayLink(); + } catch (e) { + console.log("ipfs share failed"); + this.dispatchEvent( + new CustomEvent("ipfs-share-failed", { bubbles: true, composed: true }), + ); + } + + this.shareWait = false; + } + + async onUnpin() { + this.shareWait = true; + const { removed } = await this.ipfsRemove(); + + if (removed) { + this.ipfsURL = null; + } else { + this.dispatchEvent( + new CustomEvent("ipfs-share-failed", { bubbles: true, composed: true }), + ); + } + this.shareWait = false; + } + + ipfsAdd() { + this.dispatchEvent( + new CustomEvent("ipfs-share", { detail: { pending: true } }), + ); + + //let id = 0; + let pc: { + resolve: ( + value: + | { + ipfsURL: string; + } + | PromiseLike<{ + ipfsURL: string; + }>, + ) => void; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + reject: (reason?: any) => void; + }; + + const p = new Promise<{ ipfsURL: string }>( + (resolve, reject) => (pc = { resolve, reject }), + ); + + // @ts-expect-error - TS7006 - Parameter 'event' implicitly has an 'any' type. + const listener = (event) => { + const { data } = event; + + if (!data || data.collId !== this.item?.id) { + return; + } + + switch (data.type) { + case "ipfsProgress": + this.shareProgressSize = data.size; + this.shareProgressTotalSize = data.totalSize || this.item?.size; + break; + + case "ipfsAdd": + this.shareProgressSize = 0; + this.shareProgressTotalSize = 0; + if (data.result) { + pc.resolve(data.result as { ipfsURL: string }); + } else { + pc.reject(); + } + this.dispatchEvent( + new CustomEvent("ipfs-share", { detail: { pending: false } }), + ); + + navigator.serviceWorker.removeEventListener("message", listener); + break; + } + }; + + navigator.serviceWorker.addEventListener("message", listener); + + fetch(`${apiPrefix}/c/${this.item!.id}/ipfs`, { + method: "POST", + body: JSON.stringify({ + ipfsDaemonUrl: this.ipfsOpts.daemonUrl, + gzip: false, + customSplits: true, + }), + }).then((res) => { + if (!res.ok) { + pc.reject(); + } + }); + + return p; + } + + async ipfsRemove() { + const resp = await fetch(`${apiPrefix}/c/${this.item!.id}/ipfs`, { + method: "DELETE", + body: JSON.stringify({ + ipfsDaemonUrl: this.ipfsOpts.daemonUrl, + }), + }); + + return await resp.json(); + } + + onCopyRWPLink() { + const params = new URLSearchParams(); + params.set("source", this.ipfsURL!); + const url = REPLAY_URL + params.toString(); + + this.showShareMenu = false; + navigator.clipboard.writeText(url); + } + + onCopyGatewayLink() { + const hash = this.ipfsURL!.split("/")[2]; + const url = this.ipfsOpts.gatewayUrl + hash + "/"; + + this.showShareMenu = false; + navigator.clipboard.writeText(url); + } + + onCopyIPFSLink() { + const ipfsPath = this.ipfsURL!.slice(0, this.ipfsURL!.lastIndexOf("/") + 1); + + this.showShareMenu = false; + navigator.clipboard.writeText(ipfsPath); + } + + onUpload() { + const detail = { coll: this.item, isUploadNeeded: this.isUploadNeeded }; + this.dispatchEvent( + new CustomEvent("do-upload", { bubbles: true, composed: true, detail }), + ); + } + + async doDelete() { + if (this.item!.ipfsPins?.length) { + await this.ipfsRemove(); + } + + const resp = await fetch(`${apiPrefix}/c/${this.item!.id}`, { + method: "DELETE", + }); + if (resp.status === 200) { + const json = await resp.json(); + this.items = json.colls; + } + } +} + +customElements.define("wr-rec-coll-info", WrRecCollInfo); + +export { WrRecCollInfo, wrRec }; diff --git a/src/ui/coll.js b/src/ui/coll.js deleted file mode 100644 index 04fd2941..00000000 --- a/src/ui/coll.js +++ /dev/null @@ -1,146 +0,0 @@ -import { html, css, wrapCss, clickOnSpacebarPress, apiPrefix } from "replaywebpage/src/misc"; - -import fasDownload from "@fortawesome/fontawesome-free/svgs/solid/download.svg"; - -import prettyBytes from "pretty-bytes"; - -import { Coll } from "replaywebpage"; -import wrRec from "../assets/icons/recLogo.svg"; - - -//============================================================================ -class WrRecColl extends Coll -{ - constructor() { - super(); - this._sizeUpdater = null; - this.totalSize = 0; - } - - static get properties() { - return { - ...Coll.properties, - - totalSize: { type: Number }, - shareOpts: { type: Object }, - }; - } - - static get styles() { - return wrapCss(WrRecColl.compStyles); - } - - static get compStyles() { - return css` - .rec-button { - display: flex; - flex-direction: row; - margin: 0 1px; - align-items: center; - border: 1px darkgrey solid; - border-radius: 16px; - padding: 0 0.5em; - min-width: max-content; - } - - .size-label { - margin-left: 0.5em; - font-weight: bold; - } - - ${Coll.compStyles} - `; - } - - updated(changedProperties) { - if (changedProperties.has("embed")) { - if (this.embed && !this._sizeUpdater) { - this._sizeUpdater = this.runSizeUpdater(); - } - } - - super.updated(changedProperties); - } - - async runSizeUpdater() { - try { - while (this.embed) { - if (this.coll) { - const resp = await fetch(`${apiPrefix}/c/${this.coll}`); - const json = await resp.json(); - this.totalSize = json.size || 0; - } - await new Promise(resolve => setTimeout(resolve, 3000)); - } - } finally { - this._sizeUpdater = null; - } - } - - renderExtraToolbar(isDropdown = false) { - if (this.embed) { - if (!isDropdown) { - return html` - - - - - ${prettyBytes(this.totalSize)} - - `; - } else { - return html` - - - - - Download Archive - - - `; - } - } - - if (isDropdown) { - return ""; - } - - return html` - - - - - `; - } - - renderCollInfo() { - console.log(this.collInfo); - return html` -
- -
`; - } - - onShowStart() { - if (this.embed) { - return; - } - - const coll = this.coll; - const title = this.collInfo.title; - const url = this.tabData.url; - this.dispatchEvent(new CustomEvent("show-start", {detail: {coll, title, url}})); - } -} - -customElements.define("wr-rec-coll", WrRecColl); - -export { WrRecColl }; diff --git a/src/ui/coll.ts b/src/ui/coll.ts new file mode 100644 index 00000000..c448b2ad --- /dev/null +++ b/src/ui/coll.ts @@ -0,0 +1,242 @@ +import { + html, + css, + wrapCss, + clickOnSpacebarPress, + apiPrefix, +} from "replaywebpage"; + +import { type PropertyValues } from "lit"; +import { property, state } from "lit/decorators.js"; + +import prettyBytes from "pretty-bytes"; + +import { Item } from "replaywebpage"; + +import wrRec from "../assets/icons/recLogo.svg"; + +//============================================================================ +class WrRecColl extends Item { + @property({ type: String }) + sourceUrl: string | null = null; + + @property({ type: Object }) + shareOpts: Record = {}; + + @property({ type: Boolean }) + showFinish = true; + + @state() + totalSize = 0; + + _sizeUpdater: Promise | null = null; + + static get styles() { + return wrapCss(WrRecColl.compStyles); + } + + static get compStyles() { + return css` + .rec-button { + display: flex; + flex-direction: row; + margin: 0 1px; + align-items: center; + border: 1px darkgrey solid; + border-radius: 16px; + padding: 0 0.5em; + min-width: max-content; + margin-left: 0.5mm; + } + + .size-label { + margin-left: 0.5em; + font-weight: bold; + } + + .dot { + height: 8px; + width: 8px; + background-color: #16a34a; + border-radius: 50%; + display: inline-block; + } + + ${Item.compStyles} + `; + } + + updated(changedProperties: PropertyValues): void { + super.updated(changedProperties); + + if ( + changedProperties.has("embed") || + ((changedProperties.has("item") || changedProperties.has("loadInfo")) && + this.loadInfo && + this.embed && + this.item && + !this._sizeUpdater) + ) { + this._sizeUpdater = this.runSizeUpdater(); + } + + if (changedProperties.has("favIconUrl") && this.favIconUrl) { + navigator.serviceWorker.controller?.postMessage({ + msg_type: "update-favicon", + id: this.item, + url: this.tabData.url, + favIconUrl: this.favIconUrl.split("mp_/")[1], + }); + } + } + + async runSizeUpdater() { + try { + while (this.embed) { + if (this.item) { + const resp = await fetch(`${apiPrefix}/c/${this.item}`); + const json = await resp.json(); + this.totalSize = json.size || 0; + } + await new Promise((resolve) => setTimeout(resolve, 3000)); + } + } finally { + this._sizeUpdater = null; + } + } + + protected renderToolbarLeft(isDropdown = false) { + const leftBar = super.renderToolbarLeft(); + + if (this.embed) { + return leftBar; + } + + return html`${leftBar} + + + + `; + } + + protected renderToolbarRight() { + const rightBar = super.renderToolbarRight(); + + if (!this.embed) { + return rightBar; + } + + return html` + + + ${prettyBytes(this.totalSize)} + + ${this.showFinish + ? html` ` + : html` + Download + `} + `; + } + + renderCollInfo() { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const itemInfo = this.itemInfo as any; + return html`
+ +
`; + } + + onShowStart() { + if (this.embed) { + return; + } + + const coll = this.item; + const title = this.itemInfo?.title || ""; + const url = this.tabData.url; + this.dispatchEvent( + new CustomEvent("show-start", { detail: { coll, title, url } }), + ); + } + + onEmbedFinish() { + if (navigator.serviceWorker.controller) { + navigator.serviceWorker.controller.postMessage({ + msg_type: "toggle-record", + id: this.item, + isRecording: false, + }); + } + if (window.parent !== window) { + window.parent.postMessage({ + type: "awp-finish", + downloadUrl: this.downloadUrl, + }); + } + } + + onHashChange() { + super.onHashChange(); + + if (!this.embed) { + return; + } + + const url = this.tabData.url || ""; + if (!url.startsWith("https://") && !url.startsWith("http://")) { + this.tabData.url = "https://" + url; + } + } + + navigateTo(value: string) { + if ( + this.embed && + !value.startsWith("https://") && + !value.startsWith("http://") + ) { + value = "https://" + value; + } + super.navigateTo(value); + } + + get downloadUrl() { + return new URL( + `${apiPrefix}/c/${this.item}/dl?format=wacz&pages=all`, + window.location.href, + ).href; + } +} + +customElements.define("wr-rec-coll", WrRecColl); + +export { WrRecColl }; diff --git a/src/ui/recordembed.js b/src/ui/recordembed.js deleted file mode 100644 index 06996222..00000000 --- a/src/ui/recordembed.js +++ /dev/null @@ -1,94 +0,0 @@ - -import { Embed } from "replaywebpage"; - -import awpLogo from "../assets/brand/archivewebpage-icon-color.svg"; - -// =========================================================================== -Embed.setDefaultReplayFile("replay.html"); - - -// =========================================================================== -class RecordEmbed extends Embed -{ - constructor() { - super(); - - this.replaybase = "./replay/"; - this.replayfile = "record.html"; - this.mainElementName = "archive-web-page-app"; - this.appName = "Embedded ArchiveWeb.page"; - this.embed = "default"; - this.noWebWorker = true; - - this.proxyPrefix = "https://wabac-cors-proxy.webrecorder.workers.dev/proxy/"; - this.archivePrefix = ""; - - const baseUrl = new URL(window.location); - baseUrl.hash = ""; - - this.logo = awpLogo; - - this.customConfig = { - "prefix": this.proxyPrefix, - "isLive": false, - "archivePrefix": this.archivePrefix, - "baseUrl": baseUrl.href, - "baseUrlHashReplay": false, - "recording": true, - "noPostToGet": true - }; - - this.downloaded = null; - - this.source = "proxy://" + this.proxyPrefix; - } - - static get properties() { - return { - ...Embed.properties, - - archivePrefix: { type: String }, - proxyPrefix: { type: String } - }; - } - - updated(changedProperties) { - if (changedProperties.has("proxyPrefix")) { - this.customConfig.proxyPrefix = this.proxyPrefix; - } - if (changedProperties.has("archivePrefix")) { - this.customConfig.archivePrefix = this.archivePrefix; - this.customConfig.isLive = !this.archivePrefix; - } - super.updated(changedProperties); - } - - handleMessage(event) { - if (this.downloaded && typeof(event.data) === "object" && event.data.msg_type === "downloadedBlob") { - this.downloaded(event.data.url); - this.downloaded = null; - } - } - - doDownload() { - const iframe = this.renderRoot.querySelector("iframe"); - if (!iframe) { - return; - } - - const p = new Promise((resolve) => { this.downloaded = resolve; }); - - iframe.contentWindow.postMessage({msg_type: "downloadToBlob"}); - - return p; - } -} - -// =========================================================================== -async function main() { - customElements.define("record-web-page", RecordEmbed); -} - -main(); - -export { RecordEmbed }; diff --git a/src/ui/recordembed.ts b/src/ui/recordembed.ts new file mode 100644 index 00000000..1b61917e --- /dev/null +++ b/src/ui/recordembed.ts @@ -0,0 +1,131 @@ +import { property } from "lit/decorators.js"; +import { Embed, apiPrefix } from "replaywebpage"; + +//import awpLogo from "../assets/brand/archivewebpage-icon-color.svg"; + +// =========================================================================== +Embed.setDefaultReplayFile("replay.html"); + +type AWPFinishEvent = { + type: "awp-finish"; + downloadUrl: string; +}; + +type LiveProxyURLErrorEvent = { + type: "live-proxy-url-error"; + url: string; + status: number; +}; + +// =========================================================================== +export class RecordEmbed extends Embed { + @property({ type: String }) + proxyPrefix = "https://wabac-cors-proxy.webrecorder.workers.dev/proxy/"; + + @property({ type: String }) + archivePrefix = ""; + + source: string; + + constructor() { + super(); + + this.replaybase = "./replay/"; + this.replayfile = "record.html"; + this.mainElementName = "archive-web-page-app"; + this.appName = "Embedded ArchiveWeb.page"; + this.embed = "default"; + this.noWebWorker = true; + + this.coll = this.randomId(); + + const baseUrl = new URL(window.location.href); + baseUrl.hash = ""; + + this.customConfig = { + prefix: this.proxyPrefix, + isLive: false, + archivePrefix: this.archivePrefix, + baseUrl: baseUrl.href, + baseUrlHashReplay: false, + recording: true, + noPostToGet: true, + messageOnProxyErrors: true, + }; + + this.source = "proxy://" + this.proxyPrefix; + } + + static get properties() { + return { + ...Embed.properties, + + archivePrefix: { type: String }, + proxyPrefix: { type: String }, + }; + } + + randomId() { + return ( + Math.random().toString(36).substring(2, 15) + + Math.random().toString(36).substring(2, 15) + ); + } + + firstUpdated(): void { + window.addEventListener("beforeunload", () => { + this.deleteColl(); + }); + + this.customConfig!.archivePrefix = this.archivePrefix; + this.customConfig!.isLive = !this.archivePrefix; + this.customConfig!.prefix = this.proxyPrefix; + this.source = "proxy://" + this.proxyPrefix; + + super.firstUpdated(); + } + + async deleteColl() { + if (this.coll) { + await fetch(`w/api/c/${this.coll}`, { method: "DELETE" }); + } + } + + getDownloadUrl() { + return `${apiPrefix}/c/${this.coll}/dl?format=wacz&pages=all`; + } + + handleMessage(event: MessageEvent) { + const iframe = this.renderRoot.querySelector("iframe"); + + if (iframe && event.source === iframe.contentWindow) { + switch (event.data.type) { + case "awp-finish": + this.dispatchEvent( + new CustomEvent("awp-finish", { + detail: event.data, + }), + ); + break; + + case "live-proxy-url-error": + this.dispatchEvent( + new CustomEvent("live-proxy-url-error", { + detail: event.data, + }), + ); + break; + + default: + return super.handleMessage(event); + } + } + } +} + +// =========================================================================== +function main() { + customElements.define("archive-web-page", RecordEmbed); +} + +main(); diff --git a/src/ui/upload.js b/src/ui/upload.js deleted file mode 100644 index a7280e77..00000000 --- a/src/ui/upload.js +++ /dev/null @@ -1,389 +0,0 @@ -import { html, css, wrapCss, apiPrefix, LitElement } from "replaywebpage/src/misc"; -import prettyBytes from "pretty-bytes"; - -import fasSync from "@fortawesome/fontawesome-free/svgs/solid/sync-alt.svg"; -import fasCheck from "@fortawesome/fontawesome-free/svgs/solid/check-circle.svg"; -import fasExternal from "@fortawesome/fontawesome-free/svgs/solid/external-link-alt.svg"; -import fasX from "@fortawesome/fontawesome-free/svgs/solid/times-circle.svg"; - -// eslint-disable-next-line no-undef -const VERSION = __AWP_VERSION__; - -class BtrixUploader extends LitElement -{ - static get properties() { - return { - btrixOpts: { type: Object }, - - coll: { type: Object }, - uploadColl: { type: Object }, - - status: { type: String }, - - uploadId: { type: String }, - uploadTime: { type: Number }, - isUploadNeeded: { type: Boolean }, - - actualSize: { type: Number }, - - uploadSize: { type: Number }, - uploadTotal: { type: Number } - }; - } - - static get styles() { - return wrapCss(css``); - } - - updated(changedProps) { - if (changedProps.has("uploadColl")) { - const { coll, isUploadNeeded } = this.uploadColl; - this.coll = coll; - this.actualSize = 0; - this.isUploadNeeded = isUploadNeeded; - this.uploadTime = this.coll.uploadTime; - this.uploadId = this.coll.uploadId; - } - - if (changedProps.has("coll") && this.coll) { - this.pollUploadState(); - } - } - - async pollUploadState() { - if (this.pollingUploadState) { - return; - } - - this.pollingUploadState = true; - - let loop = true; - - while (loop) { - const resp = await fetch(`${apiPrefix}/c/${this.coll.id}/upload`); - const json = await resp.json(); - this.status = json.status; - - this.uploadTime = json.uploadTime; - this.uploadId = json.uploadId; - - if (this.status === "uploading") { - this.isUploadNeeded = false; - } else if (this.status === "idle" && this.btrixOpts && this.btrixOpts.client && - json.uploadTime && json.uploadId && (json.mtime <= json.uploadTime)) { - this.getRemoteUpload(); - } else if (!this.uploadId) { - this.isUploadNeeded = true; - } - - this.uploadSize = json.size; - this.uploadTotal = json.totalSize; - - if (this.status !== "uploading") { - break; - } - - await new Promise(resolve => setTimeout(resolve, 1000)); - } - - this.pollingUploadState = false; - } - - async getRemoteUpload() { - try { - const upload = await this.btrixOpts.client.getRemoteUpload(this.uploadId); - //this.coll.title = upload.name; - this.actualSize = upload.fileSize; - } catch (e) { - this.isUploadNeeded = true; - this.status = "missing"; - } - } - - render() { - if (!this.coll) { - return html``; - } - - const uploadTime = this.uploadTime; - - const alreadyUploaded = !this.isUploadNeeded && uploadTime; - - let btrixUploadUrl = ""; - - try { - if (this.btrixOpts.client && this.uploadId) { - const { client } = this.btrixOpts; - btrixUploadUrl = new URL(`/orgs/${client.defaultOrg}/artifacts/upload/${this.uploadId}`, - client.url).href; - } - } catch (e) { - // ignore - } - - - - return html` - - - - - - - - - - - ${this.actualSize ? html` - - - - ` : ""} - ${uploadTime ? html` - - - - ` : ""} - ${btrixUploadUrl ? html` - - - - ` : ""} -
Collection:${this.coll.title}
Local Size:${prettyBytes(this.coll.size)}
Uploaded Size:${prettyBytes(this.actualSize)}
Last Uploaded At:${new Date(uploadTime).toLocaleString()}
Link: - - View in Browsertrix
-
-
- ${this.renderUploadStatus()} -
-
- ${this.status === "uploading" ? html` - - - ` : html` - - - `} -
-
-
- `; - } - - renderUploadStatus() { - switch (this.status) { - case "done": - return html`

Upload Finished

`; - - case "failed": - return html`

Sorry, Upload Failed, or, the Browsertrix credentials may be incorrect.

; -

Check your credentials in Settings and then click Upload to try again.

`; - - case "aborted": - return html`

Upload has been canceled

`; - - case "uploading": - return html` - - -

- ${prettyBytes(this.uploadSize || 0)} / ${prettyBytes(this.uploadTotal || 0)} -

`; - - case "missing": - return html`

Previously uploaded data not found, or, the Browsertrix credentials may be incorrect.

-

Check your credentials in Settings and then click Upload to try again.

`; - - case "idle": - if (!this.isUploadNeeded) { - return html`

- - Archive already uploaded to Browsertrix. - ${this.renderDeleteUploaded()} -

- `; - } else if (this.uploadId) { - return html`

- - Archive updated since last upload. Click "Upload" below to upload latest. - ${this.renderDeleteUploaded()} -

- `; - } else { - return html`

Archive not yet uploaded. Click "Upload" below to start.

`; - } - - case "deleted": - return html`

Upload to Browsertrix has been deleted.

-

(Data is still saved locally in your browser)

`; - - case "deleteFailed": - return html`

Sorry, deleting upload has failed, or, the Browsertrix credentials may be incorrect.

; -

Check your credentials in Settings and then click Delete to try again. - ${this.renderDeleteUploaded()} -

- `; - - default: - return ""; - } - } - - renderDeleteUploaded() { - return html` - - `; - } - - async onUpload() { - const client = this.btrixOpts.client; - - const org = await client.getOrg(this.btrixOpts.orgName); - - const urlObj = new URL(`/api/orgs/${org}/uploads/stream`, client.url); - - if (this.uploadId) { - urlObj.searchParams.set("replaceId", this.uploadId); - } - - const now = new Date().toLocaleString(); - urlObj.searchParams.set("notes", `Uploaded by ArchiveWeb.page ${VERSION} at ${now}`); - - const url = urlObj.href; - - const headers = {"Authorization": client.auth}; - - const body = JSON.stringify({url, headers}); - - const method = "POST"; - - this.status = "uploading"; - this.uploadSize = 0; - this.uploadTotal = 0; - - const resp = await fetch(`${apiPrefix}/c/${this.coll.id}/upload?format=wacz&pages=all`, {method, body}); - - const json = await resp.json(); - - if (json.uploading) { - this.pollUploadState(); - } - } - - async onCancelUpload() { - const method = "POST"; - const body = JSON.stringify({abortUpload: true}); - await fetch(`${apiPrefix}/c/${this.coll.id}/upload`, {method, body}); - this.pollUploadState(); - } - - async onDeleteUpload() { - try { - const { client } = this.btrixOpts; - - if (!client) { - return; - } - - await client.deleteUpload(this.uploadId); - - await fetch(`${apiPrefix}/c/${this.coll.id}/upload`, {method: "DELETE"}); - - this.status = "deleted"; - this.isUploadNeeded = true; - this.uploadTime = this.btrixOpts.uploadTime = null; - this.uploadId = this.btrixOpts.uploadId = null; - - } catch (e) { - this.status = "deleteFailed"; - } - } -} - -customElements.define("wr-btrix-upload", BtrixUploader); - -export class BtrixClient -{ - static async login({url, username, password, orgName}) { - const loginUrl = url + "/api/auth/jwt/login"; - - const form = new FormData(); - form.append("username", username); - form.append("password", password); - - const res = await fetch(loginUrl, {method: "POST", body: form}); - const auth = await res.json(); - const {token_type, access_token} = auth; - if (!access_token || !token_type) { - throw new Error("Invalid login"); - } - - const authToken = token_type + " " + access_token; - const client = new BtrixClient(url, authToken); - - const org = await client.getOrg(orgName); - client.defaultOrg = org; - - return client; - } - - constructor(url, auth) { - this.url = url; - this.auth = auth; - this.defaultOrg = null; - } - - async fetchAPI(endpoint, method="GET", body=null) { - const headers = {"Authorization": this.auth}; - if (method !== "GET") { - headers["Content-Type"] = "application/json"; - } - try { - const resp = await fetch(this.url + endpoint, {headers, method, body, duplex: "half"}); - return await resp.json(); - } catch (e) { - console.warn(e); - return {}; - } - } - - async getOrg(name="") { - const json = await this.fetchAPI("/api/users/me"); - const { orgs } = json; - if (!orgs || !orgs.length) { - return null; - } - if (!name) { - return orgs[0].id; - } - for (const org of orgs) { - if (org.slug === name || org.name === name) { - return org.id; - } - } - return orgs[0].id; - } - - async getRemoteUpload(uploadId, orgId = null) { - const org = this.defaultOrg || orgId; - const res = await this.fetchAPI(`/api/orgs/${org}/uploads/${uploadId}`); - if (!res.name) { - throw new Error("upload_missing"); - } - return res; - } - - async deleteUpload(uploadId, orgId = null) { - const org = this.defaultOrg || orgId; - const deleteStr = JSON.stringify({crawl_ids: [uploadId]}); - const res = await this.fetchAPI(`/api/orgs/${org}/uploads/delete`, "POST", deleteStr); - if (!res.deleted) { - throw new Error("delete_failed"); - } - } -} diff --git a/src/ui/upload.ts b/src/ui/upload.ts new file mode 100644 index 00000000..2ecadad0 --- /dev/null +++ b/src/ui/upload.ts @@ -0,0 +1,568 @@ +import { html, css, wrapCss, apiPrefix, LitElement } from "replaywebpage"; +import prettyBytes from "pretty-bytes"; + +import fasSync from "@fortawesome/fontawesome-free/svgs/solid/sync-alt.svg"; +import fasCheck from "@fortawesome/fontawesome-free/svgs/solid/check-circle.svg"; +import fasExternal from "@fortawesome/fontawesome-free/svgs/solid/external-link-alt.svg"; +import fasX from "@fortawesome/fontawesome-free/svgs/solid/times-circle.svg"; +import { type BtrixOpts } from "../types"; + +const VERSION = __AWP_VERSION__; + +class BtrixUploader extends LitElement { + btrixOpts: BtrixOpts | null = null; + static get properties() { + return { + btrixOpts: { type: Object }, + + coll: { type: Object }, + uploadColl: { type: Object }, + + status: { type: String }, + + uploadId: { type: String }, + uploadTime: { type: Number }, + isUploadNeeded: { type: Boolean }, + + actualSize: { type: Number }, + + uploadSize: { type: Number }, + uploadTotal: { type: Number }, + }; + } + + static get styles() { + return wrapCss(css``); + } + + // @ts-expect-error - TS7006 - Parameter 'changedProps' implicitly has an 'any' type. + updated(changedProps) { + if (changedProps.has("uploadColl")) { + // @ts-expect-error - TS2339 - Property 'uploadColl' does not exist on type 'BtrixUploader'. + const { coll, isUploadNeeded } = this.uploadColl; + // @ts-expect-error - TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + this.coll = coll; + // @ts-expect-error - TS2339 - Property 'actualSize' does not exist on type 'BtrixUploader'. + this.actualSize = 0; + // @ts-expect-error - TS2339 - Property 'isUploadNeeded' does not exist on type 'BtrixUploader'. + this.isUploadNeeded = isUploadNeeded; + // @ts-expect-error - TS2339 - Property 'uploadTime' does not exist on type 'BtrixUploader'. | TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + this.uploadTime = this.coll.uploadTime; + // @ts-expect-error - TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. | TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + this.uploadId = this.coll.uploadId; + } + + // @ts-expect-error - TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + if (changedProps.has("coll") && this.coll) { + this.pollUploadState(); + } + } + + async pollUploadState() { + // @ts-expect-error - TS2339 - Property 'pollingUploadState' does not exist on type 'BtrixUploader'. + if (this.pollingUploadState) { + return; + } + + // @ts-expect-error - TS2339 - Property 'pollingUploadState' does not exist on type 'BtrixUploader'. + this.pollingUploadState = true; + + const loop = true; + + while (loop) { + // @ts-expect-error - TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + const resp = await fetch(`${apiPrefix}/c/${this.coll.id}/upload`); + const json = await resp.json(); + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + this.status = json.status; + + // @ts-expect-error - TS2339 - Property 'uploadTime' does not exist on type 'BtrixUploader'. + this.uploadTime = json.uploadTime; + // @ts-expect-error - TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. + this.uploadId = json.uploadId; + + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + if (this.status === "uploading") { + // @ts-expect-error - TS2339 - Property 'isUploadNeeded' does not exist on type 'BtrixUploader'. + this.isUploadNeeded = false; + } else if ( + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + this.status === "idle" && + this.btrixOpts?.client && + json.uploadTime && + json.uploadId && + json.mtime <= json.uploadTime + ) { + this.getRemoteUpload(); + // @ts-expect-error - TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. + } else if (!this.uploadId) { + // @ts-expect-error - TS2339 - Property 'isUploadNeeded' does not exist on type 'BtrixUploader'. + this.isUploadNeeded = true; + } + + // @ts-expect-error - TS2339 - Property 'uploadSize' does not exist on type 'BtrixUploader'. + this.uploadSize = json.size; + // @ts-expect-error - TS2339 - Property 'uploadTotal' does not exist on type 'BtrixUploader'. + this.uploadTotal = json.totalSize; + + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + if (this.status !== "uploading") { + break; + } + + await new Promise((resolve) => setTimeout(resolve, 1000)); + } + + // @ts-expect-error - TS2339 - Property 'pollingUploadState' does not exist on type 'BtrixUploader'. + this.pollingUploadState = false; + } + + async getRemoteUpload() { + try { + // @ts-expect-error - TS2339 - Property 'btrixOpts' does not exist on type 'BtrixUploader'. | TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. + const upload = await this.btrixOpts.client.getRemoteUpload(this.uploadId); + //this.coll.title = upload.name; + // @ts-expect-error - TS2339 - Property 'actualSize' does not exist on type 'BtrixUploader'. + this.actualSize = upload.fileSize; + } catch (e) { + // @ts-expect-error - TS2339 - Property 'isUploadNeeded' does not exist on type 'BtrixUploader'. + this.isUploadNeeded = true; + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + this.status = "missing"; + } + } + + render() { + // @ts-expect-error - TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + if (!this.coll) { + return html``; + } + + // @ts-expect-error - TS2339 - Property 'uploadTime' does not exist on type 'BtrixUploader'. + const uploadTime = this.uploadTime; + + // @ts-expect-error - TS2339 - Property 'isUploadNeeded' does not exist on type 'BtrixUploader'. + const alreadyUploaded = !this.isUploadNeeded && uploadTime; + + let btrixUploadUrl = ""; + + try { + // @ts-expect-error - TS2339 - Property 'btrixOpts' does not exist on type 'BtrixUploader'. | TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. + if (this.btrixOpts.client && this.uploadId) { + // @ts-expect-error - TS2339 - Property 'btrixOpts' does not exist on type 'BtrixUploader'. + const { client } = this.btrixOpts; + btrixUploadUrl = new URL( + // @ts-expect-error - TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. + `/orgs/${client.defaultOrg}/artifacts/upload/${this.uploadId}`, + client.url, + ).href; + } + } catch (e) { + // ignore + } + + return html` + + + + + + + + + + + ${ + // @ts-expect-error - TS2339 - Property 'actualSize' does not exist on type 'BtrixUploader'. + this.actualSize + ? html` + + + ` + : "" + } + ${uploadTime + ? html` + + + ` + : ""} + ${btrixUploadUrl + ? html` + + + ` + : ""} +
Collection: + ${ + // @ts-expect-error - TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + this.coll.title + } +
Local Size: + ${ + // @ts-expect-error - TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + prettyBytes(this.coll.size) + } +
Uploaded Size: + ${ + // @ts-expect-error - TS2339 - Property 'actualSize' does not exist on type 'BtrixUploader'. + prettyBytes(this.actualSize) + } +
Last Uploaded At:${new Date(uploadTime).toLocaleString()}
Link: + + + View in Browsertrix +
+
+
+ ${this.renderUploadStatus()} +
+
+ ${ + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + this.status === "uploading" + ? html` + + + ` + : html` + + + ` + } +
+
+
+ `; + } + + renderUploadStatus() { + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + switch (this.status) { + case "done": + return html`

+ Upload Finished +

`; + + case "failed": + return html`

+ Sorry, Upload Failed, or, the Browsertrix credentials may be + incorrect. +

+ ; +

+ Check your credentials in Settings and then click + Upload to try again. +

`; + + case "aborted": + return html`

+ Upload has been canceled +

`; + + case "idle": + // @ts-expect-error - TS2339 - Property 'isUploadNeeded' does not exist on type 'BtrixUploader'. + if (!this.isUploadNeeded) { + return html`

+ + Archive already uploaded to Browsertrix. + ${this.renderDeleteUploaded()} +

`; + // @ts-expect-error - TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. + } else if (this.uploadId) { + return html`

+ + Archive updated since last upload. Click "Upload" below to upload + latest. ${this.renderDeleteUploaded()} +

`; + } else { + return html`

+ Archive not yet uploaded. Click "Upload" below to start. +

`; + } + + case "deleted": + return html`

+ Upload to Browsertrix has been deleted. +

+

(Data is still saved locally in your browser)

`; + + case "deleteFailed": + return html`

+ Sorry, deleting upload has failed, or, the Browsertrix credentials + may be incorrect. +

+ ; +

+ Check your credentials in Settings and then click + Delete to try again. ${this.renderDeleteUploaded()} +

`; + + default: + return ""; + } + } + + renderDeleteUploaded() { + return html` + + `; + } + + async onUpload() { + const client = this.btrixOpts!.client; + + // @ts-expect-error - TS2339 - Property 'btrixOpts' does not exist on type 'BtrixUploader'. + const org = await client.getOrg(this.btrixOpts.orgName); + + const urlObj = new URL(`/api/orgs/${org}/uploads/stream`, client!.url); + + // @ts-expect-error - TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. + if (this.uploadId) { + // @ts-expect-error - TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. + urlObj.searchParams.set("replaceId", this.uploadId); + } + + const now = new Date().toLocaleString(); + urlObj.searchParams.set( + "notes", + `Uploaded by ArchiveWeb.page ${VERSION} at ${now}`, + ); + + const url = urlObj.href; + + const headers = { Authorization: client!.auth }; + + const body = JSON.stringify({ url, headers }); + + const method = "POST"; + + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + this.status = "uploading"; + // @ts-expect-error - TS2339 - Property 'uploadSize' does not exist on type 'BtrixUploader'. + this.uploadSize = 0; + // @ts-expect-error - TS2339 - Property 'uploadTotal' does not exist on type 'BtrixUploader'. + this.uploadTotal = 0; + + const resp = await fetch( + // @ts-expect-error - TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + `${apiPrefix}/c/${this.coll.id}/upload?format=wacz&pages=all`, + { method, body }, + ); + + const json = await resp.json(); + + if (json.uploading) { + this.pollUploadState(); + } + } + + async onCancelUpload() { + const method = "POST"; + const body = JSON.stringify({ abortUpload: true }); + // @ts-expect-error - TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + await fetch(`${apiPrefix}/c/${this.coll.id}/upload`, { method, body }); + this.pollUploadState(); + } + + async onDeleteUpload() { + try { + // @ts-expect-error - TS2339 - Property 'btrixOpts' does not exist on type 'BtrixUploader'. + const { client } = this.btrixOpts; + + if (!client) { + return; + } + + // @ts-expect-error - TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. + await client.deleteUpload(this.uploadId); + + // @ts-expect-error - TS2339 - Property 'coll' does not exist on type 'BtrixUploader'. + await fetch(`${apiPrefix}/c/${this.coll.id}/upload`, { + method: "DELETE", + }); + + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + this.status = "deleted"; + // @ts-expect-error - TS2339 - Property 'isUploadNeeded' does not exist on type 'BtrixUploader'. + this.isUploadNeeded = true; + // @ts-expect-error - TS2339 - Property 'uploadTime' does not exist on type 'BtrixUploader'. | TS2339 - Property 'btrixOpts' does not exist on type 'BtrixUploader'. + this.uploadTime = this.btrixOpts.uploadTime = null; + // @ts-expect-error - TS2339 - Property 'uploadId' does not exist on type 'BtrixUploader'. | TS2339 - Property 'btrixOpts' does not exist on type 'BtrixUploader'. + this.uploadId = this.btrixOpts.uploadId = null; + } catch (e) { + // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'BtrixUploader'. + this.status = "deleteFailed"; + } + } +} + +customElements.define("wr-btrix-upload", BtrixUploader); + +export class BtrixClient { + url: string | URL | undefined; + auth: TODOFixMe; + defaultOrg: null; + // @ts-expect-error - TS7031 - Binding element 'url' implicitly has an 'any' type. | TS7031 - Binding element 'username' implicitly has an 'any' type. | TS7031 - Binding element 'password' implicitly has an 'any' type. | TS7031 - Binding element 'orgName' implicitly has an 'any' type. + static async login({ url, username, password, orgName }) { + const loginUrl = url + "/api/auth/jwt/login"; + + const form = new FormData(); + form.append("username", username); + form.append("password", password); + + const res = await fetch(loginUrl, { method: "POST", body: form }); + const auth = await res.json(); + const { token_type, access_token } = auth; + if (!access_token || !token_type) { + throw new Error("Invalid login"); + } + + const authToken = token_type + " " + access_token; + const client = new BtrixClient(url, authToken); + + const org = await client.getOrg(orgName); + client.defaultOrg = org; + + return client; + } + + // @ts-expect-error - TS7006 - Parameter 'url' implicitly has an 'any' type. | TS7006 - Parameter 'auth' implicitly has an 'any' type. + constructor(url, auth) { + this.url = url; + this.auth = auth; + this.defaultOrg = null; + } + + // @ts-expect-error - TS7006 - Parameter 'endpoint' implicitly has an 'any' type. + async fetchAPI(endpoint, method = "GET", body = null) { + const headers = { Authorization: this.auth }; + if (method !== "GET") { + // @ts-expect-error - TS7053 - Element implicitly has an 'any' type because expression of type '"Content-Type"' can't be used to index type '{ Authorization: any; }'. + headers["Content-Type"] = "application/json"; + } + try { + const resp = await fetch(this.url + endpoint, { + headers, + method, + body, + // @ts-expect-error - TS2345 - Argument of type '{ headers: { Authorization: any; }; method: string; body: null; duplex: string; }' is not assignable to parameter of type 'RequestInit'. + duplex: "half", + }); + return await resp.json(); + } catch (e) { + console.warn(e); + return {}; + } + } + + async getOrg(name = "") { + const json = await this.fetchAPI("/api/users/me"); + const { orgs } = json; + if (!orgs?.length) { + return null; + } + if (!name) { + return orgs[0].id; + } + for (const org of orgs) { + if (org.slug === name || org.name === name) { + return org.id; + } + } + return orgs[0].id; + } + + // @ts-expect-error - TS7006 - Parameter 'uploadId' implicitly has an 'any' type. + async getRemoteUpload(uploadId, orgId = null) { + const org = this.defaultOrg || orgId; + const res = await this.fetchAPI(`/api/orgs/${org}/uploads/${uploadId}`); + if (!res.name) { + throw new Error("upload_missing"); + } + return res; + } + + // @ts-expect-error - TS7006 - Parameter 'uploadId' implicitly has an 'any' type. + async deleteUpload(uploadId, orgId = null) { + const org = this.defaultOrg || orgId; + const deleteStr = JSON.stringify({ crawl_ids: [uploadId] }); + const res = await this.fetchAPI( + `/api/orgs/${org}/uploads/delete`, + "POST", + // @ts-expect-error - TS2345 - Argument of type 'string' is not assignable to parameter of type 'null | undefined'. + deleteStr, + ); + if (!res.deleted) { + throw new Error("delete_failed"); + } + } +} diff --git a/src/utils.js b/src/utils.js deleted file mode 100644 index 62478857..00000000 --- a/src/utils.js +++ /dev/null @@ -1,59 +0,0 @@ -import { getCollData } from "@webrecorder/wabac/src/utils"; -import { getLocalOption, setLocalOption } from "./localstorage"; - - -// =========================================================================== -export async function ensureDefaultColl(collLoader) -{ - let colls = await collLoader.listAll(); - - if (!colls.length) { - const metadata = {"title": "My Archiving Session"}; - const result = await collLoader.initNewColl(metadata); - - await setLocalOption("defaultCollId", result.name); - - colls = [result]; - - } else { - const defaultId = await getLocalOption("defaultCollId"); - - for (const coll of colls) { - if (coll.name === defaultId) { - return colls; - } - } - - await setLocalOption("defaultCollId", colls[0].name); - } - - return colls; -} - -// =========================================================================== -export async function listAllMsg(collLoader, {defaultCollId = null} = {}) { - let colls = await ensureDefaultColl(collLoader); - - colls = colls.map(x => getCollData(x)); - - // sort same way as the UI collections index - const sortKey = await getLocalOption("index:sortKey"); - const sortDesc = await getLocalOption("index:sortDesc") === "1"; - - colls.sort((first, second) => { - if (first[sortKey] === second[sortKey]) { - return 0; - } - - return (sortDesc == (first[sortKey] < second[sortKey])) ? 1 : -1; - }); - - const msg = {type: "collections"}; - msg.collId = defaultCollId || await getLocalOption("defaultCollId"); - msg.collections = colls.map(coll => ({ - id: coll.id, - title: coll.title || coll.filename - })); - - return msg; -} diff --git a/src/utils.ts b/src/utils.ts new file mode 100644 index 00000000..f45c7c9e --- /dev/null +++ b/src/utils.ts @@ -0,0 +1,64 @@ +import { getCollData } from "@webrecorder/wabac"; +import { getLocalOption, setLocalOption } from "./localstorage"; + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'collLoader' implicitly has an 'any' type. +export async function ensureDefaultColl(collLoader) { + let colls = await collLoader.listAll(); + + if (!colls.length) { + const metadata = { title: "My Archiving Session" }; + const result = await collLoader.initNewColl(metadata); + + await setLocalOption("defaultCollId", result.name); + + colls = [result]; + } else { + const defaultId = await getLocalOption("defaultCollId"); + + for (const coll of colls) { + if (coll.name === defaultId) { + return colls; + } + } + + await setLocalOption("defaultCollId", colls[0].name); + } + + return colls; +} + +// =========================================================================== +// @ts-expect-error - TS7006 - Parameter 'collLoader' implicitly has an 'any' type. +export async function listAllMsg(collLoader, { defaultCollId = null } = {}) { + let colls = await ensureDefaultColl(collLoader); + + // @ts-expect-error - TS7006 - Parameter 'x' implicitly has an 'any' type. + colls = colls.map((x) => getCollData(x)); + + // sort same way as the UI collections index + const sortKey = await getLocalOption("index:sortKey"); + const sortDesc = (await getLocalOption("index:sortDesc")) === "1"; + + // @ts-expect-error - TS7006 - Parameter 'first' implicitly has an 'any' type. | TS7006 - Parameter 'second' implicitly has an 'any' type. + colls.sort((first, second) => { + // @ts-expect-error - TS2538 - Type 'unknown' cannot be used as an index type. | TS2538 - Type 'unknown' cannot be used as an index type. + if (first[sortKey] === second[sortKey]) { + return 0; + } + + // @ts-expect-error - TS2538 - Type 'unknown' cannot be used as an index type. | TS2538 - Type 'unknown' cannot be used as an index type. + return sortDesc == first[sortKey] < second[sortKey] ? 1 : -1; + }); + + const msg = { type: "collections" }; + // @ts-expect-error - TS2339 - Property 'collId' does not exist on type '{ type: string; }'. + msg.collId = defaultCollId || (await getLocalOption("defaultCollId")); + // @ts-expect-error - TS2339 - Property 'collections' does not exist on type '{ type: string; }'. + msg.collections = colls.map((coll) => ({ + id: coll.id, + title: coll.title || coll.filename, + })); + + return msg; +} diff --git a/src/static/brave-ipfs.json b/static/brave-ipfs.json similarity index 100% rename from src/static/brave-ipfs.json rename to static/brave-ipfs.json diff --git a/src/extractPDF.js b/static/extractPDF.js similarity index 82% rename from src/extractPDF.js rename to static/extractPDF.js index 576e8956..8907d162 100644 --- a/src/extractPDF.js +++ b/static/extractPDF.js @@ -1,3 +1,6 @@ +/** + * @param {string} url + */ async function getPDFText(url) { url = url || window.location.href; @@ -5,12 +8,15 @@ async function getPDFText(url) { let doc = pdfjsLib.getDocument(url); doc = await doc.promise; + /** + * @type {any[]} + */ const strings = []; for (let i = 1; i <= doc.numPages; i++) { const page = await doc.getPage(i); const textContent = await page.getTextContent(); - textContent.items.map(item => strings.push(item.str)); + textContent.items.map((/** @type {{ str: any; }} */ item) => strings.push(item.str)); console.log("Processing Page: " + i); } @@ -18,17 +24,21 @@ async function getPDFText(url) { } // eslint-disable-next-line no-unused-vars +/** + * @param {any} url + * @param {string | URL | undefined} baseUrl + */ async function extractPDF(url, baseUrl) { let pdfText = null; try { const res = await fetch(new URL("pdf/pdf.min.js", baseUrl).href); eval(await res.text()); - + //pdfjsLib should now exist // eslint-disable-next-line no-undef pdfjsLib.GlobalWorkerOptions.workerSrc = new URL("pdf/pdf.worker.min.js", baseUrl).href; - + if (url || document.querySelector("embed[type='application/pdf']")) { pdfText = await getPDFText(url); } else { diff --git a/src/static/icon-dev.png b/static/icon-dev.png similarity index 100% rename from src/static/icon-dev.png rename to static/icon-dev.png diff --git a/src/static/icon.png b/static/icon.png similarity index 100% rename from src/static/icon.png rename to static/icon.png diff --git a/src/static/index.html b/static/index.html similarity index 100% rename from src/static/index.html rename to static/index.html diff --git a/src/static/pdf/pdf.min.js b/static/pdf/pdf.min.js similarity index 100% rename from src/static/pdf/pdf.min.js rename to static/pdf/pdf.min.js diff --git a/src/static/pdf/pdf.worker.min.js b/static/pdf/pdf.worker.min.js similarity index 100% rename from src/static/pdf/pdf.worker.min.js rename to static/pdf/pdf.worker.min.js diff --git a/src/static/popup.html b/static/popup.html similarity index 100% rename from src/static/popup.html rename to static/popup.html diff --git a/static/replay/icon.png b/static/replay/icon.png new file mode 100644 index 00000000..c19415b5 Binary files /dev/null and b/static/replay/icon.png differ diff --git a/static/replay/index.html b/static/replay/index.html new file mode 100644 index 00000000..d7fe0717 --- /dev/null +++ b/static/replay/index.html @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/static/replayIcon.png b/static/replayIcon.png new file mode 100644 index 00000000..cc565c8c Binary files /dev/null and b/static/replayIcon.png differ diff --git a/static/ruffle/LICENSE_MIT b/static/ruffle/LICENSE_MIT new file mode 100644 index 00000000..941fe993 --- /dev/null +++ b/static/ruffle/LICENSE_MIT @@ -0,0 +1,25 @@ +Copyright (c) 2018 Ruffle LLC and Ruffle contributors + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 00000000..1f6e1462 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "noEmit": true + }, + "extends": "./tsconfig.json", + "include": ["**/*.ts", "**/*.js", ".*.js"], + "exclude": ["__generated__", "__mocks__", "dist", "ruffle/*.js"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..e3ead812 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,41 @@ +{ + "compilerOptions": { + "outDir": "./dist/", + "module": "esnext", + "target": "es6", + "moduleResolution": "Bundler", + "allowJs": true, + "strict": true, + "checkJs": true, + "noImplicitAny": true, + "declaration": true, + "declarationMap": true, + "declarationDir": "./dist/lib/types", + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "importHelpers": true, + "sourceMap": true, + "inlineSources": true, + "plugins": [ + { + "name": "ts-lit-plugin", + "strict": true, + "rules": { + // This seems to produce a bunch of false positives, so we've turned it off for now. + // Relevant issues: + // https://github.com/runem/lit-analyzer/issues/293 + // https://github.com/runem/lit-analyzer/issues/302 + // https://github.com/runem/lit-analyzer/issues/266 + "no-missing-import": "off", + + // ts-lit-plugin also doesn't seem to understand string interpolations in CSS, so this is also turned off. + "no-invalid-css": "off" + } + } + ], + "skipLibCheck": true, + "paths": { "@/*": ["./*"] }, + "lib": ["dom", "dom.iterable", "webworker", "esnext", "webworker.iterable"] + }, + "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.js"] +} diff --git a/webpack.config.js b/webpack.config.js index 2ba4ea73..e191f274 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,5 @@ -/*eslint-env node */ +/* eslint-env node */ +/* eslint @typescript-eslint/no-var-requires: "off" */ const path = require("path"); const webpack = require("webpack"); @@ -6,6 +7,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const GenerateJsonPlugin = require("generate-json-webpack-plugin"); const CopyPlugin = require("copy-webpack-plugin"); const TerserPlugin = require("terser-webpack-plugin"); +const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin"); const AWP_PACKAGE = require("./package.json"); const RWP_PACKAGE = require("./node_modules/replaywebpage/package.json"); @@ -23,29 +25,36 @@ const defaultDefines = { __WEB3_STORAGE_TOKEN__: JSON.stringify(""), }; - const DIST_EXT = path.join(__dirname, "dist", "ext"); const DIST_ELECTRON = path.join(__dirname, "dist", "electron"); const DIST_EMBED = path.join(__dirname, "dist", "embed"); - -const moduleSettings = { +/** @type {import('webpack').Configuration['module']} */ +const moduleSettings = { rules: [ { - test: /\.svg$/, - use: "svg-inline-loader" + test: /\.tsx?$/, + loader: "ts-loader", + options: { + onlyCompileBundledFiles: true, + }, + }, + { + test: /\.svg$/, + use: "svg-inline-loader", }, { test: /\.s(a|c)ss$/, - use: ["css-loader", "sass-loader"] + use: ["css-loader", "sass-loader"], }, { test: /(dist\/wombat.js|src\/wombatWorkers.js|behaviors.js|extractPDF.js|ruffle.js|index.html)$/i, use: "raw-loader", - } - ] + }, + ], }; +/** @type {import('webpack').Configuration['optimization']} */ const optimization = { minimize: true, minimizer: [ @@ -55,19 +64,25 @@ const optimization = { ], }; +/** @type {import('webpack').Configuration['resolve']} */ +const resolve = { + extensions: [".ts", ".js"], + plugins: [new TsconfigPathsPlugin()], +}; // =========================================================================== +/** @returns {import('webpack').Configuration} */ const electronMainConfig = (/*env, argv*/) => { return { target: "electron-main", mode: "production", entry: { - "electron": "./src/electron/electron-rec-main.js", + electron: "./src/electron/electron-rec-main.ts", }, optimization, output: { path: DIST_ELECTRON, - filename: "[name].js" + filename: "[name].js", }, node: { __dirname: false, @@ -77,151 +92,164 @@ const electronMainConfig = (/*env, argv*/) => { new webpack.DefinePlugin(defaultDefines), new webpack.BannerPlugin(BANNER), new CopyPlugin({ - patterns: [ - { from: "build/extra_prebuilds/", to: "prebuilds" }, - ], + patterns: [{ from: "build/extra_prebuilds/", to: "prebuilds" }], }), ], module: moduleSettings, + resolve, }; }; - // =========================================================================== +/** @returns {import('webpack').Configuration} */ const electronPreloadConfig = (/*env, argv*/) => { return { target: "electron-preload", mode: "production", entry: { - "preload": "./src/electron/electron-rec-preload.js", + preload: "./src/electron/electron-rec-preload.ts", + "rec-preload": "./src/electron/rec-preload.ts", }, optimization, output: { path: DIST_ELECTRON, - filename: "[name].js" + filename: "[name].js", }, - plugins: [ - new webpack.DefinePlugin(defaultDefines), - ] + plugins: [new webpack.DefinePlugin(defaultDefines)], + module: moduleSettings, + resolve, }; }; - // =========================================================================== -function sharedBuild(outputPath, {plugins = [], copy = [], entry = {}, extra = {}, replayDir = false} = {}, argv) { +/** + * @param {string} outputPath + * @param {Object} [param1={}] + * @param {import('webpack').Configuration['plugins']} [param1.plugins=[]] + * @param {import('copy-webpack-plugin').CopyPlugin['Configuration']['patterns']} [param1.copy=[]] + * @param {import('webpack').Configuration['entry']} [param1.entry={}] + * @param {Partial} [param1.extra={}] + * @param {Partial} [param1.target={}] + * @param {boolean} [param1.flat=false] + * @returns {import('webpack').Configuration} + */ +function sharedBuild( + outputPath, + { + plugins = [], + copy = [], + entry = {}, + extra = {}, + replayDir = false, + target = "web", + } = {}, + argv, +) { if (copy.length) { - plugins.push(new CopyPlugin({patterns: copy})); + plugins.push(new CopyPlugin({ patterns: copy })); } return { mode: "production", - target: "web", + target, entry: { - "ui": "./src/ui/app.js", - "sw": "./src/sw/main.js", - ...entry + ui: "./src/ui/app.ts", + sw: "./src/sw/main.ts", + ...entry, }, devtool: argv.mode === "production" ? undefined : "source-map", - optimization, - //resolve: {fallback}, + optimization: argv.mode === "production" ? optimization : undefined, output: { path: outputPath, filename: (chunkData) => { const name = "[name].js"; switch (chunkData.chunk.name) { - case "sw": - return replayDir ? `./replay/${name}` : name; + case "sw": + return replayDir ? `./replay/${name}` : name; - default: - return name; + default: + return name; } }, libraryTarget: "global", - globalObject: "self" + globalObject: "self", }, plugins: [ - new webpack.NormalModuleReplacementPlugin( - /^node:*/, - (resource) => { - switch (resource.request) { + new webpack.NormalModuleReplacementPlugin(/^node:*/, (resource) => { + switch (resource.request) { case "node:stream": resource.request = "stream-browserify"; break; - } - }, - ), + } + }), new webpack.ProvidePlugin({ process: "process/browser.js", Buffer: ["buffer", "Buffer"], }), new MiniCssExtractPlugin(), new webpack.BannerPlugin(BANNER), - new webpack.DefinePlugin({...defaultDefines}), - ...plugins + new webpack.DefinePlugin({ ...defaultDefines }), + ...plugins, ], module: moduleSettings, - ...extra + resolve, + ...extra, }; } - // =========================================================================== const extensionWebConfig = (env, argv) => { - const icon = (argv.mode === "production") ? "icon.png" : "icon-dev.png"; + const icon = argv.mode === "production" ? "icon.png" : "icon-dev.png"; const generateManifest = (name, value) => { switch (value) { - case "$VERSION": - return AWP_PACKAGE.version; + case "$VERSION": + return AWP_PACKAGE.version; - case "$ICON": - return icon; + case "$ICON": + return icon; } return value; }; const plugins = [ - new GenerateJsonPlugin("manifest.json", manifest, generateManifest, 2) + new GenerateJsonPlugin("manifest.json", manifest, generateManifest, 2), ]; const copy = [ - { from: "src/static/", to: "./" }, + { from: "static", to: "./" }, { from: "ruffle", to: "./ruffle/" }, ]; const entry = { - "bg": "./src/ext/bg.js", - "popup": "./src/popup.js" + bg: "./src/ext/bg.ts", + popup: "./src/popup.ts", }; - return sharedBuild(DIST_EXT, {plugins, copy, entry}, argv); + return sharedBuild(DIST_EXT, { plugins, copy, entry }, argv); }; - // =========================================================================== const electronWebConfig = (env, argv) => { const entry = { - "rec-window": "./src/electron/rec-window.js" + "rec-window": "./src/electron/rec-window.ts", }; const copy = [ - { from: "src/static/", to: "./" }, + { from: "static/", to: "./" }, { from: "ruffle", to: "./ruffle/" }, - { from: "src/electron/rec-preload.js", to: "" }, { from: "src/electron/rec-window.html", to: "" }, ]; - return sharedBuild(DIST_ELECTRON, {copy, entry}, argv); + return sharedBuild(DIST_ELECTRON, { copy, entry }, argv); }; // =========================================================================== const embedWebConfig = (env, argv) => { - const copy = [ - { from: "src/embed.html", to: "./index.html" }, - ]; + const copy = [{ from: "src/embed.html", to: "./index.html" }]; const extra = { devServer: { @@ -230,18 +258,20 @@ const embedWebConfig = (env, argv) => { open: true, static: { directory: DIST_EMBED, - } - } + }, + }, }; const replayDir = true; - return sharedBuild(DIST_EMBED, {copy, extra, replayDir}, argv); + return sharedBuild(DIST_EMBED, { copy, extra, replayDir }, argv); }; - - - // =========================================================================== -module.exports = [ extensionWebConfig, electronWebConfig, embedWebConfig, electronMainConfig, electronPreloadConfig ]; - +module.exports = [ + extensionWebConfig, + electronWebConfig, + embedWebConfig, + electronMainConfig, + electronPreloadConfig, +]; diff --git a/yarn.lock b/yarn.lock index 1081d853..78ebbb4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,28 +7,1069 @@ resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.2.0.tgz#7a03314684dd6572b7dfa89e68ce31d60286854d" integrity sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A== -"@babel/code-frame@^7.0.0": - version "7.24.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.6.tgz#ab88da19344445c3d8889af2216606d3329f3ef2" - integrity sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA== +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + +"@ampproject/remapping@^2.2.0": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" + integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== dependencies: - "@babel/highlight" "^7.24.6" - picocolors "^1.0.0" + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" + integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== + dependencies: + "@babel/highlight" "^7.23.4" + chalk "^2.4.2" + +"@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.23.3", "@babel/compat-data@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" + integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== + +"@babel/core@^7.1.6", "@babel/core@^7.13.16": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.6.tgz#8be77cd77c55baadcc1eae1c33df90ab6d2151d4" + integrity sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.23.6" + "@babel/parser" "^7.23.6" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.6" + "@babel/types" "^7.23.6" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e" + integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== + dependencies: + "@babel/types" "^7.23.6" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + +"@babel/helper-annotate-as-pure@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" + integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz#5426b109cf3ad47b91120f8328d8ab1be8b0b956" + integrity sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw== + dependencies: + "@babel/types" "^7.22.15" + +"@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.15", "@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" + integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== + dependencies: + "@babel/compat-data" "^7.23.5" + "@babel/helper-validator-option" "^7.23.5" + browserslist "^4.22.2" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.6.tgz#b04d915ce92ce363666f816a884cdcfc9be04953" + integrity sha512-cBXU1vZni/CpGF29iTu4YRbOZt3Wat6zCoMDxRF1MayiEc4URxOj31tT65HUM0CRpMowA3HCJaAOVOUnMf96cw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-member-expression-to-functions" "^7.23.0" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + semver "^6.3.1" + +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.22.15", "@babel/helper-create-regexp-features-plugin@^7.22.5": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz#5ee90093914ea09639b01c711db0d6775e558be1" + integrity sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + regexpu-core "^5.3.1" + semver "^6.3.1" + +"@babel/helper-define-polyfill-provider@^0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.4.tgz#64df615451cb30e94b59a9696022cffac9a10088" + integrity sha512-QcJMILQCu2jm5TFPGA3lCpJJTeEP+mqeXooG/NZbg/h5FTFi6V0+99ahlRsW8/kRLyb24LZVCCiclDedhLKcBA== + dependencies: + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" -"@babel/helper-validator-identifier@^7.24.6": - version "7.24.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz#08bb6612b11bdec78f3feed3db196da682454a5e" - integrity sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw== +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== + +"@babel/helper-function-name@^7.22.5", "@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== + dependencies: + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" + +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" -"@babel/highlight@^7.24.6": - version "7.24.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.6.tgz#6d610c1ebd2c6e061cade0153bf69b0590b7b3df" - integrity sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ== +"@babel/helper-member-expression-to-functions@^7.22.15", "@babel/helper-member-expression-to-functions@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366" + integrity sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA== + dependencies: + "@babel/types" "^7.23.0" + +"@babel/helper-module-imports@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" + integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== + dependencies: + "@babel/types" "^7.22.15" + +"@babel/helper-module-transforms@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" + integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.20" + +"@babel/helper-optimise-call-expression@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e" + integrity sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw== + dependencies: + "@babel/types" "^7.22.5" + +"@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.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== + +"@babel/helper-remap-async-to-generator@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz#7b68e1cb4fa964d2996fd063723fb48eca8498e0" + integrity sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-wrap-function" "^7.22.20" + +"@babel/helper-replace-supers@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz#e37d367123ca98fe455a9887734ed2e16eb7a793" + integrity sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-member-expression-to-functions" "^7.22.15" + "@babel/helper-optimise-call-expression" "^7.22.5" + +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-skip-transparent-expression-wrappers@^7.20.0", "@babel/helper-skip-transparent-expression-wrappers@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847" + integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" + integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== + +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/helper-validator-option@^7.22.15", "@babel/helper-validator-option@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" + integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== + +"@babel/helper-wrap-function@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz#15352b0b9bfb10fc9c76f79f6342c00e3411a569" + integrity sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw== + dependencies: + "@babel/helper-function-name" "^7.22.5" + "@babel/template" "^7.22.15" + "@babel/types" "^7.22.19" + +"@babel/helpers@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.6.tgz#d03af2ee5fb34691eec0cda90f5ecbb4d4da145a" + integrity sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA== dependencies: - "@babel/helper-validator-identifier" "^7.24.6" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.6" + "@babel/types" "^7.23.6" + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" chalk "^2.4.2" js-tokens "^4.0.0" - picocolors "^1.0.0" + +"@babel/parser@^7.1.6", "@babel/parser@^7.13.16", "@babel/parser@^7.22.15", "@babel/parser@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b" + integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz#5cd1c87ba9380d0afb78469292c954fee5d2411a" + integrity sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz#f6652bb16b94f8f9c20c50941e16e9756898dc5d" + integrity sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/plugin-transform-optional-chaining" "^7.23.3" + +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.3.tgz#20c60d4639d18f7da8602548512e9d3a4c8d7098" + integrity sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-proposal-class-properties@^7.1.0", "@babel/plugin-proposal-class-properties@^7.13.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" + integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" + integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-proposal-object-rest-spread@^7.0.0": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" + integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== + dependencies: + "@babel/compat-data" "^7.20.5" + "@babel/helper-compilation-targets" "^7.20.7" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.20.7" + +"@babel/plugin-proposal-optional-chaining@^7.13.12": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" + integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== + dependencies: + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": + version "7.21.0-placeholder-for-preset-env.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" + integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== + +"@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-class-properties@^7.12.13": + 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-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-dynamic-import@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-export-namespace-from@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-flow@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.23.3.tgz#084564e0f3cc21ea6c70c44cff984a1c0509729a" + integrity sha512-YZiAIpkJAwQXBJLIQbRFayR5c+gJ35Vcz3bg954k7cd73zqjvhacJuL9RbrzPz8qPmZdgqP6EUKwy0PCNhaaPA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-import-assertions@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz#9c05a7f592982aff1a2768260ad84bcd3f0c77fc" + integrity sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-import-attributes@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz#992aee922cf04512461d7dae3ff6951b90a2dc06" + integrity sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-import-meta@^7.10.4": + 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.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473" + integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + 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.10.4": + 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-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + 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.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz#24f460c85dbbc983cd2b9c4994178bcc01df958f" + integrity sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-unicode-sets-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" + integrity sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-arrow-functions@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz#94c6dcfd731af90f27a79509f9ab7fb2120fc38b" + integrity sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-async-generator-functions@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.4.tgz#93ac8e3531f347fba519b4703f9ff2a75c6ae27a" + integrity sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.20" + "@babel/plugin-syntax-async-generators" "^7.8.4" + +"@babel/plugin-transform-async-to-generator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz#d1f513c7a8a506d43f47df2bf25f9254b0b051fa" + integrity sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw== + dependencies: + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.20" + +"@babel/plugin-transform-block-scoped-functions@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz#fe1177d715fb569663095e04f3598525d98e8c77" + integrity sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-block-scoping@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz#b2d38589531c6c80fbe25e6b58e763622d2d3cf5" + integrity sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-class-properties@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz#35c377db11ca92a785a718b6aa4e3ed1eb65dc48" + integrity sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-class-static-block@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz#2a202c8787a8964dd11dfcedf994d36bfc844ab5" + integrity sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + +"@babel/plugin-transform-classes@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz#e7a75f815e0c534cc4c9a39c56636c84fc0d64f2" + integrity sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" + "@babel/helper-split-export-declaration" "^7.22.6" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz#652e69561fcc9d2b50ba4f7ac7f60dcf65e86474" + integrity sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/template" "^7.22.15" + +"@babel/plugin-transform-destructuring@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz#8c9ee68228b12ae3dff986e56ed1ba4f3c446311" + integrity sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-dotall-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz#3f7af6054882ede89c378d0cf889b854a993da50" + integrity sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-duplicate-keys@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz#664706ca0a5dfe8d066537f99032fc1dc8b720ce" + integrity sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-dynamic-import@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz#c7629e7254011ac3630d47d7f34ddd40ca535143" + integrity sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + +"@babel/plugin-transform-exponentiation-operator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz#ea0d978f6b9232ba4722f3dbecdd18f450babd18" + integrity sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-export-namespace-from@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz#084c7b25e9a5c8271e987a08cf85807b80283191" + integrity sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + +"@babel/plugin-transform-flow-strip-types@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.23.3.tgz#cfa7ca159cc3306fab526fc67091556b51af26ff" + integrity sha512-26/pQTf9nQSNVJCrLB1IkHUKyPxR+lMrH2QDPG89+Znu9rAMbtrybdbWeE9bb7gzjmE5iXHEY+e0HUwM6Co93Q== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-flow" "^7.23.3" + +"@babel/plugin-transform-for-of@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz#81c37e24171b37b370ba6aaffa7ac86bcb46f94e" + integrity sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + +"@babel/plugin-transform-function-name@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz#8f424fcd862bf84cb9a1a6b42bc2f47ed630f8dc" + integrity sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw== + dependencies: + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-json-strings@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz#a871d9b6bd171976efad2e43e694c961ffa3714d" + integrity sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-json-strings" "^7.8.3" + +"@babel/plugin-transform-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz#8214665f00506ead73de157eba233e7381f3beb4" + integrity sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-logical-assignment-operators@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz#e599f82c51d55fac725f62ce55d3a0886279ecb5" + integrity sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + +"@babel/plugin-transform-member-expression-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz#e37b3f0502289f477ac0e776b05a833d853cabcc" + integrity sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-modules-amd@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz#e19b55436a1416829df0a1afc495deedfae17f7d" + integrity sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw== + dependencies: + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz#661ae831b9577e52be57dd8356b734f9700b53b4" + integrity sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA== + dependencies: + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-simple-access" "^7.22.5" + +"@babel/plugin-transform-modules-systemjs@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz#fa7e62248931cb15b9404f8052581c302dd9de81" + integrity sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ== + dependencies: + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" + +"@babel/plugin-transform-modules-umd@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz#5d4395fccd071dfefe6585a4411aa7d6b7d769e9" + integrity sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg== + dependencies: + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz#67fe18ee8ce02d57c855185e27e3dc959b2e991f" + integrity sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-new-target@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz#5491bb78ed6ac87e990957cea367eab781c4d980" + integrity sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-nullish-coalescing-operator@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz#45556aad123fc6e52189ea749e33ce090637346e" + integrity sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-transform-numeric-separator@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz#03d08e3691e405804ecdd19dd278a40cca531f29" + integrity sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + +"@babel/plugin-transform-object-rest-spread@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz#2b9c2d26bf62710460bdc0d1730d4f1048361b83" + integrity sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g== + dependencies: + "@babel/compat-data" "^7.23.3" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.23.3" + +"@babel/plugin-transform-object-super@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz#81fdb636dcb306dd2e4e8fd80db5b2362ed2ebcd" + integrity sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" + +"@babel/plugin-transform-optional-catch-binding@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz#318066de6dacce7d92fa244ae475aa8d91778017" + integrity sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + +"@babel/plugin-transform-optional-chaining@^7.23.3", "@babel/plugin-transform-optional-chaining@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz#6acf61203bdfc4de9d4e52e64490aeb3e52bd017" + integrity sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-transform-parameters@^7.20.7", "@babel/plugin-transform-parameters@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz#83ef5d1baf4b1072fa6e54b2b0999a7b2527e2af" + integrity sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-private-methods@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz#b2d7a3c97e278bfe59137a978d53b2c2e038c0e4" + integrity sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-private-property-in-object@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz#3ec711d05d6608fd173d9b8de39872d8dbf68bf5" + integrity sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + +"@babel/plugin-transform-property-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz#54518f14ac4755d22b92162e4a852d308a560875" + integrity sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-regenerator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz#141afd4a2057298602069fce7f2dc5173e6c561c" + integrity sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + regenerator-transform "^0.15.2" + +"@babel/plugin-transform-reserved-words@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz#4130dcee12bd3dd5705c587947eb715da12efac8" + integrity sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-shorthand-properties@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz#97d82a39b0e0c24f8a981568a8ed851745f59210" + integrity sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-spread@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz#41d17aacb12bde55168403c6f2d6bdca563d362c" + integrity sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + +"@babel/plugin-transform-sticky-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz#dec45588ab4a723cb579c609b294a3d1bd22ff04" + integrity sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-template-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz#5f0f028eb14e50b5d0f76be57f90045757539d07" + integrity sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-typeof-symbol@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz#9dfab97acc87495c0c449014eb9c547d8966bca4" + integrity sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-typescript@^7.23.3": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz#aa36a94e5da8d94339ae3a4e22d40ed287feb34c" + integrity sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.23.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-typescript" "^7.23.3" + +"@babel/plugin-transform-unicode-escapes@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz#1f66d16cab01fab98d784867d24f70c1ca65b925" + integrity sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-unicode-property-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz#19e234129e5ffa7205010feec0d94c251083d7ad" + integrity sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-unicode-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz#26897708d8f42654ca4ce1b73e96140fbad879dc" + integrity sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-unicode-sets-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz#4fb6f0a719c2c5859d11f6b55a050cc987f3799e" + integrity sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/preset-env@^7.1.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.6.tgz#ad0ea799d5a3c07db5b9a172819bbd444092187a" + integrity sha512-2XPn/BqKkZCpzYhUUNZ1ssXw7DcXfKQEjv/uXZUXgaebCMYmkEsfZ2yY+vv+xtXv50WmL5SGhyB6/xsWxIvvOQ== + dependencies: + "@babel/compat-data" "^7.23.5" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-option" "^7.23.5" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.23.3" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.23.3" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.23.3" + "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-import-assertions" "^7.23.3" + "@babel/plugin-syntax-import-attributes" "^7.23.3" + "@babel/plugin-syntax-import-meta" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@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-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" + "@babel/plugin-transform-arrow-functions" "^7.23.3" + "@babel/plugin-transform-async-generator-functions" "^7.23.4" + "@babel/plugin-transform-async-to-generator" "^7.23.3" + "@babel/plugin-transform-block-scoped-functions" "^7.23.3" + "@babel/plugin-transform-block-scoping" "^7.23.4" + "@babel/plugin-transform-class-properties" "^7.23.3" + "@babel/plugin-transform-class-static-block" "^7.23.4" + "@babel/plugin-transform-classes" "^7.23.5" + "@babel/plugin-transform-computed-properties" "^7.23.3" + "@babel/plugin-transform-destructuring" "^7.23.3" + "@babel/plugin-transform-dotall-regex" "^7.23.3" + "@babel/plugin-transform-duplicate-keys" "^7.23.3" + "@babel/plugin-transform-dynamic-import" "^7.23.4" + "@babel/plugin-transform-exponentiation-operator" "^7.23.3" + "@babel/plugin-transform-export-namespace-from" "^7.23.4" + "@babel/plugin-transform-for-of" "^7.23.6" + "@babel/plugin-transform-function-name" "^7.23.3" + "@babel/plugin-transform-json-strings" "^7.23.4" + "@babel/plugin-transform-literals" "^7.23.3" + "@babel/plugin-transform-logical-assignment-operators" "^7.23.4" + "@babel/plugin-transform-member-expression-literals" "^7.23.3" + "@babel/plugin-transform-modules-amd" "^7.23.3" + "@babel/plugin-transform-modules-commonjs" "^7.23.3" + "@babel/plugin-transform-modules-systemjs" "^7.23.3" + "@babel/plugin-transform-modules-umd" "^7.23.3" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" + "@babel/plugin-transform-new-target" "^7.23.3" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.23.4" + "@babel/plugin-transform-numeric-separator" "^7.23.4" + "@babel/plugin-transform-object-rest-spread" "^7.23.4" + "@babel/plugin-transform-object-super" "^7.23.3" + "@babel/plugin-transform-optional-catch-binding" "^7.23.4" + "@babel/plugin-transform-optional-chaining" "^7.23.4" + "@babel/plugin-transform-parameters" "^7.23.3" + "@babel/plugin-transform-private-methods" "^7.23.3" + "@babel/plugin-transform-private-property-in-object" "^7.23.4" + "@babel/plugin-transform-property-literals" "^7.23.3" + "@babel/plugin-transform-regenerator" "^7.23.3" + "@babel/plugin-transform-reserved-words" "^7.23.3" + "@babel/plugin-transform-shorthand-properties" "^7.23.3" + "@babel/plugin-transform-spread" "^7.23.3" + "@babel/plugin-transform-sticky-regex" "^7.23.3" + "@babel/plugin-transform-template-literals" "^7.23.3" + "@babel/plugin-transform-typeof-symbol" "^7.23.3" + "@babel/plugin-transform-unicode-escapes" "^7.23.3" + "@babel/plugin-transform-unicode-property-regex" "^7.23.3" + "@babel/plugin-transform-unicode-regex" "^7.23.3" + "@babel/plugin-transform-unicode-sets-regex" "^7.23.3" + "@babel/preset-modules" "0.1.6-no-external-plugins" + babel-plugin-polyfill-corejs2 "^0.4.6" + babel-plugin-polyfill-corejs3 "^0.8.5" + babel-plugin-polyfill-regenerator "^0.5.3" + core-js-compat "^3.31.0" + semver "^6.3.1" + +"@babel/preset-flow@^7.0.0", "@babel/preset-flow@^7.13.13": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.23.3.tgz#8084e08b9ccec287bd077ab288b286fab96ffab1" + integrity sha512-7yn6hl8RIv+KNk6iIrGZ+D06VhVY35wLVf23Cz/mMu1zOr7u4MMP4j0nZ9tLf8+4ZFpnib8cFYgB/oYg9hfswA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-option" "^7.22.15" + "@babel/plugin-transform-flow-strip-types" "^7.23.3" + +"@babel/preset-modules@0.1.6-no-external-plugins": + version "0.1.6-no-external-plugins" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz#ccb88a2c49c817236861fee7826080573b8a923a" + integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/preset-typescript@^7.1.0", "@babel/preset-typescript@^7.13.0": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz#14534b34ed5b6d435aa05f1ae1c5e7adcc01d913" + integrity sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-option" "^7.22.15" + "@babel/plugin-syntax-jsx" "^7.23.3" + "@babel/plugin-transform-modules-commonjs" "^7.23.3" + "@babel/plugin-transform-typescript" "^7.23.3" + +"@babel/register@^7.0.0", "@babel/register@^7.13.16": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.22.15.tgz#c2c294a361d59f5fa7bcc8b97ef7319c32ecaec7" + integrity sha512-V3Q3EqoQdn65RCgTLwauZaTfd1ShhwPmbBv+1dkZV/HpCGMKVyn6oFcRlI7RaKqiDQjX2Qd3AuoEguBgdjIKlg== + dependencies: + clone-deep "^4.0.1" + find-cache-dir "^2.0.0" + make-dir "^2.1.0" + pirates "^4.0.5" + source-map-support "^0.5.16" + +"@babel/regjsgen@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" + integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== + +"@babel/runtime@^7.8.4": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.6.tgz#c05e610dc228855dc92ef1b53d07389ed8ab521d" + integrity sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ== + dependencies: + regenerator-runtime "^0.14.0" + +"@babel/template@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@babel/traverse@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.6.tgz#b53526a2367a0dd6edc423637f3d2d0f2521abc5" + integrity sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.6" + "@babel/types" "^7.23.6" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.4.4": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.6.tgz#be33fdb151e1f5a56877d704492c240fc71c7ccd" + integrity sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg== + dependencies: + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + +"@ctrl/tinycolor@^4.0.2": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@ctrl/tinycolor/-/tinycolor-4.1.0.tgz#91a8f8120ffc9da2feb2a38f7862b300d5e9691a" + integrity sha512-WyOx8cJQ+FQus4Mm4uPIZA64gbk3Wxh0so5Lcii0aJifqwoVOlfFtorjLE0Hen4OYyHZMXDWqMmaQemBhgxFRQ== "@develar/schema-utils@~2.6.5": version "2.6.5" @@ -101,17 +1142,37 @@ minimatch "^3.0.4" plist "^3.0.4" -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" +"@eslint-community/regexpp@^4.5.1": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + "@eslint-community/regexpp@^4.6.1": - version "4.10.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" - integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== + version "4.11.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" + integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== + +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" "@eslint/eslintrc@^2.1.4": version "2.1.4" @@ -128,36 +1189,65 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@8.57.1": + version "8.57.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" + integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== + +"@floating-ui/core@^1.0.0": + version "1.6.2" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.2.tgz#d37f3e0ac1f1c756c7de45db13303a266226851a" + integrity sha512-+2XpQV9LLZeanU4ZevzRnGFg2neDeKHgFLjP6YLW+tly0IvrhqT4u8enLGjLH3qeh85g19xY5rsAusfwTdn5lg== + dependencies: + "@floating-ui/utils" "^0.2.0" + +"@floating-ui/dom@^1.5.3": + version "1.6.5" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.5.tgz#323f065c003f1d3ecf0ff16d2c2c4d38979f4cb9" + integrity sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw== + dependencies: + "@floating-ui/core" "^1.0.0" + "@floating-ui/utils" "^0.2.0" + +"@floating-ui/utils@^0.2.0": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.2.tgz#d8bae93ac8b815b2bd7a98078cf91e2724ef11e5" + integrity sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw== "@fortawesome/fontawesome-free@^5.13.0", "@fortawesome/fontawesome-free@^5.15.4": version "5.15.4" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5" integrity sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg== -"@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3": - 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== - -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== dependencies: - "@humanwhocodes/object-schema" "^2.0.2" + "@humanwhocodes/object-schema" "^2.0.3" debug "^4.3.1" minimatch "^3.0.5" +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.2": +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@humanwhocodes/object-schema@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== @@ -172,6 +1262,16 @@ multiformats "^13.0.0" varint "^6.0.0" +"@ipld/car@^5.3.2": + version "5.3.2" + resolved "https://registry.yarnpkg.com/@ipld/car/-/car-5.3.2.tgz#b6f9b5e30e0de5d45aff4494e8c3e2667ce9e0a4" + integrity sha512-Bb4XrCFlnsCb9tTzZ1I8zo9O61D9qm7HfvuYrQ9gzdE8YhjyVIjrjmHmnoSWV/uCmyc2/bcqiDPIg+9WljXNzg== + dependencies: + "@ipld/dag-cbor" "^9.0.7" + cborg "^4.0.5" + multiformats "^13.0.0" + varint "^6.0.0" + "@ipld/dag-cbor@^9.0.7": version "9.2.0" resolved "https://registry.yarnpkg.com/@ipld/dag-cbor/-/dag-cbor-9.2.0.tgz#3a3f0bee02d7e1c2f15582e896843d5b00fbba9f" @@ -212,7 +1312,7 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" -"@jridgewell/gen-mapping@^0.3.5": +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.5": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== @@ -221,10 +1321,29 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.24" +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + 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/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/base64/-/base64-1.1.2.tgz#cf8ea9dcb849b81c95f14fc0aaa151c6b54d2578" + integrity sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA== "@jridgewell/set-array@^1.2.1": version "1.2.1" @@ -239,11 +1358,24 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": +"@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/sourcemap-codec@^1.4.14": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@jridgewell/trace-mapping@^0.3.17": + version "0.3.20" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" + integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" @@ -252,6 +1384,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@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" + "@jsonjoy.com/base64@^1.1.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@jsonjoy.com/base64/-/base64-1.1.2.tgz#cf8ea9dcb849b81c95f14fc0aaa151c6b54d2578" @@ -277,17 +1417,22 @@ resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz#4fc56c15c580b9adb7dc3c333a134e540b44bfb1" integrity sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw== -"@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.1.tgz#2f3a8f1d688935c704dbc89132394a41029acbb8" - integrity sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ== +"@lit-labs/ssr-dom-shim@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.0.tgz#353ce4a76c83fadec272ea5674ede767650762fd" + integrity sha512-yWJKmpGE6lUURKAaIltoPIE/wrbY3TEkqQt+X0m+7fQNnAv0keydnYvbiJFP1PnMhizmIWRWOG5KLhYyc/xl+g== -"@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0": - version "1.6.3" - resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.6.3.tgz#25b4eece2592132845d303e091bad9b04cdcfe03" - integrity sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ== +"@lit/react@^1.0.0": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@lit/react/-/react-1.0.5.tgz#9c53a8d719f91ef7edca0bdd68f5589ea579ffc1" + integrity sha512-RSHhrcuSMa4vzhqiTenzXvtQ6QDq3hSPsnHHO3jaPmmvVFeoNNm4DHoQ0zLdKAUvY3wP3tTENSUf7xpyVfrDEA== + +"@lit/reactive-element@^2.0.0", "@lit/reactive-element@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.0.4.tgz#8f2ed950a848016383894a26180ff06c56ae001b" + integrity sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ== dependencies: - "@lit-labs/ssr-dom-shim" "^1.0.0" + "@lit-labs/ssr-dom-shim" "^1.2.0" "@malept/cross-spawn-promise@^1.1.0": version "1.1.1" @@ -335,38 +1480,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@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/fs@^2.1.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-2.1.2.tgz#a9e2541a4a2fec2e69c29b35e6060973da79b865" - integrity sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ== - dependencies: - "@gar/promisify" "^1.1.3" - 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" - -"@npmcli/move-file@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-2.0.1.tgz#26f6bdc379d87f75e55739bab89db525b06100e4" - integrity sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - "@peculiar/asn1-cms@^2.3.8": version "2.3.8" resolved "https://registry.yarnpkg.com/@peculiar/asn1-cms/-/asn1-cms-2.3.8.tgz#16de1b86e5f9f79ac838f392283a4b47e6d396a5" @@ -504,6 +1617,18 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== +"@pkgr/utils@^2.4.2": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" + integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw== + dependencies: + cross-spawn "^7.0.3" + fast-glob "^3.3.0" + is-glob "^4.0.3" + open "^9.1.0" + picocolors "^1.0.0" + tslib "^2.6.0" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -557,6 +1682,30 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== +"@shoelace-style/animations@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@shoelace-style/animations/-/animations-1.1.0.tgz#17539abafd6dcbf2a79e089e1593175e9f7835b5" + integrity sha512-Be+cahtZyI2dPKRm8EZSx3YJQ+jLvEcn3xzRP7tM4tqBnvd/eW/64Xh0iOf0t2w5P8iJKfdBbpVNE9naCaOf2g== + +"@shoelace-style/localize@^3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@shoelace-style/localize/-/localize-3.1.2.tgz#2c63f16d8aa80842dbe5127845c76ed53f6a5e8e" + integrity sha512-Hf45HeO+vdQblabpyZOTxJ4ZeZsmIUYXXPmoYrrR4OJ5OKxL+bhMz5mK8JXgl7HsoEowfz7+e248UGi861de9Q== + +"@shoelace-style/shoelace@~2.15.1": + version "2.15.1" + resolved "https://registry.yarnpkg.com/@shoelace-style/shoelace/-/shoelace-2.15.1.tgz#2fa6bd8e493801f5b5b4744fab0fa108bbc01934" + integrity sha512-3ecUw8gRwOtcZQ8kWWkjk4FTfObYQ/XIl3aRhxprESoOYV1cYhloYPsmQY38UoL3+pwJiZb5+LzX0l3u3Zl0GA== + dependencies: + "@ctrl/tinycolor" "^4.0.2" + "@floating-ui/dom" "^1.5.3" + "@lit/react" "^1.0.0" + "@shoelace-style/animations" "^1.1.0" + "@shoelace-style/localize" "^3.1.2" + composed-offset-position "^0.0.4" + lit "^3.0.0" + qr-creator "^1.0.0" + "@sindresorhus/is@^4.0.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" @@ -569,16 +1718,28 @@ dependencies: defer-to-connect "^2.0.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== - "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== +"@ts-morph/bootstrap@^0.16.0": + version "0.16.0" + resolved "https://registry.yarnpkg.com/@ts-morph/bootstrap/-/bootstrap-0.16.0.tgz#c97034175a8fc2b7d3f575526d819877f7ed2d83" + integrity sha512-FYW3bK5EBeAgpHu0qZ57gHbLjzgzC81y5EJmrebzIhXSYg6OgZu5lFHpF5NJ7CwM7ZMhxX1PG+DRA8e+skopKw== + dependencies: + "@ts-morph/common" "~0.16.0" + +"@ts-morph/common@~0.16.0": + version "0.16.0" + resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.16.0.tgz#57e27d4b3fd65a4cd72cb36679ed08acb40fa3ba" + integrity sha512-SgJpzkTgZKLKqQniCjLaE3c2L2sdL7UShvmTmPBejAKd2OKV/yfMpQ2IWpAuA+VY5wy7PkSUaEObIqEK6afFuw== + dependencies: + fast-glob "^3.2.11" + minimatch "^5.1.0" + mkdirp "^1.0.4" + path-browserify "^1.0.1" + "@types/body-parser@*": version "1.19.5" resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.5.tgz#04ce9a3b677dc8bd681a17da1ab9835dc9d3ede4" @@ -691,7 +1852,12 @@ dependencies: "@types/node" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/js-levenshtein@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@types/js-levenshtein/-/js-levenshtein-1.1.3.tgz#a6fd0bdc8255b274e5438e0bfb25f154492d1106" + integrity sha512-jd+Q+sD20Qfu9e2aEXogiO3vpOC1PYJOUdyN9gvs4Qrvkg4wF43L5OhqrPeokdv8TL0/mXoYfpkcoGZMNN2pkQ== + +"@types/json-schema@*", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -704,14 +1870,9 @@ "@types/node" "*" "@types/mime@^1": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" - integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== - -"@types/minimist@^1.2.0": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e" - integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== + version "1.3.2" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== "@types/ms@*": version "0.7.34" @@ -732,11 +1893,6 @@ dependencies: undici-types "~5.26.4" -"@types/normalize-package-data@^2.4.0": - version "2.4.4" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" - integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA== - "@types/pako@^1.0.7": version "1.0.7" resolved "https://registry.yarnpkg.com/@types/pako/-/pako-1.0.7.tgz#aa0e4af9855d81153a29ff84cc44cce25298eda9" @@ -772,10 +1928,10 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== -"@types/semver@^7.3.6": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== +"@types/semver@^7.5.0": + version "7.5.6" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" + integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== "@types/send@*": version "0.17.4" @@ -808,6 +1964,11 @@ dependencies: "@types/node" "*" +"@types/source-list-map@*": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.6.tgz#164e169dd061795b50b83c19e4d3be09f8d3a454" + integrity sha512-5JcVt1u5HDmlXkwOD2nslZVllBBc7HDuOICfiZah2Z0is8M8g+ddAEawbmd3VjedfDHBzxCaXLs07QEmb7y54g== + "@types/stream-buffers@^3.0.7": version "3.0.7" resolved "https://registry.yarnpkg.com/@types/stream-buffers/-/stream-buffers-3.0.7.tgz#0b719fa1bd2ca2cc0908205a440e5e569e1aa21e" @@ -815,16 +1976,58 @@ dependencies: "@types/node" "*" +"@types/tapable@^1": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.12.tgz#bc2cab12e87978eee89fb21576b670350d6d86ab" + integrity sha512-bTHG8fcxEqv1M9+TD14P8ok8hjxoOCkfKc8XXLaaD05kI7ohpeI956jtDOD3XHKBQrlyPughUtzm1jtVhHpA5Q== + "@types/trusted-types@^2.0.2": version "2.0.7" resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11" integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw== +"@types/uglify-js@*": + version "3.17.5" + resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.17.5.tgz#905ce03a3cbbf2e31cbefcbc68d15497ee2e17df" + integrity sha512-TU+fZFBTBcXj/GpDpDaBmgWk/gn96kMZ+uocaFUlV2f8a6WdMzzI44QBCmGcCiYR0Y6ZlNRiyUyKKt5nl/lbzQ== + dependencies: + source-map "^0.6.1" + "@types/verror@^1.10.3": version "1.10.10" resolved "https://registry.yarnpkg.com/@types/verror/-/verror-1.10.10.tgz#d5a4b56abac169bfbc8b23d291363a682e6fa087" integrity sha512-l4MM0Jppn18hb9xmM6wwD1uTdShpf9Pn80aXTStnK1C94gtPvJcV2FrDmbOQUAQfJ1cKZHktkQUDwEqaAKXMMg== +"@types/webpack-sources@*": + version "3.2.3" + resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-3.2.3.tgz#b667bd13e9fa15a9c26603dce502c7985418c3d8" + integrity sha512-4nZOdMwSPHZ4pTEZzSp0AsTM4K7Qmu40UKW4tJDiOVs20UzYF9l+qUe4s0ftfN0pin06n+5cWWDJXH+sbhAiDw== + dependencies: + "@types/node" "*" + "@types/source-list-map" "*" + source-map "^0.7.3" + +"@types/webpack-sources@^0.1.5": + version "0.1.12" + resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.12.tgz#9beb82c5dc5483c0fb947da1723f4044b07f6204" + integrity sha512-+vRVqE3LzMLLVPgZHUeI8k1YmvgEky+MOir5fQhKvFxpB8uZ0CFnGqxkRAmf8jvNhUBQzhuGZpIMNWZDeEyDIA== + dependencies: + "@types/node" "*" + "@types/source-list-map" "*" + source-map "^0.6.1" + +"@types/webpack@^4.39.8": + version "4.41.38" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.38.tgz#5a40ac81bdd052bf405e8bdcf3e1236f6db6dc26" + integrity sha512-oOW7E931XJU1mVfCnxCVgv8GLFL768pDO5u2Gzk82i8yTIgX6i7cntyZOkZYb/JtYM8252SN9bQp9tgkVDSsRw== + dependencies: + "@types/node" "*" + "@types/tapable" "^1" + "@types/uglify-js" "*" + "@types/webpack-sources" "*" + anymatch "^3.0.0" + source-map "^0.6.0" + "@types/ws@^8.5.10": version "8.5.10" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787" @@ -839,6 +2042,91 @@ dependencies: "@types/node" "*" +"@typescript-eslint/eslint-plugin@^6.15.0": + version "6.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.15.0.tgz#b0b3e15fa8c3e67ed4386b765cc0ba98ad3a303b" + integrity sha512-j5qoikQqPccq9QoBAupOP+CBu8BaJ8BLjaXSioDISeTZkVO3ig7oSIKh3H+rEpee7xCXtWwSB4KIL5l6hWZzpg== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.15.0" + "@typescript-eslint/type-utils" "6.15.0" + "@typescript-eslint/utils" "6.15.0" + "@typescript-eslint/visitor-keys" "6.15.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/parser@^6.15.0": + version "6.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.15.0.tgz#1af69741cfa314a13c1434d0bdd5a0c3096699d7" + integrity sha512-MkgKNnsjC6QwcMdlNAel24jjkEO/0hQaMDLqP4S9zq5HBAUJNQB6y+3DwLjX7b3l2b37eNAxMPLwb3/kh8VKdA== + dependencies: + "@typescript-eslint/scope-manager" "6.15.0" + "@typescript-eslint/types" "6.15.0" + "@typescript-eslint/typescript-estree" "6.15.0" + "@typescript-eslint/visitor-keys" "6.15.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@6.15.0": + version "6.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.15.0.tgz#40e5214a3e9e048aca55ce33381bc61b6b51c32a" + integrity sha512-+BdvxYBltqrmgCNu4Li+fGDIkW9n//NrruzG9X1vBzaNK+ExVXPoGB71kneaVw/Jp+4rH/vaMAGC6JfMbHstVg== + dependencies: + "@typescript-eslint/types" "6.15.0" + "@typescript-eslint/visitor-keys" "6.15.0" + +"@typescript-eslint/type-utils@6.15.0": + version "6.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.15.0.tgz#c22261bd00566821a300d08f4632533a8f9bed01" + integrity sha512-CnmHKTfX6450Bo49hPg2OkIm/D/TVYV7jO1MCfPYGwf6x3GO0VU8YMO5AYMn+u3X05lRRxA4fWCz87GFQV6yVQ== + dependencies: + "@typescript-eslint/typescript-estree" "6.15.0" + "@typescript-eslint/utils" "6.15.0" + debug "^4.3.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/types@6.15.0": + version "6.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.15.0.tgz#a9f7b006aee52b0948be6e03f521814bf435ddd5" + integrity sha512-yXjbt//E4T/ee8Ia1b5mGlbNj9fB9lJP4jqLbZualwpP2BCQ5is6BcWwxpIsY4XKAhmdv3hrW92GdtJbatC6dQ== + +"@typescript-eslint/typescript-estree@6.15.0": + version "6.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.15.0.tgz#2f8a513df1ce5e6e1ba8e5c6aa52f392ae023fc5" + integrity sha512-7mVZJN7Hd15OmGuWrp2T9UvqR2Ecg+1j/Bp1jXUEY2GZKV6FXlOIoqVDmLpBiEiq3katvj/2n2mR0SDwtloCew== + dependencies: + "@typescript-eslint/types" "6.15.0" + "@typescript-eslint/visitor-keys" "6.15.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.15.0": + version "6.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.15.0.tgz#f80dbb79f3b0f569077a8711dd44186a8933fa4c" + integrity sha512-eF82p0Wrrlt8fQSRL0bGXzK5nWPRV2dYQZdajcfzOD9+cQz9O7ugifrJxclB+xVOvWvagXfqS4Es7vpLP4augw== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.15.0" + "@typescript-eslint/types" "6.15.0" + "@typescript-eslint/typescript-estree" "6.15.0" + semver "^7.5.4" + +"@typescript-eslint/visitor-keys@6.15.0": + version "6.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.15.0.tgz#5baf97a7bfeec6f4894d400437055155a46b2330" + integrity sha512-1zvtdC1a9h5Tb5jU9x3ADNXO9yjP8rXlaoChu0DQX40vf5ACVpYIVIZhIMZ6d5sDXH7vq4dsZBT1fEGj8D2n2w== + dependencies: + "@typescript-eslint/types" "6.15.0" + eslint-visitor-keys "^3.4.1" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -980,30 +2268,31 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== -"@webrecorder/awp-sw@^0.4.4": - version "0.4.4" - resolved "https://registry.yarnpkg.com/@webrecorder/awp-sw/-/awp-sw-0.4.4.tgz#6b9c5fd86868442d81732e8176b686d21a71f675" - integrity sha512-H+ISFpLBGbSYyZGvF/esKh6AGLIUhNJjg7ixPEU+zN54xtOh+m4u9hc2BbXlRR4yUovdwzze0vBGGjWR7KGs9w== +"@webrecorder/awp-sw@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@webrecorder/awp-sw/-/awp-sw-0.5.0.tgz#0e5d4979d9a3f48057ca6cc275a5a22641a50972" + integrity sha512-3sz9uBP4Ayvko1KHjzC40edZPdYSV5N8WUe6qfqnfdjzgV4jJ7D/kSax4N0CbD537rDNrxfXHKEt9+xSl6QfTQ== dependencies: - "@ipld/car" "^5.3.1" + "@ipld/car" "^5.3.2" "@ipld/unixfs" "^3.0.0" - "@webrecorder/wabac" "^2.18.1" + "@webrecorder/wabac" "^2.20.0" auto-js-ipfs "^2.3.0" client-zip "^2.3.0" hash-wasm "^4.9.0" idb "^7.1.1" - p-queue "^7.3.4" + p-queue "^8.0.1" uuid "^9.0.0" - warcio "^2.2.1" + warcio "^2.3.1" -"@webrecorder/wabac@^2.17.3", "@webrecorder/wabac@^2.18.1", "@webrecorder/wabac@^2.19.9": - version "2.19.9" - resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.19.9.tgz#21d357077bc2a85419e7a6002c81a4bc4fec2514" - integrity sha512-lyvbKVrdUZMUGxwKg5ZFQnyjGUSqZSGOF3NFG9rXLA+Ni0YcQjZCMexGSmqCwY+BksyrVJISCMs3xQ2WQAekgw== +"@webrecorder/wabac@^2.20.0": + version "2.20.0" + resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.20.0.tgz#d9f87a909a0c09e460cf8b86082a71c176e0c9f8" + integrity sha512-zeR+CmAfJO2MQSKwRwcccy7+TfeKTX0A1yeHlO98mtsT3VMtTqrdasIDEjIxe39aEbBl11k+m8DQyrz3CctJNQ== dependencies: "@peculiar/asn1-ecc" "^2.3.4" "@peculiar/asn1-schema" "^2.3.3" "@peculiar/x509" "^1.9.2" + "@types/js-levenshtein" "^1.1.3" "@webrecorder/wombat" "^3.8.2" acorn "^8.10.0" auto-js-ipfs "^2.1.1" @@ -1023,7 +2312,7 @@ path-parser "^6.1.0" process "^0.11.10" stream-browserify "^3.0.0" - warcio "^2.3.0" + warcio "^2.3.1" "@webrecorder/wombat@^3.8.2": version "3.8.2" @@ -1047,12 +2336,15 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -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.4: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" -accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: +accepts@~1.3.5, 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== @@ -1065,43 +2357,48 @@ acorn-import-assertions@^1.9.0: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== -acorn-jsx@^5.3.2: +acorn-jsx@^5.3.1, acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.10.0, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: +acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +acorn@^8.10.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +acorn@^8.7.1: + version "8.8.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" + integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + +acorn@^8.8.2: version "8.11.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== +acorn@^8.9.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.13.0.tgz#2a30d670818ad16ddd6a35d3842dacec9e5d7ca3" + integrity sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w== + actor@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/actor/-/actor-2.3.1.tgz#80ce158bb41338a0c38863bddf0947c1850b6e20" integrity sha512-ST/3wnvcP2tKDXnum7nLCLXm+/rsf8vPocXH2Fre6D8FQwNkGDd4JEitBlXj007VQJfiGYRQvXqwOBZVi+JtRg== -agent-base@6, agent-base@^6.0.2: +agent-base@6: 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, agentkeepalive@^4.2.1: - version "4.5.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" - integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== - dependencies: - 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" - ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -1109,7 +2406,7 @@ ajv-formats@^2.1.1: dependencies: ajv "^8.0.0" -ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== @@ -1121,7 +2418,7 @@ ajv-keywords@^5.1.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.10.0, ajv@^6.12.0, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.0, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1141,7 +2438,7 @@ ajv@^8.0.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" -ajv@^8.9.0: +ajv@^8.0.1, ajv@^8.9.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -1151,11 +2448,26 @@ ajv@^8.9.0: require-from-string "^2.0.2" uri-js "^4.2.2" +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + ansi-html-community@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== +ansi-regex@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" + integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== + ansi-regex@^5.0.0, ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -1166,7 +2478,7 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-styles@^3.2.1: +ansi-styles@^3.2.0, 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== @@ -1185,7 +2497,7 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== -anymatch@~3.1.2: +anymatch@^3.0.0, 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== @@ -1231,24 +2543,33 @@ app-builder-lib@24.13.3: tar "^6.1.12" temp-file "^3.4.0" -"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@^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== +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: - delegates "^1.0.0" - readable-stream "^3.6.0" + sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -1259,10 +2580,10 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== asn1js@^3.0.5: version "3.0.5" @@ -1278,6 +2599,23 @@ assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== + +ast-types@0.11.7: + version "0.11.7" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.7.tgz#f318bf44e339db6a320be0009ded64ec1471f46c" + integrity sha512-2mP3TwtkY/aTv5X3ZsMpNAbOnyoC/aMJwJSoaELPkHId0nSQgFcnU4dRW3isxiz7+zBexk0ym3WNVjMiQBnJSw== + +ast-types@0.14.2: + version "0.14.2" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" + integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA== + dependencies: + tslib "^2.0.1" + astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -1288,11 +2626,6 @@ async-exit-hook@^2.0.1: resolved "https://registry.yarnpkg.com/async-exit-hook/-/async-exit-hook-2.0.1.tgz#8bd8b024b0ec9b1c01cccb9af9db29bd717dfaf3" integrity sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw== -async-foreach@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" - integrity sha512-VUeSMD8nEGBWaZK4lizI1sf3yEC7pnAQ/mrI7pC2fBz2s/tq5jWWEngTwaf0Gruu/OoXRGLGg1XFqpYBiGTYJA== - async@^3.2.3: version "3.2.5" resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" @@ -1308,11 +2641,50 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -auto-js-ipfs@^2.1.1, auto-js-ipfs@^2.3.0: +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +auto-js-ipfs@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/auto-js-ipfs/-/auto-js-ipfs-2.1.1.tgz#a4276e4ea1bde9426fc24555ee4523d3feed5c95" + integrity sha512-apr18WgwDAtxR46PmOGNtkj40IWQOYL3m1c8o0tq2xn0Hulj7B9nDPQQ9yQ+NwJdIUiFJGaCMDlUQd+BOiS/pQ== + +auto-js-ipfs@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/auto-js-ipfs/-/auto-js-ipfs-2.3.0.tgz#2c2684074cdaa2eb579345c4f86420d7635956c8" integrity sha512-gUg2+lJqcbBUDgimlOVqWWBVl/8Avs9JMIjEpIk4liho+5hFGrCXvj1ydj5GGxpOXUGkR0H9eVxTXwu+xvQgIg== +babel-core@^7.0.0-bridge.0: + version "7.0.0-bridge.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" + integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== + +babel-plugin-polyfill-corejs2@^0.4.6: + version "0.4.7" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.7.tgz#679d1b94bf3360f7682e11f2cb2708828a24fe8c" + integrity sha512-LidDk/tEGDfuHW2DWh/Hgo4rmnw3cduK6ZkOI1NPFceSK3n/yAGeOsNT7FLnSGHkXj3RHGSEVkN3FsCTY6w2CQ== + dependencies: + "@babel/compat-data" "^7.22.6" + "@babel/helper-define-polyfill-provider" "^0.4.4" + semver "^6.3.1" + +babel-plugin-polyfill-corejs3@^0.8.5: + version "0.8.7" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.7.tgz#941855aa7fdaac06ed24c730a93450d2b2b76d04" + integrity sha512-KyDvZYxAzkC0Aj2dAPyDzi2Ym15e5JKZSK+maI7NAwSqofvuFglbSsxE7wUOvTg9oFVnHMzVzBKcqEb4PJgtOA== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.4.4" + core-js-compat "^3.33.1" + +babel-plugin-polyfill-regenerator@^0.5.3: + version "0.5.4" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.4.tgz#c6fc8eab610d3a11eb475391e52584bacfc020f4" + integrity sha512-S/x2iOCvDaCASLYsOOgWOq4bCfKYVqvO/uxjkaYyZ3rVsVE3CeAI/c84NpyuBBymEgNvHgjEot3a9/Z/kXvqsg== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.4.4" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1330,11 +2702,29 @@ base64-js@^1.1.2, base64-js@^1.3.1, base64-js@^1.5.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + batch@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== +big-integer@^1.6.44: + version "1.6.52" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" + integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg== + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -1388,6 +2778,13 @@ boolean@^3.0.1: resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.1.4.tgz#f51a2fb5838a99e06f9b6ec1edb674de67026435" integrity sha512-3hx0kwU3uzG6ReQ3pnaFQPSktpBw6RHN3/ivDKEuU8g1XSfafowyvDnadjv1xp8IZqhtSukxlwv9bF6FhX8m0w== +bplist-parser@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" + integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== + dependencies: + big-integer "^1.6.44" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1403,13 +2800,36 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.3, braces@~3.0.2: +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@^3.0.2, braces@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: fill-range "^7.1.1" +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" + brotli@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/brotli/-/brotli-1.3.3.tgz#7365d8cc00f12cf765d2b2c898716bcf4b604d48" @@ -1427,6 +2847,16 @@ browserslist@^4.21.10: node-releases "^2.0.14" update-browserslist-db "^1.0.13" +browserslist@^4.22.2: + version "4.22.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b" + integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== + dependencies: + caniuse-lite "^1.0.30001565" + electron-to-chromium "^1.4.601" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + browsertrix-behaviors@^0.6.4: version "0.6.4" resolved "https://registry.yarnpkg.com/browsertrix-behaviors/-/browsertrix-behaviors-0.6.4.tgz#33fe9a433108f2faac3a03af91aff940433e5b87" @@ -1470,14 +2900,6 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -builder-util-runtime@9.1.1: - version "9.1.1" - resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.1.1.tgz#2da7b34e78a64ad14ccd070d6eed4662d893bd60" - integrity sha512-azRhYLEoDvRDR8Dhis4JatELC/jUvYjm4cVSj7n9dauGTOM2eeNn9KS0z6YA6oDsjI1xphjNbY6PZZeHPzzqaw== - dependencies: - debug "^4.3.4" - sax "^1.2.4" - builder-util-runtime@9.2.4: version "9.2.4" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.2.4.tgz#13cd1763da621e53458739a1e63f7fcba673c42a" @@ -1486,6 +2908,14 @@ builder-util-runtime@9.2.4: debug "^4.3.4" sax "^1.2.4" +builder-util-runtime@9.2.5: + version "9.2.5" + resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.2.5.tgz#0afdffa0adb5c84c14926c7dd2cf3c6e96e9be83" + integrity sha512-HjIDfhvqx/8B3TDN4GbABQcgpewTU4LMRTQPkVpKYV3lsuxEJoIfvg09GyWTNmfVNSUAYf+fbTN//JX4TH20pg== + dependencies: + debug "^4.3.4" + sax "^1.2.4" + builder-util@24.13.1: version "24.13.1" resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.13.1.tgz#4a4c4f9466b016b85c6990a0ea15aa14edec6816" @@ -1513,6 +2943,13 @@ bulma@^0.9.3: resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.9.4.tgz#0ca8aeb1847a34264768dba26a064c8be72674a1" integrity sha512-86FlT5+1GrsgKbPLRRY7cGDg8fsJiP/jzTqXXVqiUZZ2aZT8uemEOHlU1CDU+TxklPEZ11HZNNWclRBBecP4CQ== +bundle-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" + integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== + dependencies: + run-applescript "^5.0.0" + bundle-name@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" @@ -1530,53 +2967,20 @@ bytes@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" - -cacache@^16.1.0: - version "16.1.3" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-16.1.3.tgz#a02b9f34ecfaf9a78c9f4bc16fceb94d5d67a38e" - integrity sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ== +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== dependencies: - "@npmcli/fs" "^2.1.0" - "@npmcli/move-file" "^2.0.0" - chownr "^2.0.0" - fs-minipass "^2.1.0" - glob "^8.0.1" - infer-owner "^1.0.4" - lru-cache "^7.7.1" - minipass "^3.1.6" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - mkdirp "^1.0.4" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^9.0.0" - tar "^6.1.11" - unique-filename "^2.0.0" + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" cacheable-lookup@^5.0.3: version "5.0.4" @@ -1612,20 +3016,16 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase-keys@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" - integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== - dependencies: - camelcase "^5.3.1" - map-obj "^4.0.0" - quick-lru "^4.0.1" - -camelcase@^5.3.1: +camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +caniuse-lite@^1.0.30001565: + version "1.0.30001570" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001570.tgz#b4e5c1fa786f733ab78fc70f592df6b3f23244ca" + integrity sha512-+3e0ASu4sw1SWaoCtvPeyXp+5PsjigkSt8OXZbF9StH5pQWbxEjLAZE3n8Aup5udop1uRiKA7a4utUk/uoSpUw== + caniuse-lite@^1.0.30001587: version "1.0.30001627" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001627.tgz#8071c42d468e06ed2fb2c545efe79a663fd326ab" @@ -1645,7 +3045,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.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== @@ -1653,7 +3053,7 @@ chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -chokidar@^3.6.0: +"chokidar@>=3.0.0 <4.0.0", chokidar@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== @@ -1688,10 +3088,22 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== -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== +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== + dependencies: + restore-cursor "^2.0.0" cli-truncate@^2.1.0: version "2.1.0" @@ -1701,19 +3113,24 @@ cli-truncate@^2.1.0: slice-ansi "^3.0.0" string-width "^4.2.0" -client-zip@^2.2.2, client-zip@^2.3.0: - version "2.4.5" - resolved "https://registry.yarnpkg.com/client-zip/-/client-zip-2.4.5.tgz#c9b6190abca57b8b4d6dcfd21c3a1f4d4ab3bc68" - integrity sha512-4y4d5ZeTH/szIAMQeC8ju67pxtvj+3u20wMGwOFrZk+pegy3aSEA2JkwgC8XVDTXP/Iqn1gyqNQXmkyBp4KLEQ== +client-zip@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/client-zip/-/client-zip-2.2.2.tgz#58dcc66f2534954a50b506d2bd864b51ba98370d" + integrity sha512-Jh1Sz/iBTfYuLQv6yKzrrXofJy17Q7YRhBfh5HH/6i4Z+ACjTfmRJllWQKoe4eFWwXeUoOjEathqXfuGGX4jhg== -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== +client-zip@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/client-zip/-/client-zip-2.3.0.tgz#c7ae74bc277e466e27134ebcdce4aaade4c3ecd5" + integrity sha512-5hJpXzaNx7SEy35QqtdgNh9T3/w2Rjup7n31If5DO+kSgXsTPANmdwO5gRBgAbBn16GVDaGRc7vS2kUMazyXOw== + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" + wrap-ansi "^6.2.0" cliui@^8.0.1: version "8.0.1" @@ -1740,6 +3157,14 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -1764,15 +3189,20 @@ color-name@~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.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== +colorette@^2.0.10: + version "2.0.19" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" + integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== -colorette@^2.0.10, colorette@^2.0.14: - version "2.0.20" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" - integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== +colorette@^2.0.14: + version "2.0.16" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" + integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== + +colors@^1.1.2, colors@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== combined-stream@^1.0.8: version "1.0.8" @@ -1796,11 +3226,26 @@ commander@^5.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== + compare-version@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/compare-version/-/compare-version-0.1.2.tgz#0162ec2d9351f5ddd59a9202cba935366a725080" integrity sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A== +component-emitter@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.1.tgz#ef1d5796f7d93f135ee6fb684340b26403c97d17" + integrity sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ== + +composed-offset-position@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/composed-offset-position/-/composed-offset-position-0.0.4.tgz#ca8854abf15e3c235ecf4df125a27fe88af76ea4" + integrity sha512-vMlvu1RuNegVE0YsCDSV/X4X10j56mq7PCIyOKK74FxkXzGLwhOUmdkJLSdOBOMwWycobGUMgft2lp+YgTe8hw== + compressible@~2.0.16: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" @@ -1839,11 +3284,6 @@ connect-history-api-fallback@^2.0.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== -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" @@ -1856,6 +3296,11 @@ content-type@~1.0.4, content-type@~1.0.5: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== +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" @@ -1866,6 +3311,11 @@ cookie@0.6.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== + copy-webpack-plugin@^9.0.1: version "9.1.0" resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-9.1.0.tgz#2d2c460c4c4695ec0a58afb2801a1205256c4e6b" @@ -1878,6 +3328,13 @@ copy-webpack-plugin@^9.0.1: schema-utils "^3.1.1" serialize-javascript "^6.0.0" +core-js-compat@^3.31.0, core-js-compat@^3.33.1: + version "3.34.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.34.0.tgz#61a4931a13c52f8f08d924522bba65f8c94a5f17" + integrity sha512-4ZIyeNbW/Cn1wkMMDy+mvrRUxrwFNjKwbhCfQpDd+eLgYipDqp8oGFGtLmhh18EDPKA0g3VUBYOxQGGwvWLVpA== + dependencies: + browserslist "^4.22.2" + core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1895,6 +3352,15 @@ crc@^3.8.0: dependencies: buffer "^5.1.0" +create-jest-runner@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/create-jest-runner/-/create-jest-runner-0.5.3.tgz#1387e2ce70b08e4c989ae55f677005b64f9ba97b" + integrity sha512-a9VY2doMBmzRollJB3Ft3/Y5fBceSWJ4gdyVsg4/d7nP1S4715VG939s2VnITDj79YBmRgKhjGjNRv1c+Kre1g== + dependencies: + chalk "^2.4.2" + jest-worker "^24.0.0" + throat "^4.1.0" + cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -1935,33 +3401,37 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== -debug@2.6.9: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: 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.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: version "4.3.5" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== dependencies: ms "2.1.2" -decamelize-keys@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" - integrity sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg== +debug@^4.0.1, 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: - decamelize "^1.1.0" - map-obj "^1.0.0" + ms "2.1.2" -decamelize@^1.1.0, decamelize@^1.2.0: +decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= +decode-uri-component@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== + decompress-response@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" @@ -1974,11 +3444,29 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +default-browser-id@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" + integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== + dependencies: + bplist-parser "^0.2.0" + untildify "^4.0.0" + default-browser-id@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26" integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA== +default-browser@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" + integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== + dependencies: + bundle-name "^3.0.0" + default-browser-id "^3.0.0" + execa "^7.1.1" + titleize "^3.0.0" + default-browser@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf" @@ -2022,15 +3510,32 @@ define-properties@^1.2.1: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -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== + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= depd@2.0.0: version "2.0.0" @@ -2179,35 +3684,44 @@ electron-publish@24.13.1: lazy-val "^1.0.5" mime "^2.5.2" +electron-to-chromium@^1.4.601: + version "1.4.615" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.615.tgz#b1c41839962d2e4e63dca05519da9040e34848c2" + integrity sha512-/bKPPcgZVUziECqDc+0HkT87+0zhaWSZHNXqF8FLd2lQcptpmUFwoCSWjCdOng9Gdq+afKArPdEg/0ZW461Eng== + electron-to-chromium@^1.4.668: version "1.4.788" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.788.tgz#a3545959d5cfa0a266d3e551386c040be34e7e06" integrity sha512-ubp5+Ev/VV8KuRoWnfP2QF2Bg+O2ZFdb49DiiNbz2VmgkIqrnyYaqIOqj8A6K/3p1xV0QcU5hBQ1+BmB6ot1OA== -electron-updater@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-5.3.0.tgz#3ba0d20407911a2edc5a68bee45c5aa2023e9ff8" - integrity sha512-iKEr7yQBcvnQUPnSDYGSWC9t0eF2YbZWeYYYZzYxdl+HiRejXFENjYMnYjoOm2zxyD6Cr2JTHZhp9pqxiXuCOw== +electron-updater@^6.3.2: + version "6.3.4" + resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-6.3.4.tgz#3934bc89875bb524c2cbbd11041114e97c0c2496" + integrity sha512-uZUo7p1Y53G4tl6Cgw07X1yF8Jlz6zhaL7CQJDZ1fVVkOaBfE2cWtx80avwDVi8jHp+I/FWawrMgTAeCCNIfAg== dependencies: - "@types/semver" "^7.3.6" - builder-util-runtime "9.1.1" - fs-extra "^10.0.0" + builder-util-runtime "9.2.5" + fs-extra "^10.1.0" js-yaml "^4.1.0" lazy-val "^1.0.5" lodash.escaperegexp "^4.1.2" lodash.isequal "^4.5.0" - semver "^7.3.5" - typed-emitter "^2.1.0" + semver "^7.6.3" + tiny-typed-emitter "^2.1.0" -electron@^30.0.9: - version "30.0.9" - resolved "https://registry.yarnpkg.com/electron/-/electron-30.0.9.tgz#b11400e4642a4b635e79244ba365f1d401ee60b5" - integrity sha512-ArxgdGHVu3o5uaP+Tqj8cJDvU03R6vrGrOqiMs7JXLnvQHMqXJIIxmFKQAIdJW8VoT3ac3hD21tA7cPO10RLow== +electron@^32.2.0: + version "32.2.0" + resolved "https://registry.yarnpkg.com/electron/-/electron-32.2.0.tgz#40b17864be5f88c89f71045ac6f61b5d4a9c1919" + integrity sha512-Xy82QBQrEiQysoxsv6lnhHAcWNNe6vV6QqH3OPFXhEj/T9oAsBHEhZuuYHINSSsUE7zRSj+J9sNwJYOjisT0Vw== dependencies: "@electron/get" "^2.0.0" "@types/node" "^20.9.0" extract-zip "^2.0.1" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -2226,14 +3740,7 @@ emojis-list@^3.0.0: 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, encoding@^0.1.13: - 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" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= end-of-stream@^1.1.0: version "1.4.4" @@ -2242,6 +3749,14 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enhanced-resolve@^5.0.0, enhanced-resolve@^5.7.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enhanced-resolve@^5.16.0: version "5.16.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz#e8bc63d51b826d6f1cbc0a150ecb5a8b0c62e567" @@ -2250,6 +3765,14 @@ enhanced-resolve@^5.16.0: graceful-fs "^4.2.4" tapable "^2.2.0" +enquirer@^2.3.5: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + entities@^4.3.0, entities@^4.4.0: version "4.5.0" resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" @@ -2270,13 +3793,6 @@ err-code@^2.0.2: 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" - es-define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" @@ -2304,11 +3820,6 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2329,7 +3840,37 @@ escape-string-regexp@^5.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== -eslint-scope@5.1.1: +eslint-config-prettier@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== + +eslint-plugin-lit@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-lit/-/eslint-plugin-lit-1.11.0.tgz#32fc1c58b476e5b9aa1c7b6ba9de295641bd4e9b" + integrity sha512-jVqy2juQTAtOzj1ILf+ZW5GpDobXlSw0kvpP2zu2r8ZbW7KISt7ikj1Gw9DhNeirEU1UlSJR0VIWpdr4lzjayw== + dependencies: + parse5 "^6.0.1" + parse5-htmlparser2-tree-adapter "^6.0.1" + requireindex "^1.2.0" + +eslint-plugin-prettier@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.0.tgz#f14bb2b18756ad54f1ad3dc4c989cb73dfa326a3" + integrity sha512-hQc+2zbnMeXcIkg+pKZtVa+3Yqx4WY7SMkn1PLZ4VbBEU7jJIpVn9347P8BBhTbz6ne85aXvQf30kvexcqBeWw== + dependencies: + prettier-linter-helpers "^1.0.0" + synckit "^0.8.5" + +eslint-plugin-wc@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-wc/-/eslint-plugin-wc-2.0.4.tgz#1945abc2ccf484c633d0f1624294ffe91fb78314" + integrity sha512-ORu7MBv0hXIvq894EJad70m+AvHGbmrDdKT6lcgtCVVhEbuIAyxg0ilfqqqHOmsh8PfcUBeEae3y7CElKvm1KQ== + dependencies: + is-valid-element-name "^1.0.0" + js-levenshtein-esm "^1.2.0" + +eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -2345,21 +3886,89 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: +eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== +eslint@^7.14.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + eslint@^8.28.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== + version "8.57.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" + integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint/js" "8.57.1" + "@humanwhocodes/config-array" "^0.13.0" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" @@ -2394,6 +4003,15 @@ eslint@^8.28.0: strip-ansi "^6.0.1" text-table "^0.2.0" +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -2403,13 +4021,25 @@ espree@^9.6.0, espree@^9.6.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" -esquery@^1.4.2: +esprima@^4.0.0, 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== + +esquery@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" +esquery@^1.4.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -2467,6 +4097,34 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +execa@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" + integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.1" + human-signals "^4.3.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + express@^4.17.3: version "4.19.2" resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" @@ -2504,6 +4162,35 @@ express@^4.17.3: utils-merge "1.0.1" vary "~1.1.2" +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + extract-zip@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" @@ -2525,7 +4212,12 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.2.7, fast-glob@^3.2.9: +fast-diff@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + +fast-glob@^3.2.11, fast-glob@^3.2.9, fast-glob@^3.3.0: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -2536,6 +4228,17 @@ fast-glob@^3.2.7, fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -2597,6 +4300,13 @@ fetch-ndjson@^1.1.6: resolved "https://registry.yarnpkg.com/fetch-ndjson/-/fetch-ndjson-1.1.7.tgz#492ccb660c774acd3607895957773d69e13e9185" integrity sha512-z8E5OWEple6dP+bZTLwYeeXfYD1Fuzc7wOHGnqW7tUCdo8TrJ6Amd6NgSvNSMSthq/AGcb+FAi0edAhPYvVwRQ== +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -2611,7 +4321,17 @@ filelist@^1.0.4: dependencies: minimatch "^5.0.1" -fill-range@^7.1.1: +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1, fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== @@ -2631,6 +4351,22 @@ finalhandler@1.2.0: statuses "2.0.1" unpipe "~1.0.0" +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.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" @@ -2667,15 +4403,25 @@ flatted@^3.2.9: integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== flexsearch@^0.7.31: - version "0.7.31" - resolved "https://registry.yarnpkg.com/flexsearch/-/flexsearch-0.7.31.tgz#065d4110b95083110b9b6c762a71a77cc52e4702" - integrity sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA== + version "0.7.43" + resolved "https://registry.yarnpkg.com/flexsearch/-/flexsearch-0.7.43.tgz#34f89b36278a466ce379c5bf6fb341965ed3f16c" + integrity sha512-c5o/+Um8aqCSOXGcZoqZOm+NqtVwNsvVpWv6lfmSclU954O3wvQKxxK8zj74fPaSJbXpSLTs4PRhh+wnoCXnKg== + +flow-parser@0.*: + version "0.225.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.225.0.tgz#ec5e6bc6bbc779f54ab6ada91e0ba3948eba3ed8" + integrity sha512-wTr10/1z9wBuaNf+RGdGwD5FOI6TsNcWrMDhE+JBc2vEKe1e4SZuO5zVZCBq9SrFqPyWy0wFO9+hTH4zuPDbMA== follow-redirects@^1.0.0: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== + foreground-child@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" @@ -2705,6 +4451,13 @@ forwarded@0.2.0: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== + dependencies: + map-cache "^0.2.2" + fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" @@ -2738,7 +4491,7 @@ fs-extra@^9.0.0, fs-extra@^9.0.1: jsonfile "^6.0.1" universalify "^2.0.0" -fs-minipass@^2.0.0, fs-minipass@^2.1.0: +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== @@ -2760,33 +4513,22 @@ function-bind@^1.1.2: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== -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" - -gaze@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" - integrity sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g== - dependencies: - globule "^1.0.0" +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== generate-json-webpack-plugin@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-json-webpack-plugin/-/generate-json-webpack-plugin-2.0.0.tgz#cf1fb394da2c8dd8d3c15bf25ba31badba0a5adb" integrity sha512-WVEHXiES7YwjLAjWquC5+IspZM4Pwtx1yHlHTBXHkp38HVjnHJo29PxLniWPSyiB539iDgeAcMNUBStrixx3Jw== -get-caller-file@^2.0.5: +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.1, 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== @@ -2802,11 +4544,6 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: has-symbols "^1.0.3" hasown "^2.0.0" -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= - get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" @@ -2814,11 +4551,16 @@ get-stream@^5.1.0: dependencies: pump "^3.0.0" -get-stream@^6.0.0: +get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -2849,30 +4591,7 @@ glob@^10.3.10, glob@^10.3.7: minipass "^7.1.2" path-scurry "^1.11.1" -glob@^7.0.0, glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: - 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" - -glob@^8.0.1: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -glob@~7.1.1: +glob@^7.1.3, glob@^7.1.6: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -2896,7 +4615,12 @@ global-agent@^3.0.0: semver "^7.3.2" serialize-error "^7.0.1" -globals@^13.19.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== + +globals@^13.19.0, globals@^13.6.0, globals@^13.9.0: version "13.24.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== @@ -2911,7 +4635,7 @@ globalthis@^1.0.1: define-properties "^1.2.1" gopd "^1.0.1" -globby@^11.0.3: +globby@^11.0.3, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -2923,15 +4647,6 @@ globby@^11.0.3: merge2 "^1.4.1" slash "^3.0.0" -globule@^1.0.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.4.tgz#7c11c43056055a75a6e68294453c17f2796170fb" - integrity sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg== - dependencies: - glob "~7.1.1" - lodash "^4.17.21" - minimatch "~3.0.2" - gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -2956,16 +4671,16 @@ got@^11.8.5: p-cancelable "^2.0.0" responselike "^2.0.0" +graceful-fs@^4.1.11, graceful-fs@^4.2.11: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.8" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== -graceful-fs@^4.2.11: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - graceful-fs@^4.2.6: version "4.2.9" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" @@ -2981,11 +4696,6 @@ handle-thing@^2.0.0: resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== -hard-rejection@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" - integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -3013,10 +4723,36 @@ has-symbols@^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 sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" hash-wasm@^4.9.0: version "4.11.0" @@ -3024,18 +4760,13 @@ hash-wasm@^4.9.0: integrity sha512-HVusNXlVqHe0fzIzdQOGolnFN6mX/fqcrSAOcTBXdvzrXVHwTz11vXeKRmkR5gTuwVpvHZEIyKoePDvuAR+XwQ== hasown@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + version "2.0.0" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== dependencies: function-bind "^1.1.2" -hosted-git-info@^2.1.4: - version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - -hosted-git-info@^4.0.1, hosted-git-info@^4.1.0: +hosted-git-info@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== @@ -3057,7 +4788,7 @@ html-entities@^2.4.0: resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== -http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: +http-cache-semantics@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== @@ -3098,15 +4829,6 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3" integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== -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" - http-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" @@ -3149,7 +4871,7 @@ http2-wrapper@^1.0.0-beta.5.2: quick-lru "^5.1.1" resolve-alpn "^1.0.0" -https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: +https-proxy-agent@^5.0.1: 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== @@ -3162,12 +4884,10 @@ human-signals@^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" +human-signals@^4.3.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" + integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== hyperdyperid@^1.2.0: version "1.2.0" @@ -3211,12 +4931,27 @@ ieee754@^1.1.13, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + ignore@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== -import-fresh@^3.2.1: +ignore@^5.2.4: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" + integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== + +immutable@^4.0.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.6.tgz#6a05f7858213238e587fb83586ffa3b4b27f0447" + integrity sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ== + +import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -3235,17 +4970,7 @@ import-local@^3.0.2: 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== + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= inflight@^1.0.4: version "1.0.6" @@ -3270,14 +4995,6 @@ interpret@^3.1.1: resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== -ip-address@^9.0.5: - version "9.0.5" - resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" - integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== - dependencies: - jsbn "1.1.0" - sprintf-js "^1.1.3" - ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -3288,10 +5005,12 @@ ipaddr.js@^2.1.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.2.0.tgz#d33fa7bac284f4de7af949638c9d68157c6b92e8" integrity sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA== -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-accessor-descriptor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz#3223b10628354644b86260db29b3e693f5ceedd4" + integrity sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA== + dependencies: + hasown "^2.0.0" is-binary-path@~2.1.0: version "2.1.0" @@ -3300,6 +5019,11 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + is-ci@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" @@ -3307,23 +5031,68 @@ is-ci@^3.0.0: dependencies: ci-info "^3.2.0" -is-core-module@^2.13.0, is-core-module@^2.5.0: +is-core-module@^2.13.0: version "2.13.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: hasown "^2.0.0" +is-data-descriptor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz#2109164426166d32ea38c405c1e0945d9e6a4eeb" + integrity sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw== + dependencies: + hasown "^2.0.0" + +is-descriptor@^0.1.0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.7.tgz#2727eb61fd789dcd5bdf0ed4569f551d2fe3be33" + integrity sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg== + dependencies: + is-accessor-descriptor "^1.0.1" + is-data-descriptor "^1.0.1" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.3.tgz#92d27cb3cd311c4977a4db47df457234a13cb306" + integrity sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw== + dependencies: + is-accessor-descriptor "^1.0.1" + is-data-descriptor "^1.0.1" + +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-docker@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== + 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" @@ -3343,16 +5112,18 @@ is-inside-container@^1.0.0: dependencies: is-docker "^3.0.0" -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-network-error@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-network-error/-/is-network-error-1.1.0.tgz#d26a760e3770226d11c169052f266a4803d9c997" integrity sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g== +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== + dependencies: + kind-of "^3.0.2" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -3363,23 +5134,23 @@ is-path-inside@^3.0.3: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== - is-plain-obj@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== -is-plain-object@^2.0.4: +is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" +is-potential-custom-element-name@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" @@ -3390,6 +5161,25 @@ is-stream@^3.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== +is-valid-element-name@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-valid-element-name/-/is-valid-element-name-1.0.0.tgz#26ef3fd76cdf1f122d105406e32d35b0de005981" + integrity sha512-GZITEJY2LkSjQfaIPBha7eyZv+ge0PhBR7KITeCCWvy7VBQrCUdFkvpI+HrAPQjVtVjy1LvlEkqQTHckoszruw== + dependencies: + is-potential-custom-element-name "^1.0.0" + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + is-wsl@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" @@ -3397,7 +5187,7 @@ is-wsl@^3.1.0: dependencies: is-inside-container "^1.0.0" -isarray@~1.0.0: +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== @@ -3417,7 +5207,14 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -isobject@^3.0.1: +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== @@ -3441,6 +5238,14 @@ jake@^10.8.5: filelist "^1.0.4" minimatch "^3.1.2" +jest-worker@^24.0.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" + integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== + dependencies: + merge-stream "^2.0.0" + supports-color "^6.1.0" + jest-worker@^27.4.5: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" @@ -3450,10 +5255,10 @@ jest-worker@^27.4.5: merge-stream "^2.0.0" supports-color "^8.0.0" -js-base64@^2.4.9: - version "2.6.4" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" - integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ== +js-levenshtein-esm@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/js-levenshtein-esm/-/js-levenshtein-esm-1.2.0.tgz#96532c34e0c90df198c9419963c64ca3cf43ae92" + integrity sha512-fzreKVq1eD7eGcQr7MtRpQH94f8gIfhdrc7yeih38xh684TNMK9v5aAu2wxfIRMk/GpAJRrzcirMAPIaSDaByQ== js-levenshtein@^1.1.6: version "1.1.6" @@ -3465,6 +5270,14 @@ js-tokens@^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" + js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -3472,17 +5285,71 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsbn@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" - integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== +jscodeshift@^0.13.0: + version "0.13.1" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.13.1.tgz#69bfe51e54c831296380585c6d9e733512aecdef" + integrity sha512-lGyiEbGOvmMRKgWk4vf+lUrCWO/8YR8sUR3FKF1Cq5fovjZDlIcw3Hu5ppLHAnEXshVffvaM0eyuY/AbOeYpnQ== + dependencies: + "@babel/core" "^7.13.16" + "@babel/parser" "^7.13.16" + "@babel/plugin-proposal-class-properties" "^7.13.0" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.13.8" + "@babel/plugin-proposal-optional-chaining" "^7.13.12" + "@babel/plugin-transform-modules-commonjs" "^7.13.8" + "@babel/preset-flow" "^7.13.13" + "@babel/preset-typescript" "^7.13.0" + "@babel/register" "^7.13.16" + babel-core "^7.0.0-bridge.0" + chalk "^4.1.2" + flow-parser "0.*" + graceful-fs "^4.2.4" + micromatch "^3.1.10" + neo-async "^2.5.0" + node-dir "^0.1.17" + recast "^0.20.4" + temp "^0.8.4" + write-file-atomic "^2.3.0" + +jscodeshift@^0.6.3: + version "0.6.4" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.6.4.tgz#e19ab86214edac86a75c4557fc88b3937d558a8e" + integrity sha512-+NF/tlNbc2WEhXUuc4WEJLsJumF84tnaMUZW2hyJw3jThKKRvsPX4sPJVgO1lPE28z0gNL+gwniLG9d8mYvQCQ== + dependencies: + "@babel/core" "^7.1.6" + "@babel/parser" "^7.1.6" + "@babel/plugin-proposal-class-properties" "^7.1.0" + "@babel/plugin-proposal-object-rest-spread" "^7.0.0" + "@babel/preset-env" "^7.1.6" + "@babel/preset-flow" "^7.0.0" + "@babel/preset-typescript" "^7.1.0" + "@babel/register" "^7.0.0" + babel-core "^7.0.0-bridge.0" + colors "^1.1.2" + flow-parser "0.*" + graceful-fs "^4.1.11" + micromatch "^3.1.10" + neo-async "^2.5.0" + node-dir "^0.1.17" + recast "^0.16.1" + temp "^0.8.1" + write-file-atomic "^2.3.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== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== json-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== -json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: +json-parse-even-better-errors@^2.3.1: 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== @@ -3497,6 +5364,11 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +json-schema@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== + json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -3507,6 +5379,13 @@ json-stringify-safe@^5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== +json5-writer@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/json5-writer/-/json5-writer-0.1.8.tgz#98e1934ef6002f8ac12f36438e2b39c49af213fd" + integrity sha512-h5sqkk/vSKvESOUTBniGWs8p8nTzHsoDrxPS9enJfQVINqXv3lm+FAyizLwbrCwCn0q7NXqDBb+r8AdUdK3XZw== + dependencies: + jscodeshift "^0.6.3" + json5@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" @@ -3514,7 +5393,7 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.2, json5@^2.2.0: +json5@^2.1.1, json5@^2.1.2, json5@^2.2.0, json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -3559,7 +5438,21 @@ keyword-mark-element@^0.2.0: resolved "https://registry.yarnpkg.com/keyword-mark-element/-/keyword-mark-element-0.2.0.tgz#682ce7bfff5eaff7156c6be13a33b81f850f9282" integrity sha512-Q8eFQVMaa4I+aCmi5DYJWMiQ+JyPUT8CiM/qbcQ4AeGQeiKjYwUik2SViLVfE+bPRVOuu/a5kjDFxGAAHKgeOw== -kind-of@^6.0.2, kind-of@^6.0.3: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== + dependencies: + is-buffer "^1.1.5" + +kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -3590,35 +5483,39 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -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== - -lit-element@^3.3.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.3.3.tgz#10bc19702b96ef5416cf7a70177255bfb17b3209" - integrity sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA== +lit-element@^4.0.0, lit-element@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.0.6.tgz#b9f5b5d68f30636be1314ec76c9a73a6405f04dc" + integrity sha512-U4sdJ3CSQip7sLGZ/uJskO5hGiqtlpxndsLr6mt3IQIjheg93UKYeGQjWMRql1s/cXNOaRrCzC2FQwjIwSUqkg== dependencies: - "@lit-labs/ssr-dom-shim" "^1.1.0" - "@lit/reactive-element" "^1.3.0" - lit-html "^2.8.0" + "@lit-labs/ssr-dom-shim" "^1.2.0" + "@lit/reactive-element" "^2.0.4" + lit-html "^3.1.2" -lit-html@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" - integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== +lit-html@^3.1.0, lit-html@^3.1.2: + version "3.1.4" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.1.4.tgz#30ad4f11467a61e2f08856de170e343184e9034e" + integrity sha512-yKKO2uVv7zYFHlWMfZmqc+4hkmSbFp8jgjdZY9vvR9jr4J8fH6FUMXhr+ljfELgmjpvlF7Z1SJ5n5/Jeqtc9YA== dependencies: "@types/trusted-types" "^2.0.2" -lit@^2.1.1: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" - integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== +lit@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lit/-/lit-3.1.1.tgz#49340c8875019a777cc83904f75a2bf7764617dc" + integrity sha512-hF1y4K58+Gqrz+aAPS0DNBwPqPrg6P04DuWK52eMkt/SM9Qe9keWLcFgRcEKOLuDlRZlDsDbNL37Vr7ew1VCuw== + dependencies: + "@lit/reactive-element" "^2.0.0" + lit-element "^4.0.0" + lit-html "^3.1.0" + +lit@^3.0.0: + version "3.1.4" + resolved "https://registry.yarnpkg.com/lit/-/lit-3.1.4.tgz#03a72e9f0b1f5da317bf49b1ab579a7132e73d7a" + integrity sha512-q6qKnKXHy2g1kjBaNfcoLlgbI3+aSOZ9Q4tiGa9bGYXq5RBXxkVTqTIVmP2VWMp29L4GyvCFm8ZQ2o56eUAMyA== dependencies: - "@lit/reactive-element" "^1.6.0" - lit-element "^3.3.0" - lit-html "^2.8.0" + "@lit/reactive-element" "^2.0.4" + lit-element "^4.0.4" + lit-html "^3.1.2" loader-runner@^4.2.0: version "4.3.0" @@ -3643,6 +5540,14 @@ loader-utils@^2.0.0: emojis-list "^3.0.0" json5 "^2.1.2" +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -3657,6 +5562,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== + lodash.escaperegexp@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" @@ -3672,11 +5582,25 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.21: +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +log-update@^3.3.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-3.4.0.tgz#3b9a71e00ac5b1185cc193a36d654581c48f97b9" + integrity sha512-ILKe88NeMt4gmDvk/eb615U/IVn7K9KWGkoYbdatQ69Z65nj1ZzjM6fHXfcs0Uge+e+EGnMW7DY4T9yko8vWFg== + dependencies: + ansi-escapes "^3.2.0" + cli-cursor "^2.1.0" + wrap-ansi "^5.0.0" + long@^5.0.0: version "5.2.3" resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" @@ -3687,11 +5611,26 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +lru-cache@4.1.x: + 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@^10.2.0: version "10.2.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -3699,64 +5638,25 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.7.1: - version "7.14.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.14.1.tgz#8da8d2f5f59827edb388e63e459ac23d6d408fea" - integrity sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA== - -make-fetch-happen@^10.0.4: - version "10.2.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164" - integrity sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w== +make-dir@^2.0.0, make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== dependencies: - agentkeepalive "^4.2.1" - cacache "^16.1.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^7.7.1" - minipass "^3.1.6" - minipass-collect "^1.0.2" - minipass-fetch "^2.0.3" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.3" - promise-retry "^2.0.1" - socks-proxy-agent "^7.0.0" - ssri "^9.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" + pify "^4.0.1" + semver "^5.6.0" -map-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - integrity sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg== +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== -map-obj@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" - integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== + dependencies: + object-visit "^1.0.0" marked@^4.0.10: version "4.3.0" @@ -3785,24 +5685,6 @@ memfs@^4.6.0: sonic-forest "^1.0.0" tslib "^2.0.0" -meow@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-9.0.0.tgz#cd9510bc5cac9dee7d03c73ee1f9ad959f4ea364" - integrity sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize "^1.2.0" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^3.0.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.18.0" - yargs-parser "^20.2.3" - merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -3823,7 +5705,34 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^4.0.2, micromatch@^4.0.4: +micromatch@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +micromatch@^4.0.0, micromatch@^4.0.2: + 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" + +micromatch@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== @@ -3831,12 +5740,36 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.3" picomatch "^2.3.1" +mime-db@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== + +mime-db@1.51.0: + version "1.51.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" + integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== + mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": 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.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@^2.1.32, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12: + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== + dependencies: + mime-db "1.49.0" + +mime-types@^2.1.27, mime-types@~2.1.24: + version "2.1.34" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" + integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== + dependencies: + mime-db "1.51.0" + +mime-types@^2.1.31, mime-types@^2.1.32, mime-types@~2.1.17, 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== @@ -3853,11 +5786,21 @@ mime@^2.5.2: resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + 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== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + mimic-response@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" @@ -3868,11 +5811,6 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - mini-css-extract-plugin@^2.3.0: version "2.9.0" resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.0.tgz#c73a1327ccf466f69026ac22a8e8fd707b78a235" @@ -3886,14 +5824,14 @@ minimalistic-assert@^1.0.0: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, 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" -minimatch@^5.0.1, minimatch@^5.1.1: +minimatch@^5.0.1, minimatch@^5.1.0, minimatch@^5.1.1: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== @@ -3907,91 +5845,23 @@ minimatch@^9.0.4: dependencies: brace-expansion "^2.0.1" -minimatch@~3.0.2: - version "3.0.8" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" - integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== - dependencies: - brace-expansion "^1.1.7" - -minimist-options@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" - integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - kind-of "^6.0.3" +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== -minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -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-fetch@^2.0.3: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-2.1.2.tgz#95560b50c472d81a3bc76f20ede80eaed76d8add" - integrity sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA== - dependencies: - minipass "^3.1.6" - minipass-sized "^1.0.3" - minizlib "^2.1.2" - optionalDependencies: - encoding "^0.1.13" - -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: +minipass@^3.0.0: version "3.3.6" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== dependencies: yallist "^4.0.0" -minipass@^3.1.6: - 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" - minipass@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" @@ -4007,7 +5877,7 @@ minipass@^7.1.2: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -minizlib@^2.0.0, minizlib@^2.1.1, minizlib@^2.1.2: +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== @@ -4015,6 +5885,14 @@ minizlib@^2.0.0, minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + mkdirp@^1.0.3, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" @@ -4030,7 +5908,7 @@ ms@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.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -4053,27 +5931,44 @@ murmurhash3js-revisited@^3.0.0: resolved "https://registry.yarnpkg.com/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz#6bd36e25de8f73394222adc6e41fa3fac08a5869" integrity sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g== -nan@^2.17.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.19.0.tgz#bb58122ad55a6c5bc973303908d5b16cfdd5a8c0" - integrity sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw== - nanoid@^3.3.7: version "3.3.7" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + 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, negotiator@^0.6.3: +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +negotiator@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -neo-async@^2.6.2: +neo-async@^2.5.0, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== @@ -4083,11 +5978,23 @@ node-addon-api@^1.6.3: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== +node-dir@^0.1.17: + version "0.1.17" + resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" + integrity sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg== + dependencies: + minimatch "^3.0.2" + node-domexception@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== +node-ensure@^0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/node-ensure/-/node-ensure-0.0.0.tgz#ecae764150de99861ec5c810fd5d096b183932a7" + integrity sha512-DRI60hzo2oKN1ma0ckc6nQWlHU69RH6xN0sjQTjMpChPfTYvKZdcQFfdYK2RWbJcKyUizSIy/l8OTGxMAM1QDw== + node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -4109,74 +6016,11 @@ node-forge@^1: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== -node-gyp@^8.4.1: - 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-releases@^2.0.14: version "2.0.14" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== -node-sass@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-8.0.0.tgz#c80d52148db0ce88610bcf1e1d112027393c13e1" - integrity sha512-jPzqCF2/e6JXw6r3VxfIqYc8tKQdkj5Z/BDATYyG6FL6b/LuYBNFGFVhus0mthcWifHm/JzBpKAd+3eXsWeK/A== - dependencies: - async-foreach "^0.1.3" - chalk "^4.1.2" - cross-spawn "^7.0.3" - gaze "^1.0.0" - get-stdin "^4.0.1" - glob "^7.0.3" - lodash "^4.17.15" - make-fetch-happen "^10.0.4" - meow "^9.0.0" - nan "^2.17.0" - node-gyp "^8.4.1" - sass-graph "^4.0.1" - stdout-stream "^1.4.0" - "true-case-path" "^2.2.1" - -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" - -normalize-package-data@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-package-data@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" - integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== - dependencies: - hosted-git-info "^4.0.1" - is-core-module "^2.5.0" - semver "^7.3.4" - validate-npm-package-license "^3.0.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" @@ -4194,21 +6038,27 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.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== +npm-run-path@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" + integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== dependencies: - are-we-there-yet "^3.0.0" - console-control-strings "^1.1.0" - gauge "^4.0.3" - set-blocking "^2.0.0" + path-key "^4.0.0" object-assign@^4.0.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-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + object-inspect@^1.13.1: version "1.13.1" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" @@ -4219,6 +6069,20 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== + dependencies: + isobject "^3.0.0" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== + dependencies: + isobject "^3.0.1" + obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" @@ -4243,6 +6107,13 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ== + dependencies: + mimic-fn "^1.0.0" + onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" @@ -4250,6 +6121,13 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + open@^10.0.3: version "10.1.0" resolved "https://registry.yarnpkg.com/open/-/open-10.1.0.tgz#a7795e6e5d519abe4286d9937bb24b51122598e1" @@ -4260,24 +6138,39 @@ open@^10.0.3: is-inside-container "^1.0.0" is-wsl "^3.1.0" -optionator@^0.9.3: - version "0.9.4" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" - integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== +open@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" + integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== + dependencies: + default-browser "^4.0.0" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + is-wsl "^2.2.0" + +optionator@^0.9.1, optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.5" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= p-cancelable@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== -p-limit@^2.2.0: +p-limit@^2.0.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== @@ -4291,6 +6184,13 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -4305,20 +6205,13 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -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-queue@^7.3.4: - version "7.4.1" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-7.4.1.tgz#7f86f853048beca8272abdbb7cec1ed2afc0f265" - integrity sha512-vRpMXmIkYF2/1hLBKisKeVYJZ8S2tZ0zEAmIJgdVKP2nq0nh4qCdf8bgw+ZgKrkh71AOCaqzwbJJk1WtdcF3VA== +p-queue@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-8.0.1.tgz#718b7f83836922ef213ddec263ff4223ce70bef8" + integrity sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA== dependencies: eventemitter3 "^5.0.1" - p-timeout "^5.0.2" + p-timeout "^6.1.2" p-retry@^6.2.0: version "6.2.0" @@ -4329,10 +6222,10 @@ p-retry@^6.2.0: is-network-error "^1.0.0" retry "^0.13.1" -p-timeout@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-5.1.0.tgz#b3c691cf4415138ce2d9cfe071dba11f0fee085b" - integrity sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew== +p-timeout@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-6.1.2.tgz#22b8d8a78abf5e103030211c5fc6dee1166a6aa5" + integrity sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ== p-try@^2.0.0: version "2.2.0" @@ -4351,15 +6244,10 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-json@^5.0.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" +parse-ms@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-2.1.0.tgz#348565a753d4391fa524029956b172cb7753097d" + integrity sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA== parse5-html-rewriting-stream@^7.0.0: version "7.0.0" @@ -4370,6 +6258,13 @@ parse5-html-rewriting-stream@^7.0.0: parse5 "^7.0.0" parse5-sax-parser "^7.0.0" +parse5-htmlparser2-tree-adapter@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + parse5-sax-parser@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/parse5-sax-parser/-/parse5-sax-parser-7.0.0.tgz#4c05064254f0488676aca75fb39ca069ec96dee5" @@ -4377,6 +6272,11 @@ parse5-sax-parser@^7.0.0: dependencies: parse5 "^7.0.0" +parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + parse5@^7.0.0: version "7.1.2" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" @@ -4389,6 +6289,21 @@ parseurl@~1.3.2, parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== + +path-browserify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -4409,6 +6324,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -4440,12 +6360,20 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pdfjs-dist@2.2.228: + version "2.2.228" + resolved "https://registry.yarnpkg.com/pdfjs-dist/-/pdfjs-dist-2.2.228.tgz#777b068a0a16c96418433303807c183058b47aaa" + integrity sha512-W5LhYPMS2UKX0ELIa4u+CFCMoox5qQNQElt0bAK2mwz1V8jZL0rvLao+0tBujce84PK6PvWG36Nwr7agCCWFGQ== + dependencies: + node-ensure "^0.0.0" + worker-loader "^2.0.0" + pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== -picocolors@^1.0.0, picocolors@^1.0.1: +picocolors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== @@ -4455,6 +6383,23 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pirates@^4.0.5: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -4479,6 +6424,11 @@ plist@^3.0.5: base64-js "^1.5.1" xmlbuilder "^15.1.1" +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== + postcss-modules-extract-imports@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz#b4497cb85a9c0c4b5aabeb759bb25e8d89f15002" @@ -4534,11 +6484,35 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" + integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== + pretty-bytes@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== +pretty-ms@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-7.0.1.tgz#7d903eaab281f7d8e03c66f867e239dc32fb73e8" + integrity sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q== + dependencies: + parse-ms "^2.1.0" + +private@~0.1.5: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -4549,16 +6523,11 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -progress@^2.0.3: +progress@^2.0.0, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -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" @@ -4593,6 +6562,11 @@ proxy-addr@~2.0.7: 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== + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -4618,6 +6592,11 @@ pvutils@^1.1.3: resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3" integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ== +qr-creator@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/qr-creator/-/qr-creator-1.0.0.tgz#f350a8f0b5be02bd1fc1ef133a038a06ef8bc5ef" + integrity sha512-C0cqfbS1P5hfqN4NhsYsUXePlk9BO+a45bAQ3xLYjBL3bOIFzoVEjs79Fado9u9BPBD3buHi3+vY+C8tHh4qMQ== + qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -4635,11 +6614,6 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -quick-lru@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" - integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== - quick-lru@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" @@ -4692,25 +6666,6 @@ read-config-file@6.3.2: json5 "^2.2.0" lazy-val "^1.0.4" -read-pkg-up@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" - integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== - dependencies: - find-up "^4.1.0" - read-pkg "^5.2.0" - type-fest "^0.8.1" - -read-pkg@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" - integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== - dependencies: - "@types/normalize-package-data" "^2.4.0" - normalize-package-data "^2.5.0" - parse-json "^5.0.0" - type-fest "^0.6.0" - readable-stream@^2.0.1: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" @@ -4724,10 +6679,10 @@ readable-stream@^2.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6, readable-stream@^3.5.0, readable-stream@^3.6.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== +readable-stream@^3.0.6, readable-stream@^3.5.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" @@ -4740,6 +6695,26 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +recast@^0.16.1: + version "0.16.2" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.16.2.tgz#3796ebad5fe49ed85473b479cd6df554ad725dc2" + integrity sha512-O/7qXi51DPjRVdbrpNzoBQH5dnAPQNbfoOFyRiUwreTMJfIHYOEBzwuH+c0+/BTSJ3CQyKs6ILSWXhESH6Op3A== + dependencies: + ast-types "0.11.7" + esprima "~4.0.0" + private "~0.1.5" + source-map "~0.6.1" + +recast@^0.20.4: + version "0.20.5" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.20.5.tgz#8e2c6c96827a1b339c634dd232957d230553ceae" + integrity sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ== + dependencies: + ast-types "0.14.2" + esprima "~4.0.0" + source-map "~0.6.1" + tslib "^2.0.1" + rechoir@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" @@ -4747,38 +6722,97 @@ rechoir@^0.8.0: dependencies: resolve "^1.20.0" -redent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" - integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - dependencies: - indent-string "^4.0.0" - strip-indent "^3.0.0" - reflect-metadata@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.2.2.tgz#400c845b6cba87a21f2c65c4aeb158f4fa4d9c5b" integrity sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q== +regenerate-unicode-properties@^10.1.0: + version "10.1.1" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz#6b0e05489d9076b04c436f318d9b067bba459480" + integrity sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q== + dependencies: + regenerate "^1.4.2" + +regenerate@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +regenerator-transform@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.2.tgz#5bbae58b522098ebdf09bca2f83838929001c7a4" + integrity sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg== + dependencies: + "@babel/runtime" "^7.8.4" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpp@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +regexpu-core@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" + integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== + dependencies: + "@babel/regjsgen" "^0.8.0" + regenerate "^1.4.2" + regenerate-unicode-properties "^10.1.0" + regjsparser "^0.9.1" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.1.0" + register-service-worker@^1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/register-service-worker/-/register-service-worker-1.7.2.tgz#6516983e1ef790a98c4225af1216bc80941a4bd2" integrity sha512-CiD3ZSanZqcMPRhtfct5K9f7i3OLCcBBWsJjLh1gW9RO/nS94sVzY59iS+fgYBOBqaBpf4EzfqUF3j9IG+xo8A== -replaywebpage@1.8.17: - version "1.8.17" - resolved "https://registry.yarnpkg.com/replaywebpage/-/replaywebpage-1.8.17.tgz#09fb40eca865083c965b19c5745481e8d759c3d9" - integrity sha512-P4wNz1Kb2eL/eX4cEa7zqSLKYRMz2ww0BUY38HhyBBOYQ6o1l8NZpC9FwjZxpTNPQK29/tS0XKtDj2BsNenwvw== +regjsparser@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" + integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== + dependencies: + jsesc "~0.5.0" + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== + +replaywebpage@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/replaywebpage/-/replaywebpage-2.2.0.tgz#92c19eabba1e926c9b857b3a569cbfa740925470" + integrity sha512-amPSiFQ/Q5Ybvip3JWCihHlgKcXr315Y3zthIVGMC6ayQakefd+8QOzZJc0V0Fggbaq17F75/H/Jo2k4Rgp17w== dependencies: "@fortawesome/fontawesome-free" "^5.15.4" - "@webrecorder/wabac" "^2.17.3" + "@shoelace-style/shoelace" "~2.15.1" + "@webrecorder/wabac" "^2.20.0" bulma "^0.9.3" electron-log "^4.4.1" - electron-updater "^5.3.0" + electron-updater "^6.3.2" fetch-ndjson "^1.1.6" flexsearch "^0.7.31" keyword-mark-element "^0.2.0" - lit "^2.1.1" + lit "3.1.1" marked "^4.0.10" mime-types "^2.1.32" minimist "^1.2.5" @@ -4788,6 +6822,7 @@ replaywebpage@1.8.17: register-service-worker "^1.7.2" split.js "^1.6.4" stream-browserify "^3.0.0" + tsconfig-paths-webpack-plugin "^4.1.0" require-directory@^2.1.1: version "2.1.1" @@ -4799,6 +6834,16 @@ require-from-string@^2.0.2: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +requireindex@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" + integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -4826,7 +6871,12 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.10.0, resolve@^1.20.0: +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== + +resolve@^1.14.2, resolve@^1.20.0: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -4842,6 +6892,19 @@ responselike@^2.0.0: dependencies: lowercase-keys "^2.0.0" +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q== + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" @@ -4871,6 +6934,13 @@ rimraf@^5.0.5: dependencies: glob "^10.3.7" +rimraf@~2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + roarr@^2.15.3: version "2.15.4" resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.4.tgz#f5fe795b7b838ccfe35dc608e0282b9eba2e7afd" @@ -4883,6 +6953,13 @@ roarr@^2.15.3: semver-compare "^1.0.0" sprintf-js "^1.1.2" +run-applescript@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" + integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== + dependencies: + execa "^5.0.0" + run-applescript@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb" @@ -4895,13 +6972,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^7.5.2: - version "7.8.1" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" - integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== - dependencies: - tslib "^2.1.0" - safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -4912,6 +6982,13 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== + dependencies: + ret "~0.1.10" + "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" @@ -4924,16 +7001,6 @@ sanitize-filename@^1.6.3: dependencies: truncate-utf8-bytes "^1.0.0" -sass-graph@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-4.0.1.tgz#2ff8ca477224d694055bf4093f414cf6cfad1d2e" - integrity sha512-5YCfmGBmxoIRYHnKK2AKzrAkCoQ8ozO+iumT8K4tXJXRVCPf+7s1/9KxTSW3Rbvf+7Y7b4FR3mWyLnQr3PHocA== - dependencies: - glob "^7.0.0" - lodash "^4.17.11" - scss-tokenizer "^0.4.3" - yargs "^17.2.1" - sass-loader@^12.1.0: version "12.6.0" resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-12.6.0.tgz#5148362c8e2cdd4b950f3c63ac5d16dbfed37bcb" @@ -4942,12 +7009,38 @@ sass-loader@^12.1.0: klona "^2.0.4" neo-async "^2.6.2" +sass@^1.77.6: + version "1.77.6" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.77.6.tgz#898845c1348078c2e6d1b64f9ee06b3f8bd489e4" + integrity sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q== + dependencies: + chokidar ">=3.0.0 <4.0.0" + immutable "^4.0.0" + source-map-js ">=0.6.2 <2.0.0" + sax@^1.2.4: version "1.4.1" resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== -schema-utils@^3.0.0, schema-utils@^3.1.1, schema-utils@^3.2.0: +schema-utils@^0.4.0: + version "0.4.7" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" + integrity sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ== + dependencies: + ajv "^6.1.0" + ajv-keywords "^3.1.0" + +schema-utils@^3.0.0, schema-utils@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" + integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== @@ -4966,14 +7059,6 @@ schema-utils@^4.0.0, schema-utils@^4.2.0: ajv-formats "^2.1.1" ajv-keywords "^5.1.0" -scss-tokenizer@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.4.3.tgz#1058400ee7d814d71049c29923d2b25e61dc026c" - integrity sha512-raKLgf1LI5QMQnG+RxHz6oK0sL3x3I4FN2UDLqgLOGO8hodECNnNh5BXn7fAyBxrA8zVzdQizQ6XjNJQ+uBwMw== - dependencies: - js-base64 "^2.4.9" - source-map "^0.7.3" - search-params@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/search-params/-/search-params-3.0.0.tgz#dbc7c243058e5a33ae1e9870be91f5aced4100d8" @@ -4997,7 +7082,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -"semver@2 || 3 || 4 || 5": +semver@^5.6.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -5007,11 +7092,35 @@ semver@^6.2.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.2.1, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + +semver@^7.3.2: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + +semver@^7.3.4, semver@^7.3.8, semver@^7.5.3: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== +semver@^7.6.3: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -5085,6 +7194,16 @@ set-function-length@^1.2.1: gopd "^1.0.1" has-property-descriptors "^1.0.2" +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + setprototypeof@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" @@ -5129,7 +7248,7 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" -signal-exit@^3.0.3: +signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== @@ -5170,11 +7289,50 @@ slice-ansi@^3.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -smart-buffer@^4.0.2, smart-buffer@^4.2.0: +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +smart-buffer@^4.0.2: version "4.2.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + sockjs@^0.3.24: version "0.3.24" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" @@ -5184,32 +7342,6 @@ sockjs@^0.3.24: uuid "^8.3.2" websocket-driver "^0.7.4" -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-proxy-agent@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6" - integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww== - dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" - -socks@^2.6.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" - integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== - dependencies: - ip-address "^9.0.5" - smart-buffer "^4.2.0" - sonic-forest@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/sonic-forest/-/sonic-forest-1.0.3.tgz#81363af60017daba39b794fce24627dc412563cb" @@ -5217,12 +7349,28 @@ sonic-forest@^1.0.0: dependencies: tree-dump "^1.0.0" -source-map-js@^1.2.0: +source-list-map@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== -source-map-support@^0.5.19, source-map-support@~0.5.20: +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.5.16, source-map-support@^0.5.19, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -5230,42 +7378,31 @@ source-map-support@^0.5.19, source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0: +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== + +source-map@^0.6.0, source-map@^0.6.1, 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== source-map@^0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" + integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== + +source-map@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== -spdx-correct@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" - integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz#5d607d27fc806f66d7b64a766650fa890f04ed66" - integrity sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.18" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz#22aa922dcf2f2885a6494a261f2d8b75345d0326" - integrity sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ== - spdy-transport@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" @@ -5289,35 +7426,41 @@ spdy@^4.0.2: select-hose "^2.0.0" spdy-transport "^3.0.0" +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + split.js@^1.6.4: version "1.6.5" resolved "https://registry.yarnpkg.com/split.js/-/split.js-1.6.5.tgz#f7f61da1044c9984cb42947df4de4fadb5a3f300" integrity sha512-mPTnGCiS/RiuTNsVhCm9De9cCAUsrNFFviRbADdKiiV+Kk8HKp/0fWu7Kr8pi3/yBmsqLFHuXGT9UUZ+CNLwFw== -sprintf-js@^1.1.2, sprintf-js@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" - integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== - -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" +sprintf-js@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" + integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== -ssri@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" - integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== - dependencies: - minipass "^3.1.1" +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== stat-mode@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-1.0.0.tgz#68b55cb61ea639ff57136f36b216a291800d1465" integrity sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg== +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + statuses@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" @@ -5328,13 +7471,6 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -stdout-stream@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.1.tgz#5ac174cdd5cd726104aa0c0b2bd83815d8d535de" - integrity sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA== - dependencies: - readable-stream "^2.0.1" - stream-browserify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" @@ -5352,14 +7488,14 @@ stream-browserify@^3.0.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -"string-width@^1.0.2 || 2 || 3 || 4", 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== +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" string-width@^4.1.0, string-width@^4.2.0: version "4.2.2" @@ -5370,6 +7506,15 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.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-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -5400,6 +7545,13 @@ string_decoder@~1.1.1: dependencies: ansi-regex "^5.0.1" +strip-ansi@^5.0.0, strip-ansi@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + strip-ansi@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" @@ -5421,19 +7573,22 @@ strip-ansi@^7.0.1: dependencies: ansi-regex "^6.0.1" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + 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-indent@^3.0.0: +strip-final-newline@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== -strip-json-comments@^3.1.1: +strip-json-comments@^3.1.0, 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== @@ -5457,6 +7612,13 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + 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" @@ -5485,12 +7647,31 @@ svg-inline-loader@^0.8.2: object-assign "^4.0.1" simple-html-tokenizer "^0.1.1" +synckit@^0.8.5: + version "0.8.6" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.6.tgz#b69b7fbce3917c2673cbdc0d87fb324db4a5b409" + integrity sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA== + dependencies: + "@pkgr/utils" "^2.4.2" + tslib "^2.6.2" + +table@^6.0.9: + version "6.8.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" + integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== -tar@^6.0.2, tar@^6.1.11, tar@^6.1.12, tar@^6.1.2: +tar@^6.1.12: version "6.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== @@ -5515,6 +7696,13 @@ temp-file@^3.4.0: async-exit-hook "^2.0.1" fs-extra "^10.0.0" +temp@^0.8.1, temp@^0.8.4: + version "0.8.4" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2" + integrity sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg== + dependencies: + rimraf "~2.6.2" + tempy@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/tempy/-/tempy-3.1.0.tgz#00958b6df85db8589cb595465e691852aac038e9" @@ -5556,11 +7744,26 @@ thingies@^1.20.0: resolved "https://registry.yarnpkg.com/thingies/-/thingies-1.21.0.tgz#e80fbe58fd6fdaaab8fad9b67bd0a5c943c445c1" integrity sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g== +throat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + integrity sha512-wCVxLDcFxw7ujDxaeJC6nfl2XfHJNYs8yUYJnvMgtPEFlttP9tHSfRUv2vBe6C4hkVFPWoP1P6ZccbYjmSEkKA== + thunky@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== +tiny-typed-emitter@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz#b3b027fdd389ff81a152c8e847ee2f5be9fad7b5" + integrity sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA== + +titleize@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" + integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== + tmp-promise@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-3.0.3.tgz#60a1a1cc98c988674fcbfd23b6e3367bdeac4ce7" @@ -5568,6 +7771,13 @@ tmp-promise@^3.0.2: dependencies: tmp "^0.2.0" +tmp@0.0.x: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + tmp@^0.2.0: version "0.2.3" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" @@ -5578,6 +7788,26 @@ to-data-view@^2.0.0: resolved "https://registry.yarnpkg.com/to-data-view/-/to-data-view-2.0.0.tgz#4cc3f5c9eb59514a7436fc54c587c3c34c9b1d60" integrity sha512-RGEM5KqlPHr+WVTPmGNAXNeFEmsBnlkxXaIfEpUYV0AST2Z5W1EGq9L/MENFrMMmL2WQr1wjkmZy/M92eKhjYA== +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-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + 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" @@ -5585,6 +7815,16 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + to-string-loader@^1.1.6: version "1.2.0" resolved "https://registry.yarnpkg.com/to-string-loader/-/to-string-loader-1.2.0.tgz#4364aa044b9aa876473f4d7a36ef7d216a276e9c" @@ -5607,16 +7847,6 @@ tree-dump@^1.0.0: resolved "https://registry.yarnpkg.com/tree-dump/-/tree-dump-1.0.1.tgz#b448758da7495580e6b7830d6b7834fca4c45b96" integrity sha512-WCkcRBVPSlHHq1dc/px9iOfqklvzCbdRwvlNfxGZsrHqf6aZttfPrd7DJTt6oR10dwUfpFFQeVTkPbBIZxX/YA== -trim-newlines@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" - integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== - -"true-case-path@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-2.2.1.tgz#c5bf04a5bbec3fd118be4084461b3a27c4d796bf" - integrity sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q== - truncate-utf8-bytes@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz#405923909592d56f78a5818434b0b78489ca5f2b" @@ -5624,21 +7854,82 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" +ts-api-utils@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== + +ts-loader@^9.5.1: + version "9.5.1" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89" + integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg== + dependencies: + chalk "^4.1.0" + enhanced-resolve "^5.0.0" + micromatch "^4.0.0" + semver "^7.3.4" + source-map "^0.7.4" + +ts-migrate-plugins@^0.1.35: + version "0.1.35" + resolved "https://registry.yarnpkg.com/ts-migrate-plugins/-/ts-migrate-plugins-0.1.35.tgz#96579e07ba8ffa31ff85dfbdd0220482e641f654" + integrity sha512-DUkx7ClKhxKYPWDha9DJTZ6LhwEUszL90uH5I/O11K/6TbA96ytln1O3HL6Pt83i4mAKOlg0mQ6AMsPtL5FFkQ== + dependencies: + eslint "^7.14.0" + jscodeshift "^0.13.0" + json-schema "^0.4.0" + ts-migrate-server "^0.1.33" + +ts-migrate-server@^0.1.33: + version "0.1.33" + resolved "https://registry.yarnpkg.com/ts-migrate-server/-/ts-migrate-server-0.1.33.tgz#7fc38ac9ce6642399dbfbcb8e46a26e45caea8c4" + integrity sha512-MYHy10yzL2fkb2FHFQ9f54gqc5KkaVthTjtpwS4bTroYCONDelp1hbz5nxKWaP3q2oc3kBVeGuAR91RNI+yK+g== + dependencies: + "@ts-morph/bootstrap" "^0.16.0" + pretty-ms "^7.0.1" + updatable-log "^0.2.0" + +ts-migrate@^0.1.35: + version "0.1.35" + resolved "https://registry.yarnpkg.com/ts-migrate/-/ts-migrate-0.1.35.tgz#705d65e54b9d4a5a72ee11e276bb5a5856a4b340" + integrity sha512-EmXahqwIP0a6fE1BLKKVMgJEeYn9V+CxJ19qFJ/DzkPL4PjDI/FcgPo8D519amBPy2nnlc/x1V6R6aIeHdD87w== + dependencies: + create-jest-runner "^0.5.3" + json5 "^2.1.1" + json5-writer "^0.1.8" + ts-migrate-plugins "^0.1.35" + ts-migrate-server "^0.1.33" + updatable-log "^0.2.0" + yargs "^15.0.2" + +tsconfig-paths-webpack-plugin@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.1.0.tgz#3c6892c5e7319c146eee1e7302ed9e6f2be4f763" + integrity sha512-xWFISjviPydmtmgeUAuXp4N1fky+VCtfhOkDUFIv5ea7p4wuTomI4QTrXvFBX2S4jZsmyTSrStQl+E+4w+RzxA== + dependencies: + chalk "^4.1.0" + enhanced-resolve "^5.7.0" + tsconfig-paths "^4.1.2" + +tsconfig-paths@^4.1.2: + version "4.2.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" + integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg== + dependencies: + json5 "^2.2.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@^1.10.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.4.0, tslib@^2.6.1, tslib@^2.6.2: +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.4.0, tslib@^2.6.0, tslib@^2.6.1, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tslib@^2.1.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" - integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== - tsyringe@^4.8.0: version "4.8.0" resolved "https://registry.yarnpkg.com/tsyringe/-/tsyringe-4.8.0.tgz#d599651b36793ba872870fee4f845bd484a5cac1" @@ -5658,26 +7949,11 @@ type-fest@^0.13.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== -type-fest@^0.18.0: - version "0.18.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" - integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== - type-fest@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" - integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - type-fest@^1.0.1: version "1.4.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" @@ -5696,50 +7972,48 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typed-emitter@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/typed-emitter/-/typed-emitter-2.1.0.tgz#ca78e3d8ef1476f228f548d62e04e3d4d3fd77fb" - integrity sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA== - optionalDependencies: - rxjs "^7.5.2" - typescript@^5.3.3: - version "5.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" - integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + version "5.3.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" + integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -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" +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== -unique-filename@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-2.0.1.tgz#e785f8675a9a7589e0ac77e0b5c34d2eaeac6da2" - integrity sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A== +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== dependencies: - unique-slug "^3.0.0" + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^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" +unicode-match-property-value-ecmascript@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" + integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== -unique-slug@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-3.0.0.tgz#6d347cf57c8a7a7a6044aabd0e2d74e4d76dc7c9" - integrity sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w== +unicode-property-aliases-ecmascript@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" + integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== dependencies: - imurmurhash "^0.1.4" + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" unique-string@^3.0.0: version "3.0.0" @@ -5763,6 +8037,19 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + unused-filename@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/unused-filename/-/unused-filename-4.0.1.tgz#3e7285db0f3ec94fb2b089dd220a3b269b226914" @@ -5771,13 +8058,22 @@ unused-filename@^4.0.1: escape-string-regexp "^5.0.0" path-exists "^5.0.0" +updatable-log@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/updatable-log/-/updatable-log-0.2.0.tgz#8adfe35dd744bd87e8bf217425e4e8bb81b6f3c6" + integrity sha512-gR48/mTR6YFB+B1sNoap3nx8HFbEvDl0ej9KhlQTFZdmP8yL5fzFiCUfeHCUf1QvNnXowY1pM9iiGkPKrd0XyQ== + dependencies: + chalk "^2.4.2" + figures "^3.0.0" + log-update "^3.3.0" + update-browserslist-db@^1.0.13: - version "1.0.16" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" - integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== dependencies: - escalade "^3.1.2" - picocolors "^1.0.1" + escalade "^3.1.1" + picocolors "^1.0.0" uri-js@^4.2.2: version "4.4.1" @@ -5786,6 +8082,24 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +useragent@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972" + integrity sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw== + dependencies: + lru-cache "4.1.x" + tmp "0.0.x" + utf8-byte-length@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz#f9f63910d15536ee2b2d5dd4665389715eac5c1e" @@ -5812,17 +8126,14 @@ uuid@^8.3.2: integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== uuid@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + version "9.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" + integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" +v8-compile-cache@^2.0.3: + version "2.4.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz#cdada8bec61e15865f05d097c5f4fd30e94dc128" + integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw== varint@^6.0.0: version "6.0.0" @@ -5843,19 +8154,7 @@ verror@^1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -warcio@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/warcio/-/warcio-2.2.1.tgz#3619728fde716291c9b364744c276362a94bacec" - integrity sha512-KPLoz3aFtdTjexG+QQaubMyuLiNANzvcadGMyNKdpcmhl0k6lBHQQVpxZw3Hx9+4pbyqDXyiF4cr/h2tS8kvcw== - dependencies: - base32-encode "^2.0.0" - hash-wasm "^4.9.0" - pako "^1.0.11" - tempy "^3.1.0" - uuid-random "^1.3.2" - yargs "^17.6.2" - -warcio@^2.3.0, warcio@^2.3.1: +warcio@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/warcio/-/warcio-2.3.1.tgz#8ac9de897de1a556161168f2a3938b60929908ca" integrity sha512-PjcWqzXfs6HdWfHi1V/i8MoMmV5M0Csg3rOa2mqCJ1dmCJXswVfQ0VXbEVumwavNIW2oFFj6LJoCHHeL4Ls/zw== @@ -5885,9 +8184,14 @@ wbuf@^1.1.0, wbuf@^1.7.3: minimalistic-assert "^1.0.0" web-streams-polyfill@^3.0.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" - integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== + version "3.3.2" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz#32e26522e05128203a7de59519be3c648004343b" + integrity sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ== + +webextension-polyfill@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.5.0.tgz#795e0bf6a2b8eadcdb6edaecd169e9228c747519" + integrity sha512-aFrl38x43t1bTboX/paCT8I97+idzX/TY0+fuM52hrIkCpYfROEF9kSn0BXuEIi3J9LTYt2ZZKkhx9NB1qF3nA== webidl-conversions@^3.0.0: version "3.0.1" @@ -5961,6 +8265,21 @@ webpack-dev-server@^5.0.4: webpack-dev-middleware "^7.1.0" ws "^8.16.0" +webpack-extension-reloader@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/webpack-extension-reloader/-/webpack-extension-reloader-1.1.4.tgz#f5e5fa580e617c114cc45ddb6eb25c5d6a4dd2f6" + integrity sha512-PyssJvAiKhztc//QmhpU8yfg7LBR7Bn/cjSM7jadfQJPIDNN1Djxc+SJQRk8uHQ3GQbyWhsWu2DLCMBRcWHIPA== + dependencies: + "@types/webpack" "^4.39.8" + "@types/webpack-sources" "^0.1.5" + colors "^1.4.0" + lodash "^4.17.15" + minimist "^1.2.0" + useragent "^2.3.0" + webextension-polyfill "^0.5.0" + webpack-sources "^1.4.3" + ws "^7.2.0" + webpack-merge@^5.7.3: version "5.10.0" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" @@ -5970,6 +8289,14 @@ webpack-merge@^5.7.3: flat "^5.0.2" wildcard "^2.0.0" +webpack-sources@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + webpack-sources@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" @@ -6027,29 +8354,30 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which@^2.0.1, which@^2.0.2: +which-module@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" + integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== + +which@^2.0.1: 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.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" - wildcard@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== -word-wrap@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" - integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== +worker-loader@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-2.0.0.tgz#45fda3ef76aca815771a89107399ee4119b430ac" + integrity sha512-tnvNp4K3KQOpfRnD20m8xltE3eWh89Ye+5oj7wXEEHKac1P4oZ6p9oTj8/8ExqoSBnk9nu5Pr4nKfQ1hn2APJw== + dependencies: + loader-utils "^1.0.0" + schema-utils "^0.4.0" "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" @@ -6060,6 +8388,24 @@ word-wrap@^1.2.5: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -6083,6 +8429,20 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +write-file-atomic@^2.3.0: + version "2.4.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +ws@^7.2.0: + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + ws@^8.16.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" @@ -6098,38 +8458,60 @@ xmlbuilder@^9.0.7: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ== +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + 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@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + 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@^20.2.3: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" -yargs-parser@^21.0.0, yargs-parser@^21.1.1: +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.2.1: - version "17.3.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.3.1.tgz#da56b28f32e2fd45aefb402ed9c26f42be4c07b9" - integrity sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA== +yargs@^15.0.2: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.0.0" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" yargs@^17.6.2: version "17.6.2"