From 699d6853bbf1b96d77f24d46b19c38c66c2e22b1 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Sat, 4 Mar 2023 09:57:16 -0800 Subject: [PATCH] convert the implementation of the action to Dart (#77) * re-write into Dart * fix http_client interop * update entry-point * refactor dist * more updates * packaging updates * update the developing instructions; add a sig file * fix build script * await a future * use JS types * review comments --- .gitattributes | 1 + .github/dependabot.yaml | 11 +- .github/workflows/build.yml | 18 + .github/workflows/dart.yml | 4 +- .gitignore | 16 +- CHANGELOG.md | 7 + CONTRIBUTING.md | 50 +- DEVELOPING.md | 37 + README.md | 70 +- action.yml | 16 +- analysis_options.yaml | 5 + dist/index.mjs | 6864 +++++++++++++++++++++++++++++ dist/main.cjs | 4975 +++++++++++++++++++++ dist/sig.txt | 1 + example/.gitignore | 3 + lib/main.dart | 183 + lib/main.mjs | 41 + lib/node/actions/core.dart | 33 + lib/node/actions/exec.dart | 22 + lib/node/actions/http_client.dart | 19 + lib/node/actions/tool_cache.dart | 54 + lib/node/fs.dart | 20 + lib/node/os.dart | 20 + lib/node/process.dart | 22 + package-lock.json | 91 + package.json | 29 + pubspec.yaml | 16 + setup.sh | 120 - tool/sig.dart | 74 + 29 files changed, 12644 insertions(+), 178 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/build.yml create mode 100644 DEVELOPING.md create mode 100644 analysis_options.yaml create mode 100644 dist/index.mjs create mode 100644 dist/main.cjs create mode 100644 dist/sig.txt create mode 100644 example/.gitignore create mode 100644 lib/main.dart create mode 100644 lib/main.mjs create mode 100644 lib/node/actions/core.dart create mode 100644 lib/node/actions/exec.dart create mode 100644 lib/node/actions/http_client.dart create mode 100644 lib/node/actions/tool_cache.dart create mode 100644 lib/node/fs.dart create mode 100644 lib/node/os.dart create mode 100644 lib/node/process.dart create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 pubspec.yaml delete mode 100755 setup.sh create mode 100644 tool/sig.dart diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..af30937 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +dist/** -diff linguist-generated=true diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 321786b..3c727c5 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -2,7 +2,12 @@ version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: github-actions + directory: / schedule: - interval: "weekly" + interval: monthly + + - package-ecosystem: npm + directory: / + schedule: + interval: monthly diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d98d62a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,18 @@ +# Validate that the compiled artifacts are up-to-date. + +name: Build + +on: + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./ + with: + sdk: beta + - run: dart pub get + - run: dart tool/sig.dart --verify diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 871f2b6..5138927 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,3 +1,5 @@ +# Tests for general `setup-dart` configurations. + name: Dart on: @@ -6,7 +8,7 @@ on: pull_request: branches: [main] schedule: - - cron: "0 0 * * 0" # Run every Sunday at 00:00. + - cron: "0 0 * * 0" # Run every Sunday at 00:00. jobs: diff --git a/.gitignore b/.gitignore index bb25bcf..d519b44 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,13 @@ -example/.packages -example/pubspec.lock -example/.dart_tool/ +# Dart files +.dart_tool/ +pubspec.lock + +# node modules +node_modules/ + +# intermediary compilation artifacts +lib/main.js +lib/main.js.deps +lib/main.js.map + +lib/sig.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 751bc82..0296c8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v1.5.0-dev + +* Re-wrote the implementation of the action into Dart. +* Auto-detect the platform architecture (`x64`, `ia32`, `arm`, `arm64`). +* Improved the caching and download resilience of the sdk. +* Added a new action output: `dart-version` - the installed version of the sdk. + ## v1.4.0 * Automatically create OIDC token for pub.dev. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bec0724..2f3e4c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,7 @@ -## How to Contribute +# How to Contribute -Prior to sending patches and contributions to this project, please file -an issue in the issue tracker to ensure there is alignment with the overall -goals of this project. Thanks! +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. ## Contributor License Agreement @@ -17,3 +16,46 @@ You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again. +## Start with an issue + +Prior to sending patches and contributions to this project, please file an issue +in the issue tracker to ensure there is alignment with the overall goals of this +project. Thanks! + +## Code Reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Coding style + +The Dart source code in this repo follows the: + + * [Dart style guide](https://dart.dev/guides/language/effective-dart/style) + +You should familiarize yourself with those guidelines. + +## File headers + +All files in the Dart project must start with the following header; if you add a +new file please also add this. The year should be a single number stating the +year the file was created (don't use a range like "2011-2012"). Additionally, if +you edit an existing file, you shouldn't update the year. + + // Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + +## Building and testing + +See the [DEVELOPING.md](DEVELOPING.md) file. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google/conduct/). + +We pledge to maintain an open and welcoming environment. For details, see our +[code of conduct](https://dart.dev/code-of-conduct). diff --git a/DEVELOPING.md b/DEVELOPING.md new file mode 100644 index 0000000..e7e93d7 --- /dev/null +++ b/DEVELOPING.md @@ -0,0 +1,37 @@ +[![Build](https://github.com/dart-lang/setup-dart/actions/workflows/build.yml/badge.svg)](https://github.com/dart-lang/setup-dart/actions/workflows/build.yml) +[![Dart](https://github.com/dart-lang/setup-dart/actions/workflows/dart.yml/badge.svg)](https://github.com/dart-lang/setup-dart/actions/workflows/dart.yml) + +## Setting up + +1. Install node +1. Install additional node tooling (`npm i -g @vercel/ncc`) +1. Install the node package dependencies (`npm install`) + +## Development + +tldr: edit Dart source files; run `npm run all` to re-compile the action + +### Working on the action + +Generally, to work on the action, edit the Dart source code in `lib/` and +re-compile the JavaScript code via `npm run all`. This will: + +- compile the Dart source (via dart2js) to `lib/main.js`; copy that file to + `dist/main.cjs` +- package and minify the `lib/main.mjs` entrypoint point and referencd node + modules to `dist/index.mjs` + +### Files + +`lib/main.dart` - the Dart entry-point to the action. + +`lib/main.mjs` - the JavaScript wrapper; this sets up some important JS interop +globals and bootstraps into `lib/main.dart`. + +`dist/index.mjs` - the execution entry-point of the action. + +## Releasing + +See our +[publishing](https://github.com/dart-lang/setup-dart/wiki/Publishing-procedure) +wiki page. diff --git a/README.md b/README.md index 0979ba2..d015df1 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,35 @@ # setup-dart -[![Dart](https://github.com/dart-lang/setup-dart/workflows/Dart/badge.svg)](https://github.com/dart-lang/setup-dart/actions?query=workflow%3A%22Dart%22+branch%3Amain) +[setup-dart](https://github.com/dart-lang/setup-dart) installs and sets up a +Dart SDK for use in GitHub Actions; it: -This [GitHub Action](https://github.com/dart-lang/setup-dart) installs -and sets up of a Dart SDK for use in actions by: - -* Downloading the Dart SDK -* Adding the [`dart`](https://dart.dev/tools/dart-tool) command - and [`pub` cache](https://dart.dev/tools/pub/cmd/pub-get#the-system-package-cache) - to the system path +* downloads the Dart SDK +* adds the [`dart`](https://dart.dev/tools/dart-tool) tool to the system path ## Usage -Install the latest stable SDK and run 'Hello World': +To install the latest stable Dart SDK and run typical checks: ```yml -steps: -- uses: actions/checkout@v3 -- uses: dart-lang/setup-dart@v1 -- run: dart pub get -- run: dart run bin/hello_world.dart +name: Dart + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dart-lang/setup-dart@v1 + + - run: dart pub get + - run: dart format --output=none --set-exit-if-changed . + - run: dart analyze + - run: dart test ``` ## Inputs @@ -36,8 +46,9 @@ The action takes the following inputs: * The available build flavors are `release` and `raw`. * The `release` flavor contains published builds. * The `raw` flavor contains unpublished builds; these can be used by - developers to test against SDK versions before a release. Note that the - `main` release channel only supports `raw` build flavor. + developers to test against SDK versions before a signed release is + available. Note that the `main` release channel only supports the `raw` + build flavor. * `architecture`: The CPU architecture to setup support for. * Valid options are `x64`, `ia32`, `arm`, and `arm64`. @@ -46,30 +57,11 @@ The action takes the following inputs: [Dart system requirements](https://dart.dev/get-dart#system-requirements) for valid combinations. -## Check static analysis, formatting, and run tests +## Outputs -Various static checks: +The action produces the following output: - 1) Check static analysis with the Dart analyzer - 2) Check code follows Dart idiomatic formatting - 3) Check that unit tests pass - -```yml -... - steps: - - - name: Install dependencies - run: dart pub get - - - name: Verify formatting - run: dart format --output=none --set-exit-if-changed . - - - name: Analyze project source - run: dart analyze - - - name: Run tests - run: dart test -``` + * `dart-version`: The version of the Dart SDK that was installed. ## Matrix testing example @@ -171,4 +163,4 @@ Contributions are welcome! Please see [CONTRIBUTING.md.md](CONTRIBUTING.md.md). ## Version history -Please see out [CHANGELOG.md](CHANGELOG.md) file. +Please see our [CHANGELOG.md](CHANGELOG.md) file. diff --git a/action.yml b/action.yml index 53daecd..5e51f16 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: "Setup Dart SDK" -description: "Setup the Dart SDK, and add it to the PATH" +description: "Download and setup the Dart SDK." branding: icon: check-circle color: blue @@ -7,7 +7,7 @@ inputs: sdk: description: >- The channel, or a specific version from a channel to install ('stable', - 'beta', 'dev', '2.7.2', '2.12.0-1.4.beta'). Using one of the three + 'beta', 'dev', '2.7.2', '2.12.0-1.4.beta'). Using one of the named channels instead of a version will give you the latest version published to that channel. required: false @@ -15,12 +15,12 @@ inputs: architecture: description: "The CPU architecture ('x64', 'ia32', 'arm', or 'arm64')." required: false - default: "x64" flavor: - description: "The build flavor ('raw' or 'release')." + description: "The build flavor ('release' or 'raw')." required: false +outputs: + dart-version: + description: 'The installed Dart version.' runs: - using: "composite" - steps: - - run: $GITHUB_ACTION_PATH/setup.sh ${{ inputs.sdk }} ${{ runner.os }} ${{ inputs.architecture }} ${{ inputs.flavor }} - shell: bash + using: "node16" + main: "dist/index.mjs" diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..42e1077 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,5 @@ +include: package:lints/recommended.yaml + +linter: + rules: + - unawaited_futures diff --git a/dist/index.mjs b/dist/index.mjs new file mode 100644 index 0000000..00dd09b --- /dev/null +++ b/dist/index.mjs @@ -0,0 +1,6864 @@ +import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; +/******/ var __webpack_modules__ = ({ + +/***/ 2690: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.issue = exports.issueCommand = void 0; +const os = __importStar(__nccwpck_require__(2037)); +const utils_1 = __nccwpck_require__(353); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 9935: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +const command_1 = __nccwpck_require__(2690); +const file_command_1 = __nccwpck_require__(5898); +const utils_1 = __nccwpck_require__(353); +const os = __importStar(__nccwpck_require__(2037)); +const path = __importStar(__nccwpck_require__(1017)); +const oidc_utils_1 = __nccwpck_require__(7901); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); + } + command_1.issueCommand('set-env', { name }, convertedVal); +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueFileCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map(input => input.trim()); +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + } + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + const filePath = process.env['GITHUB_STATE'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + } + command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = __nccwpck_require__(9050); +Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); +/** + * @deprecated use core.summary + */ +var summary_2 = __nccwpck_require__(9050); +Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); +/** + * Path exports + */ +var path_utils_1 = __nccwpck_require__(1341); +Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); +Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); +Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 5898: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +// For internal use, subject to change. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(__nccwpck_require__(7147)); +const os = __importStar(__nccwpck_require__(2037)); +const uuid_1 = __nccwpck_require__(1368); +const utils_1 = __nccwpck_require__(353); +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueFileCommand = issueFileCommand; +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + const convertedValue = utils_1.toCommandValue(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; +} +exports.prepareKeyValueMessage = prepareKeyValueMessage; +//# sourceMappingURL=file-command.js.map + +/***/ }), + +/***/ 7901: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OidcClient = void 0; +const http_client_1 = __nccwpck_require__(3658); +const auth_1 = __nccwpck_require__(2660); +const core_1 = __nccwpck_require__(9935); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + +/***/ }), + +/***/ 1341: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(__nccwpck_require__(1017)); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map + +/***/ }), + +/***/ 9050: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = __nccwpck_require__(2037); +const fs_1 = __nccwpck_require__(7147); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map + +/***/ }), + +/***/ 353: +/***/ ((__unused_webpack_module, exports) => { + + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toCommandProperties = exports.toCommandValue = void 0; +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 3409: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getExecOutput = exports.exec = void 0; +const string_decoder_1 = __nccwpck_require__(1576); +const tr = __importStar(__nccwpck_require__(1139)); +/** + * Exec a command. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code + */ +function exec(commandLine, args, options) { + return __awaiter(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + // Path to tool to execute should be first arg + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); +} +exports.exec = exec; +/** + * Exec a command and get the output. + * Output will be streamed to the live console. + * Returns promise with the exit code and collected stdout and stderr + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code, stdout, and stderr + */ +function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + let stdout = ''; + let stderr = ''; + //Using string decoder covers the case where a mult-byte character is split + const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); + const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + //flush any remaining characters + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); +} +exports.getExecOutput = getExecOutput; +//# sourceMappingURL=exec.js.map + +/***/ }), + +/***/ 1139: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.argStringToArray = exports.ToolRunner = void 0; +const os = __importStar(__nccwpck_require__(2037)); +const events = __importStar(__nccwpck_require__(2361)); +const child = __importStar(__nccwpck_require__(2081)); +const path = __importStar(__nccwpck_require__(1017)); +const io = __importStar(__nccwpck_require__(2725)); +const ioUtil = __importStar(__nccwpck_require__(573)); +const timers_1 = __nccwpck_require__(9512); +/* eslint-disable @typescript-eslint/unbound-method */ +const IS_WINDOWS = process.platform === 'win32'; +/* + * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. + */ +class ToolRunner extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool + if (IS_WINDOWS) { + // Windows + cmd file + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + // Windows + verbatim + else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } + // Windows (regular) + else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } + else { + // OSX/Linux - this can likely be improved with some form of quoting. + // creating processes on Unix is fundamentally different than Windows. + // on Unix, execvp() takes an arg array. + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + // the rest of the string ... + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } + catch (err) { + // streaming lines to console is best effort. Don't fail a build. + this._debug(`error processing line. Failed with error ${err}`); + return ''; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env['COMSPEC'] || 'cmd.exe'; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += ' '; + argline += options.windowsVerbatimArguments + ? a + : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str, end) { + return str.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return (this._endsWith(upperToolPath, '.CMD') || + this._endsWith(upperToolPath, '.BAT')); + } + _windowsQuoteCmdArg(arg) { + // for .exe, apply the normal quoting rules that libuv applies + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + // otherwise apply quoting rules specific to the cmd.exe command line parser. + // the libuv rules are generic and are not designed specifically for cmd.exe + // command line parser. + // + // for a detailed description of the cmd.exe command line parser, refer to + // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 + // need quotes for empty arg + if (!arg) { + return '""'; + } + // determine whether the arg needs to be quoted + const cmdSpecialChars = [ + ' ', + '\t', + '&', + '(', + ')', + '[', + ']', + '{', + '}', + '^', + '=', + ';', + '!', + "'", + '+', + ',', + '`', + '~', + '|', + '<', + '>', + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some(x => x === char)) { + needsQuotes = true; + break; + } + } + // short-circuit if quotes not needed + if (!needsQuotes) { + return arg; + } + // the following quoting rules are very similar to the rules that by libuv applies. + // + // 1) wrap the string in quotes + // + // 2) double-up quotes - i.e. " => "" + // + // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately + // doesn't work well with a cmd.exe command line. + // + // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. + // for example, the command line: + // foo.exe "myarg:""my val""" + // is parsed by a .NET console app into an arg array: + // [ "myarg:\"my val\"" ] + // which is the same end result when applying libuv quoting rules. although the actual + // command line from libuv quoting rules would look like: + // foo.exe "myarg:\"my val\"" + // + // 3) double-up slashes that precede a quote, + // e.g. hello \world => "hello \world" + // hello\"world => "hello\\""world" + // hello\\"world => "hello\\\\""world" + // hello world\ => "hello world\\" + // + // technically this is not required for a cmd.exe command line, or the batch argument parser. + // the reasons for including this as a .cmd quoting rule are: + // + // a) this is optimized for the scenario where the argument is passed from the .cmd file to an + // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. + // + // b) it's what we've been doing previously (by deferring to node default behavior) and we + // haven't heard any complaints about that aspect. + // + // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be + // escaped when used on the command line directly - even though within a .cmd file % can be escaped + // by using %%. + // + // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts + // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. + // + // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would + // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the + // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args + // to an external program. + // + // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. + // % can be escaped within a .cmd file. + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + // walk the string in reverse + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === '\\') { + reverse += '\\'; // double the slash + } + else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; // double the quote + } + else { + quoteHit = false; + } + } + reverse += '"'; + return reverse + .split('') + .reverse() + .join(''); + } + _uvQuoteCmdArg(arg) { + // Tool runner wraps child_process.spawn() and needs to apply the same quoting as + // Node in certain cases where the undocumented spawn option windowsVerbatimArguments + // is used. + // + // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, + // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), + // pasting copyright notice from Node within this function: + // + // Copyright Joyent, Inc. and other Node contributors. All rights reserved. + // + // 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. + if (!arg) { + // Need double quotation for empty argument + return '""'; + } + if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { + // No quotation needed + return arg; + } + if (!arg.includes('"') && !arg.includes('\\')) { + // No embedded double quotes or backslashes, so I can just wrap + // quote marks around the whole thing. + return `"${arg}"`; + } + // Expected input/output: + // input : hello"world + // output: "hello\"world" + // input : hello""world + // output: "hello\"\"world" + // input : hello\world + // output: hello\world + // input : hello\\world + // output: hello\\world + // input : hello\"world + // output: "hello\\\"world" + // input : hello\\"world + // output: "hello\\\\\"world" + // input : hello world\ + // output: "hello world\\" - note the comment in libuv actually reads "hello world\" + // but it appears the comment is wrong, it should be "hello world\\" + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + // walk the string in reverse + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === '\\') { + reverse += '\\'; + } + else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '\\'; + } + else { + quoteHit = false; + } + } + reverse += '"'; + return reverse + .split('') + .reverse() + .join(''); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 10000 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result['windowsVerbatimArguments'] = + options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter(this, void 0, void 0, function* () { + // root the tool path if it is unrooted and contains relative pathing + if (!ioUtil.isRooted(this.toolPath) && + (this.toolPath.includes('/') || + (IS_WINDOWS && this.toolPath.includes('\\')))) { + // prefer options.cwd if it is specified, however options.cwd may also need to be rooted + this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + // if the tool is only a file name, then resolve it from the PATH + // otherwise verify it exists (add extension on Windows if necessary) + this.toolPath = yield io.which(this.toolPath, true); + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug('arguments:'); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on('debug', (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ''; + if (cp.stdout) { + cp.stdout.on('data', (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ''; + if (cp.stderr) { + cp.stderr.on('data', (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && + optionsNonNull.errStream && + optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr + ? optionsNonNull.errStream + : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on('error', (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on('exit', (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on('close', (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on('done', (error, exitCode) => { + if (stdbuffer.length > 0) { + this.emit('stdline', stdbuffer); + } + if (errbuffer.length > 0) { + this.emit('errline', errbuffer); + } + cp.removeAllListeners(); + if (error) { + reject(error); + } + else { + resolve(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error('child process missing stdin'); + } + cp.stdin.end(this.options.input); + } + })); + }); + } +} +exports.ToolRunner = ToolRunner; +/** + * Convert an arg string to an array of args. Handles escaping + * + * @param argString string of arguments + * @returns string[] array of arguments + */ +function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ''; + function append(c) { + // we only escape double quotes. + if (escaped && c !== '"') { + arg += '\\'; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } + else { + append(c); + } + continue; + } + if (c === '\\' && escaped) { + append(c); + continue; + } + if (c === '\\' && inQuotes) { + escaped = true; + continue; + } + if (c === ' ' && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ''; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; +} +exports.argStringToArray = argStringToArray; +class ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; // tracks whether the process has exited and stdio is closed + this.processError = ''; + this.processExitCode = 0; + this.processExited = false; // tracks whether the process has exited + this.processStderr = false; // tracks whether stderr was written to + this.delay = 10000; // 10 seconds + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error('toolPath must not be empty'); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } + else if (this.processExited) { + this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit('debug', message); + } + _setResult() { + // determine whether there is an error + let error; + if (this.processExited) { + if (this.processError) { + error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } + else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } + else if (this.processStderr && this.options.failOnStdErr) { + error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + // clear the timeout + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit('done', error, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / + 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } +} +//# sourceMappingURL=toolrunner.js.map + +/***/ }), + +/***/ 2660: +/***/ (function(__unused_webpack_module, exports) { + + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + +/***/ }), + +/***/ 3658: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(__nccwpck_require__(3685)); +const https = __importStar(__nccwpck_require__(5687)); +const pm = __importStar(__nccwpck_require__(9697)); +const tunnel = __importStar(__nccwpck_require__(7477)); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); + }); + let socket; + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 9697: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; +//# sourceMappingURL=proxy.js.map + +/***/ }), + +/***/ 573: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var _a; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; +const fs = __importStar(__nccwpck_require__(7147)); +const path = __importStar(__nccwpck_require__(1017)); +_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; +exports.IS_WINDOWS = process.platform === 'win32'; +function exists(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + try { + yield exports.stat(fsPath); + } + catch (err) { + if (err.code === 'ENOENT') { + return false; + } + throw err; + } + return true; + }); +} +exports.exists = exists; +function isDirectory(fsPath, useStat = false) { + return __awaiter(this, void 0, void 0, function* () { + const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); + return stats.isDirectory(); + }); +} +exports.isDirectory = isDirectory; +/** + * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: + * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). + */ +function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports.IS_WINDOWS) { + return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello + ); // e.g. C: or C:\hello + } + return p.startsWith('/'); +} +exports.isRooted = isRooted; +/** + * Best effort attempt to determine whether a file exists and is executable. + * @param filePath file path to check + * @param extensions additional file extensions to try + * @return if file exists and is executable, returns the file path. otherwise empty string. + */ +function tryGetExecutablePath(filePath, extensions) { + return __awaiter(this, void 0, void 0, function* () { + let stats = undefined; + try { + // test file exists + stats = yield exports.stat(filePath); + } + catch (err) { + if (err.code !== 'ENOENT') { + // eslint-disable-next-line no-console + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + // on Windows, test for valid extension + const upperExt = path.extname(filePath).toUpperCase(); + if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } + else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + // try each extension + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = undefined; + try { + stats = yield exports.stat(filePath); + } + catch (err) { + if (err.code !== 'ENOENT') { + // eslint-disable-next-line no-console + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + // preserve the case of the actual file (since an extension was appended) + try { + const directory = path.dirname(filePath); + const upperName = path.basename(filePath).toUpperCase(); + for (const actualName of yield exports.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path.join(directory, actualName); + break; + } + } + } + catch (err) { + // eslint-disable-next-line no-console + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } + else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ''; + }); +} +exports.tryGetExecutablePath = tryGetExecutablePath; +function normalizeSeparators(p) { + p = p || ''; + if (exports.IS_WINDOWS) { + // convert slashes on Windows + p = p.replace(/\//g, '\\'); + // remove redundant slashes + return p.replace(/\\\\+/g, '\\'); + } + // remove redundant slashes + return p.replace(/\/\/+/g, '/'); +} +// on Mac/Linux, test the execute bit +// R W X R W X R W X +// 256 128 64 32 16 8 4 2 1 +function isUnixExecutable(stats) { + return ((stats.mode & 1) > 0 || + ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || + ((stats.mode & 64) > 0 && stats.uid === process.getuid())); +} +// Get the path of cmd.exe in windows +function getCmdPath() { + var _a; + return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; +} +exports.getCmdPath = getCmdPath; +//# sourceMappingURL=io-util.js.map + +/***/ }), + +/***/ 2725: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; +const assert_1 = __nccwpck_require__(9491); +const childProcess = __importStar(__nccwpck_require__(2081)); +const path = __importStar(__nccwpck_require__(1017)); +const util_1 = __nccwpck_require__(3837); +const ioUtil = __importStar(__nccwpck_require__(573)); +const exec = util_1.promisify(childProcess.exec); +const execFile = util_1.promisify(childProcess.execFile); +/** + * Copies a file or folder. + * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js + * + * @param source source path + * @param dest destination path + * @param options optional. See CopyOptions. + */ +function cp(source, dest, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + // Dest is an existing file, but not forcing + if (destStat && destStat.isFile() && !force) { + return; + } + // If dest is an existing directory, should copy inside. + const newDest = destStat && destStat.isDirectory() && copySourceDirectory + ? path.join(dest, path.basename(source)) + : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } + else { + yield cpDirRecursive(source, newDest, 0, force); + } + } + else { + if (path.relative(source, newDest) === '') { + // a file cannot be copied to itself + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); +} +exports.cp = cp; +/** + * Moves a path. + * + * @param source source path + * @param dest destination path + * @param options optional. See MoveOptions. + */ +function mv(source, dest, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + // If dest is directory copy src into dest + dest = path.join(dest, path.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } + else { + throw new Error('Destination already exists'); + } + } + } + yield mkdirP(path.dirname(dest)); + yield ioUtil.rename(source, dest); + }); +} +exports.mv = mv; +/** + * Remove a path recursively with force + * + * @param inputPath path to remove + */ +function rmRF(inputPath) { + return __awaiter(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another + // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. + // Check for invalid characters + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + try { + const cmdPath = ioUtil.getCmdPath(); + if (yield ioUtil.isDirectory(inputPath, true)) { + yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { + env: { inputPath } + }); + } + else { + yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { + env: { inputPath } + }); + } + } + catch (err) { + // if you try to delete a file that doesn't exist, desired result is achieved + // other errors are valid + if (err.code !== 'ENOENT') + throw err; + } + // Shelling out fails to remove a symlink folder with missing source, this unlink catches that + try { + yield ioUtil.unlink(inputPath); + } + catch (err) { + // if you try to delete a file that doesn't exist, desired result is achieved + // other errors are valid + if (err.code !== 'ENOENT') + throw err; + } + } + else { + let isDir = false; + try { + isDir = yield ioUtil.isDirectory(inputPath); + } + catch (err) { + // if you try to delete a file that doesn't exist, desired result is achieved + // other errors are valid + if (err.code !== 'ENOENT') + throw err; + return; + } + if (isDir) { + yield execFile(`rm`, [`-rf`, `${inputPath}`]); + } + else { + yield ioUtil.unlink(inputPath); + } + } + }); +} +exports.rmRF = rmRF; +/** + * Make a directory. Creates the full path with folders in between + * Will throw if it fails + * + * @param fsPath path to create + * @returns Promise + */ +function mkdirP(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + assert_1.ok(fsPath, 'a path argument must be provided'); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); +} +exports.mkdirP = mkdirP; +/** + * Returns path of a tool had the tool actually been invoked. Resolves via paths. + * If you check and the tool does not exist, it will throw. + * + * @param tool name of the tool + * @param check whether to check if tool exists + * @returns Promise path to tool + */ +function which(tool, check) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + // recursive when check=true + if (check) { + const result = yield which(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } + else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ''; + }); +} +exports.which = which; +/** + * Returns a list of all occurrences of the given tool on the system path. + * + * @returns Promise the paths of the tool + */ +function findInPath(tool) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + // build the list of extensions to try + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) { + for (const extension of process.env['PATHEXT'].split(path.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + // if it's rooted, return it if exists. otherwise return empty. + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + // if any path separators, return empty + if (tool.includes(path.sep)) { + return []; + } + // build the list of directories + // + // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, + // it feels like we should not do this. Checking the current directory seems like more of a use + // case of a shell, and the which() function exposed by the toolkit should strive for consistency + // across platforms. + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path.delimiter)) { + if (p) { + directories.push(p); + } + } + } + // find all matches + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); +} +exports.findInPath = findInPath; +function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null + ? true + : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; +} +function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter(this, void 0, void 0, function* () { + // Ensure there is not a run away recursive copy + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + // Recurse + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } + else { + yield copyFile(srcFile, destFile, force); + } + } + // Change the mode for the newly created directory + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); +} +// Buffered file copy +function copyFile(srcFile, destFile, force) { + return __awaiter(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + // unlink/re-link it + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } + catch (e) { + // Try to override file permission + if (e.code === 'EPERM') { + yield ioUtil.chmod(destFile, '0666'); + yield ioUtil.unlink(destFile); + } + // other errors = it doesn't exist, no work to do + } + // Copy over symlink + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); + } + else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); +} +//# sourceMappingURL=io.js.map + +/***/ }), + +/***/ 7936: +/***/ (function(module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0; +const semver = __importStar(__nccwpck_require__(7163)); +const core_1 = __nccwpck_require__(9935); +// needs to be require for core node modules to be mocked +/* eslint @typescript-eslint/no-require-imports: 0 */ +const os = __nccwpck_require__(2037); +const cp = __nccwpck_require__(2081); +const fs = __nccwpck_require__(7147); +function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter(this, void 0, void 0, function* () { + const platFilter = os.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + core_1.debug(`check ${version} satisfies ${versionSpec}`); + if (semver.satisfies(version, versionSpec) && + (!stable || candidate.stable === stable)) { + file = candidate.files.find(item => { + core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } + else { + chk = semver.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + core_1.debug(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + // clone since we're mutating the file list to be only the file that matches + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); +} +exports._findMatch = _findMatch; +function _getOsVersion() { + // TODO: add windows and other linux, arm variants + // right now filtering on version is only an ubuntu and macos scenario for tools we build for hosted (python) + const plat = os.platform(); + let version = ''; + if (plat === 'darwin') { + version = cp.execSync('sw_vers -productVersion').toString(); + } + else if (plat === 'linux') { + // lsb_release process not in some containers, readfile + // Run cat /etc/lsb-release + // DISTRIB_ID=Ubuntu + // DISTRIB_RELEASE=18.04 + // DISTRIB_CODENAME=bionic + // DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS" + const lsbContents = module.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split('\n'); + for (const line of lines) { + const parts = line.split('='); + if (parts.length === 2 && + (parts[0].trim() === 'VERSION_ID' || + parts[0].trim() === 'DISTRIB_RELEASE')) { + version = parts[1] + .trim() + .replace(/^"/, '') + .replace(/"$/, ''); + break; + } + } + } + } + return version; +} +exports._getOsVersion = _getOsVersion; +function _readLinuxVersionFile() { + const lsbReleaseFile = '/etc/lsb-release'; + const osReleaseFile = '/etc/os-release'; + let contents = ''; + if (fs.existsSync(lsbReleaseFile)) { + contents = fs.readFileSync(lsbReleaseFile).toString(); + } + else if (fs.existsSync(osReleaseFile)) { + contents = fs.readFileSync(osReleaseFile).toString(); + } + return contents; +} +exports._readLinuxVersionFile = _readLinuxVersionFile; +//# sourceMappingURL=manifest.js.map + +/***/ }), + +/***/ 721: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RetryHelper = void 0; +const core = __importStar(__nccwpck_require__(9935)); +/** + * Internal class for retries + */ +class RetryHelper { + constructor(maxAttempts, minSeconds, maxSeconds) { + if (maxAttempts < 1) { + throw new Error('max attempts should be greater than or equal to 1'); + } + this.maxAttempts = maxAttempts; + this.minSeconds = Math.floor(minSeconds); + this.maxSeconds = Math.floor(maxSeconds); + if (this.minSeconds > this.maxSeconds) { + throw new Error('min seconds should be less than or equal to max seconds'); + } + } + execute(action, isRetryable) { + return __awaiter(this, void 0, void 0, function* () { + let attempt = 1; + while (attempt < this.maxAttempts) { + // Try + try { + return yield action(); + } + catch (err) { + if (isRetryable && !isRetryable(err)) { + throw err; + } + core.info(err.message); + } + // Sleep + const seconds = this.getSleepAmount(); + core.info(`Waiting ${seconds} seconds before trying again`); + yield this.sleep(seconds); + attempt++; + } + // Last attempt + return yield action(); + }); + } + getSleepAmount() { + return (Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + + this.minSeconds); + } + sleep(seconds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise(resolve => setTimeout(resolve, seconds * 1000)); + }); + } +} +exports.RetryHelper = RetryHelper; +//# sourceMappingURL=retry-helper.js.map + +/***/ }), + +/***/ 2275: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0; +const core = __importStar(__nccwpck_require__(9935)); +const io = __importStar(__nccwpck_require__(2725)); +const fs = __importStar(__nccwpck_require__(7147)); +const mm = __importStar(__nccwpck_require__(7936)); +const os = __importStar(__nccwpck_require__(2037)); +const path = __importStar(__nccwpck_require__(1017)); +const httpm = __importStar(__nccwpck_require__(3658)); +const semver = __importStar(__nccwpck_require__(7163)); +const stream = __importStar(__nccwpck_require__(2781)); +const util = __importStar(__nccwpck_require__(3837)); +const assert_1 = __nccwpck_require__(9491); +const v4_1 = __importDefault(__nccwpck_require__(4559)); +const exec_1 = __nccwpck_require__(3409); +const retry_helper_1 = __nccwpck_require__(721); +class HTTPError extends Error { + constructor(httpStatusCode) { + super(`Unexpected HTTP response: ${httpStatusCode}`); + this.httpStatusCode = httpStatusCode; + Object.setPrototypeOf(this, new.target.prototype); + } +} +exports.HTTPError = HTTPError; +const IS_WINDOWS = process.platform === 'win32'; +const IS_MAC = process.platform === 'darwin'; +const userAgent = 'actions/tool-cache'; +/** + * Download a tool from an url and stream it into a file + * + * @param url url of tool to download + * @param dest path to download tool + * @param auth authorization header + * @param headers other headers + * @returns path to downloaded tool + */ +function downloadTool(url, dest, auth, headers) { + return __awaiter(this, void 0, void 0, function* () { + dest = dest || path.join(_getTempDirectory(), v4_1.default()); + yield io.mkdirP(path.dirname(dest)); + core.debug(`Downloading ${url}`); + core.debug(`Destination ${dest}`); + const maxAttempts = 3; + const minSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS', 10); + const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20); + const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); + return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () { + return yield downloadToolAttempt(url, dest || '', auth, headers); + }), (err) => { + if (err instanceof HTTPError && err.httpStatusCode) { + // Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests + if (err.httpStatusCode < 500 && + err.httpStatusCode !== 408 && + err.httpStatusCode !== 429) { + return false; + } + } + // Otherwise retry + return true; + }); + }); +} +exports.downloadTool = downloadTool; +function downloadToolAttempt(url, dest, auth, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (fs.existsSync(dest)) { + throw new Error(`Destination file path ${dest} already exists`); + } + // Get the response headers + const http = new httpm.HttpClient(userAgent, [], { + allowRetries: false + }); + if (auth) { + core.debug('set auth'); + if (headers === undefined) { + headers = {}; + } + headers.authorization = auth; + } + const response = yield http.get(url, headers); + if (response.message.statusCode !== 200) { + const err = new HTTPError(response.message.statusCode); + core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + throw err; + } + // Download the response body + const pipeline = util.promisify(stream.pipeline); + const responseMessageFactory = _getGlobal('TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY', () => response.message); + const readStream = responseMessageFactory(); + let succeeded = false; + try { + yield pipeline(readStream, fs.createWriteStream(dest)); + core.debug('download complete'); + succeeded = true; + return dest; + } + finally { + // Error, delete dest before retry + if (!succeeded) { + core.debug('download failed'); + try { + yield io.rmRF(dest); + } + catch (err) { + core.debug(`Failed to delete '${dest}'. ${err.message}`); + } + } + } + }); +} +/** + * Extract a .7z file + * + * @param file path to the .7z file + * @param dest destination directory. Optional. + * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this + * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will + * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is + * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line + * interface, it is smaller than the full command line interface, and it does support long paths. At the + * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website. + * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path + * to 7zr.exe can be pass to this function. + * @returns path to the destination directory + */ +function extract7z(file, dest, _7zPath) { + return __awaiter(this, void 0, void 0, function* () { + assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS'); + assert_1.ok(file, 'parameter "file" is required'); + dest = yield _createExtractFolder(dest); + const originalCwd = process.cwd(); + process.chdir(dest); + if (_7zPath) { + try { + const logLevel = core.isDebug() ? '-bb1' : '-bb0'; + const args = [ + 'x', + logLevel, + '-bd', + '-sccUTF-8', + file + ]; + const options = { + silent: true + }; + yield exec_1.exec(`"${_7zPath}"`, args, options); + } + finally { + process.chdir(originalCwd); + } + } + else { + const escapedScript = path + .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1') + .replace(/'/g, "''") + .replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines + const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; + const args = [ + '-NoLogo', + '-Sta', + '-NoProfile', + '-NonInteractive', + '-ExecutionPolicy', + 'Unrestricted', + '-Command', + command + ]; + const options = { + silent: true + }; + try { + const powershellPath = yield io.which('powershell', true); + yield exec_1.exec(`"${powershellPath}"`, args, options); + } + finally { + process.chdir(originalCwd); + } + } + return dest; + }); +} +exports.extract7z = extract7z; +/** + * Extract a compressed tar archive + * + * @param file path to the tar + * @param dest destination directory. Optional. + * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional. + * @returns path to the destination directory + */ +function extractTar(file, dest, flags = 'xz') { + return __awaiter(this, void 0, void 0, function* () { + if (!file) { + throw new Error("parameter 'file' is required"); + } + // Create dest + dest = yield _createExtractFolder(dest); + // Determine whether GNU tar + core.debug('Checking tar --version'); + let versionOutput = ''; + yield exec_1.exec('tar --version', [], { + ignoreReturnCode: true, + silent: true, + listeners: { + stdout: (data) => (versionOutput += data.toString()), + stderr: (data) => (versionOutput += data.toString()) + } + }); + core.debug(versionOutput.trim()); + const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR'); + // Initialize args + let args; + if (flags instanceof Array) { + args = flags; + } + else { + args = [flags]; + } + if (core.isDebug() && !flags.includes('v')) { + args.push('-v'); + } + let destArg = dest; + let fileArg = file; + if (IS_WINDOWS && isGnuTar) { + args.push('--force-local'); + destArg = dest.replace(/\\/g, '/'); + // Technically only the dest needs to have `/` but for aesthetic consistency + // convert slashes in the file arg too. + fileArg = file.replace(/\\/g, '/'); + } + if (isGnuTar) { + // Suppress warnings when using GNU tar to extract archives created by BSD tar + args.push('--warning=no-unknown-keyword'); + args.push('--overwrite'); + } + args.push('-C', destArg, '-f', fileArg); + yield exec_1.exec(`tar`, args); + return dest; + }); +} +exports.extractTar = extractTar; +/** + * Extract a xar compatible archive + * + * @param file path to the archive + * @param dest destination directory. Optional. + * @param flags flags for the xar. Optional. + * @returns path to the destination directory + */ +function extractXar(file, dest, flags = []) { + return __awaiter(this, void 0, void 0, function* () { + assert_1.ok(IS_MAC, 'extractXar() not supported on current OS'); + assert_1.ok(file, 'parameter "file" is required'); + dest = yield _createExtractFolder(dest); + let args; + if (flags instanceof Array) { + args = flags; + } + else { + args = [flags]; + } + args.push('-x', '-C', dest, '-f', file); + if (core.isDebug()) { + args.push('-v'); + } + const xarPath = yield io.which('xar', true); + yield exec_1.exec(`"${xarPath}"`, _unique(args)); + return dest; + }); +} +exports.extractXar = extractXar; +/** + * Extract a zip + * + * @param file path to the zip + * @param dest destination directory. Optional. + * @returns path to the destination directory + */ +function extractZip(file, dest) { + return __awaiter(this, void 0, void 0, function* () { + if (!file) { + throw new Error("parameter 'file' is required"); + } + dest = yield _createExtractFolder(dest); + if (IS_WINDOWS) { + yield extractZipWin(file, dest); + } + else { + yield extractZipNix(file, dest); + } + return dest; + }); +} +exports.extractZip = extractZip; +function extractZipWin(file, dest) { + return __awaiter(this, void 0, void 0, function* () { + // build the powershell command + const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines + const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const pwshPath = yield io.which('pwsh', false); + //To match the file overwrite behavior on nix systems, we use the overwrite = true flag for ExtractToDirectory + //and the -Force flag for Expand-Archive as a fallback + if (pwshPath) { + //attempt to use pwsh with ExtractToDirectory, if this fails attempt Expand-Archive + const pwshCommand = [ + `$ErrorActionPreference = 'Stop' ;`, + `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`, + `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`, + `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;` + ].join(' '); + const args = [ + '-NoLogo', + '-NoProfile', + '-NonInteractive', + '-ExecutionPolicy', + 'Unrestricted', + '-Command', + pwshCommand + ]; + core.debug(`Using pwsh at path: ${pwshPath}`); + yield exec_1.exec(`"${pwshPath}"`, args); + } + else { + const powershellCommand = [ + `$ErrorActionPreference = 'Stop' ;`, + `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`, + `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`, + `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }` + ].join(' '); + const args = [ + '-NoLogo', + '-Sta', + '-NoProfile', + '-NonInteractive', + '-ExecutionPolicy', + 'Unrestricted', + '-Command', + powershellCommand + ]; + const powershellPath = yield io.which('powershell', true); + core.debug(`Using powershell at path: ${powershellPath}`); + yield exec_1.exec(`"${powershellPath}"`, args); + } + }); +} +function extractZipNix(file, dest) { + return __awaiter(this, void 0, void 0, function* () { + const unzipPath = yield io.which('unzip', true); + const args = [file]; + if (!core.isDebug()) { + args.unshift('-q'); + } + args.unshift('-o'); //overwrite with -o, otherwise a prompt is shown which freezes the run + yield exec_1.exec(`"${unzipPath}"`, args, { cwd: dest }); + }); +} +/** + * Caches a directory and installs it into the tool cacheDir + * + * @param sourceDir the directory to cache into tools + * @param tool tool name + * @param version version of the tool. semver format + * @param arch architecture of the tool. Optional. Defaults to machine architecture + */ +function cacheDir(sourceDir, tool, version, arch) { + return __awaiter(this, void 0, void 0, function* () { + version = semver.clean(version) || version; + arch = arch || os.arch(); + core.debug(`Caching tool ${tool} ${version} ${arch}`); + core.debug(`source dir: ${sourceDir}`); + if (!fs.statSync(sourceDir).isDirectory()) { + throw new Error('sourceDir is not a directory'); + } + // Create the tool dir + const destPath = yield _createToolPath(tool, version, arch); + // copy each child item. do not move. move can fail on Windows + // due to anti-virus software having an open handle on a file. + for (const itemName of fs.readdirSync(sourceDir)) { + const s = path.join(sourceDir, itemName); + yield io.cp(s, destPath, { recursive: true }); + } + // write .complete + _completeToolPath(tool, version, arch); + return destPath; + }); +} +exports.cacheDir = cacheDir; +/** + * Caches a downloaded file (GUID) and installs it + * into the tool cache with a given targetName + * + * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid. + * @param targetFile the name of the file name in the tools directory + * @param tool tool name + * @param version version of the tool. semver format + * @param arch architecture of the tool. Optional. Defaults to machine architecture + */ +function cacheFile(sourceFile, targetFile, tool, version, arch) { + return __awaiter(this, void 0, void 0, function* () { + version = semver.clean(version) || version; + arch = arch || os.arch(); + core.debug(`Caching tool ${tool} ${version} ${arch}`); + core.debug(`source file: ${sourceFile}`); + if (!fs.statSync(sourceFile).isFile()) { + throw new Error('sourceFile is not a file'); + } + // create the tool dir + const destFolder = yield _createToolPath(tool, version, arch); + // copy instead of move. move can fail on Windows due to + // anti-virus software having an open handle on a file. + const destPath = path.join(destFolder, targetFile); + core.debug(`destination file ${destPath}`); + yield io.cp(sourceFile, destPath); + // write .complete + _completeToolPath(tool, version, arch); + return destFolder; + }); +} +exports.cacheFile = cacheFile; +/** + * Finds the path to a tool version in the local installed tool cache + * + * @param toolName name of the tool + * @param versionSpec version of the tool + * @param arch optional arch. defaults to arch of computer + */ +function find(toolName, versionSpec, arch) { + if (!toolName) { + throw new Error('toolName parameter is required'); + } + if (!versionSpec) { + throw new Error('versionSpec parameter is required'); + } + arch = arch || os.arch(); + // attempt to resolve an explicit version + if (!isExplicitVersion(versionSpec)) { + const localVersions = findAllVersions(toolName, arch); + const match = evaluateVersions(localVersions, versionSpec); + versionSpec = match; + } + // check for the explicit version in the cache + let toolPath = ''; + if (versionSpec) { + versionSpec = semver.clean(versionSpec) || ''; + const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch); + core.debug(`checking cache: ${cachePath}`); + if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) { + core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + toolPath = cachePath; + } + else { + core.debug('not found'); + } + } + return toolPath; +} +exports.find = find; +/** + * Finds the paths to all versions of a tool that are installed in the local tool cache + * + * @param toolName name of the tool + * @param arch optional arch. defaults to arch of computer + */ +function findAllVersions(toolName, arch) { + const versions = []; + arch = arch || os.arch(); + const toolPath = path.join(_getCacheDirectory(), toolName); + if (fs.existsSync(toolPath)) { + const children = fs.readdirSync(toolPath); + for (const child of children) { + if (isExplicitVersion(child)) { + const fullPath = path.join(toolPath, child, arch || ''); + if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) { + versions.push(child); + } + } + } + } + return versions; +} +exports.findAllVersions = findAllVersions; +function getManifestFromRepo(owner, repo, auth, branch = 'master') { + return __awaiter(this, void 0, void 0, function* () { + let releases = []; + const treeUrl = `https://github.com/gitapi/repos/${owner}/${repo}/git/trees/${branch}`; + const http = new httpm.HttpClient('tool-cache'); + const headers = {}; + if (auth) { + core.debug('set auth'); + headers.authorization = auth; + } + const response = yield http.getJson(treeUrl, headers); + if (!response.result) { + return releases; + } + let manifestUrl = ''; + for (const item of response.result.tree) { + if (item.path === 'versions-manifest.json') { + manifestUrl = item.url; + break; + } + } + headers['accept'] = 'application/vnd.github.VERSION.raw'; + let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody(); + if (versionsRaw) { + // shouldn't be needed but protects against invalid json saved with BOM + versionsRaw = versionsRaw.replace(/^\uFEFF/, ''); + try { + releases = JSON.parse(versionsRaw); + } + catch (_a) { + core.debug('Invalid json'); + } + } + return releases; + }); +} +exports.getManifestFromRepo = getManifestFromRepo; +function findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) { + return __awaiter(this, void 0, void 0, function* () { + // wrap the internal impl + const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); + return match; + }); +} +exports.findFromManifest = findFromManifest; +function _createExtractFolder(dest) { + return __awaiter(this, void 0, void 0, function* () { + if (!dest) { + // create a temp dir + dest = path.join(_getTempDirectory(), v4_1.default()); + } + yield io.mkdirP(dest); + return dest; + }); +} +function _createToolPath(tool, version, arch) { + return __awaiter(this, void 0, void 0, function* () { + const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || ''); + core.debug(`destination ${folderPath}`); + const markerPath = `${folderPath}.complete`; + yield io.rmRF(folderPath); + yield io.rmRF(markerPath); + yield io.mkdirP(folderPath); + return folderPath; + }); +} +function _completeToolPath(tool, version, arch) { + const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || ''); + const markerPath = `${folderPath}.complete`; + fs.writeFileSync(markerPath, ''); + core.debug('finished caching tool'); +} +/** + * Check if version string is explicit + * + * @param versionSpec version string to check + */ +function isExplicitVersion(versionSpec) { + const c = semver.clean(versionSpec) || ''; + core.debug(`isExplicit: ${c}`); + const valid = semver.valid(c) != null; + core.debug(`explicit? ${valid}`); + return valid; +} +exports.isExplicitVersion = isExplicitVersion; +/** + * Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec` + * + * @param versions array of versions to evaluate + * @param versionSpec semantic version spec to satisfy + */ +function evaluateVersions(versions, versionSpec) { + let version = ''; + core.debug(`evaluating ${versions.length} versions`); + versions = versions.sort((a, b) => { + if (semver.gt(a, b)) { + return 1; + } + return -1; + }); + for (let i = versions.length - 1; i >= 0; i--) { + const potential = versions[i]; + const satisfied = semver.satisfies(potential, versionSpec); + if (satisfied) { + version = potential; + break; + } + } + if (version) { + core.debug(`matched: ${version}`); + } + else { + core.debug('match not found'); + } + return version; +} +exports.evaluateVersions = evaluateVersions; +/** + * Gets RUNNER_TOOL_CACHE + */ +function _getCacheDirectory() { + const cacheDirectory = process.env['RUNNER_TOOL_CACHE'] || ''; + assert_1.ok(cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined'); + return cacheDirectory; +} +/** + * Gets RUNNER_TEMP + */ +function _getTempDirectory() { + const tempDirectory = process.env['RUNNER_TEMP'] || ''; + assert_1.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined'); + return tempDirectory; +} +/** + * Gets a global variable + */ +function _getGlobal(key, defaultValue) { + /* eslint-disable @typescript-eslint/no-explicit-any */ + const value = global[key]; + /* eslint-enable @typescript-eslint/no-explicit-any */ + return value !== undefined ? value : defaultValue; +} +/** + * Returns an array of unique values. + * @param values Values to make unique. + */ +function _unique(values) { + return Array.from(new Set(values)); +} +//# sourceMappingURL=tool-cache.js.map + +/***/ }), + +/***/ 6993: +/***/ ((module) => { + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); +} + +module.exports = bytesToUuid; + + +/***/ }), + +/***/ 3480: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = __nccwpck_require__(6113); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; + + +/***/ }), + +/***/ 4559: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var rng = __nccwpck_require__(3480); +var bytesToUuid = __nccwpck_require__(6993); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; + + +/***/ }), + +/***/ 7163: +/***/ ((module, exports) => { + +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var t = exports.tokens = {} +var R = 0 + +function tok (n) { + t[n] = R++ +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' + +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' + +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' + +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' + +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' + +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' + +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' + +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAIN] + ')' + + '\\s*$' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(b, a, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + if (this.value === '') { + return true + } + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) +} + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + pr + } else if (xm) { + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr + } else if (xp) { + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version, options) { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) { + return null + } + + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) +} + + +/***/ }), + +/***/ 7477: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(8162); + + +/***/ }), + +/***/ 8162: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +var net = __nccwpck_require__(1808); +var tls = __nccwpck_require__(4404); +var http = __nccwpck_require__(3685); +var https = __nccwpck_require__(5687); +var events = __nccwpck_require__(2361); +var assert = __nccwpck_require__(9491); +var util = __nccwpck_require__(3837); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); + } +} else { + debug = function() {}; +} +exports.debug = debug; // for test + + +/***/ }), + +/***/ 1368: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); + +var _v = _interopRequireDefault(__nccwpck_require__(3258)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(2559)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(2872)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(5034)); + +var _nil = _interopRequireDefault(__nccwpck_require__(6051)); + +var _version = _interopRequireDefault(__nccwpck_require__(6630)); + +var _validate = _interopRequireDefault(__nccwpck_require__(6879)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(2992)); + +var _parse = _interopRequireDefault(__nccwpck_require__(3783)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +/***/ 1102: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports["default"] = _default; + +/***/ }), + +/***/ 6051: +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; + +/***/ }), + +/***/ 3783: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6879)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports["default"] = _default; + +/***/ }), + +/***/ 4557: +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + +/***/ }), + +/***/ 160: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} + +/***/ }), + +/***/ 4850: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports["default"] = _default; + +/***/ }), + +/***/ 2992: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6879)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +/***/ 3258: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(160)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(2992)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); +} + +var _default = v1; +exports["default"] = _default; + +/***/ }), + +/***/ 2559: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(810)); + +var _md = _interopRequireDefault(__nccwpck_require__(1102)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; + +/***/ }), + +/***/ 810: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(__nccwpck_require__(2992)); + +var _parse = _interopRequireDefault(__nccwpck_require__(3783)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +/***/ }), + +/***/ 2872: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(160)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(2992)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.default)(rnds); +} + +var _default = v4; +exports["default"] = _default; + +/***/ }), + +/***/ 5034: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(810)); + +var _sha = _interopRequireDefault(__nccwpck_require__(4850)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; + +/***/ }), + +/***/ 6879: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(4557)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +/***/ 6630: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6879)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +var _default = version; +exports["default"] = _default; + +/***/ }), + +/***/ 9491: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert"); + +/***/ }), + +/***/ 2081: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process"); + +/***/ }), + +/***/ 6113: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto"); + +/***/ }), + +/***/ 2361: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events"); + +/***/ }), + +/***/ 7147: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs"); + +/***/ }), + +/***/ 3685: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http"); + +/***/ }), + +/***/ 5687: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https"); + +/***/ }), + +/***/ 8188: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("module"); + +/***/ }), + +/***/ 1808: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net"); + +/***/ }), + +/***/ 2037: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os"); + +/***/ }), + +/***/ 1017: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path"); + +/***/ }), + +/***/ 7282: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("process"); + +/***/ }), + +/***/ 2781: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("stream"); + +/***/ }), + +/***/ 1576: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder"); + +/***/ }), + +/***/ 9512: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers"); + +/***/ }), + +/***/ 4404: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls"); + +/***/ }), + +/***/ 3837: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); + +/***/ }), + +/***/ 8405: +/***/ ((__webpack_module__, __unused_webpack___webpack_exports__, __nccwpck_require__) => { + +var _actions_core__WEBPACK_IMPORTED_MODULE_0___namespace_cache; +var _actions_exec__WEBPACK_IMPORTED_MODULE_1___namespace_cache; +var _actions_tool_cache__WEBPACK_IMPORTED_MODULE_3___namespace_cache; +var fs__WEBPACK_IMPORTED_MODULE_4___namespace_cache; +var os__WEBPACK_IMPORTED_MODULE_6___namespace_cache; +var process__WEBPACK_IMPORTED_MODULE_7___namespace_cache; +__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { +/* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(9935); +/* harmony import */ var _actions_exec__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3409); +/* harmony import */ var _actions_http_client__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(3658); +/* harmony import */ var _actions_tool_cache__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(2275); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(7147); +/* harmony import */ var module__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(8188); +/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(2037); +/* harmony import */ var process__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(7282); +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + + + + + + + + + +const require = module__WEBPACK_IMPORTED_MODULE_5__.createRequire(import.meta.url); + +// Setup properties for JS interop in Dart. + +globalThis.self = globalThis; +globalThis.core = /*#__PURE__*/ (_actions_core__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (_actions_core__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __nccwpck_require__.t(_actions_core__WEBPACK_IMPORTED_MODULE_0__, 2))); +globalThis.exec = /*#__PURE__*/ (_actions_exec__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (_actions_exec__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __nccwpck_require__.t(_actions_exec__WEBPACK_IMPORTED_MODULE_1__, 2))); +globalThis.HttpClient = _actions_http_client__WEBPACK_IMPORTED_MODULE_2__.HttpClient; +globalThis.toolCache = /*#__PURE__*/ (_actions_tool_cache__WEBPACK_IMPORTED_MODULE_3___namespace_cache || (_actions_tool_cache__WEBPACK_IMPORTED_MODULE_3___namespace_cache = __nccwpck_require__.t(_actions_tool_cache__WEBPACK_IMPORTED_MODULE_3__, 2))); +globalThis.fs = /*#__PURE__*/ (fs__WEBPACK_IMPORTED_MODULE_4___namespace_cache || (fs__WEBPACK_IMPORTED_MODULE_4___namespace_cache = __nccwpck_require__.t(fs__WEBPACK_IMPORTED_MODULE_4__, 2))); +globalThis.os = /*#__PURE__*/ (os__WEBPACK_IMPORTED_MODULE_6___namespace_cache || (os__WEBPACK_IMPORTED_MODULE_6___namespace_cache = __nccwpck_require__.t(os__WEBPACK_IMPORTED_MODULE_6__, 2))); +globalThis.process = /*#__PURE__*/ (process__WEBPACK_IMPORTED_MODULE_7___namespace_cache || (process__WEBPACK_IMPORTED_MODULE_7___namespace_cache = __nccwpck_require__.t(process__WEBPACK_IMPORTED_MODULE_7__, 2))); +globalThis.location = { href: `file://${process__WEBPACK_IMPORTED_MODULE_7__.cwd()}/`} + +globalThis.dartMainRunner = async function(main, args) { + const dir = process__WEBPACK_IMPORTED_MODULE_7__.argv[2]; + await main(dir); +} + +async function scriptMain() { + // We have to load `main.js` here so that the `dartMainRunner` hook is + // registered before the IIFE in `dart_main.js` runs. + require('../dist/main.cjs'); +} + +if (require.main === require.module) { + await scriptMain(); +} + +__webpack_async_result__(); +} catch(e) { __webpack_async_result__(e); } }, 1); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/async module */ +/******/ (() => { +/******/ var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__"; +/******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__"; +/******/ var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__"; +/******/ var resolveQueue = (queue) => { +/******/ if(queue && !queue.d) { +/******/ queue.d = 1; +/******/ queue.forEach((fn) => (fn.r--)); +/******/ queue.forEach((fn) => (fn.r-- ? fn.r++ : fn())); +/******/ } +/******/ } +/******/ var wrapDeps = (deps) => (deps.map((dep) => { +/******/ if(dep !== null && typeof dep === "object") { +/******/ if(dep[webpackQueues]) return dep; +/******/ if(dep.then) { +/******/ var queue = []; +/******/ queue.d = 0; +/******/ dep.then((r) => { +/******/ obj[webpackExports] = r; +/******/ resolveQueue(queue); +/******/ }, (e) => { +/******/ obj[webpackError] = e; +/******/ resolveQueue(queue); +/******/ }); +/******/ var obj = {}; +/******/ obj[webpackQueues] = (fn) => (fn(queue)); +/******/ return obj; +/******/ } +/******/ } +/******/ var ret = {}; +/******/ ret[webpackQueues] = x => {}; +/******/ ret[webpackExports] = dep; +/******/ return ret; +/******/ })); +/******/ __nccwpck_require__.a = (module, body, hasAwait) => { +/******/ var queue; +/******/ hasAwait && ((queue = []).d = 1); +/******/ var depQueues = new Set(); +/******/ var exports = module.exports; +/******/ var currentDeps; +/******/ var outerResolve; +/******/ var reject; +/******/ var promise = new Promise((resolve, rej) => { +/******/ reject = rej; +/******/ outerResolve = resolve; +/******/ }); +/******/ promise[webpackExports] = exports; +/******/ promise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise["catch"](x => {})); +/******/ module.exports = promise; +/******/ body((deps) => { +/******/ currentDeps = wrapDeps(deps); +/******/ var fn; +/******/ var getResult = () => (currentDeps.map((d) => { +/******/ if(d[webpackError]) throw d[webpackError]; +/******/ return d[webpackExports]; +/******/ })) +/******/ var promise = new Promise((resolve) => { +/******/ fn = () => (resolve(getResult)); +/******/ fn.r = 0; +/******/ var fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn)))); +/******/ currentDeps.map((dep) => (dep[webpackQueues](fnQueue))); +/******/ }); +/******/ return fn.r ? promise : getResult(); +/******/ }, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue))); +/******/ queue && (queue.d = 0); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/create fake namespace object */ +/******/ (() => { +/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); +/******/ var leafPrototypes; +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 16: return value when it's Promise-like +/******/ // mode & 8|1: behave like require +/******/ __nccwpck_require__.t = function(value, mode) { +/******/ if(mode & 1) value = this(value); +/******/ if(mode & 8) return value; +/******/ if(typeof value === 'object' && value) { +/******/ if((mode & 4) && value.__esModule) return value; +/******/ if((mode & 16) && typeof value.then === 'function') return value; +/******/ } +/******/ var ns = Object.create(null); +/******/ __nccwpck_require__.r(ns); +/******/ var def = {}; +/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; +/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { +/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); +/******/ } +/******/ def['default'] = () => (value); +/******/ __nccwpck_require__.d(ns, def); +/******/ return ns; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __nccwpck_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/"; +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module used 'module' so it can't be inlined +/******/ var __webpack_exports__ = __nccwpck_require__(8405); +/******/ __webpack_exports__ = await __webpack_exports__; +/******/ diff --git a/dist/main.cjs b/dist/main.cjs new file mode 100644 index 0000000..bfcb103 --- /dev/null +++ b/dist/main.cjs @@ -0,0 +1,4975 @@ +(function dartProgram(){function copyProperties(a,b){var s=Object.keys(a) +for(var r=0;r=0)return true +if(typeof version=="function"&&version.length==0){var q=version() +if(/^\d+\.\d+\.\d+\.\d+$/.test(q))return true}}catch(p){}return false}() +function inherit(a,b){a.prototype.constructor=a +a.prototype["$i"+a.name]=a +if(b!=null){if(z){a.prototype.__proto__=b.prototype +return}var s=Object.create(b.prototype) +copyProperties(a.prototype,s) +a.prototype=s}}function inheritMany(a,b){for(var s=0;s>>6}, +jp(a){a=a+((a&67108863)<<3)&536870911 +a^=a>>>11 +return a+((a&16383)<<15)&536870911}, +em(a,b,c){return a}, +jo(a,b,c,d){A.cP(b,"start") +if(c!=null){A.cP(c,"end") +if(b>c)A.a6(A.ag(b,0,c,"start",null))}return new A.aI(a,b,c,d.i("aI<0>"))}, +j9(){return new A.bx("No element")}, +cv:function cv(a){this.a=a}, +cb:function cb(a){this.a=a}, +eS:function eS(){}, +bd:function bd(){}, +S:function S(){}, +aI:function aI(a,b,c,d){var _=this +_.a=a +_.b=b +_.c=c +_.$ti=d}, +ae:function ae(a,b,c){var _=this +_.a=a +_.b=b +_.c=0 +_.d=null +_.$ti=c}, +aF:function aF(a,b,c){this.a=a +this.b=b +this.$ti=c}, +f6:function f6(a,b,c){this.a=a +this.b=b +this.$ti=c}, +aL:function aL(a,b,c){this.a=a +this.b=b +this.$ti=c}, +by:function by(a,b){this.a=a +this.$ti=b}, +bz:function bz(a,b){this.a=a +this.$ti=b}, +Q:function Q(){}, +aK:function aK(){}, +aZ:function aZ(){}, +iB(a){var s=v.mangledGlobalNames[a] +if(s!=null)return s +return"minified:"+a}, +kU(a,b){var s +if(b!=null){s=b.x +if(s!=null)return s}return t.p.b(a)}, +o(a){var s +if(typeof a=="string")return a +if(typeof a=="number"){if(a!==0)return""+a}else if(!0===a)return"true" +else if(!1===a)return"false" +else if(a==null)return"null" +s=J.es(a) +return s}, +cO(a){var s,r=$.hz +if(r==null)r=$.hz=Symbol("identityHashCode") +s=a[r] +if(s==null){s=Math.random()*0x3fffffff|0 +a[r]=s}return s}, +hA(a,b){var s,r,q,p,o,n=null,m=/^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(a) +if(m==null)return n +if(3>=m.length)return A.m(m,3) +s=m[3] +if(b==null){if(s!=null)return parseInt(a,10) +if(m[2]!=null)return parseInt(a,16) +return n}if(b<2||b>36)throw A.b(A.ag(b,2,36,"radix",n)) +if(b===10&&s!=null)return parseInt(a,10) +if(b<10||s==null){r=b<=10?47+b:86+b +q=m[1] +for(p=q.length,o=0;or)return n}return parseInt(a,b)}, +eP(a){return A.jh(a)}, +jh(a){var s,r,q,p +if(a instanceof A.x)return A.O(A.aw(a),null) +s=J.b5(a) +if(s===B.B||s===B.D||t.o.b(a)){r=B.l(a) +if(r!=="Object"&&r!=="")return r +q=a.constructor +if(typeof q=="function"){p=q.name +if(typeof p=="string"&&p!=="Object"&&p!=="")return p}}return A.O(A.aw(a),null)}, +ji(){if(!!self.location)return self.location.href +return null}, +jj(a,b,c){var s,r,q,p +if(c<=500&&b===0&&c===a.length)return String.fromCharCode.apply(null,a) +for(s=b,r="";s>>0,s&1023|56320)}}throw A.b(A.ag(a,0,1114111,null,null))}, +kO(a){throw A.b(A.iq(a))}, +m(a,b){if(a==null)J.a0(a) +throw A.b(A.b4(a,b))}, +b4(a,b){var s,r="index" +if(!A.ii(b))return new A.ac(!0,b,r,null) +s=A.ej(J.a0(a)) +if(b<0||b>=s)return A.y(b,s,a,r) +return new A.bu(null,null,!0,b,r,"Value not in range")}, +iq(a){return new A.ac(!0,a,null,null)}, +b(a){var s,r +if(a==null)a=new A.ai() +s=new Error() +s.dartException=a +r=A.l3 +if("defineProperty" in Object){Object.defineProperty(s,"message",{get:r}) +s.name=""}else s.toString=r +return s}, +l3(){return J.es(this.dartException)}, +a6(a){throw A.b(a)}, +iA(a){throw A.b(A.aS(a))}, +aj(a){var s,r,q,p,o,n +a=A.kZ(a.replace(String({}),"$receiver$")) +s=a.match(/\\\$[a-zA-Z]+\\\$/g) +if(s==null)s=A.t([],t.s) +r=s.indexOf("\\$arguments\\$") +q=s.indexOf("\\$argumentsExpr\\$") +p=s.indexOf("\\$expr\\$") +o=s.indexOf("\\$method\\$") +n=s.indexOf("\\$receiver\\$") +return new A.eY(a.replace(new RegExp("\\\\\\$arguments\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$","g"),"((?:x|[^x])*)"),r,q,p,o,n)}, +eZ(a){return function($expr$){var $argumentsExpr$="$arguments$" +try{$expr$.$method$($argumentsExpr$)}catch(s){return s.message}}(a)}, +hG(a){return function($expr$){try{$expr$.$method$}catch(s){return s.message}}(a)}, +fS(a,b){var s=b==null,r=s?null:b.method +return new A.cu(a,r,s?null:b.receiver)}, +ay(a){var s +if(a==null)return new A.eL(a) +if(a instanceof A.be){s=a.a +return A.ax(a,s==null?t.K.a(s):s)}if(typeof a!=="object")return a +if("dartException" in a)return A.ax(a,a.dartException) +return A.kz(a)}, +ax(a,b){if(t.Q.b(b))if(b.$thrownJsError==null)b.$thrownJsError=a +return b}, +kz(a){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e=null +if(!("message" in a))return a +s=a.message +if("number" in a&&typeof a.number=="number"){r=a.number +q=r&65535 +if((B.d.Z(r,16)&8191)===10)switch(q){case 438:return A.ax(a,A.fS(A.o(s)+" (Error "+q+")",e)) +case 445:case 5007:p=A.o(s) +return A.ax(a,new A.bt(p+" (Error "+q+")",e))}}if(a instanceof TypeError){o=$.iG() +n=$.iH() +m=$.iI() +l=$.iJ() +k=$.iM() +j=$.iN() +i=$.iL() +$.iK() +h=$.iP() +g=$.iO() +f=o.G(s) +if(f!=null)return A.ax(a,A.fS(A.z(s),f)) +else{f=n.G(s) +if(f!=null){f.method="call" +return A.ax(a,A.fS(A.z(s),f))}else{f=m.G(s) +if(f==null){f=l.G(s) +if(f==null){f=k.G(s) +if(f==null){f=j.G(s) +if(f==null){f=i.G(s) +if(f==null){f=l.G(s) +if(f==null){f=h.G(s) +if(f==null){f=g.G(s) +p=f!=null}else p=!0}else p=!0}else p=!0}else p=!0}else p=!0}else p=!0}else p=!0 +if(p){A.z(s) +return A.ax(a,new A.bt(s,f==null?e:f.method))}}}return A.ax(a,new A.d7(typeof s=="string"?s:""))}if(a instanceof RangeError){if(typeof s=="string"&&s.indexOf("call stack")!==-1)return new A.bw() +s=function(b){try{return String(b)}catch(d){}return null}(a) +return A.ax(a,new A.ac(!1,e,e,typeof s=="string"?s.replace(/^RangeError:\s*/,""):s))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof s=="string"&&s==="too much recursion")return new A.bw() +return a}, +aO(a){var s +if(a instanceof A.be)return a.b +if(a==null)return new A.bL(a) +s=a.$cachedTrace +if(s!=null)return s +return a.$cachedTrace=new A.bL(a)}, +ix(a){if(a==null||typeof a!="object")return J.fP(a) +else return A.cO(a)}, +kK(a,b){var s,r,q,p=a.length +for(s=0;s=0 +else if(b instanceof A.bk){s=B.a.I(a,c) +return b.b.test(s)}else{s=J.iY(b,B.a.I(a,c)) +return!s.gbh(s)}}, +kZ(a){if(/[[\]{}()*+?.\\^$|]/.test(a))return a.replace(/[[\]{}()*+?.\\^$|]/g,"\\$&") +return a}, +eY:function eY(a,b,c,d,e,f){var _=this +_.a=a +_.b=b +_.c=c +_.d=d +_.e=e +_.f=f}, +bt:function bt(a,b){this.a=a +this.b=b}, +cu:function cu(a,b,c){this.a=a +this.b=b +this.c=c}, +d7:function d7(a){this.a=a}, +eL:function eL(a){this.a=a}, +be:function be(a,b){this.a=a +this.b=b}, +bL:function bL(a){this.a=a +this.b=null}, +az:function az(){}, +c9:function c9(){}, +ca:function ca(){}, +d_:function d_(){}, +cV:function cV(){}, +aQ:function aQ(a,b){this.a=a +this.b=b}, +dp:function dp(a){this.a=a}, +cR:function cR(a){this.a=a}, +dh:function dh(a){this.a=a}, +aE:function aE(a){var _=this +_.a=0 +_.f=_.e=_.d=_.c=_.b=null +_.r=0 +_.$ti=a}, +eG:function eG(a,b){this.a=a +this.b=b +this.c=null}, +bl:function bl(a,b){this.a=a +this.$ti=b}, +bm:function bm(a,b,c){var _=this +_.a=a +_.b=b +_.d=_.c=null +_.$ti=c}, +fH:function fH(a){this.a=a}, +fI:function fI(a){this.a=a}, +fJ:function fJ(a){this.a=a}, +bk:function bk(a,b){var _=this +_.a=a +_.b=b +_.d=_.c=null}, +dE:function dE(a){this.b=a}, +df:function df(a,b,c){this.a=a +this.b=b +this.c=c}, +dg:function dg(a,b,c){var _=this +_.a=a +_.b=b +_.c=c +_.d=null}, +cZ:function cZ(a,b){this.a=a +this.c=b}, +dX:function dX(a,b,c){this.a=a +this.b=b +this.c=c}, +dY:function dY(a,b,c){var _=this +_.a=a +_.b=b +_.c=c +_.d=null}, +eE:function eE(){}, +k8(a){return a}, +am(a,b,c){if(a>>>0!==a||a>=c)throw A.b(A.b4(b,a))}, +aH:function aH(){}, +aW:function aW(){}, +aG:function aG(){}, +bp:function bp(){}, +cC:function cC(){}, +cD:function cD(){}, +cE:function cE(){}, +cF:function cF(){}, +cG:function cG(){}, +bq:function bq(){}, +br:function br(){}, +bF:function bF(){}, +bG:function bG(){}, +bH:function bH(){}, +bI:function bI(){}, +hC(a,b){var s=b.c +return s==null?b.c=A.fX(a,b.y,!0):s}, +hB(a,b){var s=b.c +return s==null?b.c=A.bQ(a,"aq",[b.y]):s}, +hD(a){var s=a.x +if(s===6||s===7||s===8)return A.hD(a.y) +return s===12||s===13}, +jk(a){return a.at}, +ha(a){return A.e8(v.typeUniverse,a,!1)}, +au(a,b,a0,a1){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c=b.x +switch(c){case 5:case 1:case 2:case 3:case 4:return b +case 6:s=b.y +r=A.au(a,s,a0,a1) +if(r===s)return b +return A.hT(a,r,!0) +case 7:s=b.y +r=A.au(a,s,a0,a1) +if(r===s)return b +return A.fX(a,r,!0) +case 8:s=b.y +r=A.au(a,s,a0,a1) +if(r===s)return b +return A.hS(a,r,!0) +case 9:q=b.z +p=A.bY(a,q,a0,a1) +if(p===q)return b +return A.bQ(a,b.y,p) +case 10:o=b.y +n=A.au(a,o,a0,a1) +m=b.z +l=A.bY(a,m,a0,a1) +if(n===o&&l===m)return b +return A.fV(a,n,l) +case 12:k=b.y +j=A.au(a,k,a0,a1) +i=b.z +h=A.kw(a,i,a0,a1) +if(j===k&&h===i)return b +return A.hR(a,j,h) +case 13:g=b.z +a1+=g.length +f=A.bY(a,g,a0,a1) +o=b.y +n=A.au(a,o,a0,a1) +if(f===g&&n===o)return b +return A.fW(a,n,f,!0) +case 14:e=b.y +if(e=0)p+=" "+r[q];++q}return p+"})"}, +ie(a4,a5,a6){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3=", " +if(a6!=null){s=a6.length +if(a5==null){a5=A.t([],t.s) +r=null}else r=a5.length +q=a5.length +for(p=s;p>0;--p)B.b.p(a5,"T"+(q+p)) +for(o=t.X,n=t._,m="<",l="",p=0;p=0))return A.m(a5,j) +m=B.a.aS(m+l,a5[j]) +i=a6[p] +h=i.x +if(!(h===2||h===3||h===4||h===5||i===o))if(!(i===n))k=!1 +else k=!0 +else k=!0 +if(!k)m+=" extends "+A.O(i,a5)}m+=">"}else{m="" +r=null}o=a4.y +g=a4.z +f=g.a +e=f.length +d=g.b +c=d.length +b=g.c +a=b.length +a0=A.O(o,a5) +for(a1="",a2="",p=0;p0){a1+=a2+"[" +for(a2="",p=0;p0){a1+=a2+"{" +for(a2="",p=0;p "+a0}, +O(a,b){var s,r,q,p,o,n,m,l=a.x +if(l===5)return"erased" +if(l===2)return"dynamic" +if(l===3)return"void" +if(l===1)return"Never" +if(l===4)return"any" +if(l===6){s=A.O(a.y,b) +return s}if(l===7){r=a.y +s=A.O(r,b) +q=r.x +return(q===12||q===13?"("+s+")":s)+"?"}if(l===8)return"FutureOr<"+A.O(a.y,b)+">" +if(l===9){p=A.ky(a.y) +o=a.z +return o.length>0?p+("<"+A.il(o,b)+">"):p}if(l===11)return A.kq(a,b) +if(l===12)return A.ie(a,b,null) +if(l===13)return A.ie(a.y,b,a.z) +if(l===14){n=a.y +m=b.length +n=m-1-n +if(!(n>=0&&n0)p+="<"+A.bP(c)+">" +s=a.eC.get(p) +if(s!=null)return s +r=new A.a4(null,null) +r.x=9 +r.y=b +r.z=c +if(c.length>0)r.c=c[0] +r.at=p +q=A.ak(a,r) +a.eC.set(p,q) +return q}, +fV(a,b,c){var s,r,q,p,o,n +if(b.x===10){s=b.y +r=b.z.concat(c)}else{r=c +s=b}q=s.at+(";<"+A.bP(r)+">") +p=a.eC.get(q) +if(p!=null)return p +o=new A.a4(null,null) +o.x=10 +o.y=s +o.z=r +o.at=q +n=A.ak(a,o) +a.eC.set(q,n) +return n}, +jN(a,b,c){var s,r,q="+"+(b+"("+A.bP(c)+")"),p=a.eC.get(q) +if(p!=null)return p +s=new A.a4(null,null) +s.x=11 +s.y=b +s.z=c +s.at=q +r=A.ak(a,s) +a.eC.set(q,r) +return r}, +hR(a,b,c){var s,r,q,p,o,n=b.at,m=c.a,l=m.length,k=c.b,j=k.length,i=c.c,h=i.length,g="("+A.bP(m) +if(j>0){s=l>0?",":"" +g+=s+"["+A.bP(k)+"]"}if(h>0){s=l>0?",":"" +g+=s+"{"+A.jH(i)+"}"}r=n+(g+")") +q=a.eC.get(r) +if(q!=null)return q +p=new A.a4(null,null) +p.x=12 +p.y=b +p.z=c +p.at=r +o=A.ak(a,p) +a.eC.set(r,o) +return o}, +fW(a,b,c,d){var s,r=b.at+("<"+A.bP(c)+">"),q=a.eC.get(r) +if(q!=null)return q +s=A.jJ(a,b,c,r,d) +a.eC.set(r,s) +return s}, +jJ(a,b,c,d,e){var s,r,q,p,o,n,m,l +if(e){s=c.length +r=A.fv(s) +for(q=0,p=0;p0){n=A.au(a,b,r,0) +m=A.bY(a,c,r,0) +return A.fW(a,n,m,c!==m)}}l=new A.a4(null,null) +l.x=13 +l.y=b +l.z=c +l.at=d +return A.ak(a,l)}, +hO(a,b,c,d){return{u:a,e:b,r:c,s:[],p:0,n:d}}, +hQ(a){var s,r,q,p,o,n,m,l,k,j=a.r,i=a.s +for(s=j.length,r=0;r=48&&q<=57)r=A.jB(r+1,q,j,i) +else if((((q|32)>>>0)-97&65535)<26||q===95||q===36||q===124)r=A.hP(a,r,j,i,!1) +else if(q===46)r=A.hP(a,r,j,i,!0) +else{++r +switch(q){case 44:break +case 58:i.push(!1) +break +case 33:i.push(!0) +break +case 59:i.push(A.as(a.u,a.e,i.pop())) +break +case 94:i.push(A.jM(a.u,i.pop())) +break +case 35:i.push(A.bR(a.u,5,"#")) +break +case 64:i.push(A.bR(a.u,2,"@")) +break +case 126:i.push(A.bR(a.u,3,"~")) +break +case 60:i.push(a.p) +a.p=i.length +break +case 62:p=a.u +o=i.splice(a.p) +A.fU(a.u,a.e,o) +a.p=i.pop() +n=i.pop() +if(typeof n=="string")i.push(A.bQ(p,n,o)) +else{m=A.as(p,a.e,n) +switch(m.x){case 12:i.push(A.fW(p,m,o,a.n)) +break +default:i.push(A.fV(p,m,o)) +break}}break +case 38:A.jC(a,i) +break +case 42:p=a.u +i.push(A.hT(p,A.as(p,a.e,i.pop()),a.n)) +break +case 63:p=a.u +i.push(A.fX(p,A.as(p,a.e,i.pop()),a.n)) +break +case 47:p=a.u +i.push(A.hS(p,A.as(p,a.e,i.pop()),a.n)) +break +case 40:i.push(-3) +i.push(a.p) +a.p=i.length +break +case 41:A.jA(a,i) +break +case 91:i.push(a.p) +a.p=i.length +break +case 93:o=i.splice(a.p) +A.fU(a.u,a.e,o) +a.p=i.pop() +i.push(o) +i.push(-1) +break +case 123:i.push(a.p) +a.p=i.length +break +case 125:o=i.splice(a.p) +A.jE(a.u,a.e,o) +a.p=i.pop() +i.push(o) +i.push(-2) +break +case 43:l=j.indexOf("(",r) +i.push(j.substring(r,l)) +i.push(-4) +i.push(a.p) +a.p=i.length +r=l+1 +break +default:throw"Bad character "+q}}}k=i.pop() +return A.as(a.u,a.e,k)}, +jB(a,b,c,d){var s,r,q=b-48 +for(s=c.length;a=48&&r<=57))break +q=q*10+(r-48)}d.push(q) +return a}, +hP(a,b,c,d,e){var s,r,q,p,o,n,m=b+1 +for(s=c.length;m>>0)-97&65535)<26||r===95||r===36||r===124))q=r>=48&&r<=57 +else q=!0 +if(!q)break}}p=c.substring(b,m) +if(e){s=a.u +o=a.e +if(o.x===10)o=o.y +n=A.jS(s,o.y)[p] +if(n==null)A.a6('No "'+p+'" in "'+A.jk(o)+'"') +d.push(A.ft(s,o,n))}else d.push(p) +return m}, +jA(a,b){var s,r,q,p,o,n=null,m=a.u,l=b.pop() +if(typeof l=="number")switch(l){case-1:s=b.pop() +r=n +break +case-2:r=b.pop() +s=n +break +default:b.push(l) +r=n +s=r +break}else{b.push(l) +r=n +s=r}q=A.jz(a,b) +l=b.pop() +switch(l){case-3:l=b.pop() +if(s==null)s=m.sEA +if(r==null)r=m.sEA +p=A.as(m,a.e,l) +o=new A.dy() +o.a=q +o.b=s +o.c=r +b.push(A.hR(m,p,o)) +return +case-4:b.push(A.jN(m,b.pop(),q)) +return +default:throw A.b(A.c4("Unexpected state under `()`: "+A.o(l)))}}, +jC(a,b){var s=b.pop() +if(0===s){b.push(A.bR(a.u,1,"0&")) +return}if(1===s){b.push(A.bR(a.u,4,"1&")) +return}throw A.b(A.c4("Unexpected extended operation "+A.o(s)))}, +jz(a,b){var s=b.splice(a.p) +A.fU(a.u,a.e,s) +a.p=b.pop() +return s}, +as(a,b,c){if(typeof c=="string")return A.bQ(a,c,a.sEA) +else if(typeof c=="number"){b.toString +return A.jD(a,b,c)}else return c}, +fU(a,b,c){var s,r=c.length +for(s=0;sn)return!1 +m=n-o +l=s.b +k=r.b +j=l.length +i=k.length +if(o+j=d)return!1 +a1=f[b] +b+=3 +if(a00?new Array(q):v.typeUniverse.sEA +for(o=0;o0?new Array(a):v.typeUniverse.sEA}, +a4:function a4(a,b){var _=this +_.a=a +_.b=b +_.w=_.r=_.c=null +_.x=0 +_.at=_.as=_.Q=_.z=_.y=null}, +dy:function dy(){this.c=this.b=this.a=null}, +fs:function fs(a){this.a=a}, +dv:function dv(){}, +bO:function bO(a){this.a=a}, +jv(){var s,r,q={} +if(self.scheduleImmediate!=null)return A.kC() +if(self.MutationObserver!=null&&self.document!=null){s=self.document.createElement("div") +r=self.document.createElement("span") +q.a=null +new self.MutationObserver(A.bZ(new A.f8(q),1)).observe(s,{childList:true}) +return new A.f7(q,s,r)}else if(self.setImmediate!=null)return A.kD() +return A.kE()}, +jw(a){self.scheduleImmediate(A.bZ(new A.f9(t.M.a(a)),0))}, +jx(a){self.setImmediate(A.bZ(new A.fa(t.M.a(a)),0))}, +jy(a){t.M.a(a) +A.jF(0,a)}, +jF(a,b){var s=new A.fq() +s.aY(a,b) +return s}, +h6(a){return new A.di(new A.F($.B,a.i("F<0>")),a.i("di<0>"))}, +h1(a,b){a.$2(0,null) +b.b=!0 +return b.a}, +al(a,b){A.k6(a,b)}, +h0(a,b){b.ad(0,a)}, +h_(a,b){b.ae(A.ay(a),A.aO(a))}, +k6(a,b){var s,r,q=new A.fw(b),p=new A.fx(b) +if(a instanceof A.F)a.aC(q,p,t.z) +else{s=t.z +if(t.d.b(a))a.al(q,p,s) +else{r=new A.F($.B,t.c) +r.a=8 +r.c=a +r.aC(q,p,s)}}}, +h8(a){var s=function(b,c){return function(d,e){while(true)try{b(d,e) +break}catch(r){e=r +d=c}}}(a,1) +return $.B.aP(new A.fD(s),t.H,t.S,t.z)}, +et(a,b){var s=A.em(a,"error",t.K) +return new A.b9(s,b==null?A.hk(a):b)}, +hk(a){var s +if(t.Q.b(a)){s=a.gX() +if(s!=null)return s}return B.A}, +fT(a,b){var s,r,q +for(s=t.c;r=a.a,(r&4)!==0;)a=s.a(a.c) +if((r&24)!==0){q=b.ac() +b.a5(a) +A.bC(b,q)}else{q=t.F.a(b.c) +b.a=b.a&1|4 +b.c=a +a.az(q)}}, +bC(a,a0){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c={},b=c.a=a +for(s=t.n,r=t.F,q=t.d;!0;){p={} +o=b.a +n=(o&16)===0 +m=!n +if(a0==null){if(m&&(o&1)===0){l=s.a(b.c) +A.h7(l.a,l.b)}return}p.a=a0 +k=a0.a +for(b=a0;k!=null;b=k,k=j){b.a=null +A.bC(c.a,b) +p.a=k +j=k.a}o=c.a +i=o.c +p.b=m +p.c=i +if(n){h=b.c +h=(h&1)!==0||(h&15)===8}else h=!0 +if(h){g=b.b.b +if(m){o=o.b===g +o=!(o||o)}else o=!1 +if(o){s.a(i) +A.h7(i.a,i.b) +return}f=$.B +if(f!==g)$.B=g +else f=null +b=b.c +if((b&15)===8)new A.fm(p,c,m).$0() +else if(n){if((b&1)!==0)new A.fl(p,i).$0()}else if((b&2)!==0)new A.fk(c,p).$0() +if(f!=null)$.B=f +b=p.c +if(q.b(b)){o=p.a.$ti +o=o.i("aq<2>").b(b)||!o.z[1].b(b)}else o=!1 +if(o){q.a(b) +e=p.a.b +if((b.a&24)!==0){d=r.a(e.c) +e.c=null +a0=e.Y(d) +e.a=b.a&30|e.a&1 +e.c=b.c +c.a=b +continue}else A.fT(b,e) +return}}e=p.a.b +d=r.a(e.c) +e.c=null +a0=e.Y(d) +b=p.b +o=p.c +if(!b){e.$ti.c.a(o) +e.a=8 +e.c=o}else{s.a(o) +e.a=e.a&1|16 +e.c=o}c.a=e +b=e}}, +kr(a,b){var s +if(t.C.b(a))return b.aP(a,t.z,t.K,t.l) +s=t.y +if(s.b(a))return s.a(a) +throw A.b(A.hj(a,"onError",u.c))}, +kp(){var s,r +for(s=$.b0;s!=null;s=$.b0){$.bX=null +r=s.b +$.b0=r +if(r==null)$.bW=null +s.a.$0()}}, +kv(){$.h4=!0 +try{A.kp()}finally{$.bX=null +$.h4=!1 +if($.b0!=null)$.hg().$1(A.ir())}}, +io(a){var s=new A.dj(a),r=$.bW +if(r==null){$.b0=$.bW=s +if(!$.h4)$.hg().$1(A.ir())}else $.bW=r.b=s}, +ku(a){var s,r,q,p=$.b0 +if(p==null){A.io(a) +$.bX=$.bW +return}s=new A.dj(a) +r=$.bX +if(r==null){s.b=p +$.b0=$.bX=s}else{q=r.b +s.b=q +$.bX=r.b=s +if(q==null)$.bW=s}}, +l_(a){var s,r=null,q=$.B +if(B.c===q){A.aN(r,r,B.c,a) +return}s=!1 +if(s){A.aN(r,r,q,t.M.a(a)) +return}A.aN(r,r,q,t.M.a(q.aF(a)))}, +lr(a,b){A.em(a,"stream",t.K) +return new A.dW(b.i("dW<0>"))}, +h7(a,b){A.ku(new A.fB(a,b))}, +ik(a,b,c,d,e){var s,r=$.B +if(r===c)return d.$0() +$.B=c +s=r +try{r=d.$0() +return r}finally{$.B=s}}, +kt(a,b,c,d,e,f,g){var s,r=$.B +if(r===c)return d.$1(e) +$.B=c +s=r +try{r=d.$1(e) +return r}finally{$.B=s}}, +ks(a,b,c,d,e,f,g,h,i){var s,r=$.B +if(r===c)return d.$2(e,f) +$.B=c +s=r +try{r=d.$2(e,f) +return r}finally{$.B=s}}, +aN(a,b,c,d){t.M.a(d) +if(B.c!==c)d=c.aF(d) +A.io(d)}, +f8:function f8(a){this.a=a}, +f7:function f7(a,b,c){this.a=a +this.b=b +this.c=c}, +f9:function f9(a){this.a=a}, +fa:function fa(a){this.a=a}, +fq:function fq(){}, +fr:function fr(a,b){this.a=a +this.b=b}, +di:function di(a,b){this.a=a +this.b=!1 +this.$ti=b}, +fw:function fw(a){this.a=a}, +fx:function fx(a){this.a=a}, +fD:function fD(a){this.a=a}, +b9:function b9(a,b){this.a=a +this.b=b}, +dl:function dl(){}, +bA:function bA(a,b){this.a=a +this.$ti=b}, +aM:function aM(a,b,c,d,e){var _=this +_.a=null +_.b=a +_.c=b +_.d=c +_.e=d +_.$ti=e}, +F:function F(a,b){var _=this +_.a=0 +_.b=a +_.c=null +_.$ti=b}, +fc:function fc(a,b){this.a=a +this.b=b}, +fj:function fj(a,b){this.a=a +this.b=b}, +ff:function ff(a){this.a=a}, +fg:function fg(a){this.a=a}, +fh:function fh(a,b,c){this.a=a +this.b=b +this.c=c}, +fe:function fe(a,b){this.a=a +this.b=b}, +fi:function fi(a,b){this.a=a +this.b=b}, +fd:function fd(a,b,c){this.a=a +this.b=b +this.c=c}, +fm:function fm(a,b,c){this.a=a +this.b=b +this.c=c}, +fn:function fn(a){this.a=a}, +fl:function fl(a,b){this.a=a +this.b=b}, +fk:function fk(a,b){this.a=a +this.b=b}, +dj:function dj(a){this.a=a +this.b=null}, +cX:function cX(){}, +dW:function dW(a){this.$ti=a}, +bU:function bU(){}, +fB:function fB(a,b){this.a=a +this.b=b}, +dP:function dP(){}, +fp:function fp(a,b){this.a=a +this.b=b}, +jd(a,b,c){return b.i("@<0>").E(c).i("hv<1,2>").a(A.kK(a,new A.aE(b.i("@<0>").E(c).i("aE<1,2>"))))}, +jc(a,b){return new A.aE(a.i("@<0>").E(b).i("aE<1,2>"))}, +j8(a,b,c){var s,r +if(A.h5(a)){if(b==="("&&c===")")return"(...)" +return b+"..."+c}s=A.t([],t.s) +B.b.p($.a_,a) +try{A.ko(a,s)}finally{if(0>=$.a_.length)return A.m($.a_,-1) +$.a_.pop()}r=A.eU(b,t.V.a(s),", ")+c +return r.charCodeAt(0)==0?r:r}, +hr(a,b,c){var s,r +if(A.h5(a))return b+"..."+c +s=new A.H(b) +B.b.p($.a_,a) +try{r=s +r.a=A.eU(r.a,a,", ")}finally{if(0>=$.a_.length)return A.m($.a_,-1) +$.a_.pop()}s.a+=c +r=s.a +return r.charCodeAt(0)==0?r:r}, +h5(a){var s,r +for(s=$.a_.length,r=0;r=b.length)return A.m(b,-1) +r=b.pop() +if(0>=b.length)return A.m(b,-1) +q=b.pop()}else{p=l.gv(l);++j +if(!l.u()){if(j<=4){B.b.p(b,A.o(p)) +return}r=A.o(p) +if(0>=b.length)return A.m(b,-1) +q=b.pop() +k+=r.length+2}else{o=l.gv(l);++j +for(;l.u();p=o,o=n){n=l.gv(l);++j +if(j>100){while(!0){if(!(k>75&&j>3))break +if(0>=b.length)return A.m(b,-1) +k-=b.pop().length+2;--j}B.b.p(b,"...") +return}}q=A.o(p) +r=A.o(o) +k+=r.length+q.length+4}}if(j>b.length+2){k+=5 +m="..."}else m=null +while(!0){if(!(k>80&&b.length>3))break +if(0>=b.length)return A.m(b,-1) +k-=b.pop().length+2 +if(m==null){k+=5 +m="..."}}if(m!=null)B.b.p(b,m) +B.b.p(b,q) +B.b.p(b,r)}, +hx(a){var s,r={} +if(A.h5(a))return"{...}" +s=new A.H("") +try{B.b.p($.a_,a) +s.a+="{" +r.a=!0 +J.iZ(a,new A.eH(r,s)) +s.a+="}"}finally{if(0>=$.a_.length)return A.m($.a_,-1) +$.a_.pop()}r=s.a +return r.charCodeAt(0)==0?r:r}, +bg:function bg(){}, +bn:function bn(){}, +e:function e(){}, +bo:function bo(){}, +eH:function eH(a,b){this.a=a +this.b=b}, +v:function v(){}, +bD:function bD(){}, +jt(a,b,c,d){var s,r +if(b instanceof Uint8Array){s=b +d=s.length +if(d-c<15)return null +r=A.ju(a,s,c,d) +if(r!=null&&a)if(r.indexOf("\ufffd")>=0)return null +return r}return null}, +ju(a,b,c,d){var s=a?$.iR():$.iQ() +if(s==null)return null +if(0===c&&d===b.length)return A.hL(s,b) +return A.hL(s,b.subarray(c,A.aX(c,d,b.length)))}, +hL(a,b){var s,r +try{s=a.decode(b) +return s}catch(r){}return null}, +hl(a,b,c,d,e,f){if(B.d.a2(f,4)!==0)throw A.b(A.K("Invalid base64 padding, padded length must be multiple of four, is "+f,a,c)) +if(d+e!==f)throw A.b(A.K("Invalid base64 padding, '=' not at the end",a,b)) +if(e>2)throw A.b(A.K("Invalid base64 padding, more than two '=' characters",a,b))}, +k2(a){switch(a){case 65:return"Missing extension byte" +case 67:return"Unexpected extension byte" +case 69:return"Invalid UTF-8 byte" +case 71:return"Overlong encoding" +case 73:return"Out of unicode range" +case 75:return"Encoded surrogate" +case 77:return"Unfinished UTF-8 octet sequence" +default:return""}}, +k1(a,b,c){var s,r,q,p=c-b,o=new Uint8Array(p) +for(s=J.eo(a),r=0;r>>0!==0)q=255 +if(!(r4294967295)A.a6(A.ag(a,0,4294967295,"length",null)) +s=J.fQ(A.t(new Array(a),d.i("D<0>")),d) +if(a!==0&&b!=null)for(r=s.length,q=0;q")) +for(s=J.c0(a);s.u();)B.b.p(r,c.a(s.gv(s))) +if(b)return r +return J.fQ(r,c)}, +jf(a,b){var s=A.je(a,!1,b) +s.fixed$length=Array +s.immutable$list=Array +return s}, +hF(a,b,c){var s=A.jj(a,b,A.aX(b,c,a.length)) +return s}, +jm(a){return A.af(a)}, +a9(a){return new A.bk(a,A.ht(a,!1,!0,!1,!1,!1))}, +eU(a,b,c){var s=J.c0(b) +if(!s.u())return a +if(c.length===0){do a+=A.o(s.gv(s)) +while(s.u())}else{a+=A.o(s.gv(s)) +for(;s.u();)a=a+c+A.o(s.gv(s))}return a}, +hJ(){var s=A.ji() +if(s!=null)return A.js(s) +throw A.b(A.r("'Uri.base' is not supported"))}, +cm(a){if(typeof a=="number"||A.h3(a)||a==null)return J.es(a) +if(typeof a=="string")return JSON.stringify(a) +return A.j6(a)}, +c4(a){return new A.b8(a)}, +aP(a,b){return new A.ac(!1,null,b,a)}, +hj(a,b,c){return new A.ac(!0,a,b,c)}, +ag(a,b,c,d,e){return new A.bu(b,c,!0,a,d,"Invalid value")}, +aX(a,b,c){if(0>a||a>c)throw A.b(A.ag(a,0,c,"start",null)) +if(b!=null){if(a>b||b>c)throw A.b(A.ag(b,a,c,"end",null)) +return b}return c}, +cP(a,b){if(a<0)throw A.b(A.ag(a,0,null,b,null)) +return a}, +y(a,b,c,d){return new A.cr(b,!0,a,d,"Index out of range")}, +r(a){return new A.d8(a)}, +hH(a){return new A.d6(a)}, +hE(a){return new A.bx(a)}, +aS(a){return new A.cc(a)}, +K(a,b,c){return new A.eC(a,b,c)}, +hy(a,b,c,d){var s,r=B.e.gA(a) +b=B.e.gA(b) +c=B.e.gA(c) +d=B.e.gA(d) +s=$.iU() +return A.jp(A.eW(A.eW(A.eW(A.eW(s,r),b),c),d))}, +js(a5){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3=null,a4=a5.length +if(a4>=5){s=((B.a.m(a5,4)^58)*3|B.a.m(a5,0)^100|B.a.m(a5,1)^97|B.a.m(a5,2)^116|B.a.m(a5,3)^97)>>>0 +if(s===0)return A.hI(a4=14)B.b.n(r,7,a4) +q=r[1] +if(q>=0)if(A.im(a5,0,q,20,r)===20)r[7]=q +p=r[2]+1 +o=r[3] +n=r[4] +m=r[5] +l=r[6] +if(lq+3){j=a3 +k=!1}else{i=o>0 +if(i&&o+1===n){j=a3 +k=!1}else{if(!B.a.C(a5,"\\",n))if(p>0)h=B.a.C(a5,"\\",p-1)||B.a.C(a5,"\\",p-2) +else h=!1 +else h=!0 +if(h){j=a3 +k=!1}else{if(!(mn+2&&B.a.C(a5,"/..",m-3) +else h=!0 +if(h){j=a3 +k=!1}else{if(q===4)if(B.a.C(a5,"file",0)){if(p<=0){if(!B.a.C(a5,"/",n)){g="file:///" +s=3}else{g="file://" +s=2}a5=g+B.a.k(a5,n,a4) +q-=0 +i=s-0 +m+=i +l+=i +a4=a5.length +p=7 +o=7 +n=7}else if(n===m){++l +f=m+1 +a5=B.a.O(a5,n,m,"/");++a4 +m=f}j="file"}else if(B.a.C(a5,"http",0)){if(i&&o+3===n&&B.a.C(a5,"80",o+1)){l-=3 +e=n-3 +m-=3 +a5=B.a.O(a5,o,n,"") +a4-=3 +n=e}j="http"}else j=a3 +else if(q===5&&B.a.C(a5,"https",0)){if(i&&o+4===n&&B.a.C(a5,"443",o+1)){l-=4 +e=n-4 +m-=4 +a5=B.a.O(a5,o,n,"") +a4-=3 +n=e}j="https"}else j=a3 +k=!0}}}}else j=a3 +if(k){if(a40)j=A.jY(a5,0,q) +else{if(q===0)A.b_(a5,0,"Invalid empty scheme") +j=""}if(p>0){d=q+3 +c=d9)k.$2("invalid character",s)}else{if(q===3)k.$2(m,s) +o=A.fK(B.a.k(a,r,s),null) +if(o>255)k.$2(l,r) +n=q+1 +if(!(q<4))return A.m(j,q) +j[q]=o +r=s+1 +q=n}}if(q!==3)k.$2(m,c) +o=A.fK(B.a.k(a,r,c),null) +if(o>255)k.$2(l,r) +if(!(q<4))return A.m(j,q) +j[q]=o +return j}, +hK(a,a0,a1){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d=null,c=new A.f1(a),b=new A.f2(c,a) +if(a.length<2)c.$2("address is too short",d) +s=A.t([],t.t) +for(r=a0,q=r,p=!1,o=!1;r>>0) +B.b.p(s,(k[2]<<8|k[3])>>>0)}if(p){if(s.length>7)c.$2("an address with a wildcard must have less than 7 parts",d)}else if(s.length!==8)c.$2("an address without a wildcard must contain exactly 8 parts",d) +j=new Uint8Array(16) +for(l=s.length,i=9-l,r=0,h=0;r=0&&h<16))return A.m(j,h) +j[h]=0 +e=h+1 +if(!(e<16))return A.m(j,e) +j[e]=0 +h+=2}else{e=B.d.Z(g,8) +if(!(h>=0&&h<16))return A.m(j,h) +j[h]=e +e=h+1 +if(!(e<16))return A.m(j,e) +j[e]=g&255 +h+=2}}return j}, +hU(a,b,c,d,e,f,g){return new A.bS(a,b,c,d,e,f,g)}, +hW(a){if(a==="http")return 80 +if(a==="https")return 443 +return 0}, +b_(a,b,c){throw A.b(A.K(c,a,b))}, +jU(a,b){var s,r,q +for(s=a.length,r=0;r")),r=r.i("S.E");s.u();){q=s.d +if(q==null)q=r.a(q) +if(B.a.J(q,A.a9('["*/:<>?\\\\|]'))){s=A.r("Illegal character in path: "+q) +throw A.b(s)}}}, +jV(a,b){var s +if(!(65<=a&&a<=90))s=97<=a&&a<=122 +else s=!0 +if(s)return +s=A.r("Illegal drive letter "+A.jm(a)) +throw A.b(s)}, +i1(a,b){if(a!=null&&a===A.hW(b))return null +return a}, +i_(a,b,c,d){var s,r,q,p,o,n +if(a==null)return null +if(b===c)return"" +if(B.a.t(a,b)===91){s=c-1 +if(B.a.t(a,s)!==93)A.b_(a,b,"Missing end `]` to match `[` in host") +r=b+1 +q=A.jW(a,r,s) +if(q=b&&q=b&&s>>4 +if(!(n<8))return A.m(B.f,n) +n=(B.f[n]&1<<(p&15))!==0}else n=!1 +if(n){if(q&&65<=p&&90>=p){if(i==null)i=new A.H("") +if(r>>4 +if(!(m<8))return A.m(B.p,m) +m=(B.p[m]&1<<(o&15))!==0}else m=!1 +if(m){if(p&&65<=o&&90>=o){if(q==null)q=new A.H("") +if(r>>4 +if(!(m<8))return A.m(B.i,m) +m=(B.i[m]&1<<(o&15))!==0}else m=!1 +if(m)A.b_(a,s,"Invalid character") +else{if((o&64512)===55296&&s+1>>4 +if(!(p<8))return A.m(B.h,p) +p=(B.h[p]&1<<(q&15))!==0}else p=!1 +if(!p)A.b_(a,s,"Illegal scheme character") +if(65<=q&&q<=90)r=!0}a=B.a.k(a,b,c) +return A.jT(r?a.toLowerCase():a)}, +jT(a){if(a==="http")return"http" +if(a==="file")return"file" +if(a==="https")return"https" +if(a==="package")return"package" +return a}, +i3(a,b,c){if(a==null)return"" +return A.bT(a,b,c,B.E,!1,!1)}, +i0(a,b,c,d,e,f){var s=e==="file",r=s||f,q=A.bT(a,b,c,B.o,!0,!0) +if(q.length===0){if(s)return"/"}else if(r&&!B.a.B(q,"/"))q="/"+q +return A.jZ(q,e,f)}, +jZ(a,b,c){var s=b.length===0 +if(s&&!c&&!B.a.B(a,"/")&&!B.a.B(a,"\\"))return A.i6(a,!s||c) +return A.i8(a)}, +i2(a,b,c,d){if(a!=null)return A.bT(a,b,c,B.j,!0,!1) +return null}, +hZ(a,b,c){if(a==null)return null +return A.bT(a,b,c,B.j,!0,!1)}, +fZ(a,b,c){var s,r,q,p,o,n=b+2 +if(n>=a.length)return"%" +s=B.a.t(a,b+1) +r=B.a.t(a,n) +q=A.fG(s) +p=A.fG(r) +if(q<0||p<0)return"%" +o=q*16+p +if(o<127){n=B.d.Z(o,4) +if(!(n<8))return A.m(B.f,n) +n=(B.f[n]&1<<(o&15))!==0}else n=!1 +if(n)return A.af(c&&65<=o&&90>=o?(o|32)>>>0:o) +if(s>=97||r>=97)return B.a.k(a,b,b+3).toUpperCase() +return null}, +fY(a){var s,r,q,p,o,n,m,l,k="0123456789ABCDEF" +if(a<128){s=new Uint8Array(3) +s[0]=37 +s[1]=B.a.m(k,a>>>4) +s[2]=B.a.m(k,a&15)}else{if(a>2047)if(a>65535){r=240 +q=4}else{r=224 +q=3}else{r=192 +q=2}p=3*q +s=new Uint8Array(p) +for(o=0;--q,q>=0;r=128){n=B.d.b6(a,6*q)&63|r +if(!(o>>4) +if(!(m>>4 +if(!(n<8))return A.m(d,n) +n=(d[n]&1<<(o&15))!==0}else n=!1 +if(n)++r +else{if(o===37){m=A.fZ(a,r,!1) +if(m==null){r+=3 +continue}if("%"===m){m="%25" +l=1}else l=3}else if(o===92&&f){m="/" +l=1}else{if(s)if(o<=93){n=o>>>4 +if(!(n<8))return A.m(B.i,n) +n=(B.i[n]&1<<(o&15))!==0}else n=!1 +else n=!1 +if(n){A.b_(a,r,"Invalid character") +l=i +m=l}else{if((o&64512)===55296){n=r+1 +if(n=m)return A.m(s,-1) +s.pop() +if(s.length===0)B.b.p(s,"")}p=!0}else if("."===n)p=!0 +else{B.b.p(s,n) +p=!1}}if(p)B.b.p(s,"") +return B.b.a0(s,"/")}, +i6(a,b){var s,r,q,p,o,n +if(!A.i4(a))return!b?A.hX(a):a +s=A.t([],t.s) +for(r=a.split("/"),q=r.length,p=!1,o=0;o=s.length)return A.m(s,-1) +s.pop() +p=!0}else{B.b.p(s,"..") +p=!1}else if("."===n)p=!0 +else{B.b.p(s,n) +p=!1}}r=s.length +if(r!==0)if(r===1){if(0>=r)return A.m(s,0) +r=s[0].length===0}else r=!1 +else r=!0 +if(r)return"./" +if(p||B.b.gV(s)==="..")B.b.p(s,"") +if(!b){if(0>=s.length)return A.m(s,0) +B.b.n(s,0,A.hX(s[0]))}return B.b.a0(s,"/")}, +hX(a){var s,r,q,p=a.length +if(p>=2&&A.hY(B.a.m(a,0)))for(s=1;s>>4 +if(!(q<8))return A.m(B.h,q) +q=(B.h[q]&1<<(r&15))===0}else q=!0 +if(q)break}return a}, +jX(a,b){var s,r,q +for(s=0,r=0;r<2;++r){q=B.a.m(a,b+r) +if(48<=q&&q<=57)s=s*16+q-48 +else{q|=32 +if(97<=q&&q<=102)s=s*16+q-87 +else throw A.b(A.aP("Invalid URL encoding",null))}}return s}, +k0(a,b,c,d,e){var s,r,q,p,o=b +while(!0){if(!(o127)throw A.b(A.aP("Illegal percent encoding in URI",null)) +if(r===37){if(o+3>q)throw A.b(A.aP("Truncated URI",null)) +B.b.p(p,A.jX(a,o+1)) +o+=2}else B.b.p(p,r)}}t.L.a(p) +return B.J.ba(p)}, +hY(a){var s=a|32 +return 97<=s&&s<=122}, +hI(a,b,c){var s,r,q,p,o,n,m,l,k="Invalid MIME type",j=A.t([b-1],t.t) +for(s=a.length,r=b,q=-1,p=null;rb)throw A.b(A.K(k,a,r)) +for(;p!==44;){B.b.p(j,r);++r +for(o=-1;r=0)B.b.p(j,o) +else{n=B.b.gV(j) +if(p!==44||r!==n+7||!B.a.C(a,"base64",n+1))throw A.b(A.K("Expecting '='",a,r)) +break}}B.b.p(j,r) +m=r+1 +if((j.length&1)===1)a=B.r.bk(0,a,m,s) +else{l=A.i5(a,m,s,B.j,!0,!1) +if(l!=null)a=B.a.O(a,m,s,l)}return new A.f_(a,j,c)}, +k7(){var s,r,q,p,o,n,m="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",l=".",k=":",j="/",i="\\",h="?",g="#",f="/\\",e=A.t(new Array(22),t.a) +for(s=0;s<22;++s)e[s]=new Uint8Array(96) +r=new A.fy(e) +q=new A.fz() +p=new A.fA() +o=t.bX.a(r.$2(0,225)) +q.$3(o,m,1) +q.$3(o,l,14) +q.$3(o,k,34) +q.$3(o,j,3) +q.$3(o,i,227) +q.$3(o,h,172) +q.$3(o,g,205) +n=r.$2(14,225) +q.$3(n,m,1) +q.$3(n,l,15) +q.$3(n,k,34) +q.$3(n,f,234) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(15,225) +q.$3(n,m,1) +q.$3(n,"%",225) +q.$3(n,k,34) +q.$3(n,j,9) +q.$3(n,i,233) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(1,225) +q.$3(n,m,1) +q.$3(n,k,34) +q.$3(n,j,10) +q.$3(n,i,234) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(2,235) +q.$3(n,m,139) +q.$3(n,j,131) +q.$3(n,i,131) +q.$3(n,l,146) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(3,235) +q.$3(n,m,11) +q.$3(n,j,68) +q.$3(n,i,68) +q.$3(n,l,18) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(4,229) +q.$3(n,m,5) +p.$3(n,"AZ",229) +q.$3(n,k,102) +q.$3(n,"@",68) +q.$3(n,"[",232) +q.$3(n,j,138) +q.$3(n,i,138) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(5,229) +q.$3(n,m,5) +p.$3(n,"AZ",229) +q.$3(n,k,102) +q.$3(n,"@",68) +q.$3(n,j,138) +q.$3(n,i,138) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(6,231) +p.$3(n,"19",7) +q.$3(n,"@",68) +q.$3(n,j,138) +q.$3(n,i,138) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(7,231) +p.$3(n,"09",7) +q.$3(n,"@",68) +q.$3(n,j,138) +q.$3(n,i,138) +q.$3(n,h,172) +q.$3(n,g,205) +q.$3(r.$2(8,8),"]",5) +n=r.$2(9,235) +q.$3(n,m,11) +q.$3(n,l,16) +q.$3(n,f,234) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(16,235) +q.$3(n,m,11) +q.$3(n,l,17) +q.$3(n,f,234) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(17,235) +q.$3(n,m,11) +q.$3(n,j,9) +q.$3(n,i,233) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(10,235) +q.$3(n,m,11) +q.$3(n,l,18) +q.$3(n,j,10) +q.$3(n,i,234) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(18,235) +q.$3(n,m,11) +q.$3(n,l,19) +q.$3(n,f,234) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(19,235) +q.$3(n,m,11) +q.$3(n,f,234) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(11,235) +q.$3(n,m,11) +q.$3(n,j,10) +q.$3(n,i,234) +q.$3(n,h,172) +q.$3(n,g,205) +n=r.$2(12,236) +q.$3(n,m,12) +q.$3(n,h,12) +q.$3(n,g,205) +n=r.$2(13,237) +q.$3(n,m,13) +q.$3(n,h,13) +p.$3(r.$2(20,245),"az",21) +n=r.$2(21,245) +p.$3(n,"az",21) +p.$3(n,"09",21) +q.$3(n,"+-.",21) +return e}, +im(a,b,c,d,e){var s,r,q,p,o=$.iV() +for(s=b;s=0&&d95?31:q] +d=p&31 +B.b.n(e,p>>>5,s)}return d}, +w:function w(){}, +b8:function b8(a){this.a=a}, +ai:function ai(){}, +ac:function ac(a,b,c,d){var _=this +_.a=a +_.b=b +_.c=c +_.d=d}, +bu:function bu(a,b,c,d,e,f){var _=this +_.e=a +_.f=b +_.a=c +_.b=d +_.c=e +_.d=f}, +cr:function cr(a,b,c,d,e){var _=this +_.f=a +_.a=b +_.b=c +_.c=d +_.d=e}, +d8:function d8(a){this.a=a}, +d6:function d6(a){this.a=a}, +bx:function bx(a){this.a=a}, +cc:function cc(a){this.a=a}, +cJ:function cJ(){}, +bw:function bw(){}, +fb:function fb(a){this.a=a}, +eC:function eC(a,b,c){this.a=a +this.b=b +this.c=c}, +f:function f(){}, +C:function C(){}, +E:function E(){}, +x:function x(){}, +e0:function e0(){}, +H:function H(a){this.a=a}, +f0:function f0(a){this.a=a}, +f1:function f1(a){this.a=a}, +f2:function f2(a,b){this.a=a +this.b=b}, +bS:function bS(a,b,c,d,e,f,g){var _=this +_.a=a +_.b=b +_.c=c +_.d=d +_.e=e +_.f=f +_.r=g +_.y=_.x=_.w=$}, +f_:function f_(a,b,c){this.a=a +this.b=b +this.c=c}, +fy:function fy(a){this.a=a}, +fz:function fz(){}, +fA:function fA(){}, +dR:function dR(a,b,c,d,e,f,g,h){var _=this +_.a=a +_.b=b +_.c=c +_.d=d +_.e=e +_.f=f +_.r=g +_.w=h +_.x=null}, +dq:function dq(a,b,c,d,e,f,g){var _=this +_.a=a +_.b=b +_.c=c +_.d=d +_.e=e +_.f=f +_.r=g +_.y=_.x=_.w=$}, +i:function i(){}, +c1:function c1(){}, +c2:function c2(){}, +c3:function c3(){}, +ba:function ba(){}, +ab:function ab(){}, +ce:function ce(){}, +u:function u(){}, +aT:function aT(){}, +ez:function ez(){}, +J:function J(){}, +a8:function a8(){}, +cf:function cf(){}, +cg:function cg(){}, +ch:function ch(){}, +ci:function ci(){}, +bb:function bb(){}, +bc:function bc(){}, +cj:function cj(){}, +ck:function ck(){}, +h:function h(){}, +c:function c(){}, +P:function P(){}, +cn:function cn(){}, +co:function co(){}, +cp:function cp(){}, +R:function R(){}, +cq:function cq(){}, +aB:function aB(){}, +cx:function cx(){}, +cy:function cy(){}, +cz:function cz(){}, +eI:function eI(a){this.a=a}, +cA:function cA(){}, +eJ:function eJ(a){this.a=a}, +T:function T(){}, +cB:function cB(){}, +q:function q(){}, +bs:function bs(){}, +U:function U(){}, +cL:function cL(){}, +cQ:function cQ(){}, +eR:function eR(a){this.a=a}, +cS:function cS(){}, +V:function V(){}, +cT:function cT(){}, +W:function W(){}, +cU:function cU(){}, +X:function X(){}, +cW:function cW(){}, +eT:function eT(a){this.a=a}, +L:function L(){}, +Y:function Y(){}, +M:function M(){}, +d0:function d0(){}, +d1:function d1(){}, +d2:function d2(){}, +Z:function Z(){}, +d3:function d3(){}, +d4:function d4(){}, +da:function da(){}, +dd:function dd(){}, +dm:function dm(){}, +bB:function bB(){}, +dz:function dz(){}, +bE:function bE(){}, +dU:function dU(){}, +e1:function e1(){}, +n:function n(){}, +bf:function bf(a,b,c){var _=this +_.a=a +_.b=b +_.c=-1 +_.d=null +_.$ti=c}, +dn:function dn(){}, +dr:function dr(){}, +ds:function ds(){}, +dt:function dt(){}, +du:function du(){}, +dw:function dw(){}, +dx:function dx(){}, +dA:function dA(){}, +dB:function dB(){}, +dF:function dF(){}, +dG:function dG(){}, +dH:function dH(){}, +dI:function dI(){}, +dJ:function dJ(){}, +dK:function dK(){}, +dN:function dN(){}, +dO:function dO(){}, +dQ:function dQ(){}, +bJ:function bJ(){}, +bK:function bK(){}, +dS:function dS(){}, +dT:function dT(){}, +dV:function dV(){}, +e2:function e2(){}, +e3:function e3(){}, +bM:function bM(){}, +bN:function bN(){}, +e4:function e4(){}, +e5:function e5(){}, +e9:function e9(){}, +ea:function ea(){}, +eb:function eb(){}, +ec:function ec(){}, +ed:function ed(){}, +ee:function ee(){}, +ef:function ef(){}, +eg:function eg(){}, +eh:function eh(){}, +ei:function ei(){}, +b6(a,b){var s=new A.F($.B,b.i("F<0>")),r=new A.bA(s,b.i("bA<0>")) +a.then(A.bZ(new A.fN(r,b),1),A.bZ(new A.fO(r),1)) +return s}, +fN:function fN(a,b){this.a=a +this.b=b}, +fO:function fO(a){this.a=a}, +eK:function eK(a){this.a=a}, +a1:function a1(){}, +cw:function cw(){}, +a3:function a3(){}, +cH:function cH(){}, +cM:function cM(){}, +cY:function cY(){}, +a5:function a5(){}, +d5:function d5(){}, +dC:function dC(){}, +dD:function dD(){}, +dL:function dL(){}, +dM:function dM(){}, +dZ:function dZ(){}, +e_:function e_(){}, +e6:function e6(){}, +e7:function e7(){}, +c5:function c5(){}, +c6:function c6(){}, +eu:function eu(a){this.a=a}, +c7:function c7(){}, +ap:function ap(){}, +cI:function cI(){}, +dk:function dk(){}, +kA(a,b){var s,r,q,p,o,n,m,l +for(s=b.length,r=1;r=1;s=q){q=s-1 +if(b[q]!=null)break}p=new A.H("") +o=""+(a+"(") +p.a=o +n=A.bV(b) +m=n.i("aI<1>") +l=new A.aI(b,0,s,m) +l.aX(b,0,s,n.c) +m=o+new A.aF(l,m.i("k(S.E)").a(new A.fC()),m.i("aF")).a0(0,", ") +p.a=m +p.a=m+("): part "+(r-1)+" was null, but part "+r+" was not.") +throw A.b(A.aP(p.j(0),null))}}, +ew:function ew(a){this.a=a}, +ex:function ex(){}, +fC:function fC(){}, +aC:function aC(){}, +jg(a,b){var s,r,q,p,o,n=b.aT(a) +b.N(a) +if(n!=null)a=B.a.I(a,n.length) +s=t.s +r=A.t([],s) +q=A.t([],s) +s=a.length +if(s!==0&&b.a_(B.a.m(a,0))){if(0>=s)return A.m(a,0) +B.b.p(q,a[0]) +p=1}else{B.b.p(q,"") +p=0}for(o=p;o0&&J.a0(j[0])===2&&J.hh(j[0],1)===58){if(0>=s)return A.m(j,0) +A.jV(J.hh(j[0],0),!1) +A.hV(j,!1,1) +i=!0}else{A.hV(j,!1,0) +i=!1}h=B.a.B(k.e,"/")&&!i?""+"\\":"" +if(k.c!=null){q=k.gU(k) +k=q.length!==0?h+"\\"+q+"\\":h}else k=h +k=A.eU(k,j,"\\") +s=i&&s===1?k+"\\":k +s=s.charCodeAt(0)==0?s:s}else{if(k.c!=null&&k.gU(k)!=="")A.a6(A.r("Cannot extract a non-Windows file path from a file URI with an authority")) +g=k.gaN() +A.jU(g,!1) +s=A.eU(B.a.B(k.e,"/")?""+"/":"",g,"/") +s=s.charCodeAt(0)==0?s:s}if(s==="a\\b")return $.iF() +return $.iE()}, +eV:function eV(){}, +cN:function cN(a,b,c){this.d=a +this.e=b +this.f=c}, +db:function db(a,b,c,d){var _=this +_.d=a +_.e=b +_.f=c +_.r=d}, +de:function de(a,b,c,d){var _=this +_.d=a +_.e=b +_.f=c +_.r=d}, +ey:function ey(){}, +eA:function eA(){}, +eD:function eD(){}, +eX:function eX(){}, +eB:function eB(){}, +eM:function eM(){}, +eQ:function eQ(){}, +l2(a){return A.a6(A.hu(a))}, +he(){return A.a6(A.hu(""))}, +ib(a){var s,r,q +if(a==null)return a +if(typeof a=="string"||typeof a=="number"||A.h3(a))return a +s=Object.getPrototypeOf(a) +if(s===Object.prototype||s===null)return A.av(a) +if(Array.isArray(a)){r=[] +for(q=0;q=65&&a<=90))s=a>=97&&a<=122 +else s=!0 +return s}, +kT(a,b){var s=a.length,r=b+2 +if(s0;b=s){s=b-1 +r=B.a.t(a,s) +if(r!==32&&r!==13&&!J.hs(r))break}return b}, +b5(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.bh.prototype +return J.ct.prototype}if(typeof a=="string")return J.aD.prototype +if(a==null)return J.bi.prototype +if(typeof a=="boolean")return J.cs.prototype +if(a.constructor==Array)return J.D.prototype +if(typeof a!="object"){if(typeof a=="function")return J.ad.prototype +return a}if(a instanceof A.x)return a +return J.fF(a)}, +eo(a){if(typeof a=="string")return J.aD.prototype +if(a==null)return a +if(a.constructor==Array)return J.D.prototype +if(typeof a!="object"){if(typeof a=="function")return J.ad.prototype +return a}if(a instanceof A.x)return a +return J.fF(a)}, +is(a){if(a==null)return a +if(a.constructor==Array)return J.D.prototype +if(typeof a!="object"){if(typeof a=="function")return J.ad.prototype +return a}if(a instanceof A.x)return a +return J.fF(a)}, +it(a){if(typeof a=="string")return J.aD.prototype +if(a==null)return a +if(!(a instanceof A.x))return J.aY.prototype +return a}, +hb(a){if(a==null)return a +if(typeof a!="object"){if(typeof a=="function")return J.ad.prototype +return a}if(a instanceof A.x)return a +return J.fF(a)}, +a7(a,b){if(a==null)return b==null +if(typeof a!="object")return b!=null&&a===b +return J.b5(a).H(a,b)}, +iX(a,b){if(typeof b==="number")if(a.constructor==Array||typeof a=="string"||A.kU(a,a[v.dispatchPropertyName]))if(b>>>0===b&&b=0&&b0)return a[s-1] +throw A.b(A.j9())}, +J(a,b){var s +for(s=0;s"))}, +gA(a){return A.cO(a)}, +gh(a){return a.length}, +l(a,b){if(!(b>=0&&b=s)throw A.b(A.b4(a,b)) +a[b]=c}, +$if:1, +$il:1} +J.eF.prototype={} +J.b7.prototype={ +gv(a){var s=this.d +return s==null?this.$ti.c.a(s):s}, +u(){var s,r=this,q=r.a,p=q.length +if(r.b!==p){q=A.iA(q) +throw A.b(q)}s=r.c +if(s>=p){r.sau(null) +return!1}r.sau(q[s]);++r.c +return!0}, +sau(a){this.d=this.$ti.i("1?").a(a)}, +$iC:1} +J.bj.prototype={ +j(a){if(a===0&&1/a<0)return"-0.0" +else return""+a}, +gA(a){var s,r,q,p,o=a|0 +if(a===o)return o&536870911 +s=Math.abs(a) +r=Math.log(s)/0.6931471805599453|0 +q=Math.pow(2,r) +p=s<1?s/q:q/s +return((p*9007199254740992|0)+(p*3542243181176521|0))*599197+r*1259&536870911}, +a2(a,b){var s=a%b +if(s===0)return 0 +if(s>0)return s +return s+b}, +b8(a,b){return(a|0)===a?a/b|0:this.b9(a,b)}, +b9(a,b){var s=a/b +if(s>=-2147483648&&s<=2147483647)return s|0 +if(s>0){if(s!==1/0)return Math.floor(s)}else if(s>-1/0)return Math.ceil(s) +throw A.b(A.r("Result of truncating division is "+A.o(s)+": "+A.o(a)+" ~/ "+b))}, +Z(a,b){var s +if(a>0)s=this.aA(a,b) +else{s=b>31?31:b +s=a>>s>>>0}return s}, +b6(a,b){if(0>b)throw A.b(A.iq(b)) +return this.aA(a,b)}, +aA(a,b){return b>31?0:a>>>b}, +$iaa:1, +$iI:1} +J.bh.prototype={$ij:1} +J.ct.prototype={} +J.aD.prototype={ +t(a,b){if(b<0)throw A.b(A.b4(a,b)) +if(b>=a.length)A.a6(A.b4(a,b)) +return a.charCodeAt(b)}, +m(a,b){if(b>=a.length)throw A.b(A.b4(a,b)) +return a.charCodeAt(b)}, +aE(a,b){return new A.dX(b,a,0)}, +aS(a,b){return a+b}, +aH(a,b){var s=b.length,r=a.length +if(s>r)return!1 +return b===this.I(a,r-s)}, +O(a,b,c,d){var s=A.aX(b,c,a.length) +return a.substring(0,b)+d+a.substring(s)}, +C(a,b,c){var s +if(c<0||c>a.length)throw A.b(A.ag(c,0,a.length,null,null)) +s=c+b.length +if(s>a.length)return!1 +return b===a.substring(c,s)}, +B(a,b){return this.C(a,b,0)}, +k(a,b,c){return a.substring(b,A.aX(b,c,a.length))}, +I(a,b){return this.k(a,b,null)}, +bp(a){var s,r,q,p=a.trim(),o=p.length +if(o===0)return p +if(this.m(p,0)===133){s=J.ja(p,1) +if(s===o)return""}else s=0 +r=o-1 +q=this.t(p,r)===133?J.jb(p,r):o +if(s===0&&q===o)return p +return p.substring(s,q)}, +aU(a,b){var s,r +if(0>=b)return"" +if(b===1||a.length===0)return a +if(b!==b>>>0)throw A.b(B.z) +for(s=a,r="";!0;){if((b&1)===1)r=s+r +b=b>>>1 +if(b===0)break +s+=s}return r}, +K(a,b,c){var s +if(c<0||c>a.length)throw A.b(A.ag(c,0,a.length,null,null)) +s=a.indexOf(b,c) +return s}, +bf(a,b){return this.K(a,b,0)}, +J(a,b){return A.l0(a,b,0)}, +j(a){return a}, +gA(a){var s,r,q +for(s=a.length,r=0,q=0;q>6}r=r+((r&67108863)<<3)&536870911 +r^=r>>11 +return r+((r&16383)<<15)&536870911}, +gh(a){return a.length}, +$ieO:1, +$ik:1} +A.cv.prototype={ +j(a){return"LateInitializationError: "+this.a}} +A.cb.prototype={ +gh(a){return this.a.length}, +l(a,b){return B.a.t(this.a,b)}} +A.eS.prototype={} +A.bd.prototype={} +A.S.prototype={ +gD(a){var s=this +return new A.ae(s,s.gh(s),A.ig(s).i("ae"))}, +a0(a,b){var s,r,q,p=this,o=p.gh(p) +if(b.length!==0){if(o===0)return"" +s=A.o(p.q(0,0)) +if(o!==p.gh(p))throw A.b(A.aS(p)) +for(r=s,q=1;qs)throw A.b(A.ag(r,0,s,"start",null))}}, +gb2(){var s=J.a0(this.a),r=this.c +if(r==null||r>s)return s +return r}, +gb7(){var s=J.a0(this.a),r=this.b +if(r>s)return s +return r}, +gh(a){var s,r=J.a0(this.a),q=this.b +if(q>=r)return 0 +s=this.c +if(s==null||s>=r)return r-q +if(typeof s!=="number")return s.br() +return s-q}, +q(a,b){var s=this,r=s.gb7()+b,q=s.gb2() +if(r>=q)throw A.b(A.y(b,s.gh(s),s,"index")) +return J.hi(s.a,r)}} +A.ae.prototype={ +gv(a){var s=this.d +return s==null?this.$ti.c.a(s):s}, +u(){var s,r=this,q=r.a,p=J.eo(q),o=p.gh(q) +if(r.b!==o)throw A.b(A.aS(q)) +s=r.c +if(s>=o){r.sam(null) +return!1}r.sam(p.q(q,s));++r.c +return!0}, +sam(a){this.d=this.$ti.i("1?").a(a)}, +$iC:1} +A.aF.prototype={ +gh(a){return J.a0(this.a)}, +q(a,b){return this.b.$1(J.hi(this.a,b))}} +A.f6.prototype={ +gD(a){return new A.aL(J.c0(this.a),this.b,this.$ti.i("aL<1>"))}} +A.aL.prototype={ +u(){var s,r +for(s=this.a,r=this.b;s.u();)if(A.b3(r.$1(s.gv(s))))return!0 +return!1}, +gv(a){var s=this.a +return s.gv(s)}} +A.by.prototype={ +gD(a){return new A.bz(J.c0(this.a),this.$ti.i("bz<1>"))}} +A.bz.prototype={ +u(){var s,r +for(s=this.a,r=this.$ti.c;s.u();)if(r.b(s.gv(s)))return!0 +return!1}, +gv(a){var s=this.a +return this.$ti.c.a(s.gv(s))}, +$iC:1} +A.Q.prototype={} +A.aK.prototype={ +n(a,b,c){A.ig(this).i("aK.E").a(c) +throw A.b(A.r("Cannot modify an unmodifiable list"))}} +A.aZ.prototype={} +A.eY.prototype={ +G(a){var s,r,q=this,p=new RegExp(q.a).exec(a) +if(p==null)return null +s=Object.create(null) +r=q.b +if(r!==-1)s.arguments=p[r+1] +r=q.c +if(r!==-1)s.argumentsExpr=p[r+1] +r=q.d +if(r!==-1)s.expr=p[r+1] +r=q.e +if(r!==-1)s.method=p[r+1] +r=q.f +if(r!==-1)s.receiver=p[r+1] +return s}} +A.bt.prototype={ +j(a){var s=this.b +if(s==null)return"NoSuchMethodError: "+this.a +return"NoSuchMethodError: method not found: '"+s+"' on null"}} +A.cu.prototype={ +j(a){var s,r=this,q="NoSuchMethodError: method not found: '",p=r.b +if(p==null)return"NoSuchMethodError: "+r.a +s=r.c +if(s==null)return q+p+"' ("+r.a+")" +return q+p+"' on '"+s+"' ("+r.a+")"}} +A.d7.prototype={ +j(a){var s=this.a +return s.length===0?"Error":"Error: "+s}} +A.eL.prototype={ +j(a){return"Throw of null ('"+(this.a===null?"null":"undefined")+"' from JavaScript)"}} +A.be.prototype={} +A.bL.prototype={ +j(a){var s,r=this.b +if(r!=null)return r +r=this.a +s=r!==null&&typeof r==="object"?r.stack:null +return this.b=s==null?"":s}, +$iar:1} +A.az.prototype={ +j(a){var s=this.constructor,r=s==null?null:s.name +return"Closure '"+A.iB(r==null?"unknown":r)+"'"}, +$iaA:1, +gbq(){return this}, +$C:"$1", +$R:1, +$D:null} +A.c9.prototype={$C:"$0",$R:0} +A.ca.prototype={$C:"$2",$R:2} +A.d_.prototype={} +A.cV.prototype={ +j(a){var s=this.$static_name +if(s==null)return"Closure of unknown static method" +return"Closure '"+A.iB(s)+"'"}} +A.aQ.prototype={ +H(a,b){if(b==null)return!1 +if(this===b)return!0 +if(!(b instanceof A.aQ))return!1 +return this.$_target===b.$_target&&this.a===b.a}, +gA(a){return(A.ix(this.a)^A.cO(this.$_target))>>>0}, +j(a){return"Closure '"+this.$_name+"' of "+("Instance of '"+A.eP(this.a)+"'")}} +A.dp.prototype={ +j(a){return"Reading static variable '"+this.a+"' during its initialization"}} +A.cR.prototype={ +j(a){return"RuntimeError: "+this.a}} +A.dh.prototype={ +j(a){return"Assertion failed: "+A.cm(this.a)}} +A.aE.prototype={ +gh(a){return this.a}, +gL(a){return new A.bl(this,this.$ti.i("bl<1>"))}, +l(a,b){var s,r,q,p,o=null +if(typeof b=="string"){s=this.b +if(s==null)return o +r=s[b] +q=r==null?o:r.b +return q}else if(typeof b=="number"&&(b&0x3fffffff)===b){p=this.c +if(p==null)return o +r=p[b] +q=r==null?o:r.b +return q}else return this.bg(b)}, +bg(a){var s,r,q=this.d +if(q==null)return null +s=q[J.fP(a)&0x3fffffff] +r=this.aM(s,a) +if(r<0)return null +return s[r].b}, +n(a,b,c){var s,r,q,p,o,n,m=this,l=m.$ti +l.c.a(b) +l.z[1].a(c) +if(typeof b=="string"){s=m.b +m.ao(s==null?m.b=m.aa():s,b,c)}else if(typeof b=="number"&&(b&0x3fffffff)===b){r=m.c +m.ao(r==null?m.c=m.aa():r,b,c)}else{q=m.d +if(q==null)q=m.d=m.aa() +p=J.fP(b)&0x3fffffff +o=q[p] +if(o==null)q[p]=[m.ab(b,c)] +else{n=m.aM(o,b) +if(n>=0)o[n].b=c +else o.push(m.ab(b,c))}}}, +F(a,b){var s,r,q=this +q.$ti.i("~(1,2)").a(b) +s=q.e +r=q.r +for(;s!=null;){b.$2(s.a,s.b) +if(r!==q.r)throw A.b(A.aS(q)) +s=s.c}}, +ao(a,b,c){var s,r=this.$ti +r.c.a(b) +r.z[1].a(c) +s=a[b] +if(s==null)a[b]=this.ab(b,c) +else s.b=c}, +ab(a,b){var s=this,r=s.$ti,q=new A.eG(r.c.a(a),r.z[1].a(b)) +if(s.e==null)s.e=s.f=q +else s.f=s.f.c=q;++s.a +s.r=s.r+1&1073741823 +return q}, +aM(a,b){var s,r +if(a==null)return-1 +s=a.length +for(r=0;r"]=s +delete s[""] +return s}, +$ihv:1} +A.eG.prototype={} +A.bl.prototype={ +gh(a){return this.a.a}, +gD(a){var s=this.a,r=new A.bm(s,s.r,this.$ti.i("bm<1>")) +r.c=s.e +return r}} +A.bm.prototype={ +gv(a){return this.d}, +u(){var s,r=this,q=r.a +if(r.b!==q.r)throw A.b(A.aS(q)) +s=r.c +if(s==null){r.san(null) +return!1}else{r.san(s.a) +r.c=s.c +return!0}}, +san(a){this.d=this.$ti.i("1?").a(a)}, +$iC:1} +A.fH.prototype={ +$1(a){return this.a(a)}, +$S:8} +A.fI.prototype={ +$2(a,b){return this.a(a,b)}, +$S:9} +A.fJ.prototype={ +$1(a){return this.a(A.z(a))}, +$S:10} +A.bk.prototype={ +j(a){return"RegExp/"+this.a+"/"+this.b.flags}, +gb4(){var s=this,r=s.c +if(r!=null)return r +r=s.b +return s.c=A.ht(s.a,r.multiline,!r.ignoreCase,r.unicode,r.dotAll,!0)}, +aE(a,b){return new A.df(this,b,0)}, +b3(a,b){var s,r=this.gb4() +if(r==null)r=t.K.a(r) +r.lastIndex=b +s=r.exec(a) +if(s==null)return null +return new A.dE(s)}, +$ieO:1} +A.dE.prototype={$iaV:1,$ibv:1} +A.df.prototype={ +gD(a){return new A.dg(this.a,this.b,this.c)}} +A.dg.prototype={ +gv(a){var s=this.d +return s==null?t.f.a(s):s}, +u(){var s,r,q,p,o,n,m=this,l=m.b +if(l==null)return!1 +s=m.c +r=l.length +if(s<=r){q=m.a +p=q.b3(l,s) +if(p!=null){m.d=p +s=p.b +o=s.index +n=o+s[0].length +if(o===n){if(q.b.unicode){s=m.c +q=s+1 +if(q=55296&&s<=56319){s=B.a.t(l,q) +s=s>=56320&&s<=57343}else s=!1}else s=!1}else s=!1 +n=(s?n+1:n)+1}m.c=n +return!0}}m.b=m.d=null +return!1}, +$iC:1} +A.cZ.prototype={$iaV:1} +A.dX.prototype={ +gD(a){return new A.dY(this.a,this.b,this.c)}} +A.dY.prototype={ +u(){var s,r,q=this,p=q.c,o=q.b,n=o.length,m=q.a,l=m.length +if(p+n>l){q.d=null +return!1}s=m.indexOf(o,p) +if(s<0){q.c=l+1 +q.d=null +return!1}r=s+n +q.d=new A.cZ(s,o) +q.c=r===q.c?r+1:r +return!0}, +gv(a){var s=this.d +s.toString +return s}, +$iC:1} +A.eE.prototype={} +A.aH.prototype={} +A.aW.prototype={ +gh(a){return a.length}, +$ip:1} +A.aG.prototype={ +l(a,b){A.am(b,a,a.length) +return a[b]}, +n(a,b,c){A.am(b,a,a.length) +a[b]=c}, +$if:1, +$il:1} +A.bp.prototype={ +n(a,b,c){A.am(b,a,a.length) +a[b]=c}, +$if:1, +$il:1} +A.cC.prototype={ +l(a,b){A.am(b,a,a.length) +return a[b]}} +A.cD.prototype={ +l(a,b){A.am(b,a,a.length) +return a[b]}} +A.cE.prototype={ +l(a,b){A.am(b,a,a.length) +return a[b]}} +A.cF.prototype={ +l(a,b){A.am(b,a,a.length) +return a[b]}} +A.cG.prototype={ +l(a,b){A.am(b,a,a.length) +return a[b]}} +A.bq.prototype={ +gh(a){return a.length}, +l(a,b){A.am(b,a,a.length) +return a[b]}} +A.br.prototype={ +gh(a){return a.length}, +l(a,b){A.am(b,a,a.length) +return a[b]}, +$iaJ:1} +A.bF.prototype={} +A.bG.prototype={} +A.bH.prototype={} +A.bI.prototype={} +A.a4.prototype={ +i(a){return A.ft(v.typeUniverse,this,a)}, +E(a){return A.jQ(v.typeUniverse,this,a)}} +A.dy.prototype={} +A.fs.prototype={ +j(a){return A.O(this.a,null)}} +A.dv.prototype={ +j(a){return this.a}} +A.bO.prototype={$iai:1} +A.f8.prototype={ +$1(a){var s=this.a,r=s.a +s.a=null +r.$0()}, +$S:4} +A.f7.prototype={ +$1(a){var s,r +this.a.a=t.M.a(a) +s=this.b +r=this.c +s.firstChild?s.removeChild(r):s.appendChild(r)}, +$S:11} +A.f9.prototype={ +$0(){this.a.$0()}, +$S:5} +A.fa.prototype={ +$0(){this.a.$0()}, +$S:5} +A.fq.prototype={ +aY(a,b){if(self.setTimeout!=null)self.setTimeout(A.bZ(new A.fr(this,b),0),a) +else throw A.b(A.r("`setTimeout()` not found."))}} +A.fr.prototype={ +$0(){this.b.$0()}, +$S:0} +A.di.prototype={ +ad(a,b){var s,r=this,q=r.$ti +q.i("1/?").a(b) +if(b==null)q.c.a(b) +if(!r.b)r.a.ap(b) +else{s=r.a +if(q.i("aq<1>").b(b))s.ar(b) +else s.a6(q.c.a(b))}}, +ae(a,b){var s=this.a +if(this.b)s.T(a,b) +else s.aq(a,b)}} +A.fw.prototype={ +$1(a){return this.a.$2(0,a)}, +$S:2} +A.fx.prototype={ +$2(a,b){this.a.$2(1,new A.be(a,t.l.a(b)))}, +$S:12} +A.fD.prototype={ +$2(a,b){this.a(A.ej(a),b)}, +$S:13} +A.b9.prototype={ +j(a){return A.o(this.a)}, +$iw:1, +gX(){return this.b}} +A.dl.prototype={ +ae(a,b){var s +A.em(a,"error",t.K) +s=this.a +if((s.a&30)!==0)throw A.b(A.hE("Future already completed")) +if(b==null)b=A.hk(a) +s.aq(a,b)}, +aG(a){return this.ae(a,null)}} +A.bA.prototype={ +ad(a,b){var s,r=this.$ti +r.i("1/?").a(b) +s=this.a +if((s.a&30)!==0)throw A.b(A.hE("Future already completed")) +s.ap(r.i("1/").a(b))}} +A.aM.prototype={ +bj(a){if((this.c&15)!==6)return!0 +return this.b.b.ak(t.bG.a(this.d),a.a,t.v,t.K)}, +be(a){var s,r=this,q=r.e,p=null,o=t.z,n=t.K,m=a.a,l=r.b.b +if(t.C.b(q))p=l.bm(q,m,a.b,o,n,t.l) +else p=l.ak(t.y.a(q),m,o,n) +try{o=r.$ti.i("2/").a(p) +return o}catch(s){if(t.b7.b(A.ay(s))){if((r.c&1)!==0)throw A.b(A.aP("The error handler of Future.then must return a value of the returned future's type","onError")) +throw A.b(A.aP("The error handler of Future.catchError must return a value of the future's type","onError"))}else throw s}}} +A.F.prototype={ +al(a,b,c){var s,r,q,p=this.$ti +p.E(c).i("1/(2)").a(a) +s=$.B +if(s===B.c){if(b!=null&&!t.C.b(b)&&!t.y.b(b))throw A.b(A.hj(b,"onError",u.c))}else{c.i("@<0/>").E(p.c).i("1(2)").a(a) +if(b!=null)b=A.kr(b,s)}r=new A.F(s,c.i("F<0>")) +q=b==null?1:3 +this.a4(new A.aM(r,q,a,b,p.i("@<1>").E(c).i("aM<1,2>"))) +return r}, +bo(a,b){return this.al(a,null,b)}, +aC(a,b,c){var s,r=this.$ti +r.E(c).i("1/(2)").a(a) +s=new A.F($.B,c.i("F<0>")) +this.a4(new A.aM(s,3,a,b,r.i("@<1>").E(c).i("aM<1,2>"))) +return s}, +b5(a){this.a=this.a&1|16 +this.c=a}, +a5(a){this.a=a.a&30|this.a&1 +this.c=a.c}, +a4(a){var s,r=this,q=r.a +if(q<=3){a.a=t.F.a(r.c) +r.c=a}else{if((q&4)!==0){s=t.c.a(r.c) +if((s.a&24)===0){s.a4(a) +return}r.a5(s)}A.aN(null,null,r.b,t.M.a(new A.fc(r,a)))}}, +az(a){var s,r,q,p,o,n,m=this,l={} +l.a=a +if(a==null)return +s=m.a +if(s<=3){r=t.F.a(m.c) +m.c=a +if(r!=null){q=a.a +for(p=a;q!=null;p=q,q=o)o=q.a +p.a=r}}else{if((s&4)!==0){n=t.c.a(m.c) +if((n.a&24)===0){n.az(a) +return}m.a5(n)}l.a=m.Y(a) +A.aN(null,null,m.b,t.M.a(new A.fj(l,m)))}}, +ac(){var s=t.F.a(this.c) +this.c=null +return this.Y(s)}, +Y(a){var s,r,q +for(s=a,r=null;s!=null;r=s,s=q){q=s.a +s.a=r}return r}, +b0(a){var s,r,q,p=this +p.a^=2 +try{a.al(new A.ff(p),new A.fg(p),t.P)}catch(q){s=A.ay(q) +r=A.aO(q) +A.l_(new A.fh(p,s,r))}}, +a6(a){var s,r=this +r.$ti.c.a(a) +s=r.ac() +r.a=8 +r.c=a +A.bC(r,s)}, +T(a,b){var s +t.l.a(b) +s=this.ac() +this.b5(A.et(a,b)) +A.bC(this,s)}, +ap(a){var s=this.$ti +s.i("1/").a(a) +if(s.i("aq<1>").b(a)){this.ar(a) +return}this.b_(s.c.a(a))}, +b_(a){var s=this +s.$ti.c.a(a) +s.a^=2 +A.aN(null,null,s.b,t.M.a(new A.fe(s,a)))}, +ar(a){var s=this,r=s.$ti +r.i("aq<1>").a(a) +if(r.b(a)){if((a.a&16)!==0){s.a^=2 +A.aN(null,null,s.b,t.M.a(new A.fi(s,a)))}else A.fT(a,s) +return}s.b0(a)}, +aq(a,b){this.a^=2 +A.aN(null,null,this.b,t.M.a(new A.fd(this,a,b)))}, +$iaq:1} +A.fc.prototype={ +$0(){A.bC(this.a,this.b)}, +$S:0} +A.fj.prototype={ +$0(){A.bC(this.b,this.a.a)}, +$S:0} +A.ff.prototype={ +$1(a){var s,r,q,p=this.a +p.a^=2 +try{p.a6(p.$ti.c.a(a))}catch(q){s=A.ay(q) +r=A.aO(q) +p.T(s,r)}}, +$S:4} +A.fg.prototype={ +$2(a,b){this.a.T(t.K.a(a),t.l.a(b))}, +$S:14} +A.fh.prototype={ +$0(){this.a.T(this.b,this.c)}, +$S:0} +A.fe.prototype={ +$0(){this.a.a6(this.b)}, +$S:0} +A.fi.prototype={ +$0(){A.fT(this.b,this.a)}, +$S:0} +A.fd.prototype={ +$0(){this.a.T(this.b,this.c)}, +$S:0} +A.fm.prototype={ +$0(){var s,r,q,p,o,n,m=this,l=null +try{q=m.a.a +l=q.b.b.bl(t.O.a(q.d),t.z)}catch(p){s=A.ay(p) +r=A.aO(p) +q=m.c&&t.n.a(m.b.a.c).a===s +o=m.a +if(q)o.c=t.n.a(m.b.a.c) +else o.c=A.et(s,r) +o.b=!0 +return}if(l instanceof A.F&&(l.a&24)!==0){if((l.a&16)!==0){q=m.a +q.c=t.n.a(l.c) +q.b=!0}return}if(t.d.b(l)){n=m.b.a +q=m.a +q.c=l.bo(new A.fn(n),t.z) +q.b=!1}}, +$S:0} +A.fn.prototype={ +$1(a){return this.a}, +$S:15} +A.fl.prototype={ +$0(){var s,r,q,p,o,n,m,l +try{q=this.a +p=q.a +o=p.$ti +n=o.c +m=n.a(this.b) +q.c=p.b.b.ak(o.i("2/(1)").a(p.d),m,o.i("2/"),n)}catch(l){s=A.ay(l) +r=A.aO(l) +q=this.a +q.c=A.et(s,r) +q.b=!0}}, +$S:0} +A.fk.prototype={ +$0(){var s,r,q,p,o,n,m=this +try{s=t.n.a(m.a.a.c) +p=m.b +if(p.a.bj(s)&&p.a.e!=null){p.c=p.a.be(s) +p.b=!1}}catch(o){r=A.ay(o) +q=A.aO(o) +p=t.n.a(m.a.a.c) +n=m.b +if(p.a===r)n.c=p +else n.c=A.et(r,q) +n.b=!0}}, +$S:0} +A.dj.prototype={} +A.cX.prototype={} +A.dW.prototype={} +A.bU.prototype={$ihM:1} +A.fB.prototype={ +$0(){var s=this.a,r=this.b +A.em(s,"error",t.K) +A.em(r,"stackTrace",t.l) +A.j7(s,r)}, +$S:0} +A.dP.prototype={ +bn(a){var s,r,q +t.M.a(a) +try{if(B.c===$.B){a.$0() +return}A.ik(null,null,this,a,t.H)}catch(q){s=A.ay(q) +r=A.aO(q) +A.h7(t.K.a(s),t.l.a(r))}}, +aF(a){return new A.fp(this,t.M.a(a))}, +bl(a,b){b.i("0()").a(a) +if($.B===B.c)return a.$0() +return A.ik(null,null,this,a,b)}, +ak(a,b,c,d){c.i("@<0>").E(d).i("1(2)").a(a) +d.a(b) +if($.B===B.c)return a.$1(b) +return A.kt(null,null,this,a,b,c,d)}, +bm(a,b,c,d,e,f){d.i("@<0>").E(e).E(f).i("1(2,3)").a(a) +e.a(b) +f.a(c) +if($.B===B.c)return a.$2(b,c) +return A.ks(null,null,this,a,b,c,d,e,f)}, +aP(a,b,c,d){return b.i("@<0>").E(c).E(d).i("1(2,3)").a(a)}} +A.fp.prototype={ +$0(){return this.a.bn(this.b)}, +$S:0} +A.bg.prototype={} +A.bn.prototype={$if:1,$il:1} +A.e.prototype={ +gD(a){return new A.ae(a,this.gh(a),A.aw(a).i("ae"))}, +q(a,b){return this.l(a,b)}, +bd(a,b,c,d){var s +A.aw(a).i("e.E?").a(d) +A.aX(b,c,this.gh(a)) +for(s=b;s=0&&f=0){f=B.a.t("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e) +if(f===j)continue +j=f}else{if(e===-1){if(n<0){d=o==null?null:o.a.length +if(d==null)d=0 +n=d+(q-p) +m=q}++l +if(j===61)continue}j=f}if(e!==-2){if(o==null){o=new A.H("") +d=o}else d=o +d.a+=B.a.k(a1,p,q) +d.a+=A.af(j) +p=k +continue}}throw A.b(A.K("Invalid base64 data",a1,q))}if(o!=null){r=o.a+=B.a.k(a1,p,a3) +d=r.length +if(n>=0)A.hl(a1,m,a3,n,l,d) +else{c=B.d.a2(d-1,4)+1 +if(c===1)throw A.b(A.K(a,a1,a3)) +for(;c<4;){r+="=" +o.a=r;++c}}r=o.a +return B.a.O(a1,a2,a3,r.charCodeAt(0)==0?r:r)}b=a3-a2 +if(n>=0)A.hl(a1,m,a3,n,l,b) +else{c=B.d.a2(b,4) +if(c===1)throw A.b(A.K(a,a1,a3)) +if(c>1)a1=B.a.O(a1,a3,a3,c===2?"==":"=")}return a1}} +A.ev.prototype={} +A.aR.prototype={} +A.cd.prototype={} +A.cl.prototype={} +A.dc.prototype={} +A.f3.prototype={ +ba(a){var s,r +t.L.a(a) +s=this.a +r=A.jt(s,a,0,null) +if(r!=null)return r +return new A.fu(s).bb(a,0,null,!0)}} +A.fu.prototype={ +bb(a,b,c,d){var s,r,q,p,o,n=this +t.L.a(a) +s=A.aX(b,c,J.a0(a)) +if(b===s)return"" +r=A.k1(a,b,s) +q=n.a7(r,0,s-b,!0) +p=n.b +if((p&1)!==0){o=A.k2(p) +n.b=0 +throw A.b(A.K(o,a,b+n.c))}return q}, +a7(a,b,c,d){var s,r,q=this +if(c-b>1000){s=B.d.b8(b+c,2) +r=q.a7(a,b,s,!1) +if((q.b&1)!==0)return r +return r+q.a7(a,s,c,d)}return q.bc(a,b,c,d)}, +bc(a,b,c,d){var s,r,q,p,o,n,m,l,k=this,j=65533,i=k.b,h=k.c,g=new A.H(""),f=b+1,e=a.length +if(!(b>=0&&b>>q:(s&63|h<<6)>>>0 +i=B.a.m(" \x000:XECCCCCN:lDb \x000:XECCCCCNvlDb \x000:XECCCCCN:lDb AAAAA\x00\x00\x00\x00\x00AAAAA00000AAAAA:::::AAAAAGG000AAAAA00KKKAAAAAG::::AAAAA:IIIIAAAAA000\x800AAAAA\x00\x00\x00\x00 AAAAA",i+q) +if(i===0){g.a+=A.af(h) +if(f===c)break $label0$0 +break}else if((i&1)!==0){if(r)switch(i){case 69:case 67:g.a+=A.af(j) +break +case 65:g.a+=A.af(j);--f +break +default:p=g.a+=A.af(j) +g.a=p+A.af(j) +break}else{k.b=i +k.c=f-1 +return""}i=0}if(f===c)break $label0$0 +o=f+1 +if(!(f>=0&&f=0&&f=0&&o=128){n=m-1 +o=m +break}o=m}if(n-f<20)for(l=f;l32)if(r)g.a+=A.af(j) +else{k.b=77 +k.c=c +return""}k.b=i +k.c=h +e=g.a +return e.charCodeAt(0)==0?e:e}} +A.w.prototype={ +gX(){return A.aO(this.$thrownJsError)}} +A.b8.prototype={ +j(a){var s=this.a +if(s!=null)return"Assertion failed: "+A.cm(s) +return"Assertion failed"}} +A.ai.prototype={} +A.ac.prototype={ +ga9(){return"Invalid argument"+(!this.a?"(s)":"")}, +ga8(){return""}, +j(a){var s=this,r=s.c,q=r==null?"":" ("+r+")",p=s.d,o=p==null?"":": "+p,n=s.ga9()+q+o +if(!s.a)return n +return n+s.ga8()+": "+A.cm(s.gag())}, +gag(){return this.b}} +A.bu.prototype={ +gag(){return A.k3(this.b)}, +ga9(){return"RangeError"}, +ga8(){var s,r=this.e,q=this.f +if(r==null)s=q!=null?": Not less than or equal to "+A.o(q):"" +else if(q==null)s=": Not greater than or equal to "+A.o(r) +else if(q>r)s=": Not in inclusive range "+A.o(r)+".."+A.o(q) +else s=qe.length +else s=!1 +if(s)f=null +if(f==null){if(e.length>78)e=B.a.k(e,0,75)+"..." +return g+"\n"+e}for(r=1,q=0,p=!1,o=0;o1?g+(" (at line "+r+", character "+(f-q+1)+")\n"):g+(" (at character "+(f+1)+")\n") +m=e.length +for(o=f;o78)if(f-q<75){l=q+75 +k=q +j="" +i="..."}else{if(m-f<75){k=m-75 +l=m +i=""}else{k=f-36 +l=f+36 +i="..."}j="..."}else{l=m +k=q +j="" +i=""}return g+j+B.a.k(e,k,l)+i+"\n"+B.a.aU(" ",f-k+j.length)+"^\n"}else return f!=null?g+(" (at offset "+A.o(f)+")"):g}} +A.f.prototype={ +gh(a){var s,r=this.gD(this) +for(s=0;r.u();)++s +return s}, +gbh(a){return!this.gD(this).u()}, +q(a,b){var s,r,q +A.cP(b,"index") +for(s=this.gD(this),r=0;s.u();){q=s.gv(s) +if(b===r)return q;++r}throw A.b(A.y(b,r,this,"index"))}, +j(a){return A.j8(this,"(",")")}} +A.C.prototype={} +A.E.prototype={ +gA(a){return A.x.prototype.gA.call(this,this)}, +j(a){return"null"}} +A.x.prototype={$ix:1, +H(a,b){return this===b}, +gA(a){return A.cO(this)}, +j(a){return"Instance of '"+A.eP(this)+"'"}, +toString(){return this.j(this)}} +A.e0.prototype={ +j(a){return""}, +$iar:1} +A.H.prototype={ +gh(a){return this.a.length}, +j(a){var s=this.a +return s.charCodeAt(0)==0?s:s}, +$ijl:1} +A.f0.prototype={ +$2(a,b){throw A.b(A.K("Illegal IPv4 address, "+a,this.a,b))}, +$S:17} +A.f1.prototype={ +$2(a,b){throw A.b(A.K("Illegal IPv6 address, "+a,this.a,b))}, +$S:18} +A.f2.prototype={ +$2(a,b){var s +if(b-a>4)this.a.$2("an IPv6 part can only contain a maximum of 4 hex digits",a) +s=A.fK(B.a.k(this.b,a,b),16) +if(s<0||s>65535)this.a.$2("each part must be in the range of `0x0..0xFFFF`",a) +return s}, +$S:19} +A.bS.prototype={ +gaB(){var s,r,q,p,o=this,n=o.w +if(n===$){s=o.a +r=s.length!==0?""+s+":":"" +q=o.c +p=q==null +if(!p||s==="file"){s=r+"//" +r=o.b +if(r.length!==0)s=s+r+"@" +if(!p)s+=q +r=o.d +if(r!=null)s=s+":"+A.o(r)}else s=r +s+=o.e +r=o.f +if(r!=null)s=s+"?"+r +r=o.r +if(r!=null)s=s+"#"+r +n!==$&&A.he() +n=o.w=s.charCodeAt(0)==0?s:s}return n}, +gaN(){var s,r,q=this,p=q.x +if(p===$){s=q.e +if(s.length!==0&&B.a.m(s,0)===47)s=B.a.I(s,1) +r=s.length===0?B.F:A.jf(new A.aF(A.t(s.split("/"),t.s),t.c0.a(A.kH()),t.W),t.N) +q.x!==$&&A.he() +q.saZ(r) +p=r}return p}, +gA(a){var s,r=this,q=r.y +if(q===$){s=B.a.gA(r.gaB()) +r.y!==$&&A.he() +r.y=s +q=s}return q}, +gaR(){return this.b}, +gU(a){var s=this.c +if(s==null)return"" +if(B.a.B(s,"["))return B.a.k(s,1,s.length-1) +return s}, +gaj(a){var s=this.d +return s==null?A.hW(this.a):s}, +gaO(a){var s=this.f +return s==null?"":s}, +gaI(){var s=this.r +return s==null?"":s}, +gaJ(){return this.c!=null}, +gaL(){return this.f!=null}, +gaK(){return this.r!=null}, +j(a){return this.gaB()}, +H(a,b){var s,r,q=this +if(b==null)return!1 +if(q===b)return!0 +if(t.R.b(b))if(q.a===b.ga3())if(q.c!=null===b.gaJ())if(q.b===b.gaR())if(q.gU(q)===b.gU(b))if(q.gaj(q)===b.gaj(b))if(q.e===b.gai(b)){s=q.f +r=s==null +if(!r===b.gaL()){if(r)s="" +if(s===b.gaO(b)){s=q.r +r=s==null +if(!r===b.gaK()){if(r)s="" +s=s===b.gaI()}else s=!1}else s=!1}else s=!1}else s=!1 +else s=!1 +else s=!1 +else s=!1 +else s=!1 +else s=!1 +else s=!1 +return s}, +saZ(a){this.x=t.h.a(a)}, +$id9:1, +ga3(){return this.a}, +gai(a){return this.e}} +A.f_.prototype={ +gaQ(){var s,r,q,p,o=this,n=null,m=o.c +if(m==null){m=o.b +if(0>=m.length)return A.m(m,0) +s=o.a +m=m[0]+1 +r=B.a.K(s,"?",m) +q=s.length +if(r>=0){p=A.bT(s,r+1,q,B.j,!1,!1) +q=r}else p=n +m=o.c=new A.dq("data","",n,n,A.bT(s,m,q,B.o,!1,!1),p,n)}return m}, +j(a){var s,r=this.b +if(0>=r.length)return A.m(r,0) +s=this.a +return r[0]===-1?"data:"+s:s}} +A.fy.prototype={ +$2(a,b){var s=this.a +if(!(a>>0 +if(!(q<96))return A.m(a,q) +a[q]=c}}, +$S:7} +A.dR.prototype={ +gaJ(){return this.c>0}, +gaL(){return this.fr?B.a.k(this.a,r,s-1):""}, +gU(a){var s=this.c +return s>0?B.a.k(this.a,s,this.d):""}, +gaj(a){var s,r=this +if(r.c>0&&r.d+1>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.q.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){A.z(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.I.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.A.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.x.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.A.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.Y.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.aN.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.aj.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.cz.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.E.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.aO.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.B.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.c1.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.A.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.aE.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b>>0!==b||b>=s)throw A.b(A.y(b,s,a,null)) +return a[b]}, +n(a,b,c){t.k.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){if(!(b>=0&&b"))}} +A.bf.prototype={ +u(){var s=this,r=s.c+1,q=s.b +if(r>>0!==b||b>=a.length)throw A.b(A.y(b,this.gh(a),a,null)) +return a.getItem(b)}, +n(a,b,c){t.r.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){return this.l(a,b)}, +$if:1, +$il:1} +A.a3.prototype={$ia3:1} +A.cH.prototype={ +gh(a){return a.length}, +l(a,b){if(b>>>0!==b||b>=a.length)throw A.b(A.y(b,this.gh(a),a,null)) +return a.getItem(b)}, +n(a,b,c){t.j.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){return this.l(a,b)}, +$if:1, +$il:1} +A.cM.prototype={ +gh(a){return a.length}} +A.cY.prototype={ +gh(a){return a.length}, +l(a,b){if(b>>>0!==b||b>=a.length)throw A.b(A.y(b,this.gh(a),a,null)) +return a.getItem(b)}, +n(a,b,c){A.z(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){return this.l(a,b)}, +$if:1, +$il:1} +A.a5.prototype={$ia5:1} +A.d5.prototype={ +gh(a){return a.length}, +l(a,b){if(b>>>0!==b||b>=a.length)throw A.b(A.y(b,this.gh(a),a,null)) +return a.getItem(b)}, +n(a,b,c){t.ax.a(c) +throw A.b(A.r("Cannot assign element of immutable List."))}, +q(a,b){return this.l(a,b)}, +$if:1, +$il:1} +A.dC.prototype={} +A.dD.prototype={} +A.dL.prototype={} +A.dM.prototype={} +A.dZ.prototype={} +A.e_.prototype={} +A.e6.prototype={} +A.e7.prototype={} +A.c5.prototype={ +gh(a){return a.length}} +A.c6.prototype={ +l(a,b){return A.av(a.get(A.z(b)))}, +F(a,b){var s,r +t.u.a(b) +s=a.entries() +for(;!0;){r=s.next() +if(r.done)return +b.$2(r.value[0],A.av(r.value[1]))}}, +gL(a){var s=A.t([],t.s) +this.F(a,new A.eu(s)) +return s}, +gh(a){return a.size}, +$ia2:1} +A.eu.prototype={ +$2(a,b){return B.b.p(this.a,a)}, +$S:1} +A.c7.prototype={ +gh(a){return a.length}} +A.ap.prototype={} +A.cI.prototype={ +gh(a){return a.length}} +A.dk.prototype={} +A.ew.prototype={ +bi(a){var s,r,q,p,o,n,m,l,k,j +t.U.a(a) +for(s=a.$ti,r=s.i("b2(f.E)").a(new A.ex()),q=a.gD(a),s=new A.aL(q,r,s.i("aL")),r=this.a,p=!1,o=!1,n="";s.u();){m=q.gv(q) +if(r.N(m)&&o){l=A.jg(m,r) +k=n.charCodeAt(0)==0?n:n +n=B.a.k(k,0,r.R(k,!0)) +l.b=n +if(r.a1(n))B.b.n(l.e,0,r.gW()) +n=""+l.j(0)}else if(r.P(m)>0){o=!r.N(m) +n=""+m}else{j=m.length +if(j!==0){if(0>=j)return A.m(m,0) +j=r.af(m[0])}else j=!1 +if(!j)if(p)n+=r.gW() +n+=m}p=r.a1(m)}return n.charCodeAt(0)==0?n:n}} +A.ex.prototype={ +$1(a){return A.z(a)!==""}, +$S:22} +A.fC.prototype={ +$1(a){A.ek(a) +return a==null?"null":'"'+a+'"'}, +$S:23} +A.aC.prototype={ +aT(a){var s,r=this.P(a) +if(r>0)return B.a.k(a,0,r) +if(this.N(a)){if(0>=a.length)return A.m(a,0) +s=a[0]}else s=null +return s}} +A.eN.prototype={ +j(a){var s,r,q,p,o,n=this.b +n=n!=null?""+n:"" +for(s=this.d,r=this.e,q=s.length,p=r.length,o=0;o0){r=B.a.K(a,"\\",r+1) +if(r>0)return r}return q}if(q<3)return 0 +if(!A.iw(s))return 0 +if(B.a.m(a,1)!==58)return 0 +q=B.a.m(a,2) +if(!(q===47||q===92))return 0 +return 3}, +P(a){return this.R(a,!1)}, +N(a){return this.P(a)===1}, +gah(){return"windows"}, +gW(){return"\\"}} +A.ey.prototype={} +A.eA.prototype={} +A.eD.prototype={} +A.eX.prototype={} +A.eB.prototype={} +A.eM.prototype={} +A.eQ.prototype={};(function aliases(){var s=J.aU.prototype +s.aV=s.j +s=J.G.prototype +s.aW=s.j})();(function installTearOffs(){var s=hunkHelpers._static_1,r=hunkHelpers._static_0 +s(A,"kC","jw",3) +s(A,"kD","jx",3) +s(A,"kE","jy",3) +r(A,"ir","kv",0) +s(A,"kH","jr",24)})();(function inheritance(){var s=hunkHelpers.mixin,r=hunkHelpers.inherit,q=hunkHelpers.inheritMany +r(A.x,null) +q(A.x,[A.fR,J.aU,J.b7,A.w,A.bD,A.eS,A.f,A.ae,A.C,A.bz,A.Q,A.aK,A.eY,A.eL,A.be,A.bL,A.az,A.v,A.eG,A.bm,A.bk,A.dE,A.dg,A.cZ,A.dY,A.a4,A.dy,A.fs,A.fq,A.di,A.b9,A.dl,A.aM,A.F,A.dj,A.cX,A.dW,A.bU,A.e,A.aR,A.fu,A.cJ,A.bw,A.fb,A.eC,A.E,A.e0,A.H,A.bS,A.f_,A.dR,A.ez,A.n,A.bf,A.eK,A.ew,A.eV,A.eN]) +q(J.aU,[J.cs,J.bi,J.a,J.bj,J.aD]) +q(J.a,[J.G,J.D,A.aH,A.c,A.c1,A.ba,A.a8,A.u,A.dn,A.J,A.ch,A.ci,A.dr,A.bc,A.dt,A.ck,A.dw,A.R,A.cq,A.dA,A.cx,A.cy,A.dF,A.dG,A.T,A.dH,A.dJ,A.U,A.dN,A.dQ,A.W,A.dS,A.X,A.dV,A.L,A.e2,A.d2,A.Z,A.e4,A.d4,A.da,A.e9,A.eb,A.ed,A.ef,A.eh,A.a1,A.dC,A.a3,A.dL,A.cM,A.dZ,A.a5,A.e6,A.c5,A.dk]) +q(J.G,[J.cK,J.aY,J.ad,A.eE,A.ey,A.eA,A.eD,A.eX,A.eB,A.eM,A.eQ]) +r(J.eF,J.D) +q(J.bj,[J.bh,J.ct]) +q(A.w,[A.cv,A.ai,A.cu,A.d7,A.dp,A.cR,A.b8,A.dv,A.ac,A.d8,A.d6,A.bx,A.cc]) +r(A.bn,A.bD) +r(A.aZ,A.bn) +r(A.cb,A.aZ) +q(A.f,[A.bd,A.f6,A.by,A.bg,A.dX]) +q(A.bd,[A.S,A.bl]) +q(A.S,[A.aI,A.aF]) +r(A.aL,A.C) +r(A.bt,A.ai) +q(A.az,[A.c9,A.ca,A.d_,A.fH,A.fJ,A.f8,A.f7,A.fw,A.ff,A.fn,A.fz,A.fA,A.fN,A.fO,A.ex,A.fC]) +q(A.d_,[A.cV,A.aQ]) +r(A.dh,A.b8) +r(A.bo,A.v) +r(A.aE,A.bo) +q(A.ca,[A.fI,A.fx,A.fD,A.fg,A.eH,A.f0,A.f1,A.f2,A.fy,A.eI,A.eJ,A.eR,A.eT,A.eu]) +r(A.df,A.bg) +r(A.aW,A.aH) +q(A.aW,[A.bF,A.bH]) +r(A.bG,A.bF) +r(A.aG,A.bG) +r(A.bI,A.bH) +r(A.bp,A.bI) +q(A.bp,[A.cC,A.cD,A.cE,A.cF,A.cG,A.bq,A.br]) +r(A.bO,A.dv) +q(A.c9,[A.f9,A.fa,A.fr,A.fc,A.fj,A.fh,A.fe,A.fi,A.fd,A.fm,A.fl,A.fk,A.fB,A.fp,A.f5,A.f4]) +r(A.bA,A.dl) +r(A.dP,A.bU) +q(A.aR,[A.c8,A.cl]) +r(A.cd,A.cX) +q(A.cd,[A.ev,A.f3]) +r(A.dc,A.cl) +q(A.ac,[A.bu,A.cr]) +r(A.dq,A.bS) +q(A.c,[A.q,A.co,A.V,A.bJ,A.Y,A.M,A.bM,A.dd,A.c7,A.ap]) +q(A.q,[A.h,A.ab]) +r(A.i,A.h) +q(A.i,[A.c2,A.c3,A.cp,A.cS]) +r(A.ce,A.a8) +r(A.aT,A.dn) +q(A.J,[A.cf,A.cg]) +r(A.ds,A.dr) +r(A.bb,A.ds) +r(A.du,A.dt) +r(A.cj,A.du) +r(A.P,A.ba) +r(A.dx,A.dw) +r(A.cn,A.dx) +r(A.dB,A.dA) +r(A.aB,A.dB) +r(A.cz,A.dF) +r(A.cA,A.dG) +r(A.dI,A.dH) +r(A.cB,A.dI) +r(A.dK,A.dJ) +r(A.bs,A.dK) +r(A.dO,A.dN) +r(A.cL,A.dO) +r(A.cQ,A.dQ) +r(A.bK,A.bJ) +r(A.cT,A.bK) +r(A.dT,A.dS) +r(A.cU,A.dT) +r(A.cW,A.dV) +r(A.e3,A.e2) +r(A.d0,A.e3) +r(A.bN,A.bM) +r(A.d1,A.bN) +r(A.e5,A.e4) +r(A.d3,A.e5) +r(A.ea,A.e9) +r(A.dm,A.ea) +r(A.bB,A.bc) +r(A.ec,A.eb) +r(A.dz,A.ec) +r(A.ee,A.ed) +r(A.bE,A.ee) +r(A.eg,A.ef) +r(A.dU,A.eg) +r(A.ei,A.eh) +r(A.e1,A.ei) +r(A.dD,A.dC) +r(A.cw,A.dD) +r(A.dM,A.dL) +r(A.cH,A.dM) +r(A.e_,A.dZ) +r(A.cY,A.e_) +r(A.e7,A.e6) +r(A.d5,A.e7) +r(A.c6,A.dk) +r(A.cI,A.ap) +r(A.aC,A.eV) +q(A.aC,[A.cN,A.db,A.de]) +s(A.aZ,A.aK) +s(A.bF,A.e) +s(A.bG,A.Q) +s(A.bH,A.e) +s(A.bI,A.Q) +s(A.bD,A.e) +s(A.dn,A.ez) +s(A.dr,A.e) +s(A.ds,A.n) +s(A.dt,A.e) +s(A.du,A.n) +s(A.dw,A.e) +s(A.dx,A.n) +s(A.dA,A.e) +s(A.dB,A.n) +s(A.dF,A.v) +s(A.dG,A.v) +s(A.dH,A.e) +s(A.dI,A.n) +s(A.dJ,A.e) +s(A.dK,A.n) +s(A.dN,A.e) +s(A.dO,A.n) +s(A.dQ,A.v) +s(A.bJ,A.e) +s(A.bK,A.n) +s(A.dS,A.e) +s(A.dT,A.n) +s(A.dV,A.v) +s(A.e2,A.e) +s(A.e3,A.n) +s(A.bM,A.e) +s(A.bN,A.n) +s(A.e4,A.e) +s(A.e5,A.n) +s(A.e9,A.e) +s(A.ea,A.n) +s(A.eb,A.e) +s(A.ec,A.n) +s(A.ed,A.e) +s(A.ee,A.n) +s(A.ef,A.e) +s(A.eg,A.n) +s(A.eh,A.e) +s(A.ei,A.n) +s(A.dC,A.e) +s(A.dD,A.n) +s(A.dL,A.e) +s(A.dM,A.n) +s(A.dZ,A.e) +s(A.e_,A.n) +s(A.e6,A.e) +s(A.e7,A.n) +s(A.dk,A.v)})() +var v={typeUniverse:{eC:new Map(),tR:{},eT:{},tPV:{},sEA:[]},mangledGlobalNames:{j:"int",aa:"double",I:"num",k:"String",b2:"bool",E:"Null",l:"List"},mangledNames:{},types:["~()","~(k,@)","~(@)","~(~())","E(@)","E()","@()","~(aJ,k,j)","@(@)","@(@,k)","@(k)","E(~())","E(@,ar)","~(j,@)","E(x,ar)","F<@>(@)","~(x?,x?)","~(k,j)","~(k,j?)","j(j,j)","aJ(@,@)","~(k,k)","b2(k)","k(k?)","k(k)"],interceptorsByTag:null,leafTags:null,arrayRti:Symbol("$ti")} +A.jP(v.typeUniverse,JSON.parse('{"cK":"G","aY":"G","ad":"G","eE":"G","ey":"G","eA":"G","eD":"G","eX":"G","eB":"G","eM":"G","eQ":"G","ll":"a","l6":"ap","l5":"c","lo":"c","lq":"c","lj":"h","l7":"i","lk":"i","lh":"q","lg":"q","lJ":"M","l8":"ab","lw":"ab","li":"aB","l9":"u","lb":"a8","ld":"L","le":"J","la":"J","lc":"J","ln":"aG","lm":"aH","a":{"d":[]},"cs":{"b2":[]},"bi":{"E":[]},"G":{"a":[],"d":[]},"D":{"l":["1"],"a":[],"d":[],"f":["1"]},"eF":{"D":["1"],"l":["1"],"a":[],"d":[],"f":["1"]},"b7":{"C":["1"]},"bj":{"aa":[],"I":[]},"bh":{"aa":[],"j":[],"I":[]},"ct":{"aa":[],"I":[]},"aD":{"k":[],"eO":[]},"cv":{"w":[]},"cb":{"e":["j"],"aK":["j"],"l":["j"],"f":["j"],"e.E":"j","aK.E":"j"},"bd":{"f":["1"]},"S":{"f":["1"]},"aI":{"S":["1"],"f":["1"],"f.E":"1","S.E":"1"},"ae":{"C":["1"]},"aF":{"S":["2"],"f":["2"],"f.E":"2","S.E":"2"},"f6":{"f":["1"],"f.E":"1"},"aL":{"C":["1"]},"by":{"f":["1"],"f.E":"1"},"bz":{"C":["1"]},"aZ":{"e":["1"],"aK":["1"],"l":["1"],"f":["1"]},"bt":{"ai":[],"w":[]},"cu":{"w":[]},"d7":{"w":[]},"bL":{"ar":[]},"az":{"aA":[]},"c9":{"aA":[]},"ca":{"aA":[]},"d_":{"aA":[]},"cV":{"aA":[]},"aQ":{"aA":[]},"dp":{"w":[]},"cR":{"w":[]},"dh":{"w":[]},"aE":{"v":["1","2"],"hv":["1","2"],"a2":["1","2"],"v.K":"1","v.V":"2"},"bl":{"f":["1"],"f.E":"1"},"bm":{"C":["1"]},"bk":{"eO":[]},"dE":{"bv":[],"aV":[]},"df":{"f":["bv"],"f.E":"bv"},"dg":{"C":["bv"]},"cZ":{"aV":[]},"dX":{"f":["aV"],"f.E":"aV"},"dY":{"C":["aV"]},"aH":{"a":[],"d":[]},"aW":{"p":["1"],"a":[],"d":[]},"aG":{"e":["aa"],"p":["aa"],"l":["aa"],"a":[],"d":[],"f":["aa"],"Q":["aa"],"e.E":"aa"},"bp":{"e":["j"],"p":["j"],"l":["j"],"a":[],"d":[],"f":["j"],"Q":["j"]},"cC":{"e":["j"],"p":["j"],"l":["j"],"a":[],"d":[],"f":["j"],"Q":["j"],"e.E":"j"},"cD":{"e":["j"],"p":["j"],"l":["j"],"a":[],"d":[],"f":["j"],"Q":["j"],"e.E":"j"},"cE":{"e":["j"],"p":["j"],"l":["j"],"a":[],"d":[],"f":["j"],"Q":["j"],"e.E":"j"},"cF":{"e":["j"],"p":["j"],"l":["j"],"a":[],"d":[],"f":["j"],"Q":["j"],"e.E":"j"},"cG":{"e":["j"],"p":["j"],"l":["j"],"a":[],"d":[],"f":["j"],"Q":["j"],"e.E":"j"},"bq":{"e":["j"],"p":["j"],"l":["j"],"a":[],"d":[],"f":["j"],"Q":["j"],"e.E":"j"},"br":{"e":["j"],"aJ":[],"p":["j"],"l":["j"],"a":[],"d":[],"f":["j"],"Q":["j"],"e.E":"j"},"dv":{"w":[]},"bO":{"ai":[],"w":[]},"F":{"aq":["1"]},"b9":{"w":[]},"bA":{"dl":["1"]},"bU":{"hM":[]},"dP":{"bU":[],"hM":[]},"bg":{"f":["1"]},"bn":{"e":["1"],"l":["1"],"f":["1"]},"bo":{"v":["1","2"],"a2":["1","2"]},"v":{"a2":["1","2"]},"c8":{"aR":["l","k"]},"cl":{"aR":["k","l"]},"dc":{"aR":["k","l"]},"aa":{"I":[]},"j":{"I":[]},"l":{"f":["1"]},"bv":{"aV":[]},"k":{"eO":[]},"b8":{"w":[]},"ai":{"w":[]},"ac":{"w":[]},"bu":{"w":[]},"cr":{"w":[]},"d8":{"w":[]},"d6":{"w":[]},"bx":{"w":[]},"cc":{"w":[]},"cJ":{"w":[]},"bw":{"w":[]},"e0":{"ar":[]},"H":{"jl":[]},"bS":{"d9":[]},"dR":{"d9":[]},"dq":{"d9":[]},"u":{"a":[],"d":[]},"P":{"a":[],"d":[]},"R":{"a":[],"d":[]},"T":{"a":[],"d":[]},"q":{"a":[],"d":[]},"U":{"a":[],"d":[]},"V":{"a":[],"d":[]},"W":{"a":[],"d":[]},"X":{"a":[],"d":[]},"L":{"a":[],"d":[]},"Y":{"a":[],"d":[]},"M":{"a":[],"d":[]},"Z":{"a":[],"d":[]},"i":{"q":[],"a":[],"d":[]},"c1":{"a":[],"d":[]},"c2":{"q":[],"a":[],"d":[]},"c3":{"q":[],"a":[],"d":[]},"ba":{"a":[],"d":[]},"ab":{"q":[],"a":[],"d":[]},"ce":{"a":[],"d":[]},"aT":{"a":[],"d":[]},"J":{"a":[],"d":[]},"a8":{"a":[],"d":[]},"cf":{"a":[],"d":[]},"cg":{"a":[],"d":[]},"ch":{"a":[],"d":[]},"ci":{"a":[],"d":[]},"bb":{"e":["ah"],"n":["ah"],"l":["ah"],"p":["ah"],"a":[],"d":[],"f":["ah"],"n.E":"ah","e.E":"ah"},"bc":{"a":[],"ah":["I"],"d":[]},"cj":{"e":["k"],"n":["k"],"l":["k"],"p":["k"],"a":[],"d":[],"f":["k"],"n.E":"k","e.E":"k"},"ck":{"a":[],"d":[]},"h":{"q":[],"a":[],"d":[]},"c":{"a":[],"d":[]},"cn":{"e":["P"],"n":["P"],"l":["P"],"p":["P"],"a":[],"d":[],"f":["P"],"n.E":"P","e.E":"P"},"co":{"a":[],"d":[]},"cp":{"q":[],"a":[],"d":[]},"cq":{"a":[],"d":[]},"aB":{"e":["q"],"n":["q"],"l":["q"],"p":["q"],"a":[],"d":[],"f":["q"],"n.E":"q","e.E":"q"},"cx":{"a":[],"d":[]},"cy":{"a":[],"d":[]},"cz":{"a":[],"v":["k","@"],"d":[],"a2":["k","@"],"v.K":"k","v.V":"@"},"cA":{"a":[],"v":["k","@"],"d":[],"a2":["k","@"],"v.K":"k","v.V":"@"},"cB":{"e":["T"],"n":["T"],"l":["T"],"p":["T"],"a":[],"d":[],"f":["T"],"n.E":"T","e.E":"T"},"bs":{"e":["q"],"n":["q"],"l":["q"],"p":["q"],"a":[],"d":[],"f":["q"],"n.E":"q","e.E":"q"},"cL":{"e":["U"],"n":["U"],"l":["U"],"p":["U"],"a":[],"d":[],"f":["U"],"n.E":"U","e.E":"U"},"cQ":{"a":[],"v":["k","@"],"d":[],"a2":["k","@"],"v.K":"k","v.V":"@"},"cS":{"q":[],"a":[],"d":[]},"cT":{"e":["V"],"n":["V"],"l":["V"],"p":["V"],"a":[],"d":[],"f":["V"],"n.E":"V","e.E":"V"},"cU":{"e":["W"],"n":["W"],"l":["W"],"p":["W"],"a":[],"d":[],"f":["W"],"n.E":"W","e.E":"W"},"cW":{"a":[],"v":["k","k"],"d":[],"a2":["k","k"],"v.K":"k","v.V":"k"},"d0":{"e":["M"],"n":["M"],"l":["M"],"p":["M"],"a":[],"d":[],"f":["M"],"n.E":"M","e.E":"M"},"d1":{"e":["Y"],"n":["Y"],"l":["Y"],"p":["Y"],"a":[],"d":[],"f":["Y"],"n.E":"Y","e.E":"Y"},"d2":{"a":[],"d":[]},"d3":{"e":["Z"],"n":["Z"],"l":["Z"],"p":["Z"],"a":[],"d":[],"f":["Z"],"n.E":"Z","e.E":"Z"},"d4":{"a":[],"d":[]},"da":{"a":[],"d":[]},"dd":{"a":[],"d":[]},"dm":{"e":["u"],"n":["u"],"l":["u"],"p":["u"],"a":[],"d":[],"f":["u"],"n.E":"u","e.E":"u"},"bB":{"a":[],"ah":["I"],"d":[]},"dz":{"e":["R?"],"n":["R?"],"l":["R?"],"p":["R?"],"a":[],"d":[],"f":["R?"],"n.E":"R?","e.E":"R?"},"bE":{"e":["q"],"n":["q"],"l":["q"],"p":["q"],"a":[],"d":[],"f":["q"],"n.E":"q","e.E":"q"},"dU":{"e":["X"],"n":["X"],"l":["X"],"p":["X"],"a":[],"d":[],"f":["X"],"n.E":"X","e.E":"X"},"e1":{"e":["L"],"n":["L"],"l":["L"],"p":["L"],"a":[],"d":[],"f":["L"],"n.E":"L","e.E":"L"},"bf":{"C":["1"]},"a1":{"a":[],"d":[]},"a3":{"a":[],"d":[]},"a5":{"a":[],"d":[]},"cw":{"e":["a1"],"n":["a1"],"l":["a1"],"a":[],"d":[],"f":["a1"],"n.E":"a1","e.E":"a1"},"cH":{"e":["a3"],"n":["a3"],"l":["a3"],"a":[],"d":[],"f":["a3"],"n.E":"a3","e.E":"a3"},"cM":{"a":[],"d":[]},"cY":{"e":["k"],"n":["k"],"l":["k"],"a":[],"d":[],"f":["k"],"n.E":"k","e.E":"k"},"d5":{"e":["a5"],"n":["a5"],"l":["a5"],"a":[],"d":[],"f":["a5"],"n.E":"a5","e.E":"a5"},"c5":{"a":[],"d":[]},"c6":{"a":[],"v":["k","@"],"d":[],"a2":["k","@"],"v.K":"k","v.V":"@"},"c7":{"a":[],"d":[]},"ap":{"a":[],"d":[]},"cI":{"a":[],"d":[]},"cN":{"aC":[]},"db":{"aC":[]},"de":{"aC":[]},"aJ":{"l":["j"],"f":["j"]}}')) +A.jO(v.typeUniverse,JSON.parse('{"bd":1,"aZ":1,"aW":1,"cX":2,"bg":1,"bn":1,"bo":2,"bD":1,"cd":2}')) +var u={c:"Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type",e:"https://storage.googleapis.com/dart-archive/channels/"} +var t=(function rtii(){var s=A.ha +return{n:s("b9"),B:s("u"),Q:s("w"),I:s("P"),Z:s("aA"),w:s("k/"),d:s("aq<@>"),U:s("f"),V:s("f<@>"),s:s("D"),a:s("D"),b:s("D<@>"),t:s("D"),D:s("D"),T:s("bi"),m:s("d"),g:s("ad"),p:s("p<@>"),e:s("a"),r:s("a1"),h:s("l"),L:s("l"),W:s("aF"),x:s("T"),A:s("q"),P:s("E"),j:s("a3"),K:s("x"),Y:s("U"),J:s("lp"),q:s("ah"),f:s("bv"),aN:s("V"),aj:s("W"),aE:s("X"),l:s("ar"),N:s("k"),k:s("L"),E:s("Y"),cz:s("M"),aO:s("Z"),ax:s("a5"),b7:s("ai"),bX:s("aJ"),o:s("aY"),R:s("d9"),ab:s("by"),c:s("F<@>"),v:s("b2"),bG:s("b2(x)"),i:s("aa"),z:s("@"),O:s("@()"),y:s("@(x)"),C:s("@(x,ar)"),c0:s("@(k)"),S:s("j"),G:s("0&*"),_:s("x*"),bc:s("aq?"),c1:s("R?"),X:s("x?"),F:s("aM<@,@>?"),cY:s("I"),H:s("~"),M:s("~()"),aa:s("~(k,k)"),u:s("~(k,@)")}})();(function constants(){var s=hunkHelpers.makeConstList +B.B=J.aU.prototype +B.b=J.D.prototype +B.d=J.bh.prototype +B.e=J.bj.prototype +B.a=J.aD.prototype +B.C=J.ad.prototype +B.D=J.a.prototype +B.H=A.br.prototype +B.q=J.cK.prototype +B.k=J.aY.prototype +B.K=new A.ev() +B.r=new A.c8() +B.l=function getTagFallback(o) { + var s = Object.prototype.toString.call(o); + return s.substring(8, s.length - 1); +} +B.t=function() { + var toStringFunction = Object.prototype.toString; + function getTag(o) { + var s = toStringFunction.call(o); + return s.substring(8, s.length - 1); + } + function getUnknownTag(object, tag) { + if (/^HTML[A-Z].*Element$/.test(tag)) { + var name = toStringFunction.call(object); + if (name == "[object Object]") return null; + return "HTMLElement"; + } + } + function getUnknownTagGenericBrowser(object, tag) { + if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement"; + return getUnknownTag(object, tag); + } + function prototypeForTag(tag) { + if (typeof window == "undefined") return null; + if (typeof window[tag] == "undefined") return null; + var constructor = window[tag]; + if (typeof constructor != "function") return null; + return constructor.prototype; + } + function discriminator(tag) { return null; } + var isBrowser = typeof navigator == "object"; + return { + getTag: getTag, + getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, + prototypeForTag: prototypeForTag, + discriminator: discriminator }; +} +B.y=function(getTagFallback) { + return function(hooks) { + if (typeof navigator != "object") return hooks; + var ua = navigator.userAgent; + if (ua.indexOf("DumpRenderTree") >= 0) return hooks; + if (ua.indexOf("Chrome") >= 0) { + function confirm(p) { + return typeof window == "object" && window[p] && window[p].name == p; + } + if (confirm("Window") && confirm("HTMLElement")) return hooks; + } + hooks.getTag = getTagFallback; + }; +} +B.u=function(hooks) { + if (typeof dartExperimentalFixupGetTag != "function") return hooks; + hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); +} +B.v=function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; +} +B.x=function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Firefox") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "GeoGeolocation": "Geolocation", + "Location": "!Location", + "WorkerMessageEvent": "MessageEvent", + "XMLDocument": "!Document"}; + function getTagFirefox(o) { + var tag = getTag(o); + return quickMap[tag] || tag; + } + hooks.getTag = getTagFirefox; +} +B.w=function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Trident/") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "HTMLDDElement": "HTMLElement", + "HTMLDTElement": "HTMLElement", + "HTMLPhraseElement": "HTMLElement", + "Position": "Geoposition" + }; + function getTagIE(o) { + var tag = getTag(o); + var newTag = quickMap[tag]; + if (newTag) return newTag; + if (tag == "Object") { + if (window.DataView && (o instanceof window.DataView)) return "DataView"; + } + return tag; + } + function prototypeForTagIE(tag) { + var constructor = window[tag]; + if (constructor == null) return null; + return constructor.prototype; + } + hooks.getTag = getTagIE; + hooks.prototypeForTag = prototypeForTagIE; +} +B.m=function(hooks) { return hooks; } + +B.z=new A.cJ() +B.L=new A.eS() +B.n=new A.dc() +B.c=new A.dP() +B.A=new A.e0() +B.f=A.t(s([0,0,24576,1023,65534,34815,65534,18431]),t.t) +B.h=A.t(s([0,0,26624,1023,65534,2047,65534,2047]),t.t) +B.E=A.t(s([0,0,32722,12287,65534,34815,65534,18431]),t.t) +B.o=A.t(s([0,0,65490,12287,65535,34815,65534,18431]),t.t) +B.i=A.t(s([0,0,32776,33792,1,10240,0,0]),t.t) +B.p=A.t(s([0,0,32754,11263,65534,34815,65534,18431]),t.t) +B.F=A.t(s([]),t.s) +B.j=A.t(s([0,0,65490,45055,65535,34815,65534,18431]),t.t) +B.G=A.t(s(["x64","ia32","arm","arm64"]),t.s) +B.I=A.l4("x") +B.J=new A.f3(!1)})();(function staticFields(){$.fo=null +$.hz=null +$.ho=null +$.hn=null +$.iu=null +$.ip=null +$.iz=null +$.fE=null +$.fL=null +$.hc=null +$.b0=null +$.bW=null +$.bX=null +$.h4=!1 +$.B=B.c +$.a_=A.t([],A.ha("D"))})();(function lazyInitializers(){var s=hunkHelpers.lazyFinal +s($,"lf","iC",()=>A.kL("_$dart_dartClosure")) +s($,"lx","iG",()=>A.aj(A.eZ({ +toString:function(){return"$receiver$"}}))) +s($,"ly","iH",()=>A.aj(A.eZ({$method$:null, +toString:function(){return"$receiver$"}}))) +s($,"lz","iI",()=>A.aj(A.eZ(null))) +s($,"lA","iJ",()=>A.aj(function(){var $argumentsExpr$="$arguments$" +try{null.$method$($argumentsExpr$)}catch(r){return r.message}}())) +s($,"lD","iM",()=>A.aj(A.eZ(void 0))) +s($,"lE","iN",()=>A.aj(function(){var $argumentsExpr$="$arguments$" +try{(void 0).$method$($argumentsExpr$)}catch(r){return r.message}}())) +s($,"lC","iL",()=>A.aj(A.hG(null))) +s($,"lB","iK",()=>A.aj(function(){try{null.$method$}catch(r){return r.message}}())) +s($,"lG","iP",()=>A.aj(A.hG(void 0))) +s($,"lF","iO",()=>A.aj(function(){try{(void 0).$method$}catch(r){return r.message}}())) +s($,"lK","hg",()=>A.jv()) +s($,"lH","iQ",()=>new A.f5().$0()) +s($,"lI","iR",()=>new A.f4().$0()) +s($,"lL","iS",()=>new Int8Array(A.k8(A.t([-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-2,-2,-2,-2,-2,62,-2,62,-2,63,52,53,54,55,56,57,58,59,60,61,-2,-2,-2,-1,-2,-2,-2,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-2,-2,-2,-2,63,-2,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-2,-2,-2,-2,-2],t.t)))) +s($,"lM","iT",()=>typeof process!="undefined"&&Object.prototype.toString.call(process)=="[object process]"&&process.platform=="win32") +s($,"lY","iU",()=>A.ix(B.I)) +s($,"lZ","iV",()=>A.k7()) +s($,"m_","iW",()=>new A.ew(A.ha("aC").a($.iD()))) +s($,"lt","iE",()=>new A.cN(A.a9("/"),A.a9("[^/]$"),A.a9("^/"))) +s($,"lv","iF",()=>new A.de(A.a9("[/\\\\]"),A.a9("[^/\\\\]$"),A.a9("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])"),A.a9("^[/\\\\](?![/\\\\])"))) +s($,"lu","hf",()=>new A.db(A.a9("/"),A.a9("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$"),A.a9("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*"),A.a9("^/"))) +s($,"ls","iD",()=>A.jn())})();(function nativeSupport(){!function(){var s=function(a){var m={} +m[a]=1 +return Object.keys(hunkHelpers.convertToFastObject(m))[0]} +v.getIsolateTag=function(a){return s("___dart_"+a+v.isolateTag)} +var r="___dart_isolate_tags_" +var q=Object[r]||(Object[r]=Object.create(null)) +var p="_ZxYxX" +for(var o=0;;o++){var n=s(p+"_"+o+"_") +if(!(n in q)){q[n]=1 +v.isolateTag=n +break}}v.dispatchPropertyName=v.getIsolateTag("dispatch_record")}() +hunkHelpers.setOrUpdateInterceptorsByTag({WebGL:J.aU,ArrayBuffer:J.a,AbortPaymentEvent:J.a,AnimationEffectReadOnly:J.a,AnimationEffectTiming:J.a,AnimationEffectTimingReadOnly:J.a,AnimationEvent:J.a,AnimationPlaybackEvent:J.a,AnimationTimeline:J.a,AnimationWorkletGlobalScope:J.a,ApplicationCacheErrorEvent:J.a,AuthenticatorAssertionResponse:J.a,AuthenticatorAttestationResponse:J.a,AuthenticatorResponse:J.a,BackgroundFetchClickEvent:J.a,BackgroundFetchEvent:J.a,BackgroundFetchFailEvent:J.a,BackgroundFetchFetch:J.a,BackgroundFetchManager:J.a,BackgroundFetchSettledFetch:J.a,BackgroundFetchedEvent:J.a,BarProp:J.a,BarcodeDetector:J.a,BeforeInstallPromptEvent:J.a,BeforeUnloadEvent:J.a,BlobEvent:J.a,BluetoothRemoteGATTDescriptor:J.a,Body:J.a,BudgetState:J.a,CacheStorage:J.a,CanMakePaymentEvent:J.a,CanvasGradient:J.a,CanvasPattern:J.a,CanvasRenderingContext2D:J.a,Client:J.a,Clients:J.a,ClipboardEvent:J.a,CloseEvent:J.a,CompositionEvent:J.a,CookieStore:J.a,Coordinates:J.a,Credential:J.a,CredentialUserData:J.a,CredentialsContainer:J.a,Crypto:J.a,CryptoKey:J.a,CSS:J.a,CSSVariableReferenceValue:J.a,CustomElementRegistry:J.a,CustomEvent:J.a,DataTransfer:J.a,DataTransferItem:J.a,DeprecatedStorageInfo:J.a,DeprecatedStorageQuota:J.a,DeprecationReport:J.a,DetectedBarcode:J.a,DetectedFace:J.a,DetectedText:J.a,DeviceAcceleration:J.a,DeviceMotionEvent:J.a,DeviceOrientationEvent:J.a,DeviceRotationRate:J.a,DirectoryEntry:J.a,webkitFileSystemDirectoryEntry:J.a,FileSystemDirectoryEntry:J.a,DirectoryReader:J.a,WebKitDirectoryReader:J.a,webkitFileSystemDirectoryReader:J.a,FileSystemDirectoryReader:J.a,DocumentOrShadowRoot:J.a,DocumentTimeline:J.a,DOMError:J.a,DOMImplementation:J.a,Iterator:J.a,DOMMatrix:J.a,DOMMatrixReadOnly:J.a,DOMParser:J.a,DOMPoint:J.a,DOMPointReadOnly:J.a,DOMQuad:J.a,DOMStringMap:J.a,Entry:J.a,webkitFileSystemEntry:J.a,FileSystemEntry:J.a,ErrorEvent:J.a,Event:J.a,InputEvent:J.a,SubmitEvent:J.a,ExtendableEvent:J.a,ExtendableMessageEvent:J.a,External:J.a,FaceDetector:J.a,FederatedCredential:J.a,FetchEvent:J.a,FileEntry:J.a,webkitFileSystemFileEntry:J.a,FileSystemFileEntry:J.a,DOMFileSystem:J.a,WebKitFileSystem:J.a,webkitFileSystem:J.a,FileSystem:J.a,FocusEvent:J.a,FontFace:J.a,FontFaceSetLoadEvent:J.a,FontFaceSource:J.a,ForeignFetchEvent:J.a,FormData:J.a,GamepadButton:J.a,GamepadEvent:J.a,GamepadPose:J.a,Geolocation:J.a,Position:J.a,GeolocationPosition:J.a,HashChangeEvent:J.a,Headers:J.a,HTMLHyperlinkElementUtils:J.a,IdleDeadline:J.a,ImageBitmap:J.a,ImageBitmapRenderingContext:J.a,ImageCapture:J.a,ImageData:J.a,InputDeviceCapabilities:J.a,InstallEvent:J.a,IntersectionObserver:J.a,IntersectionObserverEntry:J.a,InterventionReport:J.a,KeyboardEvent:J.a,KeyframeEffect:J.a,KeyframeEffectReadOnly:J.a,MediaCapabilities:J.a,MediaCapabilitiesInfo:J.a,MediaDeviceInfo:J.a,MediaEncryptedEvent:J.a,MediaError:J.a,MediaKeyMessageEvent:J.a,MediaKeyStatusMap:J.a,MediaKeySystemAccess:J.a,MediaKeys:J.a,MediaKeysPolicy:J.a,MediaMetadata:J.a,MediaQueryListEvent:J.a,MediaSession:J.a,MediaSettingsRange:J.a,MediaStreamEvent:J.a,MediaStreamTrackEvent:J.a,MemoryInfo:J.a,MessageChannel:J.a,MessageEvent:J.a,Metadata:J.a,MIDIConnectionEvent:J.a,MIDIMessageEvent:J.a,MouseEvent:J.a,DragEvent:J.a,MutationEvent:J.a,MutationObserver:J.a,WebKitMutationObserver:J.a,MutationRecord:J.a,NavigationPreloadManager:J.a,Navigator:J.a,NavigatorAutomationInformation:J.a,NavigatorConcurrentHardware:J.a,NavigatorCookies:J.a,NavigatorUserMediaError:J.a,NodeFilter:J.a,NodeIterator:J.a,NonDocumentTypeChildNode:J.a,NonElementParentNode:J.a,NoncedElement:J.a,NotificationEvent:J.a,OffscreenCanvasRenderingContext2D:J.a,OverconstrainedError:J.a,PageTransitionEvent:J.a,PaintRenderingContext2D:J.a,PaintSize:J.a,PaintWorkletGlobalScope:J.a,PasswordCredential:J.a,Path2D:J.a,PaymentAddress:J.a,PaymentInstruments:J.a,PaymentManager:J.a,PaymentRequestEvent:J.a,PaymentRequestUpdateEvent:J.a,PaymentResponse:J.a,PerformanceEntry:J.a,PerformanceLongTaskTiming:J.a,PerformanceMark:J.a,PerformanceMeasure:J.a,PerformanceNavigation:J.a,PerformanceNavigationTiming:J.a,PerformanceObserver:J.a,PerformanceObserverEntryList:J.a,PerformancePaintTiming:J.a,PerformanceResourceTiming:J.a,PerformanceServerTiming:J.a,PerformanceTiming:J.a,Permissions:J.a,PhotoCapabilities:J.a,PointerEvent:J.a,PopStateEvent:J.a,PositionError:J.a,GeolocationPositionError:J.a,Presentation:J.a,PresentationConnectionAvailableEvent:J.a,PresentationConnectionCloseEvent:J.a,PresentationReceiver:J.a,ProgressEvent:J.a,PromiseRejectionEvent:J.a,PublicKeyCredential:J.a,PushEvent:J.a,PushManager:J.a,PushMessageData:J.a,PushSubscription:J.a,PushSubscriptionOptions:J.a,Range:J.a,RelatedApplication:J.a,ReportBody:J.a,ReportingObserver:J.a,ResizeObserver:J.a,ResizeObserverEntry:J.a,RTCCertificate:J.a,RTCDataChannelEvent:J.a,RTCDTMFToneChangeEvent:J.a,RTCIceCandidate:J.a,mozRTCIceCandidate:J.a,RTCLegacyStatsReport:J.a,RTCPeerConnectionIceEvent:J.a,RTCRtpContributingSource:J.a,RTCRtpReceiver:J.a,RTCRtpSender:J.a,RTCSessionDescription:J.a,mozRTCSessionDescription:J.a,RTCStatsResponse:J.a,RTCTrackEvent:J.a,Screen:J.a,ScrollState:J.a,ScrollTimeline:J.a,SecurityPolicyViolationEvent:J.a,Selection:J.a,SensorErrorEvent:J.a,SharedArrayBuffer:J.a,SpeechRecognitionAlternative:J.a,SpeechRecognitionError:J.a,SpeechRecognitionEvent:J.a,SpeechSynthesisEvent:J.a,SpeechSynthesisVoice:J.a,StaticRange:J.a,StorageEvent:J.a,StorageManager:J.a,StyleMedia:J.a,StylePropertyMap:J.a,StylePropertyMapReadonly:J.a,SyncEvent:J.a,SyncManager:J.a,TaskAttributionTiming:J.a,TextDetector:J.a,TextEvent:J.a,TextMetrics:J.a,TouchEvent:J.a,TrackDefault:J.a,TrackEvent:J.a,TransitionEvent:J.a,WebKitTransitionEvent:J.a,TreeWalker:J.a,TrustedHTML:J.a,TrustedScriptURL:J.a,TrustedURL:J.a,UIEvent:J.a,UnderlyingSourceBase:J.a,URLSearchParams:J.a,VRCoordinateSystem:J.a,VRDeviceEvent:J.a,VRDisplayCapabilities:J.a,VRDisplayEvent:J.a,VREyeParameters:J.a,VRFrameData:J.a,VRFrameOfReference:J.a,VRPose:J.a,VRSessionEvent:J.a,VRStageBounds:J.a,VRStageBoundsPoint:J.a,VRStageParameters:J.a,ValidityState:J.a,VideoPlaybackQuality:J.a,VideoTrack:J.a,VTTRegion:J.a,WheelEvent:J.a,WindowClient:J.a,WorkletAnimation:J.a,WorkletGlobalScope:J.a,XPathEvaluator:J.a,XPathExpression:J.a,XPathNSResolver:J.a,XPathResult:J.a,XMLSerializer:J.a,XSLTProcessor:J.a,Bluetooth:J.a,BluetoothCharacteristicProperties:J.a,BluetoothRemoteGATTServer:J.a,BluetoothRemoteGATTService:J.a,BluetoothUUID:J.a,BudgetService:J.a,Cache:J.a,DOMFileSystemSync:J.a,DirectoryEntrySync:J.a,DirectoryReaderSync:J.a,EntrySync:J.a,FileEntrySync:J.a,FileReaderSync:J.a,FileWriterSync:J.a,HTMLAllCollection:J.a,Mojo:J.a,MojoHandle:J.a,MojoInterfaceRequestEvent:J.a,MojoWatcher:J.a,NFC:J.a,PagePopupController:J.a,Report:J.a,Request:J.a,ResourceProgressEvent:J.a,Response:J.a,SubtleCrypto:J.a,USBAlternateInterface:J.a,USBConfiguration:J.a,USBConnectionEvent:J.a,USBDevice:J.a,USBEndpoint:J.a,USBInTransferResult:J.a,USBInterface:J.a,USBIsochronousInTransferPacket:J.a,USBIsochronousInTransferResult:J.a,USBIsochronousOutTransferPacket:J.a,USBIsochronousOutTransferResult:J.a,USBOutTransferResult:J.a,WorkerLocation:J.a,WorkerNavigator:J.a,Worklet:J.a,IDBCursor:J.a,IDBCursorWithValue:J.a,IDBFactory:J.a,IDBIndex:J.a,IDBKeyRange:J.a,IDBObjectStore:J.a,IDBObservation:J.a,IDBObserver:J.a,IDBObserverChanges:J.a,IDBVersionChangeEvent:J.a,SVGAngle:J.a,SVGAnimatedAngle:J.a,SVGAnimatedBoolean:J.a,SVGAnimatedEnumeration:J.a,SVGAnimatedInteger:J.a,SVGAnimatedLength:J.a,SVGAnimatedLengthList:J.a,SVGAnimatedNumber:J.a,SVGAnimatedNumberList:J.a,SVGAnimatedPreserveAspectRatio:J.a,SVGAnimatedRect:J.a,SVGAnimatedString:J.a,SVGAnimatedTransformList:J.a,SVGMatrix:J.a,SVGPoint:J.a,SVGPreserveAspectRatio:J.a,SVGRect:J.a,SVGUnitTypes:J.a,AudioListener:J.a,AudioParam:J.a,AudioProcessingEvent:J.a,AudioTrack:J.a,AudioWorkletGlobalScope:J.a,AudioWorkletProcessor:J.a,OfflineAudioCompletionEvent:J.a,PeriodicWave:J.a,WebGLActiveInfo:J.a,ANGLEInstancedArrays:J.a,ANGLE_instanced_arrays:J.a,WebGLBuffer:J.a,WebGLCanvas:J.a,WebGLColorBufferFloat:J.a,WebGLCompressedTextureASTC:J.a,WebGLCompressedTextureATC:J.a,WEBGL_compressed_texture_atc:J.a,WebGLCompressedTextureETC1:J.a,WEBGL_compressed_texture_etc1:J.a,WebGLCompressedTextureETC:J.a,WebGLCompressedTexturePVRTC:J.a,WEBGL_compressed_texture_pvrtc:J.a,WebGLCompressedTextureS3TC:J.a,WEBGL_compressed_texture_s3tc:J.a,WebGLCompressedTextureS3TCsRGB:J.a,WebGLContextEvent:J.a,WebGLDebugRendererInfo:J.a,WEBGL_debug_renderer_info:J.a,WebGLDebugShaders:J.a,WEBGL_debug_shaders:J.a,WebGLDepthTexture:J.a,WEBGL_depth_texture:J.a,WebGLDrawBuffers:J.a,WEBGL_draw_buffers:J.a,EXTsRGB:J.a,EXT_sRGB:J.a,EXTBlendMinMax:J.a,EXT_blend_minmax:J.a,EXTColorBufferFloat:J.a,EXTColorBufferHalfFloat:J.a,EXTDisjointTimerQuery:J.a,EXTDisjointTimerQueryWebGL2:J.a,EXTFragDepth:J.a,EXT_frag_depth:J.a,EXTShaderTextureLOD:J.a,EXT_shader_texture_lod:J.a,EXTTextureFilterAnisotropic:J.a,EXT_texture_filter_anisotropic:J.a,WebGLFramebuffer:J.a,WebGLGetBufferSubDataAsync:J.a,WebGLLoseContext:J.a,WebGLExtensionLoseContext:J.a,WEBGL_lose_context:J.a,OESElementIndexUint:J.a,OES_element_index_uint:J.a,OESStandardDerivatives:J.a,OES_standard_derivatives:J.a,OESTextureFloat:J.a,OES_texture_float:J.a,OESTextureFloatLinear:J.a,OES_texture_float_linear:J.a,OESTextureHalfFloat:J.a,OES_texture_half_float:J.a,OESTextureHalfFloatLinear:J.a,OES_texture_half_float_linear:J.a,OESVertexArrayObject:J.a,OES_vertex_array_object:J.a,WebGLProgram:J.a,WebGLQuery:J.a,WebGLRenderbuffer:J.a,WebGLRenderingContext:J.a,WebGL2RenderingContext:J.a,WebGLSampler:J.a,WebGLShader:J.a,WebGLShaderPrecisionFormat:J.a,WebGLSync:J.a,WebGLTexture:J.a,WebGLTimerQueryEXT:J.a,WebGLTransformFeedback:J.a,WebGLUniformLocation:J.a,WebGLVertexArrayObject:J.a,WebGLVertexArrayObjectOES:J.a,WebGL2RenderingContextBase:J.a,DataView:A.aH,ArrayBufferView:A.aH,Float32Array:A.aG,Float64Array:A.aG,Int16Array:A.cC,Int32Array:A.cD,Int8Array:A.cE,Uint16Array:A.cF,Uint32Array:A.cG,Uint8ClampedArray:A.bq,CanvasPixelArray:A.bq,Uint8Array:A.br,HTMLAudioElement:A.i,HTMLBRElement:A.i,HTMLBaseElement:A.i,HTMLBodyElement:A.i,HTMLButtonElement:A.i,HTMLCanvasElement:A.i,HTMLContentElement:A.i,HTMLDListElement:A.i,HTMLDataElement:A.i,HTMLDataListElement:A.i,HTMLDetailsElement:A.i,HTMLDialogElement:A.i,HTMLDivElement:A.i,HTMLEmbedElement:A.i,HTMLFieldSetElement:A.i,HTMLHRElement:A.i,HTMLHeadElement:A.i,HTMLHeadingElement:A.i,HTMLHtmlElement:A.i,HTMLIFrameElement:A.i,HTMLImageElement:A.i,HTMLInputElement:A.i,HTMLLIElement:A.i,HTMLLabelElement:A.i,HTMLLegendElement:A.i,HTMLLinkElement:A.i,HTMLMapElement:A.i,HTMLMediaElement:A.i,HTMLMenuElement:A.i,HTMLMetaElement:A.i,HTMLMeterElement:A.i,HTMLModElement:A.i,HTMLOListElement:A.i,HTMLObjectElement:A.i,HTMLOptGroupElement:A.i,HTMLOptionElement:A.i,HTMLOutputElement:A.i,HTMLParagraphElement:A.i,HTMLParamElement:A.i,HTMLPictureElement:A.i,HTMLPreElement:A.i,HTMLProgressElement:A.i,HTMLQuoteElement:A.i,HTMLScriptElement:A.i,HTMLShadowElement:A.i,HTMLSlotElement:A.i,HTMLSourceElement:A.i,HTMLSpanElement:A.i,HTMLStyleElement:A.i,HTMLTableCaptionElement:A.i,HTMLTableCellElement:A.i,HTMLTableDataCellElement:A.i,HTMLTableHeaderCellElement:A.i,HTMLTableColElement:A.i,HTMLTableElement:A.i,HTMLTableRowElement:A.i,HTMLTableSectionElement:A.i,HTMLTemplateElement:A.i,HTMLTextAreaElement:A.i,HTMLTimeElement:A.i,HTMLTitleElement:A.i,HTMLTrackElement:A.i,HTMLUListElement:A.i,HTMLUnknownElement:A.i,HTMLVideoElement:A.i,HTMLDirectoryElement:A.i,HTMLFontElement:A.i,HTMLFrameElement:A.i,HTMLFrameSetElement:A.i,HTMLMarqueeElement:A.i,HTMLElement:A.i,AccessibleNodeList:A.c1,HTMLAnchorElement:A.c2,HTMLAreaElement:A.c3,Blob:A.ba,CDATASection:A.ab,CharacterData:A.ab,Comment:A.ab,ProcessingInstruction:A.ab,Text:A.ab,CSSPerspective:A.ce,CSSCharsetRule:A.u,CSSConditionRule:A.u,CSSFontFaceRule:A.u,CSSGroupingRule:A.u,CSSImportRule:A.u,CSSKeyframeRule:A.u,MozCSSKeyframeRule:A.u,WebKitCSSKeyframeRule:A.u,CSSKeyframesRule:A.u,MozCSSKeyframesRule:A.u,WebKitCSSKeyframesRule:A.u,CSSMediaRule:A.u,CSSNamespaceRule:A.u,CSSPageRule:A.u,CSSRule:A.u,CSSStyleRule:A.u,CSSSupportsRule:A.u,CSSViewportRule:A.u,CSSStyleDeclaration:A.aT,MSStyleCSSProperties:A.aT,CSS2Properties:A.aT,CSSImageValue:A.J,CSSKeywordValue:A.J,CSSNumericValue:A.J,CSSPositionValue:A.J,CSSResourceValue:A.J,CSSUnitValue:A.J,CSSURLImageValue:A.J,CSSStyleValue:A.J,CSSMatrixComponent:A.a8,CSSRotation:A.a8,CSSScale:A.a8,CSSSkew:A.a8,CSSTranslation:A.a8,CSSTransformComponent:A.a8,CSSTransformValue:A.cf,CSSUnparsedValue:A.cg,DataTransferItemList:A.ch,DOMException:A.ci,ClientRectList:A.bb,DOMRectList:A.bb,DOMRectReadOnly:A.bc,DOMStringList:A.cj,DOMTokenList:A.ck,MathMLElement:A.h,SVGAElement:A.h,SVGAnimateElement:A.h,SVGAnimateMotionElement:A.h,SVGAnimateTransformElement:A.h,SVGAnimationElement:A.h,SVGCircleElement:A.h,SVGClipPathElement:A.h,SVGDefsElement:A.h,SVGDescElement:A.h,SVGDiscardElement:A.h,SVGEllipseElement:A.h,SVGFEBlendElement:A.h,SVGFEColorMatrixElement:A.h,SVGFEComponentTransferElement:A.h,SVGFECompositeElement:A.h,SVGFEConvolveMatrixElement:A.h,SVGFEDiffuseLightingElement:A.h,SVGFEDisplacementMapElement:A.h,SVGFEDistantLightElement:A.h,SVGFEFloodElement:A.h,SVGFEFuncAElement:A.h,SVGFEFuncBElement:A.h,SVGFEFuncGElement:A.h,SVGFEFuncRElement:A.h,SVGFEGaussianBlurElement:A.h,SVGFEImageElement:A.h,SVGFEMergeElement:A.h,SVGFEMergeNodeElement:A.h,SVGFEMorphologyElement:A.h,SVGFEOffsetElement:A.h,SVGFEPointLightElement:A.h,SVGFESpecularLightingElement:A.h,SVGFESpotLightElement:A.h,SVGFETileElement:A.h,SVGFETurbulenceElement:A.h,SVGFilterElement:A.h,SVGForeignObjectElement:A.h,SVGGElement:A.h,SVGGeometryElement:A.h,SVGGraphicsElement:A.h,SVGImageElement:A.h,SVGLineElement:A.h,SVGLinearGradientElement:A.h,SVGMarkerElement:A.h,SVGMaskElement:A.h,SVGMetadataElement:A.h,SVGPathElement:A.h,SVGPatternElement:A.h,SVGPolygonElement:A.h,SVGPolylineElement:A.h,SVGRadialGradientElement:A.h,SVGRectElement:A.h,SVGScriptElement:A.h,SVGSetElement:A.h,SVGStopElement:A.h,SVGStyleElement:A.h,SVGElement:A.h,SVGSVGElement:A.h,SVGSwitchElement:A.h,SVGSymbolElement:A.h,SVGTSpanElement:A.h,SVGTextContentElement:A.h,SVGTextElement:A.h,SVGTextPathElement:A.h,SVGTextPositioningElement:A.h,SVGTitleElement:A.h,SVGUseElement:A.h,SVGViewElement:A.h,SVGGradientElement:A.h,SVGComponentTransferFunctionElement:A.h,SVGFEDropShadowElement:A.h,SVGMPathElement:A.h,Element:A.h,AbsoluteOrientationSensor:A.c,Accelerometer:A.c,AccessibleNode:A.c,AmbientLightSensor:A.c,Animation:A.c,ApplicationCache:A.c,DOMApplicationCache:A.c,OfflineResourceList:A.c,BackgroundFetchRegistration:A.c,BatteryManager:A.c,BroadcastChannel:A.c,CanvasCaptureMediaStreamTrack:A.c,DedicatedWorkerGlobalScope:A.c,EventSource:A.c,FileReader:A.c,FontFaceSet:A.c,Gyroscope:A.c,XMLHttpRequest:A.c,XMLHttpRequestEventTarget:A.c,XMLHttpRequestUpload:A.c,LinearAccelerationSensor:A.c,Magnetometer:A.c,MediaDevices:A.c,MediaKeySession:A.c,MediaQueryList:A.c,MediaRecorder:A.c,MediaSource:A.c,MediaStream:A.c,MediaStreamTrack:A.c,MessagePort:A.c,MIDIAccess:A.c,MIDIInput:A.c,MIDIOutput:A.c,MIDIPort:A.c,NetworkInformation:A.c,Notification:A.c,OffscreenCanvas:A.c,OrientationSensor:A.c,PaymentRequest:A.c,Performance:A.c,PermissionStatus:A.c,PresentationAvailability:A.c,PresentationConnection:A.c,PresentationConnectionList:A.c,PresentationRequest:A.c,RelativeOrientationSensor:A.c,RemotePlayback:A.c,RTCDataChannel:A.c,DataChannel:A.c,RTCDTMFSender:A.c,RTCPeerConnection:A.c,webkitRTCPeerConnection:A.c,mozRTCPeerConnection:A.c,ScreenOrientation:A.c,Sensor:A.c,ServiceWorker:A.c,ServiceWorkerContainer:A.c,ServiceWorkerGlobalScope:A.c,ServiceWorkerRegistration:A.c,SharedWorker:A.c,SharedWorkerGlobalScope:A.c,SpeechRecognition:A.c,SpeechSynthesis:A.c,SpeechSynthesisUtterance:A.c,VR:A.c,VRDevice:A.c,VRDisplay:A.c,VRSession:A.c,VisualViewport:A.c,WebSocket:A.c,Window:A.c,DOMWindow:A.c,Worker:A.c,WorkerGlobalScope:A.c,WorkerPerformance:A.c,BluetoothDevice:A.c,BluetoothRemoteGATTCharacteristic:A.c,Clipboard:A.c,MojoInterfaceInterceptor:A.c,USB:A.c,IDBDatabase:A.c,IDBOpenDBRequest:A.c,IDBVersionChangeRequest:A.c,IDBRequest:A.c,IDBTransaction:A.c,AnalyserNode:A.c,RealtimeAnalyserNode:A.c,AudioBufferSourceNode:A.c,AudioDestinationNode:A.c,AudioNode:A.c,AudioScheduledSourceNode:A.c,AudioWorkletNode:A.c,BiquadFilterNode:A.c,ChannelMergerNode:A.c,AudioChannelMerger:A.c,ChannelSplitterNode:A.c,AudioChannelSplitter:A.c,ConstantSourceNode:A.c,ConvolverNode:A.c,DelayNode:A.c,DynamicsCompressorNode:A.c,GainNode:A.c,AudioGainNode:A.c,IIRFilterNode:A.c,MediaElementAudioSourceNode:A.c,MediaStreamAudioDestinationNode:A.c,MediaStreamAudioSourceNode:A.c,OscillatorNode:A.c,Oscillator:A.c,PannerNode:A.c,AudioPannerNode:A.c,webkitAudioPannerNode:A.c,ScriptProcessorNode:A.c,JavaScriptAudioNode:A.c,StereoPannerNode:A.c,WaveShaperNode:A.c,EventTarget:A.c,File:A.P,FileList:A.cn,FileWriter:A.co,HTMLFormElement:A.cp,Gamepad:A.R,History:A.cq,HTMLCollection:A.aB,HTMLFormControlsCollection:A.aB,HTMLOptionsCollection:A.aB,Location:A.cx,MediaList:A.cy,MIDIInputMap:A.cz,MIDIOutputMap:A.cA,MimeType:A.T,MimeTypeArray:A.cB,Document:A.q,DocumentFragment:A.q,HTMLDocument:A.q,ShadowRoot:A.q,XMLDocument:A.q,Attr:A.q,DocumentType:A.q,Node:A.q,NodeList:A.bs,RadioNodeList:A.bs,Plugin:A.U,PluginArray:A.cL,RTCStatsReport:A.cQ,HTMLSelectElement:A.cS,SourceBuffer:A.V,SourceBufferList:A.cT,SpeechGrammar:A.W,SpeechGrammarList:A.cU,SpeechRecognitionResult:A.X,Storage:A.cW,CSSStyleSheet:A.L,StyleSheet:A.L,TextTrack:A.Y,TextTrackCue:A.M,VTTCue:A.M,TextTrackCueList:A.d0,TextTrackList:A.d1,TimeRanges:A.d2,Touch:A.Z,TouchList:A.d3,TrackDefaultList:A.d4,URL:A.da,VideoTrackList:A.dd,CSSRuleList:A.dm,ClientRect:A.bB,DOMRect:A.bB,GamepadList:A.dz,NamedNodeMap:A.bE,MozNamedAttrMap:A.bE,SpeechRecognitionResultList:A.dU,StyleSheetList:A.e1,SVGLength:A.a1,SVGLengthList:A.cw,SVGNumber:A.a3,SVGNumberList:A.cH,SVGPointList:A.cM,SVGStringList:A.cY,SVGTransform:A.a5,SVGTransformList:A.d5,AudioBuffer:A.c5,AudioParamMap:A.c6,AudioTrackList:A.c7,AudioContext:A.ap,webkitAudioContext:A.ap,BaseAudioContext:A.ap,OfflineAudioContext:A.cI}) +hunkHelpers.setOrUpdateLeafTags({WebGL:true,ArrayBuffer:true,AbortPaymentEvent:true,AnimationEffectReadOnly:true,AnimationEffectTiming:true,AnimationEffectTimingReadOnly:true,AnimationEvent:true,AnimationPlaybackEvent:true,AnimationTimeline:true,AnimationWorkletGlobalScope:true,ApplicationCacheErrorEvent:true,AuthenticatorAssertionResponse:true,AuthenticatorAttestationResponse:true,AuthenticatorResponse:true,BackgroundFetchClickEvent:true,BackgroundFetchEvent:true,BackgroundFetchFailEvent:true,BackgroundFetchFetch:true,BackgroundFetchManager:true,BackgroundFetchSettledFetch:true,BackgroundFetchedEvent:true,BarProp:true,BarcodeDetector:true,BeforeInstallPromptEvent:true,BeforeUnloadEvent:true,BlobEvent:true,BluetoothRemoteGATTDescriptor:true,Body:true,BudgetState:true,CacheStorage:true,CanMakePaymentEvent:true,CanvasGradient:true,CanvasPattern:true,CanvasRenderingContext2D:true,Client:true,Clients:true,ClipboardEvent:true,CloseEvent:true,CompositionEvent:true,CookieStore:true,Coordinates:true,Credential:true,CredentialUserData:true,CredentialsContainer:true,Crypto:true,CryptoKey:true,CSS:true,CSSVariableReferenceValue:true,CustomElementRegistry:true,CustomEvent:true,DataTransfer:true,DataTransferItem:true,DeprecatedStorageInfo:true,DeprecatedStorageQuota:true,DeprecationReport:true,DetectedBarcode:true,DetectedFace:true,DetectedText:true,DeviceAcceleration:true,DeviceMotionEvent:true,DeviceOrientationEvent:true,DeviceRotationRate:true,DirectoryEntry:true,webkitFileSystemDirectoryEntry:true,FileSystemDirectoryEntry:true,DirectoryReader:true,WebKitDirectoryReader:true,webkitFileSystemDirectoryReader:true,FileSystemDirectoryReader:true,DocumentOrShadowRoot:true,DocumentTimeline:true,DOMError:true,DOMImplementation:true,Iterator:true,DOMMatrix:true,DOMMatrixReadOnly:true,DOMParser:true,DOMPoint:true,DOMPointReadOnly:true,DOMQuad:true,DOMStringMap:true,Entry:true,webkitFileSystemEntry:true,FileSystemEntry:true,ErrorEvent:true,Event:true,InputEvent:true,SubmitEvent:true,ExtendableEvent:true,ExtendableMessageEvent:true,External:true,FaceDetector:true,FederatedCredential:true,FetchEvent:true,FileEntry:true,webkitFileSystemFileEntry:true,FileSystemFileEntry:true,DOMFileSystem:true,WebKitFileSystem:true,webkitFileSystem:true,FileSystem:true,FocusEvent:true,FontFace:true,FontFaceSetLoadEvent:true,FontFaceSource:true,ForeignFetchEvent:true,FormData:true,GamepadButton:true,GamepadEvent:true,GamepadPose:true,Geolocation:true,Position:true,GeolocationPosition:true,HashChangeEvent:true,Headers:true,HTMLHyperlinkElementUtils:true,IdleDeadline:true,ImageBitmap:true,ImageBitmapRenderingContext:true,ImageCapture:true,ImageData:true,InputDeviceCapabilities:true,InstallEvent:true,IntersectionObserver:true,IntersectionObserverEntry:true,InterventionReport:true,KeyboardEvent:true,KeyframeEffect:true,KeyframeEffectReadOnly:true,MediaCapabilities:true,MediaCapabilitiesInfo:true,MediaDeviceInfo:true,MediaEncryptedEvent:true,MediaError:true,MediaKeyMessageEvent:true,MediaKeyStatusMap:true,MediaKeySystemAccess:true,MediaKeys:true,MediaKeysPolicy:true,MediaMetadata:true,MediaQueryListEvent:true,MediaSession:true,MediaSettingsRange:true,MediaStreamEvent:true,MediaStreamTrackEvent:true,MemoryInfo:true,MessageChannel:true,MessageEvent:true,Metadata:true,MIDIConnectionEvent:true,MIDIMessageEvent:true,MouseEvent:true,DragEvent:true,MutationEvent:true,MutationObserver:true,WebKitMutationObserver:true,MutationRecord:true,NavigationPreloadManager:true,Navigator:true,NavigatorAutomationInformation:true,NavigatorConcurrentHardware:true,NavigatorCookies:true,NavigatorUserMediaError:true,NodeFilter:true,NodeIterator:true,NonDocumentTypeChildNode:true,NonElementParentNode:true,NoncedElement:true,NotificationEvent:true,OffscreenCanvasRenderingContext2D:true,OverconstrainedError:true,PageTransitionEvent:true,PaintRenderingContext2D:true,PaintSize:true,PaintWorkletGlobalScope:true,PasswordCredential:true,Path2D:true,PaymentAddress:true,PaymentInstruments:true,PaymentManager:true,PaymentRequestEvent:true,PaymentRequestUpdateEvent:true,PaymentResponse:true,PerformanceEntry:true,PerformanceLongTaskTiming:true,PerformanceMark:true,PerformanceMeasure:true,PerformanceNavigation:true,PerformanceNavigationTiming:true,PerformanceObserver:true,PerformanceObserverEntryList:true,PerformancePaintTiming:true,PerformanceResourceTiming:true,PerformanceServerTiming:true,PerformanceTiming:true,Permissions:true,PhotoCapabilities:true,PointerEvent:true,PopStateEvent:true,PositionError:true,GeolocationPositionError:true,Presentation:true,PresentationConnectionAvailableEvent:true,PresentationConnectionCloseEvent:true,PresentationReceiver:true,ProgressEvent:true,PromiseRejectionEvent:true,PublicKeyCredential:true,PushEvent:true,PushManager:true,PushMessageData:true,PushSubscription:true,PushSubscriptionOptions:true,Range:true,RelatedApplication:true,ReportBody:true,ReportingObserver:true,ResizeObserver:true,ResizeObserverEntry:true,RTCCertificate:true,RTCDataChannelEvent:true,RTCDTMFToneChangeEvent:true,RTCIceCandidate:true,mozRTCIceCandidate:true,RTCLegacyStatsReport:true,RTCPeerConnectionIceEvent:true,RTCRtpContributingSource:true,RTCRtpReceiver:true,RTCRtpSender:true,RTCSessionDescription:true,mozRTCSessionDescription:true,RTCStatsResponse:true,RTCTrackEvent:true,Screen:true,ScrollState:true,ScrollTimeline:true,SecurityPolicyViolationEvent:true,Selection:true,SensorErrorEvent:true,SharedArrayBuffer:true,SpeechRecognitionAlternative:true,SpeechRecognitionError:true,SpeechRecognitionEvent:true,SpeechSynthesisEvent:true,SpeechSynthesisVoice:true,StaticRange:true,StorageEvent:true,StorageManager:true,StyleMedia:true,StylePropertyMap:true,StylePropertyMapReadonly:true,SyncEvent:true,SyncManager:true,TaskAttributionTiming:true,TextDetector:true,TextEvent:true,TextMetrics:true,TouchEvent:true,TrackDefault:true,TrackEvent:true,TransitionEvent:true,WebKitTransitionEvent:true,TreeWalker:true,TrustedHTML:true,TrustedScriptURL:true,TrustedURL:true,UIEvent:true,UnderlyingSourceBase:true,URLSearchParams:true,VRCoordinateSystem:true,VRDeviceEvent:true,VRDisplayCapabilities:true,VRDisplayEvent:true,VREyeParameters:true,VRFrameData:true,VRFrameOfReference:true,VRPose:true,VRSessionEvent:true,VRStageBounds:true,VRStageBoundsPoint:true,VRStageParameters:true,ValidityState:true,VideoPlaybackQuality:true,VideoTrack:true,VTTRegion:true,WheelEvent:true,WindowClient:true,WorkletAnimation:true,WorkletGlobalScope:true,XPathEvaluator:true,XPathExpression:true,XPathNSResolver:true,XPathResult:true,XMLSerializer:true,XSLTProcessor:true,Bluetooth:true,BluetoothCharacteristicProperties:true,BluetoothRemoteGATTServer:true,BluetoothRemoteGATTService:true,BluetoothUUID:true,BudgetService:true,Cache:true,DOMFileSystemSync:true,DirectoryEntrySync:true,DirectoryReaderSync:true,EntrySync:true,FileEntrySync:true,FileReaderSync:true,FileWriterSync:true,HTMLAllCollection:true,Mojo:true,MojoHandle:true,MojoInterfaceRequestEvent:true,MojoWatcher:true,NFC:true,PagePopupController:true,Report:true,Request:true,ResourceProgressEvent:true,Response:true,SubtleCrypto:true,USBAlternateInterface:true,USBConfiguration:true,USBConnectionEvent:true,USBDevice:true,USBEndpoint:true,USBInTransferResult:true,USBInterface:true,USBIsochronousInTransferPacket:true,USBIsochronousInTransferResult:true,USBIsochronousOutTransferPacket:true,USBIsochronousOutTransferResult:true,USBOutTransferResult:true,WorkerLocation:true,WorkerNavigator:true,Worklet:true,IDBCursor:true,IDBCursorWithValue:true,IDBFactory:true,IDBIndex:true,IDBKeyRange:true,IDBObjectStore:true,IDBObservation:true,IDBObserver:true,IDBObserverChanges:true,IDBVersionChangeEvent:true,SVGAngle:true,SVGAnimatedAngle:true,SVGAnimatedBoolean:true,SVGAnimatedEnumeration:true,SVGAnimatedInteger:true,SVGAnimatedLength:true,SVGAnimatedLengthList:true,SVGAnimatedNumber:true,SVGAnimatedNumberList:true,SVGAnimatedPreserveAspectRatio:true,SVGAnimatedRect:true,SVGAnimatedString:true,SVGAnimatedTransformList:true,SVGMatrix:true,SVGPoint:true,SVGPreserveAspectRatio:true,SVGRect:true,SVGUnitTypes:true,AudioListener:true,AudioParam:true,AudioProcessingEvent:true,AudioTrack:true,AudioWorkletGlobalScope:true,AudioWorkletProcessor:true,OfflineAudioCompletionEvent:true,PeriodicWave:true,WebGLActiveInfo:true,ANGLEInstancedArrays:true,ANGLE_instanced_arrays:true,WebGLBuffer:true,WebGLCanvas:true,WebGLColorBufferFloat:true,WebGLCompressedTextureASTC:true,WebGLCompressedTextureATC:true,WEBGL_compressed_texture_atc:true,WebGLCompressedTextureETC1:true,WEBGL_compressed_texture_etc1:true,WebGLCompressedTextureETC:true,WebGLCompressedTexturePVRTC:true,WEBGL_compressed_texture_pvrtc:true,WebGLCompressedTextureS3TC:true,WEBGL_compressed_texture_s3tc:true,WebGLCompressedTextureS3TCsRGB:true,WebGLContextEvent:true,WebGLDebugRendererInfo:true,WEBGL_debug_renderer_info:true,WebGLDebugShaders:true,WEBGL_debug_shaders:true,WebGLDepthTexture:true,WEBGL_depth_texture:true,WebGLDrawBuffers:true,WEBGL_draw_buffers:true,EXTsRGB:true,EXT_sRGB:true,EXTBlendMinMax:true,EXT_blend_minmax:true,EXTColorBufferFloat:true,EXTColorBufferHalfFloat:true,EXTDisjointTimerQuery:true,EXTDisjointTimerQueryWebGL2:true,EXTFragDepth:true,EXT_frag_depth:true,EXTShaderTextureLOD:true,EXT_shader_texture_lod:true,EXTTextureFilterAnisotropic:true,EXT_texture_filter_anisotropic:true,WebGLFramebuffer:true,WebGLGetBufferSubDataAsync:true,WebGLLoseContext:true,WebGLExtensionLoseContext:true,WEBGL_lose_context:true,OESElementIndexUint:true,OES_element_index_uint:true,OESStandardDerivatives:true,OES_standard_derivatives:true,OESTextureFloat:true,OES_texture_float:true,OESTextureFloatLinear:true,OES_texture_float_linear:true,OESTextureHalfFloat:true,OES_texture_half_float:true,OESTextureHalfFloatLinear:true,OES_texture_half_float_linear:true,OESVertexArrayObject:true,OES_vertex_array_object:true,WebGLProgram:true,WebGLQuery:true,WebGLRenderbuffer:true,WebGLRenderingContext:true,WebGL2RenderingContext:true,WebGLSampler:true,WebGLShader:true,WebGLShaderPrecisionFormat:true,WebGLSync:true,WebGLTexture:true,WebGLTimerQueryEXT:true,WebGLTransformFeedback:true,WebGLUniformLocation:true,WebGLVertexArrayObject:true,WebGLVertexArrayObjectOES:true,WebGL2RenderingContextBase:true,DataView:true,ArrayBufferView:false,Float32Array:true,Float64Array:true,Int16Array:true,Int32Array:true,Int8Array:true,Uint16Array:true,Uint32Array:true,Uint8ClampedArray:true,CanvasPixelArray:true,Uint8Array:false,HTMLAudioElement:true,HTMLBRElement:true,HTMLBaseElement:true,HTMLBodyElement:true,HTMLButtonElement:true,HTMLCanvasElement:true,HTMLContentElement:true,HTMLDListElement:true,HTMLDataElement:true,HTMLDataListElement:true,HTMLDetailsElement:true,HTMLDialogElement:true,HTMLDivElement:true,HTMLEmbedElement:true,HTMLFieldSetElement:true,HTMLHRElement:true,HTMLHeadElement:true,HTMLHeadingElement:true,HTMLHtmlElement:true,HTMLIFrameElement:true,HTMLImageElement:true,HTMLInputElement:true,HTMLLIElement:true,HTMLLabelElement:true,HTMLLegendElement:true,HTMLLinkElement:true,HTMLMapElement:true,HTMLMediaElement:true,HTMLMenuElement:true,HTMLMetaElement:true,HTMLMeterElement:true,HTMLModElement:true,HTMLOListElement:true,HTMLObjectElement:true,HTMLOptGroupElement:true,HTMLOptionElement:true,HTMLOutputElement:true,HTMLParagraphElement:true,HTMLParamElement:true,HTMLPictureElement:true,HTMLPreElement:true,HTMLProgressElement:true,HTMLQuoteElement:true,HTMLScriptElement:true,HTMLShadowElement:true,HTMLSlotElement:true,HTMLSourceElement:true,HTMLSpanElement:true,HTMLStyleElement:true,HTMLTableCaptionElement:true,HTMLTableCellElement:true,HTMLTableDataCellElement:true,HTMLTableHeaderCellElement:true,HTMLTableColElement:true,HTMLTableElement:true,HTMLTableRowElement:true,HTMLTableSectionElement:true,HTMLTemplateElement:true,HTMLTextAreaElement:true,HTMLTimeElement:true,HTMLTitleElement:true,HTMLTrackElement:true,HTMLUListElement:true,HTMLUnknownElement:true,HTMLVideoElement:true,HTMLDirectoryElement:true,HTMLFontElement:true,HTMLFrameElement:true,HTMLFrameSetElement:true,HTMLMarqueeElement:true,HTMLElement:false,AccessibleNodeList:true,HTMLAnchorElement:true,HTMLAreaElement:true,Blob:false,CDATASection:true,CharacterData:true,Comment:true,ProcessingInstruction:true,Text:true,CSSPerspective:true,CSSCharsetRule:true,CSSConditionRule:true,CSSFontFaceRule:true,CSSGroupingRule:true,CSSImportRule:true,CSSKeyframeRule:true,MozCSSKeyframeRule:true,WebKitCSSKeyframeRule:true,CSSKeyframesRule:true,MozCSSKeyframesRule:true,WebKitCSSKeyframesRule:true,CSSMediaRule:true,CSSNamespaceRule:true,CSSPageRule:true,CSSRule:true,CSSStyleRule:true,CSSSupportsRule:true,CSSViewportRule:true,CSSStyleDeclaration:true,MSStyleCSSProperties:true,CSS2Properties:true,CSSImageValue:true,CSSKeywordValue:true,CSSNumericValue:true,CSSPositionValue:true,CSSResourceValue:true,CSSUnitValue:true,CSSURLImageValue:true,CSSStyleValue:false,CSSMatrixComponent:true,CSSRotation:true,CSSScale:true,CSSSkew:true,CSSTranslation:true,CSSTransformComponent:false,CSSTransformValue:true,CSSUnparsedValue:true,DataTransferItemList:true,DOMException:true,ClientRectList:true,DOMRectList:true,DOMRectReadOnly:false,DOMStringList:true,DOMTokenList:true,MathMLElement:true,SVGAElement:true,SVGAnimateElement:true,SVGAnimateMotionElement:true,SVGAnimateTransformElement:true,SVGAnimationElement:true,SVGCircleElement:true,SVGClipPathElement:true,SVGDefsElement:true,SVGDescElement:true,SVGDiscardElement:true,SVGEllipseElement:true,SVGFEBlendElement:true,SVGFEColorMatrixElement:true,SVGFEComponentTransferElement:true,SVGFECompositeElement:true,SVGFEConvolveMatrixElement:true,SVGFEDiffuseLightingElement:true,SVGFEDisplacementMapElement:true,SVGFEDistantLightElement:true,SVGFEFloodElement:true,SVGFEFuncAElement:true,SVGFEFuncBElement:true,SVGFEFuncGElement:true,SVGFEFuncRElement:true,SVGFEGaussianBlurElement:true,SVGFEImageElement:true,SVGFEMergeElement:true,SVGFEMergeNodeElement:true,SVGFEMorphologyElement:true,SVGFEOffsetElement:true,SVGFEPointLightElement:true,SVGFESpecularLightingElement:true,SVGFESpotLightElement:true,SVGFETileElement:true,SVGFETurbulenceElement:true,SVGFilterElement:true,SVGForeignObjectElement:true,SVGGElement:true,SVGGeometryElement:true,SVGGraphicsElement:true,SVGImageElement:true,SVGLineElement:true,SVGLinearGradientElement:true,SVGMarkerElement:true,SVGMaskElement:true,SVGMetadataElement:true,SVGPathElement:true,SVGPatternElement:true,SVGPolygonElement:true,SVGPolylineElement:true,SVGRadialGradientElement:true,SVGRectElement:true,SVGScriptElement:true,SVGSetElement:true,SVGStopElement:true,SVGStyleElement:true,SVGElement:true,SVGSVGElement:true,SVGSwitchElement:true,SVGSymbolElement:true,SVGTSpanElement:true,SVGTextContentElement:true,SVGTextElement:true,SVGTextPathElement:true,SVGTextPositioningElement:true,SVGTitleElement:true,SVGUseElement:true,SVGViewElement:true,SVGGradientElement:true,SVGComponentTransferFunctionElement:true,SVGFEDropShadowElement:true,SVGMPathElement:true,Element:false,AbsoluteOrientationSensor:true,Accelerometer:true,AccessibleNode:true,AmbientLightSensor:true,Animation:true,ApplicationCache:true,DOMApplicationCache:true,OfflineResourceList:true,BackgroundFetchRegistration:true,BatteryManager:true,BroadcastChannel:true,CanvasCaptureMediaStreamTrack:true,DedicatedWorkerGlobalScope:true,EventSource:true,FileReader:true,FontFaceSet:true,Gyroscope:true,XMLHttpRequest:true,XMLHttpRequestEventTarget:true,XMLHttpRequestUpload:true,LinearAccelerationSensor:true,Magnetometer:true,MediaDevices:true,MediaKeySession:true,MediaQueryList:true,MediaRecorder:true,MediaSource:true,MediaStream:true,MediaStreamTrack:true,MessagePort:true,MIDIAccess:true,MIDIInput:true,MIDIOutput:true,MIDIPort:true,NetworkInformation:true,Notification:true,OffscreenCanvas:true,OrientationSensor:true,PaymentRequest:true,Performance:true,PermissionStatus:true,PresentationAvailability:true,PresentationConnection:true,PresentationConnectionList:true,PresentationRequest:true,RelativeOrientationSensor:true,RemotePlayback:true,RTCDataChannel:true,DataChannel:true,RTCDTMFSender:true,RTCPeerConnection:true,webkitRTCPeerConnection:true,mozRTCPeerConnection:true,ScreenOrientation:true,Sensor:true,ServiceWorker:true,ServiceWorkerContainer:true,ServiceWorkerGlobalScope:true,ServiceWorkerRegistration:true,SharedWorker:true,SharedWorkerGlobalScope:true,SpeechRecognition:true,SpeechSynthesis:true,SpeechSynthesisUtterance:true,VR:true,VRDevice:true,VRDisplay:true,VRSession:true,VisualViewport:true,WebSocket:true,Window:true,DOMWindow:true,Worker:true,WorkerGlobalScope:true,WorkerPerformance:true,BluetoothDevice:true,BluetoothRemoteGATTCharacteristic:true,Clipboard:true,MojoInterfaceInterceptor:true,USB:true,IDBDatabase:true,IDBOpenDBRequest:true,IDBVersionChangeRequest:true,IDBRequest:true,IDBTransaction:true,AnalyserNode:true,RealtimeAnalyserNode:true,AudioBufferSourceNode:true,AudioDestinationNode:true,AudioNode:true,AudioScheduledSourceNode:true,AudioWorkletNode:true,BiquadFilterNode:true,ChannelMergerNode:true,AudioChannelMerger:true,ChannelSplitterNode:true,AudioChannelSplitter:true,ConstantSourceNode:true,ConvolverNode:true,DelayNode:true,DynamicsCompressorNode:true,GainNode:true,AudioGainNode:true,IIRFilterNode:true,MediaElementAudioSourceNode:true,MediaStreamAudioDestinationNode:true,MediaStreamAudioSourceNode:true,OscillatorNode:true,Oscillator:true,PannerNode:true,AudioPannerNode:true,webkitAudioPannerNode:true,ScriptProcessorNode:true,JavaScriptAudioNode:true,StereoPannerNode:true,WaveShaperNode:true,EventTarget:false,File:true,FileList:true,FileWriter:true,HTMLFormElement:true,Gamepad:true,History:true,HTMLCollection:true,HTMLFormControlsCollection:true,HTMLOptionsCollection:true,Location:true,MediaList:true,MIDIInputMap:true,MIDIOutputMap:true,MimeType:true,MimeTypeArray:true,Document:true,DocumentFragment:true,HTMLDocument:true,ShadowRoot:true,XMLDocument:true,Attr:true,DocumentType:true,Node:false,NodeList:true,RadioNodeList:true,Plugin:true,PluginArray:true,RTCStatsReport:true,HTMLSelectElement:true,SourceBuffer:true,SourceBufferList:true,SpeechGrammar:true,SpeechGrammarList:true,SpeechRecognitionResult:true,Storage:true,CSSStyleSheet:true,StyleSheet:true,TextTrack:true,TextTrackCue:true,VTTCue:true,TextTrackCueList:true,TextTrackList:true,TimeRanges:true,Touch:true,TouchList:true,TrackDefaultList:true,URL:true,VideoTrackList:true,CSSRuleList:true,ClientRect:true,DOMRect:true,GamepadList:true,NamedNodeMap:true,MozNamedAttrMap:true,SpeechRecognitionResultList:true,StyleSheetList:true,SVGLength:true,SVGLengthList:true,SVGNumber:true,SVGNumberList:true,SVGPointList:true,SVGStringList:true,SVGTransform:true,SVGTransformList:true,AudioBuffer:true,AudioParamMap:true,AudioTrackList:true,AudioContext:true,webkitAudioContext:true,BaseAudioContext:false,OfflineAudioContext:true}) +A.aW.$nativeSuperclassTag="ArrayBufferView" +A.bF.$nativeSuperclassTag="ArrayBufferView" +A.bG.$nativeSuperclassTag="ArrayBufferView" +A.aG.$nativeSuperclassTag="ArrayBufferView" +A.bH.$nativeSuperclassTag="ArrayBufferView" +A.bI.$nativeSuperclassTag="ArrayBufferView" +A.bp.$nativeSuperclassTag="ArrayBufferView" +A.bJ.$nativeSuperclassTag="EventTarget" +A.bK.$nativeSuperclassTag="EventTarget" +A.bM.$nativeSuperclassTag="EventTarget" +A.bN.$nativeSuperclassTag="EventTarget"})() +Function.prototype.$2=function(a,b){return this(a,b)} +Function.prototype.$1=function(a){return this(a)} +Function.prototype.$0=function(){return this()} +Function.prototype.$3=function(a,b,c){return this(a,b,c)} +Function.prototype.$4=function(a,b,c,d){return this(a,b,c,d)} +Function.prototype.$1$1=function(a){return this(a)} +convertAllToFastObject(w) +convertToFastObject($);(function(a){if(typeof document==="undefined"){a(null) +return}if(typeof document.currentScript!="undefined"){a(document.currentScript) +return}var s=document.scripts +function onLoad(b){for(var q=0;q args) async { + try { + // sdk + var sdk = core.getInput('sdk'); + if (sdk.isEmpty) { + sdk = 'stable'; + } + + // flavor + var flavor = core.getInput('flavor'); + if (flavor.isEmpty) { + flavor = sdk == 'main' ? 'raw' : 'release'; + } else if (flavor != 'raw' && flavor != 'release') { + core.setFailed("Unrecognized build flavor '$flavor'."); + return; + } + final raw = flavor == 'raw'; + + // os + final os = getPlatform(); + + // architecture + var architecture = core.getInput('architecture'); + if (architecture.isEmpty) { + architecture = getArch(); + } + + // calculate version and channel + String version; + String channel; + + if (sdk == 'stable' || sdk == 'beta' || sdk == 'dev') { + channel = sdk; + version = + raw ? 'latest' : (await latestPublishedVersion(channel, flavor)); + } else if (sdk == 'main') { + channel = 'be'; + version = + raw ? 'latest' : (await latestPublishedVersion(channel, flavor)); + } else { + version = sdk; + + // Derive the channel from the version string. + if (sdk.contains('dev')) { + channel = 'dev'; + } else if (sdk.contains('beta')) { + channel = 'beta'; + } else if (sdk.contains('main')) { + core.setFailed('Versions cannot be specified for main channel builds.'); + return; + } else { + channel = 'stable'; + } + } + + core.info('Installing the $os-$architecture Dart SDK version $version from ' + 'the $channel ($flavor) channel.'); + + // Calculate url based on https://dart.dev/tools/sdk/archive#download-urls. + final url = 'https://storage.googleapis.com/dart-archive/' + 'channels/$channel/$flavor/$version/sdk/' + 'dartsdk-$os-$architecture-release.zip'; + + // Use a cached sdk or download and cache the sdk; using a 'raw' sdk flavor + // disables caching. + final toolName = raw ? 'dart_raw' : 'dart'; + var sdkPath = !raw ? toolCache.find(toolName, version, architecture) : ''; + if (sdkPath.isNotEmpty) { + core.info('Using cached sdk from $sdkPath.'); + } else { + core.info('$url ...'); + + final archivePath = + await promiseToFuture(toolCache.downloadTool(url)); + var extractedFolder = + await promiseToFuture(toolCache.extractZip(archivePath)); + extractedFolder = path.join(extractedFolder, 'dart-sdk'); + + sdkPath = await promiseToFuture( + toolCache.cacheDir(extractedFolder, toolName, version, architecture)); + } + + final pubCache = path.join( + getProcessEnv(os == 'windows' ? 'USERPROFILE' : 'HOME')!, '.pub-cache'); + + core.exportVariable('DART_HOME', sdkPath); + core.addPath(path.join(sdkPath, 'bin')); + core.exportVariable('PUB_CACHE', pubCache); + core.addPath(path.join(pubCache, 'bin')); + + // Create the OIDC token used for pub.dev publishing. + await createPubOIDCToken(); + + // Configure the outputs. + if (raw) { + core.setOutput('dart-version', getVersionFromSdk(sdkPath)); + } else { + core.setOutput('dart-version', version); + } + + // Report success; print version. + await promiseToFuture(exec.exec('dart', ['--version'])); + } catch (error) { + core.setFailed('$error'); + } +} + +String getVersionFromSdk(String sdkPath) { + final versionFilePath = path.join(sdkPath, 'version'); + return fs.readFileSync(versionFilePath, 'utf8').trim(); +} + +/// Returns 'x64', 'ia32', 'arm', or 'arm64'. +String getArch() { + const supported = ['x64', 'ia32', 'arm', 'arm64']; + return supported.contains(os.arch()) ? os.arch() : 'x64'; +} + +/// Returns 'linux', 'windows', or 'macos'. +String getPlatform() { + if (os.platform() == 'win32') return 'windows'; + return os.platform() == 'darwin' ? 'macos' : 'linux'; +} + +// When enabled through env variables, create OIDC token for publishing on +// pub.dev. +Future createPubOIDCToken() async { + final tokenRequestUrl = getProcessEnv('ACTIONS_ID_TOKEN_REQUEST_URL'); + final tokenRequestToken = getProcessEnv('ACTIONS_ID_TOKEN_REQUEST_TOKEN'); + + if (tokenRequestUrl == null || tokenRequestToken == null) { + return; + } + + final token = await promiseToFuture(core.getIDToken('https://pub.dev')); + + core.exportVariable('PUB_TOKEN', token); + + await promiseToFuture(exec.exec('dart', + ['pub', 'token', 'add', 'https://pub.dev', '--env-var', 'PUB_TOKEN'])); +} + +// https://storage.googleapis.com/dart-archive/channels/stable/release/latest/VERSION +// { +// "date": "2023-02-07", +// "version": "2.19.2", +// "revision": "e46b4f59490230778e907bde2eedb06b062d31be" +// } + +// Query google storage for the most recent published SDK version for the given +// channel and flavor. +Future latestPublishedVersion(String channel, String flavor) async { + final url = 'https://storage.googleapis.com/dart-archive/channels/' + '$channel/$flavor/latest/VERSION'; + + final http = HttpClient('setup-dart', [], { + 'allowRedirects': true, + 'maxRedirects': 3, + 'allowRetries': true, + 'maxRetries': 3, + }); + + JSObject response = await promiseToFuture(http.getJson(url)); + JSObject result = getProperty(response, 'result'); + return getProperty(result, 'version'); +} diff --git a/lib/main.mjs b/lib/main.mjs new file mode 100644 index 0000000..c158205 --- /dev/null +++ b/lib/main.mjs @@ -0,0 +1,41 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import * as core from '@actions/core'; +import * as exec from '@actions/exec'; +import * as httpClient from '@actions/http-client'; +import * as toolCache from '@actions/tool-cache'; +import * as fs from 'fs'; +import * as module from 'module'; +import * as os from 'os'; +import * as process from 'process'; + +const require = module.createRequire(import.meta.url); + +// Setup properties for JS interop in Dart. + +globalThis.self = globalThis; +globalThis.core = core; +globalThis.exec = exec; +globalThis.HttpClient = httpClient.HttpClient; +globalThis.toolCache = toolCache; +globalThis.fs = fs; +globalThis.os = os; +globalThis.process = process; +globalThis.location = { href: `file://${process.cwd()}/`} + +globalThis.dartMainRunner = async function(main, args) { + const dir = process.argv[2]; + await main(dir); +} + +async function scriptMain() { + // We have to load `main.js` here so that the `dartMainRunner` hook is + // registered before the IIFE in `dart_main.js` runs. + require('../dist/main.cjs'); +} + +if (require.main === require.module) { + await scriptMain(); +} diff --git a/lib/node/actions/core.dart b/lib/node/actions/core.dart new file mode 100644 index 0000000..6e68619 --- /dev/null +++ b/lib/node/actions/core.dart @@ -0,0 +1,33 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:js_interop'; + +import 'package:js/js.dart' as js; + +@JS() +external Core get core; + +@JS() +@js.staticInterop +class Core {} + +extension CoreExtension on Core { + external JSString getInput(JSString name); + + external void setOutput(JSString name, JSString value); + + external void info(JSString name); + external void warning(JSString name); + external void error(JSString name); + + external void addPath(JSString element); + + external void exportVariable(JSString name, JSString value); + + external void setFailed(JSString name); + + // JSPromise + external JSPromise getIDToken(JSString audience); +} diff --git a/lib/node/actions/exec.dart b/lib/node/actions/exec.dart new file mode 100644 index 0000000..44259b7 --- /dev/null +++ b/lib/node/actions/exec.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:js_interop'; + +import 'package:js/js.dart' as js; + +@JS() +external Exec get exec; + +@JS() +@js.staticInterop +class Exec {} + +extension ExecExtension on Exec { + /// Exec a command. + /// + /// Output will be streamed to the live console. Returns promise with return + /// code. + external JSPromise exec(JSString commandLine, [List args]); +} diff --git a/lib/node/actions/http_client.dart b/lib/node/actions/http_client.dart new file mode 100644 index 0000000..d474482 --- /dev/null +++ b/lib/node/actions/http_client.dart @@ -0,0 +1,19 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:js_interop'; + +import 'package:js/js.dart' as js; + +@JS() +@js.staticInterop +class HttpClient { + external factory HttpClient( + JSString userAgent, JSArray handlers, Map requestOptions); +} + +extension HttpClientExtension on HttpClient { + // JSPromise + external JSPromise getJson(JSString requestUrl); +} diff --git a/lib/node/actions/tool_cache.dart b/lib/node/actions/tool_cache.dart new file mode 100644 index 0000000..173ce44 --- /dev/null +++ b/lib/node/actions/tool_cache.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:js_interop'; + +import 'package:js/js.dart' as js; + +@JS() +external ToolCache get toolCache; + +@JS() +@js.staticInterop +class ToolCache {} + +extension ToolCacheExtension on ToolCache { + /// Finds the path to a tool version in the local installed tool cache. + /// + /// @param toolName name of the tool + /// @param versionSpec version of the tool + /// @param arch optional arch. defaults to arch of computer + external JSString find( + JSString toolName, + JSString versionSpec, [ + JSString arch, + ]); + + /// Download a tool from an url and stream it into a file. + /// + /// @param url url of tool to download + /// @returns path to downloaded tool + // JSPromise + external JSPromise downloadTool(JSString url); + + /// Extract a zip. + /// + /// @param file path to the zip + /// @returns path to the destination directory + external JSPromise extractZip(JSString file); + + /// Caches a directory and installs it into the tool cacheDir + /// + /// @param sourceDir the directory to cache into tools + /// @param tool tool name + /// @param version version of the tool. semver format + /// @param arch architecture of the tool. Optional. + /// Defaults to machine architecture + external JSPromise cacheDir( + JSString sourceDir, + JSString tool, + JSString version, [ + JSString arch, + ]); +} diff --git a/lib/node/fs.dart b/lib/node/fs.dart new file mode 100644 index 0000000..95075bb --- /dev/null +++ b/lib/node/fs.dart @@ -0,0 +1,20 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:js_interop'; + +import 'package:js/js.dart' as js; + +@JS() +external FileSystem get fs; + +@JS() +@js.staticInterop +class FileSystem {} + +extension FileSystemExtension on FileSystem { + external JSBoolean existsSync(JSString path); + + external JSString readFileSync(JSString path, [JSString encoding]); +} diff --git a/lib/node/os.dart b/lib/node/os.dart new file mode 100644 index 0000000..58c95cf --- /dev/null +++ b/lib/node/os.dart @@ -0,0 +1,20 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:js_interop'; + +import 'package:js/js.dart' as js; + +@JS() +external OS get os; + +@JS() +@js.staticInterop +class OS {} + +extension OSExtension on OS { + external JSString arch(); + + external JSString platform(); +} diff --git a/lib/node/process.dart b/lib/node/process.dart new file mode 100644 index 0000000..6f3146e --- /dev/null +++ b/lib/node/process.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:js_interop'; +import 'dart:js_util'; + +import 'package:js/js.dart' as js; + +@JS() +external Process get process; + +@JS() +@js.staticInterop +class Process {} + +extension ProcessExtension on Process { + // Map + external JSObject env; +} + +String? getProcessEnv(String name) => getProperty(process.env, name); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..efc4af0 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,91 @@ +{ + "name": "setup-dart", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@actions/core": "^1.10.0", + "@actions/exec": "^1.1.1", + "@actions/http-client": "^2.0.1", + "@actions/tool-cache": "^2.0.1" + } + }, + "node_modules/@actions/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/exec": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", + "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", + "dependencies": { + "@actions/io": "^1.0.1" + } + }, + "node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/@actions/io": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz", + "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw==" + }, + "node_modules/@actions/tool-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-2.0.1.tgz", + "integrity": "sha512-iPU+mNwrbA8jodY8eyo/0S/QqCKDajiR8OxWTnSk/SnYg0sj8Hp4QcUEVC1YFpHWXtrfbQrE13Jz4k4HXJQKcA==", + "dependencies": { + "@actions/core": "^1.2.6", + "@actions/exec": "^1.0.0", + "@actions/http-client": "^2.0.1", + "@actions/io": "^1.1.1", + "semver": "^6.1.0", + "uuid": "^3.3.2" + } + }, + "node_modules/@actions/tool-cache/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..99ef92d --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "setup-dart", + "version": "0.0.0", + "private": true, + "description": "The setup-dart GitHub Action - download and setup the Dart SDK.", + "main": "lib/main.mjs", + "scripts": { + "build": "dart compile js -olib/main.js -O2 lib/main.dart && dart tool/sig.dart --generate", + "dist": "ncc build lib/main.mjs && cp lib/main.js dist/main.cjs && cp lib/sig.txt dist/sig.txt", + "all": "npm run build && npm run dist" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/dart-lang/setup-dart.git" + }, + "type": "module", + "keywords": [ + "actions", + "dart", + "setup" + ], + "license": "BSD", + "dependencies": { + "@actions/core": "^1.10.0", + "@actions/exec": "^1.1.1", + "@actions/http-client": "^2.0.1", + "@actions/tool-cache": "^2.0.1" + } +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..d72255b --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,16 @@ +name: setup_dart +description: The setup-dart GitHub Action - download and setup the Dart SDK. + +publish_to: none + +environment: + sdk: ^2.19.0 + +dependencies: + js: ^0.6.7 + path: ^1.8.0 + +dev_dependencies: + args: ^2.4.0 + crypto: ^3.0.0 + lints: ^2.0.0 diff --git a/setup.sh b/setup.sh deleted file mode 100755 index 3096a4d..0000000 --- a/setup.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2020, the Dart project authors. -# -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -############################################################################### -# Bash script that downloads and does setup for a Dart SDK. # -# Takes three params; first listed is the default: # -# $1: Dart SDK version/channel: stable|beta|dev|main| # -# $2: Dart channel (DEPRECATED): stable|beta|dev # -# $3: OS: Linux|Windows|macOS # -# $4: ARCH: x64|ia32 # -############################################################################### - -# Parse SDK and version args. -SDK="${1:-stable}" -VERSION= -if [[ $SDK == stable || $SDK == beta || $SDK == dev || $SDK == main ]] -then - CHANNEL=$SDK - VERSION=latest -else - CHANNEL=stable - VERSION=$SDK - # Derive the channel from the version string - if [[ "$SDK" == *"dev"* ]] - then - CHANNEL=dev - elif [[ "$SDK" == *"beta"* ]] - then - CHANNEL=beta - elif [[ "$SDK" == *"main"* ]] - then - echo -e "::error::Versions cannot be specified for builds from the main channel." - exit 1 - fi -fi - -OS="${2:-Linux}" -ARCH="${3:-x64}" -OS=$(echo "$OS" | awk '{print tolower($0)}') - -DEFAULT_FLAVOR=release -if [[ $SDK == main ]] -then - DEFAULT_FLAVOR=raw -fi - -FLAVOR="${4:-$DEFAULT_FLAVOR}" -if ! [[ $FLAVOR == raw || $FLAVOR == release ]] -then - echo -e "::error::Unrecognized build flavor \"${FLAVOR}\"." - exit 1 -fi - -if [[ $SDK == main && $FLAVOR != raw ]] -then - echo -e "::error::Main channel only supports raw build flavor." - exit 1 -fi - -echo "Installing Dart SDK version \"${VERSION}\" from the ${CHANNEL} channel (${FLAVOR}) on ${OS}-${ARCH}" - -# Calculate download Url. Based on: -# https://dart.dev/tools/sdk/archive#download-urls -PREFIX="https://storage.googleapis.com/dart-archive/channels" -BUILD="sdk/dartsdk-${OS}-${ARCH}-release.zip" -if [[ $SDK == main ]] -then - URL="${PREFIX}/be/raw/latest/${BUILD}" -else - URL="${PREFIX}/${CHANNEL}/${FLAVOR}/${VERSION}/${BUILD}" -fi -echo "Downloading ${URL}..." - -# Download installation zip. -curl --connect-timeout 15 --retry 5 "$URL" > "${HOME}/dartsdk.zip" -unzip -o "${HOME}/dartsdk.zip" -d "${RUNNER_TOOL_CACHE}" > /dev/null -if [ $? -ne 0 ]; then - echo -e "::error::Download failed! Please check passed arguments." - exit 1 -fi -rm "${HOME}/dartsdk.zip" - -# Configure pub to use a fixed location. -if [[ $OS == windows ]] -then - PUBCACHE="${USERPROFILE}\\.pub-cache" - DART_HOME="${RUNNER_TOOL_CACHE}\\dart-sdk" -else - PUBCACHE="${HOME}/.pub-cache" - DART_HOME="${RUNNER_TOOL_CACHE}/dart-sdk" -fi -echo "PUB_CACHE=${PUBCACHE}" >> $GITHUB_ENV -echo "Pub cache set to: ${PUBCACHE}" - -# Update paths. -echo "DART_HOME=${DART_HOME}" >> $GITHUB_ENV -echo "${PUBCACHE}/bin" >> $GITHUB_PATH -echo "${RUNNER_TOOL_CACHE}/dart-sdk/bin" >> $GITHUB_PATH - -# Report success, and print version. -echo -e "Successfully installed Dart SDK:" -${RUNNER_TOOL_CACHE}/dart-sdk/bin/dart --version - -# When enabled through env variables, create OIDC token for publishing on pub.dev. -if [[ "${ACTIONS_ID_TOKEN_REQUEST_URL}" != "" && "${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" != "" ]] -then - if [[ -x "$(command -v jq)" ]] - then - PUB_TOKEN=$(curl --retry 5 --retry-connrefused -sLS "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=https://pub.dev" -H "User-Agent: actions/oidc-client" -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" | jq -r '.value') - echo "PUB_TOKEN=${PUB_TOKEN}" >> $GITHUB_ENV - export PUB_TOKEN - ${RUNNER_TOOL_CACHE}/dart-sdk/bin/dart pub token add https://pub.dev --env-var PUB_TOKEN - else - echo "Could not setup OIDC token, 'jq' is not available."; - fi -fi diff --git a/tool/sig.dart b/tool/sig.dart new file mode 100644 index 0000000..3e05646 --- /dev/null +++ b/tool/sig.dart @@ -0,0 +1,74 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:convert'; +import 'dart:io'; + +import 'package:args/args.dart'; +import 'package:crypto/crypto.dart'; + +void main(List args) async { + var argsParser = ArgParser() + ..addFlag( + 'generate', + negatable: false, + help: 'Generate the compilation signature to lib/sig.txt.', + ) + ..addFlag( + 'verify', + negatable: false, + help: 'Verify the compilation signature against dist/sig.txt.', + ); + + var argsResult = argsParser.parse(args); + + final generate = argsResult['generate'] as bool; + final verify = argsResult['verify'] as bool; + + if (!generate && !verify) { + print('Please specify one of --generate or --verify.\n'); + print(argsParser.usage); + exit(1); + } + + var sig = await calcSig(); + + if (generate) { + File('lib/sig.txt').writeAsStringSync('$sig\n'); + } else if (verify) { + var existing = File('dist/sig.txt').readAsStringSync().trim(); + if (existing != sig) { + stderr.writeln( + "Compilation artifacts not up-to-date; re-run 'npm run all'."); + exit(1); + } else { + print('Compilation artifacts up-to-date.'); + } + } +} + +Future calcSig() async { + final digest = + await _fileLines().transform(utf8.encoder).transform(md5).single; + + return digest.bytes + .map((byte) => byte.toRadixString(16).padLeft(2, '0').toUpperCase()) + .join(); +} + +Stream _fileLines() async* { + // Collect lib/ Dart files. + final files = Directory('lib') + .listSync(recursive: true) + .whereType() + .where((file) => file.path.endsWith('.dart')) + .toList() + ..sort((a, b) => a.path.toLowerCase().compareTo(b.path.toLowerCase())); + + for (var file in [File('pubspec.yaml'), ...files]) { + for (var line in file.readAsLinesSync()) { + yield line; + } + } +}