mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
* Trim arguments after splitting them * Test functionality * Update buildExec.test.ts * Use `toMatchObject` instead of `toEqual` * Use `expect.arrayContaining` * Update buildExec.test.ts * Debug `execArgs` * Build project * Add `verbose` guard * Build project
23822 lines
1.5 MiB
Executable File
23822 lines
1.5 MiB
Executable File
require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
|
||
/******/ var __webpack_modules__ = ({
|
||
|
||
/***/ 5241:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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__(5278);
|
||
/**
|
||
* 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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2186:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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__(5241);
|
||
const file_command_1 = __nccwpck_require__(717);
|
||
const utils_1 = __nccwpck_require__(5278);
|
||
const os = __importStar(__nccwpck_require__(2037));
|
||
const path = __importStar(__nccwpck_require__(1017));
|
||
const oidc_utils_1 = __nccwpck_require__(8041);
|
||
/**
|
||
* 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) {
|
||
const delimiter = '_GitHubActionsFileCommandDelimeter_';
|
||
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
|
||
file_command_1.issueCommand('ENV', commandValue);
|
||
}
|
||
else {
|
||
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.issueCommand('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 !== '');
|
||
return inputs;
|
||
}
|
||
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) {
|
||
process.stdout.write(os.EOL);
|
||
command_1.issueCommand('set-output', { name }, 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) {
|
||
command_1.issueCommand('save-state', { name }, 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__(1327);
|
||
Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } }));
|
||
/**
|
||
* @deprecated use core.summary
|
||
*/
|
||
var summary_2 = __nccwpck_require__(1327);
|
||
Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
|
||
//# sourceMappingURL=core.js.map
|
||
|
||
/***/ }),
|
||
|
||
/***/ 717:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
// 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.issueCommand = 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 utils_1 = __nccwpck_require__(5278);
|
||
function issueCommand(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.issueCommand = issueCommand;
|
||
//# sourceMappingURL=file-command.js.map
|
||
|
||
/***/ }),
|
||
|
||
/***/ 8041:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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__(1404);
|
||
const auth_1 = __nccwpck_require__(6758);
|
||
const core_1 = __nccwpck_require__(2186);
|
||
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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1327:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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}</${tag}>`;
|
||
}
|
||
/**
|
||
* 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>} 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 (<hr>) 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 (<br>) 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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5278:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
// 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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 6758:
|
||
/***/ (function(__unused_webpack_module, exports) {
|
||
|
||
"use strict";
|
||
|
||
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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1404:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
/* 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__(2843));
|
||
const tunnel = __importStar(__nccwpck_require__(4294));
|
||
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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2843:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1514:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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__(8159));
|
||
/**
|
||
* 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<number> 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<ExecOutput> 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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 8159:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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__(7351));
|
||
const ioUtil = __importStar(__nccwpck_require__(1962));
|
||
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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4087:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
exports.Context = void 0;
|
||
const fs_1 = __nccwpck_require__(7147);
|
||
const os_1 = __nccwpck_require__(2037);
|
||
class Context {
|
||
/**
|
||
* Hydrate the context from the environment
|
||
*/
|
||
constructor() {
|
||
var _a, _b, _c;
|
||
this.payload = {};
|
||
if (process.env.GITHUB_EVENT_PATH) {
|
||
if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) {
|
||
this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));
|
||
}
|
||
else {
|
||
const path = process.env.GITHUB_EVENT_PATH;
|
||
process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);
|
||
}
|
||
}
|
||
this.eventName = process.env.GITHUB_EVENT_NAME;
|
||
this.sha = process.env.GITHUB_SHA;
|
||
this.ref = process.env.GITHUB_REF;
|
||
this.workflow = process.env.GITHUB_WORKFLOW;
|
||
this.action = process.env.GITHUB_ACTION;
|
||
this.actor = process.env.GITHUB_ACTOR;
|
||
this.job = process.env.GITHUB_JOB;
|
||
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
|
||
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
|
||
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
|
||
this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;
|
||
this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;
|
||
}
|
||
get issue() {
|
||
const payload = this.payload;
|
||
return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });
|
||
}
|
||
get repo() {
|
||
if (process.env.GITHUB_REPOSITORY) {
|
||
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
|
||
return { owner, repo };
|
||
}
|
||
if (this.payload.repository) {
|
||
return {
|
||
owner: this.payload.repository.owner.login,
|
||
repo: this.payload.repository.name
|
||
};
|
||
}
|
||
throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'");
|
||
}
|
||
}
|
||
exports.Context = Context;
|
||
//# sourceMappingURL=context.js.map
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5438:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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.getOctokit = exports.context = void 0;
|
||
const Context = __importStar(__nccwpck_require__(4087));
|
||
const utils_1 = __nccwpck_require__(3030);
|
||
exports.context = new Context.Context();
|
||
/**
|
||
* Returns a hydrated octokit ready to use for GitHub Actions
|
||
*
|
||
* @param token the repo PAT or GITHUB_TOKEN
|
||
* @param options other options to set
|
||
*/
|
||
function getOctokit(token, options) {
|
||
return new utils_1.GitHub(utils_1.getOctokitOptions(token, options));
|
||
}
|
||
exports.getOctokit = getOctokit;
|
||
//# sourceMappingURL=github.js.map
|
||
|
||
/***/ }),
|
||
|
||
/***/ 7914:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0;
|
||
const httpClient = __importStar(__nccwpck_require__(6341));
|
||
function getAuthString(token, options) {
|
||
if (!token && !options.auth) {
|
||
throw new Error('Parameter token or opts.auth is required');
|
||
}
|
||
else if (token && options.auth) {
|
||
throw new Error('Parameters token and opts.auth may not both be specified');
|
||
}
|
||
return typeof options.auth === 'string' ? options.auth : `token ${token}`;
|
||
}
|
||
exports.getAuthString = getAuthString;
|
||
function getProxyAgent(destinationUrl) {
|
||
const hc = new httpClient.HttpClient();
|
||
return hc.getAgent(destinationUrl);
|
||
}
|
||
exports.getProxyAgent = getProxyAgent;
|
||
function getApiBaseUrl() {
|
||
return process.env['GITHUB_API_URL'] || 'https://api.github.com';
|
||
}
|
||
exports.getApiBaseUrl = getApiBaseUrl;
|
||
//# sourceMappingURL=utils.js.map
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3030:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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.getOctokitOptions = exports.GitHub = exports.context = void 0;
|
||
const Context = __importStar(__nccwpck_require__(4087));
|
||
const Utils = __importStar(__nccwpck_require__(7914));
|
||
// octokit + plugins
|
||
const core_1 = __nccwpck_require__(6762);
|
||
const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044);
|
||
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
|
||
exports.context = new Context.Context();
|
||
const baseUrl = Utils.getApiBaseUrl();
|
||
const defaults = {
|
||
baseUrl,
|
||
request: {
|
||
agent: Utils.getProxyAgent(baseUrl)
|
||
}
|
||
};
|
||
exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults);
|
||
/**
|
||
* Convience function to correctly format Octokit Options to pass into the constructor.
|
||
*
|
||
* @param token the repo PAT or GITHUB_TOKEN
|
||
* @param options other options to set
|
||
*/
|
||
function getOctokitOptions(token, options) {
|
||
const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller
|
||
// Auth
|
||
const auth = Utils.getAuthString(token, opts);
|
||
if (auth) {
|
||
opts.auth = auth;
|
||
}
|
||
return opts;
|
||
}
|
||
exports.getOctokitOptions = getOctokitOptions;
|
||
//# sourceMappingURL=utils.js.map
|
||
|
||
/***/ }),
|
||
|
||
/***/ 6341:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
/* 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__(3466));
|
||
const tunnel = __importStar(__nccwpck_require__(4294));
|
||
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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3466:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1962:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 7351:
|
||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||
|
||
"use strict";
|
||
|
||
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__(1962));
|
||
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<void>
|
||
*/
|
||
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<string> 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<string[]> 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
|
||
|
||
/***/ }),
|
||
|
||
/***/ 334:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
const REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
|
||
const REGEX_IS_INSTALLATION = /^ghs_/;
|
||
const REGEX_IS_USER_TO_SERVER = /^ghu_/;
|
||
async function auth(token) {
|
||
const isApp = token.split(/\./).length === 3;
|
||
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
|
||
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
|
||
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
|
||
return {
|
||
type: "token",
|
||
token: token,
|
||
tokenType
|
||
};
|
||
}
|
||
|
||
/**
|
||
* Prefix token for usage in the Authorization header
|
||
*
|
||
* @param token OAuth token or JSON Web Token
|
||
*/
|
||
function withAuthorizationPrefix(token) {
|
||
if (token.split(/\./).length === 3) {
|
||
return `bearer ${token}`;
|
||
}
|
||
|
||
return `token ${token}`;
|
||
}
|
||
|
||
async function hook(token, request, route, parameters) {
|
||
const endpoint = request.endpoint.merge(route, parameters);
|
||
endpoint.headers.authorization = withAuthorizationPrefix(token);
|
||
return request(endpoint);
|
||
}
|
||
|
||
const createTokenAuth = function createTokenAuth(token) {
|
||
if (!token) {
|
||
throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
|
||
}
|
||
|
||
if (typeof token !== "string") {
|
||
throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
|
||
}
|
||
|
||
token = token.replace(/^(token|bearer) +/i, "");
|
||
return Object.assign(auth.bind(null, token), {
|
||
hook: hook.bind(null, token)
|
||
});
|
||
};
|
||
|
||
exports.createTokenAuth = createTokenAuth;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 6762:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
var universalUserAgent = __nccwpck_require__(5030);
|
||
var beforeAfterHook = __nccwpck_require__(3682);
|
||
var request = __nccwpck_require__(6234);
|
||
var graphql = __nccwpck_require__(8467);
|
||
var authToken = __nccwpck_require__(334);
|
||
|
||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||
if (source == null) return {};
|
||
var target = {};
|
||
var sourceKeys = Object.keys(source);
|
||
var key, i;
|
||
|
||
for (i = 0; i < sourceKeys.length; i++) {
|
||
key = sourceKeys[i];
|
||
if (excluded.indexOf(key) >= 0) continue;
|
||
target[key] = source[key];
|
||
}
|
||
|
||
return target;
|
||
}
|
||
|
||
function _objectWithoutProperties(source, excluded) {
|
||
if (source == null) return {};
|
||
|
||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||
|
||
var key, i;
|
||
|
||
if (Object.getOwnPropertySymbols) {
|
||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
||
|
||
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
||
key = sourceSymbolKeys[i];
|
||
if (excluded.indexOf(key) >= 0) continue;
|
||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
||
target[key] = source[key];
|
||
}
|
||
}
|
||
|
||
return target;
|
||
}
|
||
|
||
const VERSION = "3.6.0";
|
||
|
||
const _excluded = ["authStrategy"];
|
||
class Octokit {
|
||
constructor(options = {}) {
|
||
const hook = new beforeAfterHook.Collection();
|
||
const requestDefaults = {
|
||
baseUrl: request.request.endpoint.DEFAULTS.baseUrl,
|
||
headers: {},
|
||
request: Object.assign({}, options.request, {
|
||
// @ts-ignore internal usage only, no need to type
|
||
hook: hook.bind(null, "request")
|
||
}),
|
||
mediaType: {
|
||
previews: [],
|
||
format: ""
|
||
}
|
||
}; // prepend default user agent with `options.userAgent` if set
|
||
|
||
requestDefaults.headers["user-agent"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(" ");
|
||
|
||
if (options.baseUrl) {
|
||
requestDefaults.baseUrl = options.baseUrl;
|
||
}
|
||
|
||
if (options.previews) {
|
||
requestDefaults.mediaType.previews = options.previews;
|
||
}
|
||
|
||
if (options.timeZone) {
|
||
requestDefaults.headers["time-zone"] = options.timeZone;
|
||
}
|
||
|
||
this.request = request.request.defaults(requestDefaults);
|
||
this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults);
|
||
this.log = Object.assign({
|
||
debug: () => {},
|
||
info: () => {},
|
||
warn: console.warn.bind(console),
|
||
error: console.error.bind(console)
|
||
}, options.log);
|
||
this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance
|
||
// is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.
|
||
// (2) If only `options.auth` is set, use the default token authentication strategy.
|
||
// (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.
|
||
// TODO: type `options.auth` based on `options.authStrategy`.
|
||
|
||
if (!options.authStrategy) {
|
||
if (!options.auth) {
|
||
// (1)
|
||
this.auth = async () => ({
|
||
type: "unauthenticated"
|
||
});
|
||
} else {
|
||
// (2)
|
||
const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\_(ツ)_/¯
|
||
|
||
hook.wrap("request", auth.hook);
|
||
this.auth = auth;
|
||
}
|
||
} else {
|
||
const {
|
||
authStrategy
|
||
} = options,
|
||
otherOptions = _objectWithoutProperties(options, _excluded);
|
||
|
||
const auth = authStrategy(Object.assign({
|
||
request: this.request,
|
||
log: this.log,
|
||
// we pass the current octokit instance as well as its constructor options
|
||
// to allow for authentication strategies that return a new octokit instance
|
||
// that shares the same internal state as the current one. The original
|
||
// requirement for this was the "event-octokit" authentication strategy
|
||
// of https://github.com/probot/octokit-auth-probot.
|
||
octokit: this,
|
||
octokitOptions: otherOptions
|
||
}, options.auth)); // @ts-ignore ¯\_(ツ)_/¯
|
||
|
||
hook.wrap("request", auth.hook);
|
||
this.auth = auth;
|
||
} // apply plugins
|
||
// https://stackoverflow.com/a/16345172
|
||
|
||
|
||
const classConstructor = this.constructor;
|
||
classConstructor.plugins.forEach(plugin => {
|
||
Object.assign(this, plugin(this, options));
|
||
});
|
||
}
|
||
|
||
static defaults(defaults) {
|
||
const OctokitWithDefaults = class extends this {
|
||
constructor(...args) {
|
||
const options = args[0] || {};
|
||
|
||
if (typeof defaults === "function") {
|
||
super(defaults(options));
|
||
return;
|
||
}
|
||
|
||
super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? {
|
||
userAgent: `${options.userAgent} ${defaults.userAgent}`
|
||
} : null));
|
||
}
|
||
|
||
};
|
||
return OctokitWithDefaults;
|
||
}
|
||
/**
|
||
* Attach a plugin (or many) to your Octokit instance.
|
||
*
|
||
* @example
|
||
* const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
|
||
*/
|
||
|
||
|
||
static plugin(...newPlugins) {
|
||
var _a;
|
||
|
||
const currentPlugins = this.plugins;
|
||
const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);
|
||
return NewOctokit;
|
||
}
|
||
|
||
}
|
||
Octokit.VERSION = VERSION;
|
||
Octokit.plugins = [];
|
||
|
||
exports.Octokit = Octokit;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 9440:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
var isPlainObject = __nccwpck_require__(3287);
|
||
var universalUserAgent = __nccwpck_require__(5030);
|
||
|
||
function lowercaseKeys(object) {
|
||
if (!object) {
|
||
return {};
|
||
}
|
||
|
||
return Object.keys(object).reduce((newObj, key) => {
|
||
newObj[key.toLowerCase()] = object[key];
|
||
return newObj;
|
||
}, {});
|
||
}
|
||
|
||
function mergeDeep(defaults, options) {
|
||
const result = Object.assign({}, defaults);
|
||
Object.keys(options).forEach(key => {
|
||
if (isPlainObject.isPlainObject(options[key])) {
|
||
if (!(key in defaults)) Object.assign(result, {
|
||
[key]: options[key]
|
||
});else result[key] = mergeDeep(defaults[key], options[key]);
|
||
} else {
|
||
Object.assign(result, {
|
||
[key]: options[key]
|
||
});
|
||
}
|
||
});
|
||
return result;
|
||
}
|
||
|
||
function removeUndefinedProperties(obj) {
|
||
for (const key in obj) {
|
||
if (obj[key] === undefined) {
|
||
delete obj[key];
|
||
}
|
||
}
|
||
|
||
return obj;
|
||
}
|
||
|
||
function merge(defaults, route, options) {
|
||
if (typeof route === "string") {
|
||
let [method, url] = route.split(" ");
|
||
options = Object.assign(url ? {
|
||
method,
|
||
url
|
||
} : {
|
||
url: method
|
||
}, options);
|
||
} else {
|
||
options = Object.assign({}, route);
|
||
} // lowercase header names before merging with defaults to avoid duplicates
|
||
|
||
|
||
options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging
|
||
|
||
removeUndefinedProperties(options);
|
||
removeUndefinedProperties(options.headers);
|
||
const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten
|
||
|
||
if (defaults && defaults.mediaType.previews.length) {
|
||
mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);
|
||
}
|
||
|
||
mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, ""));
|
||
return mergedOptions;
|
||
}
|
||
|
||
function addQueryParameters(url, parameters) {
|
||
const separator = /\?/.test(url) ? "&" : "?";
|
||
const names = Object.keys(parameters);
|
||
|
||
if (names.length === 0) {
|
||
return url;
|
||
}
|
||
|
||
return url + separator + names.map(name => {
|
||
if (name === "q") {
|
||
return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
|
||
}
|
||
|
||
return `${name}=${encodeURIComponent(parameters[name])}`;
|
||
}).join("&");
|
||
}
|
||
|
||
const urlVariableRegex = /\{[^}]+\}/g;
|
||
|
||
function removeNonChars(variableName) {
|
||
return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
|
||
}
|
||
|
||
function extractUrlVariableNames(url) {
|
||
const matches = url.match(urlVariableRegex);
|
||
|
||
if (!matches) {
|
||
return [];
|
||
}
|
||
|
||
return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
|
||
}
|
||
|
||
function omit(object, keysToOmit) {
|
||
return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => {
|
||
obj[key] = object[key];
|
||
return obj;
|
||
}, {});
|
||
}
|
||
|
||
// Based on https://github.com/bramstein/url-template, licensed under BSD
|
||
// TODO: create separate package.
|
||
//
|
||
// Copyright (c) 2012-2014, Bram Stein
|
||
// All rights reserved.
|
||
// Redistribution and use in source and binary forms, with or without
|
||
// modification, are permitted provided that the following conditions
|
||
// are met:
|
||
// 1. Redistributions of source code must retain the above copyright
|
||
// notice, this list of conditions and the following disclaimer.
|
||
// 2. Redistributions in binary form must reproduce the above copyright
|
||
// notice, this list of conditions and the following disclaimer in the
|
||
// documentation and/or other materials provided with the distribution.
|
||
// 3. The name of the author may not be used to endorse or promote products
|
||
// derived from this software without specific prior written permission.
|
||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
|
||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||
// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
||
/* istanbul ignore file */
|
||
function encodeReserved(str) {
|
||
return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
|
||
if (!/%[0-9A-Fa-f]/.test(part)) {
|
||
part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
|
||
}
|
||
|
||
return part;
|
||
}).join("");
|
||
}
|
||
|
||
function encodeUnreserved(str) {
|
||
return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
|
||
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
||
});
|
||
}
|
||
|
||
function encodeValue(operator, value, key) {
|
||
value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
|
||
|
||
if (key) {
|
||
return encodeUnreserved(key) + "=" + value;
|
||
} else {
|
||
return value;
|
||
}
|
||
}
|
||
|
||
function isDefined(value) {
|
||
return value !== undefined && value !== null;
|
||
}
|
||
|
||
function isKeyOperator(operator) {
|
||
return operator === ";" || operator === "&" || operator === "?";
|
||
}
|
||
|
||
function getValues(context, operator, key, modifier) {
|
||
var value = context[key],
|
||
result = [];
|
||
|
||
if (isDefined(value) && value !== "") {
|
||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||
value = value.toString();
|
||
|
||
if (modifier && modifier !== "*") {
|
||
value = value.substring(0, parseInt(modifier, 10));
|
||
}
|
||
|
||
result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
|
||
} else {
|
||
if (modifier === "*") {
|
||
if (Array.isArray(value)) {
|
||
value.filter(isDefined).forEach(function (value) {
|
||
result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
|
||
});
|
||
} else {
|
||
Object.keys(value).forEach(function (k) {
|
||
if (isDefined(value[k])) {
|
||
result.push(encodeValue(operator, value[k], k));
|
||
}
|
||
});
|
||
}
|
||
} else {
|
||
const tmp = [];
|
||
|
||
if (Array.isArray(value)) {
|
||
value.filter(isDefined).forEach(function (value) {
|
||
tmp.push(encodeValue(operator, value));
|
||
});
|
||
} else {
|
||
Object.keys(value).forEach(function (k) {
|
||
if (isDefined(value[k])) {
|
||
tmp.push(encodeUnreserved(k));
|
||
tmp.push(encodeValue(operator, value[k].toString()));
|
||
}
|
||
});
|
||
}
|
||
|
||
if (isKeyOperator(operator)) {
|
||
result.push(encodeUnreserved(key) + "=" + tmp.join(","));
|
||
} else if (tmp.length !== 0) {
|
||
result.push(tmp.join(","));
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
if (operator === ";") {
|
||
if (isDefined(value)) {
|
||
result.push(encodeUnreserved(key));
|
||
}
|
||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||
result.push(encodeUnreserved(key) + "=");
|
||
} else if (value === "") {
|
||
result.push("");
|
||
}
|
||
}
|
||
|
||
return result;
|
||
}
|
||
|
||
function parseUrl(template) {
|
||
return {
|
||
expand: expand.bind(null, template)
|
||
};
|
||
}
|
||
|
||
function expand(template, context) {
|
||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||
return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) {
|
||
if (expression) {
|
||
let operator = "";
|
||
const values = [];
|
||
|
||
if (operators.indexOf(expression.charAt(0)) !== -1) {
|
||
operator = expression.charAt(0);
|
||
expression = expression.substr(1);
|
||
}
|
||
|
||
expression.split(/,/g).forEach(function (variable) {
|
||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||
values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
|
||
});
|
||
|
||
if (operator && operator !== "+") {
|
||
var separator = ",";
|
||
|
||
if (operator === "?") {
|
||
separator = "&";
|
||
} else if (operator !== "#") {
|
||
separator = operator;
|
||
}
|
||
|
||
return (values.length !== 0 ? operator : "") + values.join(separator);
|
||
} else {
|
||
return values.join(",");
|
||
}
|
||
} else {
|
||
return encodeReserved(literal);
|
||
}
|
||
});
|
||
}
|
||
|
||
function parse(options) {
|
||
// https://fetch.spec.whatwg.org/#methods
|
||
let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible
|
||
|
||
let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
|
||
let headers = Object.assign({}, options.headers);
|
||
let body;
|
||
let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later
|
||
|
||
const urlVariableNames = extractUrlVariableNames(url);
|
||
url = parseUrl(url).expand(parameters);
|
||
|
||
if (!/^http/.test(url)) {
|
||
url = options.baseUrl + url;
|
||
}
|
||
|
||
const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl");
|
||
const remainingParameters = omit(parameters, omittedParameters);
|
||
const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
|
||
|
||
if (!isBinaryRequest) {
|
||
if (options.mediaType.format) {
|
||
// e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw
|
||
headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(",");
|
||
}
|
||
|
||
if (options.mediaType.previews.length) {
|
||
const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
|
||
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => {
|
||
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
|
||
return `application/vnd.github.${preview}-preview${format}`;
|
||
}).join(",");
|
||
}
|
||
} // for GET/HEAD requests, set URL query parameters from remaining parameters
|
||
// for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters
|
||
|
||
|
||
if (["GET", "HEAD"].includes(method)) {
|
||
url = addQueryParameters(url, remainingParameters);
|
||
} else {
|
||
if ("data" in remainingParameters) {
|
||
body = remainingParameters.data;
|
||
} else {
|
||
if (Object.keys(remainingParameters).length) {
|
||
body = remainingParameters;
|
||
} else {
|
||
headers["content-length"] = 0;
|
||
}
|
||
}
|
||
} // default content-type for JSON if body is set
|
||
|
||
|
||
if (!headers["content-type"] && typeof body !== "undefined") {
|
||
headers["content-type"] = "application/json; charset=utf-8";
|
||
} // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.
|
||
// fetch does not allow to set `content-length` header, but we can set body to an empty string
|
||
|
||
|
||
if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
|
||
body = "";
|
||
} // Only return body/request keys if present
|
||
|
||
|
||
return Object.assign({
|
||
method,
|
||
url,
|
||
headers
|
||
}, typeof body !== "undefined" ? {
|
||
body
|
||
} : null, options.request ? {
|
||
request: options.request
|
||
} : null);
|
||
}
|
||
|
||
function endpointWithDefaults(defaults, route, options) {
|
||
return parse(merge(defaults, route, options));
|
||
}
|
||
|
||
function withDefaults(oldDefaults, newDefaults) {
|
||
const DEFAULTS = merge(oldDefaults, newDefaults);
|
||
const endpoint = endpointWithDefaults.bind(null, DEFAULTS);
|
||
return Object.assign(endpoint, {
|
||
DEFAULTS,
|
||
defaults: withDefaults.bind(null, DEFAULTS),
|
||
merge: merge.bind(null, DEFAULTS),
|
||
parse
|
||
});
|
||
}
|
||
|
||
const VERSION = "6.0.12";
|
||
|
||
const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.
|
||
// So we use RequestParameters and add method as additional required property.
|
||
|
||
const DEFAULTS = {
|
||
method: "GET",
|
||
baseUrl: "https://api.github.com",
|
||
headers: {
|
||
accept: "application/vnd.github.v3+json",
|
||
"user-agent": userAgent
|
||
},
|
||
mediaType: {
|
||
format: "",
|
||
previews: []
|
||
}
|
||
};
|
||
|
||
const endpoint = withDefaults(null, DEFAULTS);
|
||
|
||
exports.endpoint = endpoint;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 8467:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
var request = __nccwpck_require__(6234);
|
||
var universalUserAgent = __nccwpck_require__(5030);
|
||
|
||
const VERSION = "4.8.0";
|
||
|
||
function _buildMessageForResponseErrors(data) {
|
||
return `Request failed due to following response errors:\n` + data.errors.map(e => ` - ${e.message}`).join("\n");
|
||
}
|
||
|
||
class GraphqlResponseError extends Error {
|
||
constructor(request, headers, response) {
|
||
super(_buildMessageForResponseErrors(response));
|
||
this.request = request;
|
||
this.headers = headers;
|
||
this.response = response;
|
||
this.name = "GraphqlResponseError"; // Expose the errors and response data in their shorthand properties.
|
||
|
||
this.errors = response.errors;
|
||
this.data = response.data; // Maintains proper stack trace (only available on V8)
|
||
|
||
/* istanbul ignore next */
|
||
|
||
if (Error.captureStackTrace) {
|
||
Error.captureStackTrace(this, this.constructor);
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
|
||
const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
|
||
const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
|
||
function graphql(request, query, options) {
|
||
if (options) {
|
||
if (typeof query === "string" && "query" in options) {
|
||
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
|
||
}
|
||
|
||
for (const key in options) {
|
||
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
|
||
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
|
||
}
|
||
}
|
||
|
||
const parsedOptions = typeof query === "string" ? Object.assign({
|
||
query
|
||
}, options) : query;
|
||
const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {
|
||
if (NON_VARIABLE_OPTIONS.includes(key)) {
|
||
result[key] = parsedOptions[key];
|
||
return result;
|
||
}
|
||
|
||
if (!result.variables) {
|
||
result.variables = {};
|
||
}
|
||
|
||
result.variables[key] = parsedOptions[key];
|
||
return result;
|
||
}, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix
|
||
// https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451
|
||
|
||
const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;
|
||
|
||
if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
|
||
requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
|
||
}
|
||
|
||
return request(requestOptions).then(response => {
|
||
if (response.data.errors) {
|
||
const headers = {};
|
||
|
||
for (const key of Object.keys(response.headers)) {
|
||
headers[key] = response.headers[key];
|
||
}
|
||
|
||
throw new GraphqlResponseError(requestOptions, headers, response.data);
|
||
}
|
||
|
||
return response.data.data;
|
||
});
|
||
}
|
||
|
||
function withDefaults(request$1, newDefaults) {
|
||
const newRequest = request$1.defaults(newDefaults);
|
||
|
||
const newApi = (query, options) => {
|
||
return graphql(newRequest, query, options);
|
||
};
|
||
|
||
return Object.assign(newApi, {
|
||
defaults: withDefaults.bind(null, newRequest),
|
||
endpoint: request.request.endpoint
|
||
});
|
||
}
|
||
|
||
const graphql$1 = withDefaults(request.request, {
|
||
headers: {
|
||
"user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}`
|
||
},
|
||
method: "POST",
|
||
url: "/graphql"
|
||
});
|
||
function withCustomRequest(customRequest) {
|
||
return withDefaults(customRequest, {
|
||
method: "POST",
|
||
url: "/graphql"
|
||
});
|
||
}
|
||
|
||
exports.GraphqlResponseError = GraphqlResponseError;
|
||
exports.graphql = graphql$1;
|
||
exports.withCustomRequest = withCustomRequest;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4193:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
const VERSION = "2.17.0";
|
||
|
||
function ownKeys(object, enumerableOnly) {
|
||
var keys = Object.keys(object);
|
||
|
||
if (Object.getOwnPropertySymbols) {
|
||
var symbols = Object.getOwnPropertySymbols(object);
|
||
|
||
if (enumerableOnly) {
|
||
symbols = symbols.filter(function (sym) {
|
||
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
||
});
|
||
}
|
||
|
||
keys.push.apply(keys, symbols);
|
||
}
|
||
|
||
return keys;
|
||
}
|
||
|
||
function _objectSpread2(target) {
|
||
for (var i = 1; i < arguments.length; i++) {
|
||
var source = arguments[i] != null ? arguments[i] : {};
|
||
|
||
if (i % 2) {
|
||
ownKeys(Object(source), true).forEach(function (key) {
|
||
_defineProperty(target, key, source[key]);
|
||
});
|
||
} else if (Object.getOwnPropertyDescriptors) {
|
||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||
} else {
|
||
ownKeys(Object(source)).forEach(function (key) {
|
||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||
});
|
||
}
|
||
}
|
||
|
||
return target;
|
||
}
|
||
|
||
function _defineProperty(obj, key, value) {
|
||
if (key in obj) {
|
||
Object.defineProperty(obj, key, {
|
||
value: value,
|
||
enumerable: true,
|
||
configurable: true,
|
||
writable: true
|
||
});
|
||
} else {
|
||
obj[key] = value;
|
||
}
|
||
|
||
return obj;
|
||
}
|
||
|
||
/**
|
||
* Some “list” response that can be paginated have a different response structure
|
||
*
|
||
* They have a `total_count` key in the response (search also has `incomplete_results`,
|
||
* /installation/repositories also has `repository_selection`), as well as a key with
|
||
* the list of the items which name varies from endpoint to endpoint.
|
||
*
|
||
* Octokit normalizes these responses so that paginated results are always returned following
|
||
* the same structure. One challenge is that if the list response has only one page, no Link
|
||
* header is provided, so this header alone is not sufficient to check wether a response is
|
||
* paginated or not.
|
||
*
|
||
* We check if a "total_count" key is present in the response data, but also make sure that
|
||
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
|
||
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||
*/
|
||
function normalizePaginatedListResponse(response) {
|
||
// endpoints can respond with 204 if repository is empty
|
||
if (!response.data) {
|
||
return _objectSpread2(_objectSpread2({}, response), {}, {
|
||
data: []
|
||
});
|
||
}
|
||
|
||
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
||
if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way
|
||
// to retrieve the same information.
|
||
|
||
const incompleteResults = response.data.incomplete_results;
|
||
const repositorySelection = response.data.repository_selection;
|
||
const totalCount = response.data.total_count;
|
||
delete response.data.incomplete_results;
|
||
delete response.data.repository_selection;
|
||
delete response.data.total_count;
|
||
const namespaceKey = Object.keys(response.data)[0];
|
||
const data = response.data[namespaceKey];
|
||
response.data = data;
|
||
|
||
if (typeof incompleteResults !== "undefined") {
|
||
response.data.incomplete_results = incompleteResults;
|
||
}
|
||
|
||
if (typeof repositorySelection !== "undefined") {
|
||
response.data.repository_selection = repositorySelection;
|
||
}
|
||
|
||
response.data.total_count = totalCount;
|
||
return response;
|
||
}
|
||
|
||
function iterator(octokit, route, parameters) {
|
||
const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);
|
||
const requestMethod = typeof route === "function" ? route : octokit.request;
|
||
const method = options.method;
|
||
const headers = options.headers;
|
||
let url = options.url;
|
||
return {
|
||
[Symbol.asyncIterator]: () => ({
|
||
async next() {
|
||
if (!url) return {
|
||
done: true
|
||
};
|
||
|
||
try {
|
||
const response = await requestMethod({
|
||
method,
|
||
url,
|
||
headers
|
||
});
|
||
const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format:
|
||
// '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
|
||
// sets `url` to undefined if "next" URL is not present or `link` header is not set
|
||
|
||
url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
|
||
return {
|
||
value: normalizedResponse
|
||
};
|
||
} catch (error) {
|
||
if (error.status !== 409) throw error;
|
||
url = "";
|
||
return {
|
||
value: {
|
||
status: 200,
|
||
headers: {},
|
||
data: []
|
||
}
|
||
};
|
||
}
|
||
}
|
||
|
||
})
|
||
};
|
||
}
|
||
|
||
function paginate(octokit, route, parameters, mapFn) {
|
||
if (typeof parameters === "function") {
|
||
mapFn = parameters;
|
||
parameters = undefined;
|
||
}
|
||
|
||
return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
|
||
}
|
||
|
||
function gather(octokit, results, iterator, mapFn) {
|
||
return iterator.next().then(result => {
|
||
if (result.done) {
|
||
return results;
|
||
}
|
||
|
||
let earlyExit = false;
|
||
|
||
function done() {
|
||
earlyExit = true;
|
||
}
|
||
|
||
results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);
|
||
|
||
if (earlyExit) {
|
||
return results;
|
||
}
|
||
|
||
return gather(octokit, results, iterator, mapFn);
|
||
});
|
||
}
|
||
|
||
const composePaginateRest = Object.assign(paginate, {
|
||
iterator
|
||
});
|
||
|
||
const paginatingEndpoints = ["GET /app/hook/deliveries", "GET /app/installations", "GET /applications/grants", "GET /authorizations", "GET /enterprises/{enterprise}/actions/permissions/organizations", "GET /enterprises/{enterprise}/actions/runner-groups", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "GET /enterprises/{enterprise}/actions/runners", "GET /enterprises/{enterprise}/actions/runners/downloads", "GET /events", "GET /gists", "GET /gists/public", "GET /gists/starred", "GET /gists/{gist_id}/comments", "GET /gists/{gist_id}/commits", "GET /gists/{gist_id}/forks", "GET /installation/repositories", "GET /issues", "GET /marketplace_listing/plans", "GET /marketplace_listing/plans/{plan_id}/accounts", "GET /marketplace_listing/stubbed/plans", "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", "GET /networks/{owner}/{repo}/events", "GET /notifications", "GET /organizations", "GET /orgs/{org}/actions/permissions/repositories", "GET /orgs/{org}/actions/runner-groups", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "GET /orgs/{org}/actions/runners", "GET /orgs/{org}/actions/runners/downloads", "GET /orgs/{org}/actions/secrets", "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", "GET /orgs/{org}/blocks", "GET /orgs/{org}/credential-authorizations", "GET /orgs/{org}/events", "GET /orgs/{org}/failed_invitations", "GET /orgs/{org}/hooks", "GET /orgs/{org}/hooks/{hook_id}/deliveries", "GET /orgs/{org}/installations", "GET /orgs/{org}/invitations", "GET /orgs/{org}/invitations/{invitation_id}/teams", "GET /orgs/{org}/issues", "GET /orgs/{org}/members", "GET /orgs/{org}/migrations", "GET /orgs/{org}/migrations/{migration_id}/repositories", "GET /orgs/{org}/outside_collaborators", "GET /orgs/{org}/packages", "GET /orgs/{org}/projects", "GET /orgs/{org}/public_members", "GET /orgs/{org}/repos", "GET /orgs/{org}/secret-scanning/alerts", "GET /orgs/{org}/team-sync/groups", "GET /orgs/{org}/teams", "GET /orgs/{org}/teams/{team_slug}/discussions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/invitations", "GET /orgs/{org}/teams/{team_slug}/members", "GET /orgs/{org}/teams/{team_slug}/projects", "GET /orgs/{org}/teams/{team_slug}/repos", "GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings", "GET /orgs/{org}/teams/{team_slug}/teams", "GET /projects/columns/{column_id}/cards", "GET /projects/{project_id}/collaborators", "GET /projects/{project_id}/columns", "GET /repos/{owner}/{repo}/actions/artifacts", "GET /repos/{owner}/{repo}/actions/runners", "GET /repos/{owner}/{repo}/actions/runners/downloads", "GET /repos/{owner}/{repo}/actions/runs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "GET /repos/{owner}/{repo}/actions/secrets", "GET /repos/{owner}/{repo}/actions/workflows", "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "GET /repos/{owner}/{repo}/assignees", "GET /repos/{owner}/{repo}/autolinks", "GET /repos/{owner}/{repo}/branches", "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "GET /repos/{owner}/{repo}/code-scanning/alerts", "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "GET /repos/{owner}/{repo}/code-scanning/analyses", "GET /repos/{owner}/{repo}/collaborators", "GET /repos/{owner}/{repo}/comments", "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/commits", "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", "GET /repos/{owner}/{repo}/commits/{ref}/statuses", "GET /repos/{owner}/{repo}/contributors", "GET /repos/{owner}/{repo}/deployments", "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "GET /repos/{owner}/{repo}/events", "GET /repos/{owner}/{repo}/forks", "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", "GET /repos/{owner}/{repo}/hooks", "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "GET /repos/{owner}/{repo}/invitations", "GET /repos/{owner}/{repo}/issues", "GET /repos/{owner}/{repo}/issues/comments", "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/issues/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", "GET /repos/{owner}/{repo}/issues/{issue_number}/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", "GET /repos/{owner}/{repo}/keys", "GET /repos/{owner}/{repo}/labels", "GET /repos/{owner}/{repo}/milestones", "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", "GET /repos/{owner}/{repo}/notifications", "GET /repos/{owner}/{repo}/pages/builds", "GET /repos/{owner}/{repo}/projects", "GET /repos/{owner}/{repo}/pulls", "GET /repos/{owner}/{repo}/pulls/comments", "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "GET /repos/{owner}/{repo}/releases", "GET /repos/{owner}/{repo}/releases/{release_id}/assets", "GET /repos/{owner}/{repo}/secret-scanning/alerts", "GET /repos/{owner}/{repo}/stargazers", "GET /repos/{owner}/{repo}/subscribers", "GET /repos/{owner}/{repo}/tags", "GET /repos/{owner}/{repo}/teams", "GET /repositories", "GET /repositories/{repository_id}/environments/{environment_name}/secrets", "GET /scim/v2/enterprises/{enterprise}/Groups", "GET /scim/v2/enterprises/{enterprise}/Users", "GET /scim/v2/organizations/{org}/Users", "GET /search/code", "GET /search/commits", "GET /search/issues", "GET /search/labels", "GET /search/repositories", "GET /search/topics", "GET /search/users", "GET /teams/{team_id}/discussions", "GET /teams/{team_id}/discussions/{discussion_number}/comments", "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /teams/{team_id}/discussions/{discussion_number}/reactions", "GET /teams/{team_id}/invitations", "GET /teams/{team_id}/members", "GET /teams/{team_id}/projects", "GET /teams/{team_id}/repos", "GET /teams/{team_id}/team-sync/group-mappings", "GET /teams/{team_id}/teams", "GET /user/blocks", "GET /user/emails", "GET /user/followers", "GET /user/following", "GET /user/gpg_keys", "GET /user/installations", "GET /user/installations/{installation_id}/repositories", "GET /user/issues", "GET /user/keys", "GET /user/marketplace_purchases", "GET /user/marketplace_purchases/stubbed", "GET /user/memberships/orgs", "GET /user/migrations", "GET /user/migrations/{migration_id}/repositories", "GET /user/orgs", "GET /user/packages", "GET /user/public_emails", "GET /user/repos", "GET /user/repository_invitations", "GET /user/starred", "GET /user/subscriptions", "GET /user/teams", "GET /users", "GET /users/{username}/events", "GET /users/{username}/events/orgs/{org}", "GET /users/{username}/events/public", "GET /users/{username}/followers", "GET /users/{username}/following", "GET /users/{username}/gists", "GET /users/{username}/gpg_keys", "GET /users/{username}/keys", "GET /users/{username}/orgs", "GET /users/{username}/packages", "GET /users/{username}/projects", "GET /users/{username}/received_events", "GET /users/{username}/received_events/public", "GET /users/{username}/repos", "GET /users/{username}/starred", "GET /users/{username}/subscriptions"];
|
||
|
||
function isPaginatingEndpoint(arg) {
|
||
if (typeof arg === "string") {
|
||
return paginatingEndpoints.includes(arg);
|
||
} else {
|
||
return false;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @param octokit Octokit instance
|
||
* @param options Options passed to Octokit constructor
|
||
*/
|
||
|
||
function paginateRest(octokit) {
|
||
return {
|
||
paginate: Object.assign(paginate.bind(null, octokit), {
|
||
iterator: iterator.bind(null, octokit)
|
||
})
|
||
};
|
||
}
|
||
paginateRest.VERSION = VERSION;
|
||
|
||
exports.composePaginateRest = composePaginateRest;
|
||
exports.isPaginatingEndpoint = isPaginatingEndpoint;
|
||
exports.paginateRest = paginateRest;
|
||
exports.paginatingEndpoints = paginatingEndpoints;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3044:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
function ownKeys(object, enumerableOnly) {
|
||
var keys = Object.keys(object);
|
||
|
||
if (Object.getOwnPropertySymbols) {
|
||
var symbols = Object.getOwnPropertySymbols(object);
|
||
|
||
if (enumerableOnly) {
|
||
symbols = symbols.filter(function (sym) {
|
||
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
||
});
|
||
}
|
||
|
||
keys.push.apply(keys, symbols);
|
||
}
|
||
|
||
return keys;
|
||
}
|
||
|
||
function _objectSpread2(target) {
|
||
for (var i = 1; i < arguments.length; i++) {
|
||
var source = arguments[i] != null ? arguments[i] : {};
|
||
|
||
if (i % 2) {
|
||
ownKeys(Object(source), true).forEach(function (key) {
|
||
_defineProperty(target, key, source[key]);
|
||
});
|
||
} else if (Object.getOwnPropertyDescriptors) {
|
||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||
} else {
|
||
ownKeys(Object(source)).forEach(function (key) {
|
||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||
});
|
||
}
|
||
}
|
||
|
||
return target;
|
||
}
|
||
|
||
function _defineProperty(obj, key, value) {
|
||
if (key in obj) {
|
||
Object.defineProperty(obj, key, {
|
||
value: value,
|
||
enumerable: true,
|
||
configurable: true,
|
||
writable: true
|
||
});
|
||
} else {
|
||
obj[key] = value;
|
||
}
|
||
|
||
return obj;
|
||
}
|
||
|
||
const Endpoints = {
|
||
actions: {
|
||
addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],
|
||
approveWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],
|
||
cancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],
|
||
createOrUpdateEnvironmentSecret: ["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],
|
||
createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"],
|
||
createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],
|
||
createRegistrationTokenForOrg: ["POST /orgs/{org}/actions/runners/registration-token"],
|
||
createRegistrationTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/registration-token"],
|
||
createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"],
|
||
createRemoveTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/remove-token"],
|
||
createWorkflowDispatch: ["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],
|
||
deleteArtifact: ["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
|
||
deleteEnvironmentSecret: ["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],
|
||
deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"],
|
||
deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],
|
||
deleteSelfHostedRunnerFromOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}"],
|
||
deleteSelfHostedRunnerFromRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],
|
||
deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],
|
||
deleteWorkflowRunLogs: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],
|
||
disableSelectedRepositoryGithubActionsOrganization: ["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],
|
||
disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],
|
||
downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],
|
||
downloadJobLogsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],
|
||
downloadWorkflowRunAttemptLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"],
|
||
downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],
|
||
enableSelectedRepositoryGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],
|
||
enableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],
|
||
getAllowedActionsOrganization: ["GET /orgs/{org}/actions/permissions/selected-actions"],
|
||
getAllowedActionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],
|
||
getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
|
||
getEnvironmentPublicKey: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"],
|
||
getEnvironmentSecret: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],
|
||
getGithubActionsPermissionsOrganization: ["GET /orgs/{org}/actions/permissions"],
|
||
getGithubActionsPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions"],
|
||
getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],
|
||
getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"],
|
||
getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"],
|
||
getPendingDeploymentsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],
|
||
getRepoPermissions: ["GET /repos/{owner}/{repo}/actions/permissions", {}, {
|
||
renamed: ["actions", "getGithubActionsPermissionsRepository"]
|
||
}],
|
||
getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"],
|
||
getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],
|
||
getReviewsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"],
|
||
getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"],
|
||
getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],
|
||
getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],
|
||
getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],
|
||
getWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"],
|
||
getWorkflowRunUsage: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],
|
||
getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],
|
||
listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"],
|
||
listEnvironmentSecrets: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets"],
|
||
listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],
|
||
listJobsForWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"],
|
||
listOrgSecrets: ["GET /orgs/{org}/actions/secrets"],
|
||
listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"],
|
||
listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"],
|
||
listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"],
|
||
listRunnerApplicationsForRepo: ["GET /repos/{owner}/{repo}/actions/runners/downloads"],
|
||
listSelectedReposForOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],
|
||
listSelectedRepositoriesEnabledGithubActionsOrganization: ["GET /orgs/{org}/actions/permissions/repositories"],
|
||
listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"],
|
||
listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"],
|
||
listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],
|
||
listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],
|
||
listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"],
|
||
removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],
|
||
reviewPendingDeploymentsForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],
|
||
setAllowedActionsOrganization: ["PUT /orgs/{org}/actions/permissions/selected-actions"],
|
||
setAllowedActionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],
|
||
setGithubActionsPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions"],
|
||
setGithubActionsPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions"],
|
||
setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],
|
||
setSelectedRepositoriesEnabledGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories"]
|
||
},
|
||
activity: {
|
||
checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"],
|
||
deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"],
|
||
deleteThreadSubscription: ["DELETE /notifications/threads/{thread_id}/subscription"],
|
||
getFeeds: ["GET /feeds"],
|
||
getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"],
|
||
getThread: ["GET /notifications/threads/{thread_id}"],
|
||
getThreadSubscriptionForAuthenticatedUser: ["GET /notifications/threads/{thread_id}/subscription"],
|
||
listEventsForAuthenticatedUser: ["GET /users/{username}/events"],
|
||
listNotificationsForAuthenticatedUser: ["GET /notifications"],
|
||
listOrgEventsForAuthenticatedUser: ["GET /users/{username}/events/orgs/{org}"],
|
||
listPublicEvents: ["GET /events"],
|
||
listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"],
|
||
listPublicEventsForUser: ["GET /users/{username}/events/public"],
|
||
listPublicOrgEvents: ["GET /orgs/{org}/events"],
|
||
listReceivedEventsForUser: ["GET /users/{username}/received_events"],
|
||
listReceivedPublicEventsForUser: ["GET /users/{username}/received_events/public"],
|
||
listRepoEvents: ["GET /repos/{owner}/{repo}/events"],
|
||
listRepoNotificationsForAuthenticatedUser: ["GET /repos/{owner}/{repo}/notifications"],
|
||
listReposStarredByAuthenticatedUser: ["GET /user/starred"],
|
||
listReposStarredByUser: ["GET /users/{username}/starred"],
|
||
listReposWatchedByUser: ["GET /users/{username}/subscriptions"],
|
||
listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"],
|
||
listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"],
|
||
listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"],
|
||
markNotificationsAsRead: ["PUT /notifications"],
|
||
markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"],
|
||
markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"],
|
||
setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"],
|
||
setThreadSubscription: ["PUT /notifications/threads/{thread_id}/subscription"],
|
||
starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"],
|
||
unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"]
|
||
},
|
||
apps: {
|
||
addRepoToInstallation: ["PUT /user/installations/{installation_id}/repositories/{repository_id}", {}, {
|
||
renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"]
|
||
}],
|
||
addRepoToInstallationForAuthenticatedUser: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"],
|
||
checkToken: ["POST /applications/{client_id}/token"],
|
||
createContentAttachment: ["POST /content_references/{content_reference_id}/attachments", {
|
||
mediaType: {
|
||
previews: ["corsair"]
|
||
}
|
||
}],
|
||
createContentAttachmentForRepo: ["POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments", {
|
||
mediaType: {
|
||
previews: ["corsair"]
|
||
}
|
||
}],
|
||
createFromManifest: ["POST /app-manifests/{code}/conversions"],
|
||
createInstallationAccessToken: ["POST /app/installations/{installation_id}/access_tokens"],
|
||
deleteAuthorization: ["DELETE /applications/{client_id}/grant"],
|
||
deleteInstallation: ["DELETE /app/installations/{installation_id}"],
|
||
deleteToken: ["DELETE /applications/{client_id}/token"],
|
||
getAuthenticated: ["GET /app"],
|
||
getBySlug: ["GET /apps/{app_slug}"],
|
||
getInstallation: ["GET /app/installations/{installation_id}"],
|
||
getOrgInstallation: ["GET /orgs/{org}/installation"],
|
||
getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"],
|
||
getSubscriptionPlanForAccount: ["GET /marketplace_listing/accounts/{account_id}"],
|
||
getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"],
|
||
getUserInstallation: ["GET /users/{username}/installation"],
|
||
getWebhookConfigForApp: ["GET /app/hook/config"],
|
||
getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"],
|
||
listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"],
|
||
listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],
|
||
listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories"],
|
||
listInstallations: ["GET /app/installations"],
|
||
listInstallationsForAuthenticatedUser: ["GET /user/installations"],
|
||
listPlans: ["GET /marketplace_listing/plans"],
|
||
listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"],
|
||
listReposAccessibleToInstallation: ["GET /installation/repositories"],
|
||
listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"],
|
||
listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"],
|
||
listWebhookDeliveries: ["GET /app/hook/deliveries"],
|
||
redeliverWebhookDelivery: ["POST /app/hook/deliveries/{delivery_id}/attempts"],
|
||
removeRepoFromInstallation: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}", {}, {
|
||
renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"]
|
||
}],
|
||
removeRepoFromInstallationForAuthenticatedUser: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],
|
||
resetToken: ["PATCH /applications/{client_id}/token"],
|
||
revokeInstallationAccessToken: ["DELETE /installation/token"],
|
||
scopeToken: ["POST /applications/{client_id}/token/scoped"],
|
||
suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"],
|
||
unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"],
|
||
updateWebhookConfigForApp: ["PATCH /app/hook/config"]
|
||
},
|
||
billing: {
|
||
getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"],
|
||
getGithubActionsBillingUser: ["GET /users/{username}/settings/billing/actions"],
|
||
getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"],
|
||
getGithubPackagesBillingUser: ["GET /users/{username}/settings/billing/packages"],
|
||
getSharedStorageBillingOrg: ["GET /orgs/{org}/settings/billing/shared-storage"],
|
||
getSharedStorageBillingUser: ["GET /users/{username}/settings/billing/shared-storage"]
|
||
},
|
||
checks: {
|
||
create: ["POST /repos/{owner}/{repo}/check-runs"],
|
||
createSuite: ["POST /repos/{owner}/{repo}/check-suites"],
|
||
get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],
|
||
getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],
|
||
listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],
|
||
listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],
|
||
listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],
|
||
listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],
|
||
rerequestRun: ["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"],
|
||
rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],
|
||
setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"],
|
||
update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]
|
||
},
|
||
codeScanning: {
|
||
deleteAnalysis: ["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],
|
||
getAlert: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", {}, {
|
||
renamedParameters: {
|
||
alert_id: "alert_number"
|
||
}
|
||
}],
|
||
getAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],
|
||
getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],
|
||
listAlertInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],
|
||
listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"],
|
||
listAlertsInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", {}, {
|
||
renamed: ["codeScanning", "listAlertInstances"]
|
||
}],
|
||
listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"],
|
||
updateAlert: ["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],
|
||
uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"]
|
||
},
|
||
codesOfConduct: {
|
||
getAllCodesOfConduct: ["GET /codes_of_conduct"],
|
||
getConductCode: ["GET /codes_of_conduct/{key}"]
|
||
},
|
||
emojis: {
|
||
get: ["GET /emojis"]
|
||
},
|
||
enterpriseAdmin: {
|
||
disableSelectedOrganizationGithubActionsEnterprise: ["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],
|
||
enableSelectedOrganizationGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],
|
||
getAllowedActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/selected-actions"],
|
||
getGithubActionsPermissionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions"],
|
||
listSelectedOrganizationsEnabledGithubActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/organizations"],
|
||
setAllowedActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"],
|
||
setGithubActionsPermissionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions"],
|
||
setSelectedOrganizationsEnabledGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations"]
|
||
},
|
||
gists: {
|
||
checkIsStarred: ["GET /gists/{gist_id}/star"],
|
||
create: ["POST /gists"],
|
||
createComment: ["POST /gists/{gist_id}/comments"],
|
||
delete: ["DELETE /gists/{gist_id}"],
|
||
deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"],
|
||
fork: ["POST /gists/{gist_id}/forks"],
|
||
get: ["GET /gists/{gist_id}"],
|
||
getComment: ["GET /gists/{gist_id}/comments/{comment_id}"],
|
||
getRevision: ["GET /gists/{gist_id}/{sha}"],
|
||
list: ["GET /gists"],
|
||
listComments: ["GET /gists/{gist_id}/comments"],
|
||
listCommits: ["GET /gists/{gist_id}/commits"],
|
||
listForUser: ["GET /users/{username}/gists"],
|
||
listForks: ["GET /gists/{gist_id}/forks"],
|
||
listPublic: ["GET /gists/public"],
|
||
listStarred: ["GET /gists/starred"],
|
||
star: ["PUT /gists/{gist_id}/star"],
|
||
unstar: ["DELETE /gists/{gist_id}/star"],
|
||
update: ["PATCH /gists/{gist_id}"],
|
||
updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"]
|
||
},
|
||
git: {
|
||
createBlob: ["POST /repos/{owner}/{repo}/git/blobs"],
|
||
createCommit: ["POST /repos/{owner}/{repo}/git/commits"],
|
||
createRef: ["POST /repos/{owner}/{repo}/git/refs"],
|
||
createTag: ["POST /repos/{owner}/{repo}/git/tags"],
|
||
createTree: ["POST /repos/{owner}/{repo}/git/trees"],
|
||
deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],
|
||
getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],
|
||
getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],
|
||
getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"],
|
||
getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],
|
||
getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],
|
||
listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],
|
||
updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]
|
||
},
|
||
gitignore: {
|
||
getAllTemplates: ["GET /gitignore/templates"],
|
||
getTemplate: ["GET /gitignore/templates/{name}"]
|
||
},
|
||
interactions: {
|
||
getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"],
|
||
getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"],
|
||
getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"],
|
||
getRestrictionsForYourPublicRepos: ["GET /user/interaction-limits", {}, {
|
||
renamed: ["interactions", "getRestrictionsForAuthenticatedUser"]
|
||
}],
|
||
removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"],
|
||
removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"],
|
||
removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits"],
|
||
removeRestrictionsForYourPublicRepos: ["DELETE /user/interaction-limits", {}, {
|
||
renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"]
|
||
}],
|
||
setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"],
|
||
setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"],
|
||
setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"],
|
||
setRestrictionsForYourPublicRepos: ["PUT /user/interaction-limits", {}, {
|
||
renamed: ["interactions", "setRestrictionsForAuthenticatedUser"]
|
||
}]
|
||
},
|
||
issues: {
|
||
addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],
|
||
addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
||
checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"],
|
||
create: ["POST /repos/{owner}/{repo}/issues"],
|
||
createComment: ["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
||
createLabel: ["POST /repos/{owner}/{repo}/labels"],
|
||
createMilestone: ["POST /repos/{owner}/{repo}/milestones"],
|
||
deleteComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],
|
||
deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"],
|
||
deleteMilestone: ["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
||
get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"],
|
||
getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],
|
||
getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"],
|
||
getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"],
|
||
getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
||
list: ["GET /issues"],
|
||
listAssignees: ["GET /repos/{owner}/{repo}/assignees"],
|
||
listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
||
listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"],
|
||
listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],
|
||
listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"],
|
||
listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"],
|
||
listForAuthenticatedUser: ["GET /user/issues"],
|
||
listForOrg: ["GET /orgs/{org}/issues"],
|
||
listForRepo: ["GET /repos/{owner}/{repo}/issues"],
|
||
listLabelsForMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],
|
||
listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"],
|
||
listLabelsOnIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
||
listMilestones: ["GET /repos/{owner}/{repo}/milestones"],
|
||
lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],
|
||
removeAllLabels: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
||
removeAssignees: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],
|
||
removeLabel: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],
|
||
setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
||
unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],
|
||
update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],
|
||
updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],
|
||
updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"],
|
||
updateMilestone: ["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]
|
||
},
|
||
licenses: {
|
||
get: ["GET /licenses/{license}"],
|
||
getAllCommonlyUsed: ["GET /licenses"],
|
||
getForRepo: ["GET /repos/{owner}/{repo}/license"]
|
||
},
|
||
markdown: {
|
||
render: ["POST /markdown"],
|
||
renderRaw: ["POST /markdown/raw", {
|
||
headers: {
|
||
"content-type": "text/plain; charset=utf-8"
|
||
}
|
||
}]
|
||
},
|
||
meta: {
|
||
get: ["GET /meta"],
|
||
getOctocat: ["GET /octocat"],
|
||
getZen: ["GET /zen"],
|
||
root: ["GET /"]
|
||
},
|
||
migrations: {
|
||
cancelImport: ["DELETE /repos/{owner}/{repo}/import"],
|
||
deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive"],
|
||
deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive"],
|
||
downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive"],
|
||
getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive"],
|
||
getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"],
|
||
getImportStatus: ["GET /repos/{owner}/{repo}/import"],
|
||
getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"],
|
||
getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"],
|
||
getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"],
|
||
listForAuthenticatedUser: ["GET /user/migrations"],
|
||
listForOrg: ["GET /orgs/{org}/migrations"],
|
||
listReposForAuthenticatedUser: ["GET /user/migrations/{migration_id}/repositories"],
|
||
listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"],
|
||
listReposForUser: ["GET /user/migrations/{migration_id}/repositories", {}, {
|
||
renamed: ["migrations", "listReposForAuthenticatedUser"]
|
||
}],
|
||
mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"],
|
||
setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"],
|
||
startForAuthenticatedUser: ["POST /user/migrations"],
|
||
startForOrg: ["POST /orgs/{org}/migrations"],
|
||
startImport: ["PUT /repos/{owner}/{repo}/import"],
|
||
unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"],
|
||
unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"],
|
||
updateImport: ["PATCH /repos/{owner}/{repo}/import"]
|
||
},
|
||
orgs: {
|
||
blockUser: ["PUT /orgs/{org}/blocks/{username}"],
|
||
cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"],
|
||
checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"],
|
||
checkMembershipForUser: ["GET /orgs/{org}/members/{username}"],
|
||
checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"],
|
||
convertMemberToOutsideCollaborator: ["PUT /orgs/{org}/outside_collaborators/{username}"],
|
||
createInvitation: ["POST /orgs/{org}/invitations"],
|
||
createWebhook: ["POST /orgs/{org}/hooks"],
|
||
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
|
||
get: ["GET /orgs/{org}"],
|
||
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
|
||
getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
|
||
getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"],
|
||
getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"],
|
||
getWebhookDelivery: ["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"],
|
||
list: ["GET /organizations"],
|
||
listAppInstallations: ["GET /orgs/{org}/installations"],
|
||
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
||
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
|
||
listForAuthenticatedUser: ["GET /user/orgs"],
|
||
listForUser: ["GET /users/{username}/orgs"],
|
||
listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"],
|
||
listMembers: ["GET /orgs/{org}/members"],
|
||
listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"],
|
||
listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"],
|
||
listPendingInvitations: ["GET /orgs/{org}/invitations"],
|
||
listPublicMembers: ["GET /orgs/{org}/public_members"],
|
||
listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"],
|
||
listWebhooks: ["GET /orgs/{org}/hooks"],
|
||
pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"],
|
||
redeliverWebhookDelivery: ["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],
|
||
removeMember: ["DELETE /orgs/{org}/members/{username}"],
|
||
removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"],
|
||
removeOutsideCollaborator: ["DELETE /orgs/{org}/outside_collaborators/{username}"],
|
||
removePublicMembershipForAuthenticatedUser: ["DELETE /orgs/{org}/public_members/{username}"],
|
||
setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"],
|
||
setPublicMembershipForAuthenticatedUser: ["PUT /orgs/{org}/public_members/{username}"],
|
||
unblockUser: ["DELETE /orgs/{org}/blocks/{username}"],
|
||
update: ["PATCH /orgs/{org}"],
|
||
updateMembershipForAuthenticatedUser: ["PATCH /user/memberships/orgs/{org}"],
|
||
updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"],
|
||
updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"]
|
||
},
|
||
packages: {
|
||
deletePackageForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}"],
|
||
deletePackageForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],
|
||
deletePackageForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}"],
|
||
deletePackageVersionForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||
deletePackageVersionForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||
deletePackageVersionForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||
getAllPackageVersionsForAPackageOwnedByAnOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions", {}, {
|
||
renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"]
|
||
}],
|
||
getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions", {}, {
|
||
renamed: ["packages", "getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]
|
||
}],
|
||
getAllPackageVersionsForPackageOwnedByAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions"],
|
||
getAllPackageVersionsForPackageOwnedByOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],
|
||
getAllPackageVersionsForPackageOwnedByUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions"],
|
||
getPackageForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}"],
|
||
getPackageForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}"],
|
||
getPackageForUser: ["GET /users/{username}/packages/{package_type}/{package_name}"],
|
||
getPackageVersionForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||
getPackageVersionForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||
getPackageVersionForUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||
listPackagesForAuthenticatedUser: ["GET /user/packages"],
|
||
listPackagesForOrganization: ["GET /orgs/{org}/packages"],
|
||
listPackagesForUser: ["GET /users/{username}/packages"],
|
||
restorePackageForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/restore{?token}"],
|
||
restorePackageForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"],
|
||
restorePackageForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"],
|
||
restorePackageVersionForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],
|
||
restorePackageVersionForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],
|
||
restorePackageVersionForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]
|
||
},
|
||
projects: {
|
||
addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"],
|
||
createCard: ["POST /projects/columns/{column_id}/cards"],
|
||
createColumn: ["POST /projects/{project_id}/columns"],
|
||
createForAuthenticatedUser: ["POST /user/projects"],
|
||
createForOrg: ["POST /orgs/{org}/projects"],
|
||
createForRepo: ["POST /repos/{owner}/{repo}/projects"],
|
||
delete: ["DELETE /projects/{project_id}"],
|
||
deleteCard: ["DELETE /projects/columns/cards/{card_id}"],
|
||
deleteColumn: ["DELETE /projects/columns/{column_id}"],
|
||
get: ["GET /projects/{project_id}"],
|
||
getCard: ["GET /projects/columns/cards/{card_id}"],
|
||
getColumn: ["GET /projects/columns/{column_id}"],
|
||
getPermissionForUser: ["GET /projects/{project_id}/collaborators/{username}/permission"],
|
||
listCards: ["GET /projects/columns/{column_id}/cards"],
|
||
listCollaborators: ["GET /projects/{project_id}/collaborators"],
|
||
listColumns: ["GET /projects/{project_id}/columns"],
|
||
listForOrg: ["GET /orgs/{org}/projects"],
|
||
listForRepo: ["GET /repos/{owner}/{repo}/projects"],
|
||
listForUser: ["GET /users/{username}/projects"],
|
||
moveCard: ["POST /projects/columns/cards/{card_id}/moves"],
|
||
moveColumn: ["POST /projects/columns/{column_id}/moves"],
|
||
removeCollaborator: ["DELETE /projects/{project_id}/collaborators/{username}"],
|
||
update: ["PATCH /projects/{project_id}"],
|
||
updateCard: ["PATCH /projects/columns/cards/{card_id}"],
|
||
updateColumn: ["PATCH /projects/columns/{column_id}"]
|
||
},
|
||
pulls: {
|
||
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
||
create: ["POST /repos/{owner}/{repo}/pulls"],
|
||
createReplyForReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],
|
||
createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
|
||
createReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],
|
||
deletePendingReview: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
||
deleteReviewComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],
|
||
dismissReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],
|
||
get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"],
|
||
getReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
||
getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],
|
||
list: ["GET /repos/{owner}/{repo}/pulls"],
|
||
listCommentsForReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],
|
||
listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],
|
||
listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],
|
||
listRequestedReviewers: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
||
listReviewComments: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],
|
||
listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"],
|
||
listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
|
||
merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
||
removeRequestedReviewers: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
||
requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
||
submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],
|
||
update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],
|
||
updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"],
|
||
updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
||
updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]
|
||
},
|
||
rateLimit: {
|
||
get: ["GET /rate_limit"]
|
||
},
|
||
reactions: {
|
||
createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"],
|
||
createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"],
|
||
createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],
|
||
createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],
|
||
createForRelease: ["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"],
|
||
createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],
|
||
createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"],
|
||
deleteForCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"],
|
||
deleteForIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"],
|
||
deleteForIssueComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"],
|
||
deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"],
|
||
deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"],
|
||
deleteForTeamDiscussionComment: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"],
|
||
listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"],
|
||
listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],
|
||
listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],
|
||
listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],
|
||
listForTeamDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],
|
||
listForTeamDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]
|
||
},
|
||
repos: {
|
||
acceptInvitation: ["PATCH /user/repository_invitations/{invitation_id}", {}, {
|
||
renamed: ["repos", "acceptInvitationForAuthenticatedUser"]
|
||
}],
|
||
acceptInvitationForAuthenticatedUser: ["PATCH /user/repository_invitations/{invitation_id}"],
|
||
addAppAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, {
|
||
mapToData: "apps"
|
||
}],
|
||
addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"],
|
||
addStatusCheckContexts: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, {
|
||
mapToData: "contexts"
|
||
}],
|
||
addTeamAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, {
|
||
mapToData: "teams"
|
||
}],
|
||
addUserAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, {
|
||
mapToData: "users"
|
||
}],
|
||
checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"],
|
||
checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts"],
|
||
compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"],
|
||
compareCommitsWithBasehead: ["GET /repos/{owner}/{repo}/compare/{basehead}"],
|
||
createAutolink: ["POST /repos/{owner}/{repo}/autolinks"],
|
||
createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],
|
||
createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],
|
||
createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"],
|
||
createDeployKey: ["POST /repos/{owner}/{repo}/keys"],
|
||
createDeployment: ["POST /repos/{owner}/{repo}/deployments"],
|
||
createDeploymentStatus: ["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],
|
||
createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"],
|
||
createForAuthenticatedUser: ["POST /user/repos"],
|
||
createFork: ["POST /repos/{owner}/{repo}/forks"],
|
||
createInOrg: ["POST /orgs/{org}/repos"],
|
||
createOrUpdateEnvironment: ["PUT /repos/{owner}/{repo}/environments/{environment_name}"],
|
||
createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"],
|
||
createPagesSite: ["POST /repos/{owner}/{repo}/pages"],
|
||
createRelease: ["POST /repos/{owner}/{repo}/releases"],
|
||
createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate"],
|
||
createWebhook: ["POST /repos/{owner}/{repo}/hooks"],
|
||
declineInvitation: ["DELETE /user/repository_invitations/{invitation_id}", {}, {
|
||
renamed: ["repos", "declineInvitationForAuthenticatedUser"]
|
||
}],
|
||
declineInvitationForAuthenticatedUser: ["DELETE /user/repository_invitations/{invitation_id}"],
|
||
delete: ["DELETE /repos/{owner}/{repo}"],
|
||
deleteAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
||
deleteAdminBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
||
deleteAnEnvironment: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}"],
|
||
deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],
|
||
deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],
|
||
deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],
|
||
deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],
|
||
deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"],
|
||
deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],
|
||
deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"],
|
||
deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],
|
||
deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"],
|
||
deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
||
deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"],
|
||
deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
||
deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],
|
||
disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes"],
|
||
disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"],
|
||
disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts"],
|
||
downloadArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}", {}, {
|
||
renamed: ["repos", "downloadZipballArchive"]
|
||
}],
|
||
downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"],
|
||
downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"],
|
||
enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes"],
|
||
enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"],
|
||
enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts"],
|
||
generateReleaseNotes: ["POST /repos/{owner}/{repo}/releases/generate-notes"],
|
||
get: ["GET /repos/{owner}/{repo}"],
|
||
getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
||
getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
||
getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"],
|
||
getAllStatusCheckContexts: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],
|
||
getAllTopics: ["GET /repos/{owner}/{repo}/topics", {
|
||
mediaType: {
|
||
previews: ["mercy"]
|
||
}
|
||
}],
|
||
getAppsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],
|
||
getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],
|
||
getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"],
|
||
getBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection"],
|
||
getClones: ["GET /repos/{owner}/{repo}/traffic/clones"],
|
||
getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"],
|
||
getCollaboratorPermissionLevel: ["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],
|
||
getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"],
|
||
getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"],
|
||
getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"],
|
||
getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"],
|
||
getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],
|
||
getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"],
|
||
getContent: ["GET /repos/{owner}/{repo}/contents/{path}"],
|
||
getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"],
|
||
getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"],
|
||
getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],
|
||
getDeploymentStatus: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],
|
||
getEnvironment: ["GET /repos/{owner}/{repo}/environments/{environment_name}"],
|
||
getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"],
|
||
getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"],
|
||
getPages: ["GET /repos/{owner}/{repo}/pages"],
|
||
getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],
|
||
getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"],
|
||
getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"],
|
||
getPullRequestReviewProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
||
getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"],
|
||
getReadme: ["GET /repos/{owner}/{repo}/readme"],
|
||
getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"],
|
||
getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"],
|
||
getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
||
getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"],
|
||
getStatusChecksProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
||
getTeamsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],
|
||
getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"],
|
||
getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"],
|
||
getUsersWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],
|
||
getViews: ["GET /repos/{owner}/{repo}/traffic/views"],
|
||
getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"],
|
||
getWebhookConfigForRepo: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],
|
||
getWebhookDelivery: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"],
|
||
listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"],
|
||
listBranches: ["GET /repos/{owner}/{repo}/branches"],
|
||
listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"],
|
||
listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"],
|
||
listCommentsForCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],
|
||
listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"],
|
||
listCommitStatusesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],
|
||
listCommits: ["GET /repos/{owner}/{repo}/commits"],
|
||
listContributors: ["GET /repos/{owner}/{repo}/contributors"],
|
||
listDeployKeys: ["GET /repos/{owner}/{repo}/keys"],
|
||
listDeploymentStatuses: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],
|
||
listDeployments: ["GET /repos/{owner}/{repo}/deployments"],
|
||
listForAuthenticatedUser: ["GET /user/repos"],
|
||
listForOrg: ["GET /orgs/{org}/repos"],
|
||
listForUser: ["GET /users/{username}/repos"],
|
||
listForks: ["GET /repos/{owner}/{repo}/forks"],
|
||
listInvitations: ["GET /repos/{owner}/{repo}/invitations"],
|
||
listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"],
|
||
listLanguages: ["GET /repos/{owner}/{repo}/languages"],
|
||
listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"],
|
||
listPublic: ["GET /repositories"],
|
||
listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"],
|
||
listReleaseAssets: ["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],
|
||
listReleases: ["GET /repos/{owner}/{repo}/releases"],
|
||
listTags: ["GET /repos/{owner}/{repo}/tags"],
|
||
listTeams: ["GET /repos/{owner}/{repo}/teams"],
|
||
listWebhookDeliveries: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"],
|
||
listWebhooks: ["GET /repos/{owner}/{repo}/hooks"],
|
||
merge: ["POST /repos/{owner}/{repo}/merges"],
|
||
mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"],
|
||
pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],
|
||
redeliverWebhookDelivery: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],
|
||
removeAppAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, {
|
||
mapToData: "apps"
|
||
}],
|
||
removeCollaborator: ["DELETE /repos/{owner}/{repo}/collaborators/{username}"],
|
||
removeStatusCheckContexts: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, {
|
||
mapToData: "contexts"
|
||
}],
|
||
removeStatusCheckProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
||
removeTeamAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, {
|
||
mapToData: "teams"
|
||
}],
|
||
removeUserAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, {
|
||
mapToData: "users"
|
||
}],
|
||
renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"],
|
||
replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics", {
|
||
mediaType: {
|
||
previews: ["mercy"]
|
||
}
|
||
}],
|
||
requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"],
|
||
setAdminBranchProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
||
setAppAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, {
|
||
mapToData: "apps"
|
||
}],
|
||
setStatusCheckContexts: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, {
|
||
mapToData: "contexts"
|
||
}],
|
||
setTeamAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, {
|
||
mapToData: "teams"
|
||
}],
|
||
setUserAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, {
|
||
mapToData: "users"
|
||
}],
|
||
testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],
|
||
transfer: ["POST /repos/{owner}/{repo}/transfer"],
|
||
update: ["PATCH /repos/{owner}/{repo}"],
|
||
updateBranchProtection: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],
|
||
updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],
|
||
updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"],
|
||
updateInvitation: ["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],
|
||
updatePullRequestReviewProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
||
updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"],
|
||
updateReleaseAsset: ["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
||
updateStatusCheckPotection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", {}, {
|
||
renamed: ["repos", "updateStatusCheckProtection"]
|
||
}],
|
||
updateStatusCheckProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
||
updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],
|
||
updateWebhookConfigForRepo: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],
|
||
uploadReleaseAsset: ["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", {
|
||
baseUrl: "https://uploads.github.com"
|
||
}]
|
||
},
|
||
search: {
|
||
code: ["GET /search/code"],
|
||
commits: ["GET /search/commits"],
|
||
issuesAndPullRequests: ["GET /search/issues"],
|
||
labels: ["GET /search/labels"],
|
||
repos: ["GET /search/repositories"],
|
||
topics: ["GET /search/topics", {
|
||
mediaType: {
|
||
previews: ["mercy"]
|
||
}
|
||
}],
|
||
users: ["GET /search/users"]
|
||
},
|
||
secretScanning: {
|
||
getAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],
|
||
listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"],
|
||
listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"],
|
||
updateAlert: ["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]
|
||
},
|
||
teams: {
|
||
addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
||
addOrUpdateProjectPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"],
|
||
addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
||
checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"],
|
||
checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
||
create: ["POST /orgs/{org}/teams"],
|
||
createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],
|
||
createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"],
|
||
deleteDiscussionCommentInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],
|
||
deleteDiscussionInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],
|
||
deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"],
|
||
getByName: ["GET /orgs/{org}/teams/{team_slug}"],
|
||
getDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],
|
||
getDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],
|
||
getMembershipForUserInOrg: ["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
||
list: ["GET /orgs/{org}/teams"],
|
||
listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"],
|
||
listDiscussionCommentsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],
|
||
listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"],
|
||
listForAuthenticatedUser: ["GET /user/teams"],
|
||
listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"],
|
||
listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"],
|
||
listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"],
|
||
listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"],
|
||
removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
||
removeProjectInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],
|
||
removeRepoInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
||
updateDiscussionCommentInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],
|
||
updateDiscussionInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],
|
||
updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"]
|
||
},
|
||
users: {
|
||
addEmailForAuthenticated: ["POST /user/emails", {}, {
|
||
renamed: ["users", "addEmailForAuthenticatedUser"]
|
||
}],
|
||
addEmailForAuthenticatedUser: ["POST /user/emails"],
|
||
block: ["PUT /user/blocks/{username}"],
|
||
checkBlocked: ["GET /user/blocks/{username}"],
|
||
checkFollowingForUser: ["GET /users/{username}/following/{target_user}"],
|
||
checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"],
|
||
createGpgKeyForAuthenticated: ["POST /user/gpg_keys", {}, {
|
||
renamed: ["users", "createGpgKeyForAuthenticatedUser"]
|
||
}],
|
||
createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"],
|
||
createPublicSshKeyForAuthenticated: ["POST /user/keys", {}, {
|
||
renamed: ["users", "createPublicSshKeyForAuthenticatedUser"]
|
||
}],
|
||
createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"],
|
||
deleteEmailForAuthenticated: ["DELETE /user/emails", {}, {
|
||
renamed: ["users", "deleteEmailForAuthenticatedUser"]
|
||
}],
|
||
deleteEmailForAuthenticatedUser: ["DELETE /user/emails"],
|
||
deleteGpgKeyForAuthenticated: ["DELETE /user/gpg_keys/{gpg_key_id}", {}, {
|
||
renamed: ["users", "deleteGpgKeyForAuthenticatedUser"]
|
||
}],
|
||
deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"],
|
||
deletePublicSshKeyForAuthenticated: ["DELETE /user/keys/{key_id}", {}, {
|
||
renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"]
|
||
}],
|
||
deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"],
|
||
follow: ["PUT /user/following/{username}"],
|
||
getAuthenticated: ["GET /user"],
|
||
getByUsername: ["GET /users/{username}"],
|
||
getContextForUser: ["GET /users/{username}/hovercard"],
|
||
getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}", {}, {
|
||
renamed: ["users", "getGpgKeyForAuthenticatedUser"]
|
||
}],
|
||
getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"],
|
||
getPublicSshKeyForAuthenticated: ["GET /user/keys/{key_id}", {}, {
|
||
renamed: ["users", "getPublicSshKeyForAuthenticatedUser"]
|
||
}],
|
||
getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"],
|
||
list: ["GET /users"],
|
||
listBlockedByAuthenticated: ["GET /user/blocks", {}, {
|
||
renamed: ["users", "listBlockedByAuthenticatedUser"]
|
||
}],
|
||
listBlockedByAuthenticatedUser: ["GET /user/blocks"],
|
||
listEmailsForAuthenticated: ["GET /user/emails", {}, {
|
||
renamed: ["users", "listEmailsForAuthenticatedUser"]
|
||
}],
|
||
listEmailsForAuthenticatedUser: ["GET /user/emails"],
|
||
listFollowedByAuthenticated: ["GET /user/following", {}, {
|
||
renamed: ["users", "listFollowedByAuthenticatedUser"]
|
||
}],
|
||
listFollowedByAuthenticatedUser: ["GET /user/following"],
|
||
listFollowersForAuthenticatedUser: ["GET /user/followers"],
|
||
listFollowersForUser: ["GET /users/{username}/followers"],
|
||
listFollowingForUser: ["GET /users/{username}/following"],
|
||
listGpgKeysForAuthenticated: ["GET /user/gpg_keys", {}, {
|
||
renamed: ["users", "listGpgKeysForAuthenticatedUser"]
|
||
}],
|
||
listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"],
|
||
listGpgKeysForUser: ["GET /users/{username}/gpg_keys"],
|
||
listPublicEmailsForAuthenticated: ["GET /user/public_emails", {}, {
|
||
renamed: ["users", "listPublicEmailsForAuthenticatedUser"]
|
||
}],
|
||
listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"],
|
||
listPublicKeysForUser: ["GET /users/{username}/keys"],
|
||
listPublicSshKeysForAuthenticated: ["GET /user/keys", {}, {
|
||
renamed: ["users", "listPublicSshKeysForAuthenticatedUser"]
|
||
}],
|
||
listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"],
|
||
setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility", {}, {
|
||
renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"]
|
||
}],
|
||
setPrimaryEmailVisibilityForAuthenticatedUser: ["PATCH /user/email/visibility"],
|
||
unblock: ["DELETE /user/blocks/{username}"],
|
||
unfollow: ["DELETE /user/following/{username}"],
|
||
updateAuthenticated: ["PATCH /user"]
|
||
}
|
||
};
|
||
|
||
const VERSION = "5.13.0";
|
||
|
||
function endpointsToMethods(octokit, endpointsMap) {
|
||
const newMethods = {};
|
||
|
||
for (const [scope, endpoints] of Object.entries(endpointsMap)) {
|
||
for (const [methodName, endpoint] of Object.entries(endpoints)) {
|
||
const [route, defaults, decorations] = endpoint;
|
||
const [method, url] = route.split(/ /);
|
||
const endpointDefaults = Object.assign({
|
||
method,
|
||
url
|
||
}, defaults);
|
||
|
||
if (!newMethods[scope]) {
|
||
newMethods[scope] = {};
|
||
}
|
||
|
||
const scopeMethods = newMethods[scope];
|
||
|
||
if (decorations) {
|
||
scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);
|
||
continue;
|
||
}
|
||
|
||
scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);
|
||
}
|
||
}
|
||
|
||
return newMethods;
|
||
}
|
||
|
||
function decorate(octokit, scope, methodName, defaults, decorations) {
|
||
const requestWithDefaults = octokit.request.defaults(defaults);
|
||
/* istanbul ignore next */
|
||
|
||
function withDecorations(...args) {
|
||
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488
|
||
let options = requestWithDefaults.endpoint.merge(...args); // There are currently no other decorations than `.mapToData`
|
||
|
||
if (decorations.mapToData) {
|
||
options = Object.assign({}, options, {
|
||
data: options[decorations.mapToData],
|
||
[decorations.mapToData]: undefined
|
||
});
|
||
return requestWithDefaults(options);
|
||
}
|
||
|
||
if (decorations.renamed) {
|
||
const [newScope, newMethodName] = decorations.renamed;
|
||
octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);
|
||
}
|
||
|
||
if (decorations.deprecated) {
|
||
octokit.log.warn(decorations.deprecated);
|
||
}
|
||
|
||
if (decorations.renamedParameters) {
|
||
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488
|
||
const options = requestWithDefaults.endpoint.merge(...args);
|
||
|
||
for (const [name, alias] of Object.entries(decorations.renamedParameters)) {
|
||
if (name in options) {
|
||
octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`);
|
||
|
||
if (!(alias in options)) {
|
||
options[alias] = options[name];
|
||
}
|
||
|
||
delete options[name];
|
||
}
|
||
}
|
||
|
||
return requestWithDefaults(options);
|
||
} // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488
|
||
|
||
|
||
return requestWithDefaults(...args);
|
||
}
|
||
|
||
return Object.assign(withDecorations, requestWithDefaults);
|
||
}
|
||
|
||
function restEndpointMethods(octokit) {
|
||
const api = endpointsToMethods(octokit, Endpoints);
|
||
return {
|
||
rest: api
|
||
};
|
||
}
|
||
restEndpointMethods.VERSION = VERSION;
|
||
function legacyRestEndpointMethods(octokit) {
|
||
const api = endpointsToMethods(octokit, Endpoints);
|
||
return _objectSpread2(_objectSpread2({}, api), {}, {
|
||
rest: api
|
||
});
|
||
}
|
||
legacyRestEndpointMethods.VERSION = VERSION;
|
||
|
||
exports.legacyRestEndpointMethods = legacyRestEndpointMethods;
|
||
exports.restEndpointMethods = restEndpointMethods;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 537:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||
|
||
var deprecation = __nccwpck_require__(8932);
|
||
var once = _interopDefault(__nccwpck_require__(1223));
|
||
|
||
const logOnceCode = once(deprecation => console.warn(deprecation));
|
||
const logOnceHeaders = once(deprecation => console.warn(deprecation));
|
||
/**
|
||
* Error with extra properties to help with debugging
|
||
*/
|
||
|
||
class RequestError extends Error {
|
||
constructor(message, statusCode, options) {
|
||
super(message); // Maintains proper stack trace (only available on V8)
|
||
|
||
/* istanbul ignore next */
|
||
|
||
if (Error.captureStackTrace) {
|
||
Error.captureStackTrace(this, this.constructor);
|
||
}
|
||
|
||
this.name = "HttpError";
|
||
this.status = statusCode;
|
||
let headers;
|
||
|
||
if ("headers" in options && typeof options.headers !== "undefined") {
|
||
headers = options.headers;
|
||
}
|
||
|
||
if ("response" in options) {
|
||
this.response = options.response;
|
||
headers = options.response.headers;
|
||
} // redact request credentials without mutating original request options
|
||
|
||
|
||
const requestCopy = Object.assign({}, options.request);
|
||
|
||
if (options.request.headers.authorization) {
|
||
requestCopy.headers = Object.assign({}, options.request.headers, {
|
||
authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]")
|
||
});
|
||
}
|
||
|
||
requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit
|
||
// see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
|
||
.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended
|
||
// see https://developer.github.com/v3/#oauth2-token-sent-in-a-header
|
||
.replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
|
||
this.request = requestCopy; // deprecations
|
||
|
||
Object.defineProperty(this, "code", {
|
||
get() {
|
||
logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
|
||
return statusCode;
|
||
}
|
||
|
||
});
|
||
Object.defineProperty(this, "headers", {
|
||
get() {
|
||
logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));
|
||
return headers || {};
|
||
}
|
||
|
||
});
|
||
}
|
||
|
||
}
|
||
|
||
exports.RequestError = RequestError;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 6234:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||
|
||
var endpoint = __nccwpck_require__(9440);
|
||
var universalUserAgent = __nccwpck_require__(5030);
|
||
var isPlainObject = __nccwpck_require__(3287);
|
||
var nodeFetch = _interopDefault(__nccwpck_require__(1768));
|
||
var requestError = __nccwpck_require__(537);
|
||
|
||
const VERSION = "5.6.3";
|
||
|
||
function getBufferResponse(response) {
|
||
return response.arrayBuffer();
|
||
}
|
||
|
||
function fetchWrapper(requestOptions) {
|
||
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
|
||
|
||
if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
|
||
requestOptions.body = JSON.stringify(requestOptions.body);
|
||
}
|
||
|
||
let headers = {};
|
||
let status;
|
||
let url;
|
||
const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch;
|
||
return fetch(requestOptions.url, Object.assign({
|
||
method: requestOptions.method,
|
||
body: requestOptions.body,
|
||
headers: requestOptions.headers,
|
||
redirect: requestOptions.redirect
|
||
}, // `requestOptions.request.agent` type is incompatible
|
||
// see https://github.com/octokit/types.ts/pull/264
|
||
requestOptions.request)).then(async response => {
|
||
url = response.url;
|
||
status = response.status;
|
||
|
||
for (const keyAndValue of response.headers) {
|
||
headers[keyAndValue[0]] = keyAndValue[1];
|
||
}
|
||
|
||
if ("deprecation" in headers) {
|
||
const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
|
||
const deprecationLink = matches && matches.pop();
|
||
log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`);
|
||
}
|
||
|
||
if (status === 204 || status === 205) {
|
||
return;
|
||
} // GitHub API returns 200 for HEAD requests
|
||
|
||
|
||
if (requestOptions.method === "HEAD") {
|
||
if (status < 400) {
|
||
return;
|
||
}
|
||
|
||
throw new requestError.RequestError(response.statusText, status, {
|
||
response: {
|
||
url,
|
||
status,
|
||
headers,
|
||
data: undefined
|
||
},
|
||
request: requestOptions
|
||
});
|
||
}
|
||
|
||
if (status === 304) {
|
||
throw new requestError.RequestError("Not modified", status, {
|
||
response: {
|
||
url,
|
||
status,
|
||
headers,
|
||
data: await getResponseData(response)
|
||
},
|
||
request: requestOptions
|
||
});
|
||
}
|
||
|
||
if (status >= 400) {
|
||
const data = await getResponseData(response);
|
||
const error = new requestError.RequestError(toErrorMessage(data), status, {
|
||
response: {
|
||
url,
|
||
status,
|
||
headers,
|
||
data
|
||
},
|
||
request: requestOptions
|
||
});
|
||
throw error;
|
||
}
|
||
|
||
return getResponseData(response);
|
||
}).then(data => {
|
||
return {
|
||
status,
|
||
url,
|
||
headers,
|
||
data
|
||
};
|
||
}).catch(error => {
|
||
if (error instanceof requestError.RequestError) throw error;
|
||
throw new requestError.RequestError(error.message, 500, {
|
||
request: requestOptions
|
||
});
|
||
});
|
||
}
|
||
|
||
async function getResponseData(response) {
|
||
const contentType = response.headers.get("content-type");
|
||
|
||
if (/application\/json/.test(contentType)) {
|
||
return response.json();
|
||
}
|
||
|
||
if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
|
||
return response.text();
|
||
}
|
||
|
||
return getBufferResponse(response);
|
||
}
|
||
|
||
function toErrorMessage(data) {
|
||
if (typeof data === "string") return data; // istanbul ignore else - just in case
|
||
|
||
if ("message" in data) {
|
||
if (Array.isArray(data.errors)) {
|
||
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
|
||
}
|
||
|
||
return data.message;
|
||
} // istanbul ignore next - just in case
|
||
|
||
|
||
return `Unknown error: ${JSON.stringify(data)}`;
|
||
}
|
||
|
||
function withDefaults(oldEndpoint, newDefaults) {
|
||
const endpoint = oldEndpoint.defaults(newDefaults);
|
||
|
||
const newApi = function (route, parameters) {
|
||
const endpointOptions = endpoint.merge(route, parameters);
|
||
|
||
if (!endpointOptions.request || !endpointOptions.request.hook) {
|
||
return fetchWrapper(endpoint.parse(endpointOptions));
|
||
}
|
||
|
||
const request = (route, parameters) => {
|
||
return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));
|
||
};
|
||
|
||
Object.assign(request, {
|
||
endpoint,
|
||
defaults: withDefaults.bind(null, endpoint)
|
||
});
|
||
return endpointOptions.request.hook(request, endpointOptions);
|
||
};
|
||
|
||
return Object.assign(newApi, {
|
||
endpoint,
|
||
defaults: withDefaults.bind(null, endpoint)
|
||
});
|
||
}
|
||
|
||
const request = withDefaults(endpoint.endpoint, {
|
||
headers: {
|
||
"user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}`
|
||
}
|
||
});
|
||
|
||
exports.request = request;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1768:
|
||
/***/ ((module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||
|
||
var Stream = _interopDefault(__nccwpck_require__(2781));
|
||
var http = _interopDefault(__nccwpck_require__(3685));
|
||
var Url = _interopDefault(__nccwpck_require__(7310));
|
||
var whatwgUrl = _interopDefault(__nccwpck_require__(301));
|
||
var https = _interopDefault(__nccwpck_require__(5687));
|
||
var zlib = _interopDefault(__nccwpck_require__(9796));
|
||
|
||
// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
|
||
|
||
// fix for "Readable" isn't a named export issue
|
||
const Readable = Stream.Readable;
|
||
|
||
const BUFFER = Symbol('buffer');
|
||
const TYPE = Symbol('type');
|
||
|
||
class Blob {
|
||
constructor() {
|
||
this[TYPE] = '';
|
||
|
||
const blobParts = arguments[0];
|
||
const options = arguments[1];
|
||
|
||
const buffers = [];
|
||
let size = 0;
|
||
|
||
if (blobParts) {
|
||
const a = blobParts;
|
||
const length = Number(a.length);
|
||
for (let i = 0; i < length; i++) {
|
||
const element = a[i];
|
||
let buffer;
|
||
if (element instanceof Buffer) {
|
||
buffer = element;
|
||
} else if (ArrayBuffer.isView(element)) {
|
||
buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
|
||
} else if (element instanceof ArrayBuffer) {
|
||
buffer = Buffer.from(element);
|
||
} else if (element instanceof Blob) {
|
||
buffer = element[BUFFER];
|
||
} else {
|
||
buffer = Buffer.from(typeof element === 'string' ? element : String(element));
|
||
}
|
||
size += buffer.length;
|
||
buffers.push(buffer);
|
||
}
|
||
}
|
||
|
||
this[BUFFER] = Buffer.concat(buffers);
|
||
|
||
let type = options && options.type !== undefined && String(options.type).toLowerCase();
|
||
if (type && !/[^\u0020-\u007E]/.test(type)) {
|
||
this[TYPE] = type;
|
||
}
|
||
}
|
||
get size() {
|
||
return this[BUFFER].length;
|
||
}
|
||
get type() {
|
||
return this[TYPE];
|
||
}
|
||
text() {
|
||
return Promise.resolve(this[BUFFER].toString());
|
||
}
|
||
arrayBuffer() {
|
||
const buf = this[BUFFER];
|
||
const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
|
||
return Promise.resolve(ab);
|
||
}
|
||
stream() {
|
||
const readable = new Readable();
|
||
readable._read = function () {};
|
||
readable.push(this[BUFFER]);
|
||
readable.push(null);
|
||
return readable;
|
||
}
|
||
toString() {
|
||
return '[object Blob]';
|
||
}
|
||
slice() {
|
||
const size = this.size;
|
||
|
||
const start = arguments[0];
|
||
const end = arguments[1];
|
||
let relativeStart, relativeEnd;
|
||
if (start === undefined) {
|
||
relativeStart = 0;
|
||
} else if (start < 0) {
|
||
relativeStart = Math.max(size + start, 0);
|
||
} else {
|
||
relativeStart = Math.min(start, size);
|
||
}
|
||
if (end === undefined) {
|
||
relativeEnd = size;
|
||
} else if (end < 0) {
|
||
relativeEnd = Math.max(size + end, 0);
|
||
} else {
|
||
relativeEnd = Math.min(end, size);
|
||
}
|
||
const span = Math.max(relativeEnd - relativeStart, 0);
|
||
|
||
const buffer = this[BUFFER];
|
||
const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
|
||
const blob = new Blob([], { type: arguments[2] });
|
||
blob[BUFFER] = slicedBuffer;
|
||
return blob;
|
||
}
|
||
}
|
||
|
||
Object.defineProperties(Blob.prototype, {
|
||
size: { enumerable: true },
|
||
type: { enumerable: true },
|
||
slice: { enumerable: true }
|
||
});
|
||
|
||
Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
|
||
value: 'Blob',
|
||
writable: false,
|
||
enumerable: false,
|
||
configurable: true
|
||
});
|
||
|
||
/**
|
||
* fetch-error.js
|
||
*
|
||
* FetchError interface for operational errors
|
||
*/
|
||
|
||
/**
|
||
* Create FetchError instance
|
||
*
|
||
* @param String message Error message for human
|
||
* @param String type Error type for machine
|
||
* @param String systemError For Node.js system error
|
||
* @return FetchError
|
||
*/
|
||
function FetchError(message, type, systemError) {
|
||
Error.call(this, message);
|
||
|
||
this.message = message;
|
||
this.type = type;
|
||
|
||
// when err.type is `system`, err.code contains system error code
|
||
if (systemError) {
|
||
this.code = this.errno = systemError.code;
|
||
}
|
||
|
||
// hide custom error implementation details from end-users
|
||
Error.captureStackTrace(this, this.constructor);
|
||
}
|
||
|
||
FetchError.prototype = Object.create(Error.prototype);
|
||
FetchError.prototype.constructor = FetchError;
|
||
FetchError.prototype.name = 'FetchError';
|
||
|
||
let convert;
|
||
try {
|
||
convert = (__nccwpck_require__(2877).convert);
|
||
} catch (e) {}
|
||
|
||
const INTERNALS = Symbol('Body internals');
|
||
|
||
// fix an issue where "PassThrough" isn't a named export for node <10
|
||
const PassThrough = Stream.PassThrough;
|
||
|
||
/**
|
||
* Body mixin
|
||
*
|
||
* Ref: https://fetch.spec.whatwg.org/#body
|
||
*
|
||
* @param Stream body Readable stream
|
||
* @param Object opts Response options
|
||
* @return Void
|
||
*/
|
||
function Body(body) {
|
||
var _this = this;
|
||
|
||
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
||
_ref$size = _ref.size;
|
||
|
||
let size = _ref$size === undefined ? 0 : _ref$size;
|
||
var _ref$timeout = _ref.timeout;
|
||
let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
|
||
|
||
if (body == null) {
|
||
// body is undefined or null
|
||
body = null;
|
||
} else if (isURLSearchParams(body)) {
|
||
// body is a URLSearchParams
|
||
body = Buffer.from(body.toString());
|
||
} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
|
||
// body is ArrayBuffer
|
||
body = Buffer.from(body);
|
||
} else if (ArrayBuffer.isView(body)) {
|
||
// body is ArrayBufferView
|
||
body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
||
} else if (body instanceof Stream) ; else {
|
||
// none of the above
|
||
// coerce to string then buffer
|
||
body = Buffer.from(String(body));
|
||
}
|
||
this[INTERNALS] = {
|
||
body,
|
||
disturbed: false,
|
||
error: null
|
||
};
|
||
this.size = size;
|
||
this.timeout = timeout;
|
||
|
||
if (body instanceof Stream) {
|
||
body.on('error', function (err) {
|
||
const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
|
||
_this[INTERNALS].error = error;
|
||
});
|
||
}
|
||
}
|
||
|
||
Body.prototype = {
|
||
get body() {
|
||
return this[INTERNALS].body;
|
||
},
|
||
|
||
get bodyUsed() {
|
||
return this[INTERNALS].disturbed;
|
||
},
|
||
|
||
/**
|
||
* Decode response as ArrayBuffer
|
||
*
|
||
* @return Promise
|
||
*/
|
||
arrayBuffer() {
|
||
return consumeBody.call(this).then(function (buf) {
|
||
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
|
||
});
|
||
},
|
||
|
||
/**
|
||
* Return raw response as Blob
|
||
*
|
||
* @return Promise
|
||
*/
|
||
blob() {
|
||
let ct = this.headers && this.headers.get('content-type') || '';
|
||
return consumeBody.call(this).then(function (buf) {
|
||
return Object.assign(
|
||
// Prevent copying
|
||
new Blob([], {
|
||
type: ct.toLowerCase()
|
||
}), {
|
||
[BUFFER]: buf
|
||
});
|
||
});
|
||
},
|
||
|
||
/**
|
||
* Decode response as json
|
||
*
|
||
* @return Promise
|
||
*/
|
||
json() {
|
||
var _this2 = this;
|
||
|
||
return consumeBody.call(this).then(function (buffer) {
|
||
try {
|
||
return JSON.parse(buffer.toString());
|
||
} catch (err) {
|
||
return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
|
||
}
|
||
});
|
||
},
|
||
|
||
/**
|
||
* Decode response as text
|
||
*
|
||
* @return Promise
|
||
*/
|
||
text() {
|
||
return consumeBody.call(this).then(function (buffer) {
|
||
return buffer.toString();
|
||
});
|
||
},
|
||
|
||
/**
|
||
* Decode response as buffer (non-spec api)
|
||
*
|
||
* @return Promise
|
||
*/
|
||
buffer() {
|
||
return consumeBody.call(this);
|
||
},
|
||
|
||
/**
|
||
* Decode response as text, while automatically detecting the encoding and
|
||
* trying to decode to UTF-8 (non-spec api)
|
||
*
|
||
* @return Promise
|
||
*/
|
||
textConverted() {
|
||
var _this3 = this;
|
||
|
||
return consumeBody.call(this).then(function (buffer) {
|
||
return convertBody(buffer, _this3.headers);
|
||
});
|
||
}
|
||
};
|
||
|
||
// In browsers, all properties are enumerable.
|
||
Object.defineProperties(Body.prototype, {
|
||
body: { enumerable: true },
|
||
bodyUsed: { enumerable: true },
|
||
arrayBuffer: { enumerable: true },
|
||
blob: { enumerable: true },
|
||
json: { enumerable: true },
|
||
text: { enumerable: true }
|
||
});
|
||
|
||
Body.mixIn = function (proto) {
|
||
for (const name of Object.getOwnPropertyNames(Body.prototype)) {
|
||
// istanbul ignore else: future proof
|
||
if (!(name in proto)) {
|
||
const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
|
||
Object.defineProperty(proto, name, desc);
|
||
}
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Consume and convert an entire Body to a Buffer.
|
||
*
|
||
* Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
|
||
*
|
||
* @return Promise
|
||
*/
|
||
function consumeBody() {
|
||
var _this4 = this;
|
||
|
||
if (this[INTERNALS].disturbed) {
|
||
return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
|
||
}
|
||
|
||
this[INTERNALS].disturbed = true;
|
||
|
||
if (this[INTERNALS].error) {
|
||
return Body.Promise.reject(this[INTERNALS].error);
|
||
}
|
||
|
||
let body = this.body;
|
||
|
||
// body is null
|
||
if (body === null) {
|
||
return Body.Promise.resolve(Buffer.alloc(0));
|
||
}
|
||
|
||
// body is blob
|
||
if (isBlob(body)) {
|
||
body = body.stream();
|
||
}
|
||
|
||
// body is buffer
|
||
if (Buffer.isBuffer(body)) {
|
||
return Body.Promise.resolve(body);
|
||
}
|
||
|
||
// istanbul ignore if: should never happen
|
||
if (!(body instanceof Stream)) {
|
||
return Body.Promise.resolve(Buffer.alloc(0));
|
||
}
|
||
|
||
// body is stream
|
||
// get ready to actually consume the body
|
||
let accum = [];
|
||
let accumBytes = 0;
|
||
let abort = false;
|
||
|
||
return new Body.Promise(function (resolve, reject) {
|
||
let resTimeout;
|
||
|
||
// allow timeout on slow response body
|
||
if (_this4.timeout) {
|
||
resTimeout = setTimeout(function () {
|
||
abort = true;
|
||
reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
|
||
}, _this4.timeout);
|
||
}
|
||
|
||
// handle stream errors
|
||
body.on('error', function (err) {
|
||
if (err.name === 'AbortError') {
|
||
// if the request was aborted, reject with this Error
|
||
abort = true;
|
||
reject(err);
|
||
} else {
|
||
// other errors, such as incorrect content-encoding
|
||
reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
|
||
}
|
||
});
|
||
|
||
body.on('data', function (chunk) {
|
||
if (abort || chunk === null) {
|
||
return;
|
||
}
|
||
|
||
if (_this4.size && accumBytes + chunk.length > _this4.size) {
|
||
abort = true;
|
||
reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
|
||
return;
|
||
}
|
||
|
||
accumBytes += chunk.length;
|
||
accum.push(chunk);
|
||
});
|
||
|
||
body.on('end', function () {
|
||
if (abort) {
|
||
return;
|
||
}
|
||
|
||
clearTimeout(resTimeout);
|
||
|
||
try {
|
||
resolve(Buffer.concat(accum, accumBytes));
|
||
} catch (err) {
|
||
// handle streams that have accumulated too much data (issue #414)
|
||
reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
|
||
}
|
||
});
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Detect buffer encoding and convert to target encoding
|
||
* ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
|
||
*
|
||
* @param Buffer buffer Incoming buffer
|
||
* @param String encoding Target encoding
|
||
* @return String
|
||
*/
|
||
function convertBody(buffer, headers) {
|
||
if (typeof convert !== 'function') {
|
||
throw new Error('The package `encoding` must be installed to use the textConverted() function');
|
||
}
|
||
|
||
const ct = headers.get('content-type');
|
||
let charset = 'utf-8';
|
||
let res, str;
|
||
|
||
// header
|
||
if (ct) {
|
||
res = /charset=([^;]*)/i.exec(ct);
|
||
}
|
||
|
||
// no charset in content type, peek at response body for at most 1024 bytes
|
||
str = buffer.slice(0, 1024).toString();
|
||
|
||
// html5
|
||
if (!res && str) {
|
||
res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
|
||
}
|
||
|
||
// html4
|
||
if (!res && str) {
|
||
res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
|
||
if (!res) {
|
||
res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str);
|
||
if (res) {
|
||
res.pop(); // drop last quote
|
||
}
|
||
}
|
||
|
||
if (res) {
|
||
res = /charset=(.*)/i.exec(res.pop());
|
||
}
|
||
}
|
||
|
||
// xml
|
||
if (!res && str) {
|
||
res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
|
||
}
|
||
|
||
// found charset
|
||
if (res) {
|
||
charset = res.pop();
|
||
|
||
// prevent decode issues when sites use incorrect encoding
|
||
// ref: https://hsivonen.fi/encoding-menu/
|
||
if (charset === 'gb2312' || charset === 'gbk') {
|
||
charset = 'gb18030';
|
||
}
|
||
}
|
||
|
||
// turn raw buffers into a single utf-8 buffer
|
||
return convert(buffer, 'UTF-8', charset).toString();
|
||
}
|
||
|
||
/**
|
||
* Detect a URLSearchParams object
|
||
* ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
|
||
*
|
||
* @param Object obj Object to detect by type or brand
|
||
* @return String
|
||
*/
|
||
function isURLSearchParams(obj) {
|
||
// Duck-typing as a necessary condition.
|
||
if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {
|
||
return false;
|
||
}
|
||
|
||
// Brand-checking and more duck-typing as optional condition.
|
||
return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';
|
||
}
|
||
|
||
/**
|
||
* Check if `obj` is a W3C `Blob` object (which `File` inherits from)
|
||
* @param {*} obj
|
||
* @return {boolean}
|
||
*/
|
||
function isBlob(obj) {
|
||
return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
|
||
}
|
||
|
||
/**
|
||
* Clone body given Res/Req instance
|
||
*
|
||
* @param Mixed instance Response or Request instance
|
||
* @return Mixed
|
||
*/
|
||
function clone(instance) {
|
||
let p1, p2;
|
||
let body = instance.body;
|
||
|
||
// don't allow cloning a used body
|
||
if (instance.bodyUsed) {
|
||
throw new Error('cannot clone body after it is used');
|
||
}
|
||
|
||
// check that body is a stream and not form-data object
|
||
// note: we can't clone the form-data object without having it as a dependency
|
||
if (body instanceof Stream && typeof body.getBoundary !== 'function') {
|
||
// tee instance body
|
||
p1 = new PassThrough();
|
||
p2 = new PassThrough();
|
||
body.pipe(p1);
|
||
body.pipe(p2);
|
||
// set instance body to teed body and return the other teed body
|
||
instance[INTERNALS].body = p1;
|
||
body = p2;
|
||
}
|
||
|
||
return body;
|
||
}
|
||
|
||
/**
|
||
* Performs the operation "extract a `Content-Type` value from |object|" as
|
||
* specified in the specification:
|
||
* https://fetch.spec.whatwg.org/#concept-bodyinit-extract
|
||
*
|
||
* This function assumes that instance.body is present.
|
||
*
|
||
* @param Mixed instance Any options.body input
|
||
*/
|
||
function extractContentType(body) {
|
||
if (body === null) {
|
||
// body is null
|
||
return null;
|
||
} else if (typeof body === 'string') {
|
||
// body is string
|
||
return 'text/plain;charset=UTF-8';
|
||
} else if (isURLSearchParams(body)) {
|
||
// body is a URLSearchParams
|
||
return 'application/x-www-form-urlencoded;charset=UTF-8';
|
||
} else if (isBlob(body)) {
|
||
// body is blob
|
||
return body.type || null;
|
||
} else if (Buffer.isBuffer(body)) {
|
||
// body is buffer
|
||
return null;
|
||
} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
|
||
// body is ArrayBuffer
|
||
return null;
|
||
} else if (ArrayBuffer.isView(body)) {
|
||
// body is ArrayBufferView
|
||
return null;
|
||
} else if (typeof body.getBoundary === 'function') {
|
||
// detect form data input from form-data module
|
||
return `multipart/form-data;boundary=${body.getBoundary()}`;
|
||
} else if (body instanceof Stream) {
|
||
// body is stream
|
||
// can't really do much about this
|
||
return null;
|
||
} else {
|
||
// Body constructor defaults other things to string
|
||
return 'text/plain;charset=UTF-8';
|
||
}
|
||
}
|
||
|
||
/**
|
||
* The Fetch Standard treats this as if "total bytes" is a property on the body.
|
||
* For us, we have to explicitly get it with a function.
|
||
*
|
||
* ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
|
||
*
|
||
* @param Body instance Instance of Body
|
||
* @return Number? Number of bytes, or null if not possible
|
||
*/
|
||
function getTotalBytes(instance) {
|
||
const body = instance.body;
|
||
|
||
|
||
if (body === null) {
|
||
// body is null
|
||
return 0;
|
||
} else if (isBlob(body)) {
|
||
return body.size;
|
||
} else if (Buffer.isBuffer(body)) {
|
||
// body is buffer
|
||
return body.length;
|
||
} else if (body && typeof body.getLengthSync === 'function') {
|
||
// detect form data input from form-data module
|
||
if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
|
||
body.hasKnownLength && body.hasKnownLength()) {
|
||
// 2.x
|
||
return body.getLengthSync();
|
||
}
|
||
return null;
|
||
} else {
|
||
// body is stream
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Write a Body to a Node.js WritableStream (e.g. http.Request) object.
|
||
*
|
||
* @param Body instance Instance of Body
|
||
* @return Void
|
||
*/
|
||
function writeToStream(dest, instance) {
|
||
const body = instance.body;
|
||
|
||
|
||
if (body === null) {
|
||
// body is null
|
||
dest.end();
|
||
} else if (isBlob(body)) {
|
||
body.stream().pipe(dest);
|
||
} else if (Buffer.isBuffer(body)) {
|
||
// body is buffer
|
||
dest.write(body);
|
||
dest.end();
|
||
} else {
|
||
// body is stream
|
||
body.pipe(dest);
|
||
}
|
||
}
|
||
|
||
// expose Promise
|
||
Body.Promise = global.Promise;
|
||
|
||
/**
|
||
* headers.js
|
||
*
|
||
* Headers class offers convenient helpers
|
||
*/
|
||
|
||
const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
|
||
const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
|
||
|
||
function validateName(name) {
|
||
name = `${name}`;
|
||
if (invalidTokenRegex.test(name) || name === '') {
|
||
throw new TypeError(`${name} is not a legal HTTP header name`);
|
||
}
|
||
}
|
||
|
||
function validateValue(value) {
|
||
value = `${value}`;
|
||
if (invalidHeaderCharRegex.test(value)) {
|
||
throw new TypeError(`${value} is not a legal HTTP header value`);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Find the key in the map object given a header name.
|
||
*
|
||
* Returns undefined if not found.
|
||
*
|
||
* @param String name Header name
|
||
* @return String|Undefined
|
||
*/
|
||
function find(map, name) {
|
||
name = name.toLowerCase();
|
||
for (const key in map) {
|
||
if (key.toLowerCase() === name) {
|
||
return key;
|
||
}
|
||
}
|
||
return undefined;
|
||
}
|
||
|
||
const MAP = Symbol('map');
|
||
class Headers {
|
||
/**
|
||
* Headers class
|
||
*
|
||
* @param Object headers Response headers
|
||
* @return Void
|
||
*/
|
||
constructor() {
|
||
let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
|
||
|
||
this[MAP] = Object.create(null);
|
||
|
||
if (init instanceof Headers) {
|
||
const rawHeaders = init.raw();
|
||
const headerNames = Object.keys(rawHeaders);
|
||
|
||
for (const headerName of headerNames) {
|
||
for (const value of rawHeaders[headerName]) {
|
||
this.append(headerName, value);
|
||
}
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
// We don't worry about converting prop to ByteString here as append()
|
||
// will handle it.
|
||
if (init == null) ; else if (typeof init === 'object') {
|
||
const method = init[Symbol.iterator];
|
||
if (method != null) {
|
||
if (typeof method !== 'function') {
|
||
throw new TypeError('Header pairs must be iterable');
|
||
}
|
||
|
||
// sequence<sequence<ByteString>>
|
||
// Note: per spec we have to first exhaust the lists then process them
|
||
const pairs = [];
|
||
for (const pair of init) {
|
||
if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
|
||
throw new TypeError('Each header pair must be iterable');
|
||
}
|
||
pairs.push(Array.from(pair));
|
||
}
|
||
|
||
for (const pair of pairs) {
|
||
if (pair.length !== 2) {
|
||
throw new TypeError('Each header pair must be a name/value tuple');
|
||
}
|
||
this.append(pair[0], pair[1]);
|
||
}
|
||
} else {
|
||
// record<ByteString, ByteString>
|
||
for (const key of Object.keys(init)) {
|
||
const value = init[key];
|
||
this.append(key, value);
|
||
}
|
||
}
|
||
} else {
|
||
throw new TypeError('Provided initializer must be an object');
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Return combined header value given name
|
||
*
|
||
* @param String name Header name
|
||
* @return Mixed
|
||
*/
|
||
get(name) {
|
||
name = `${name}`;
|
||
validateName(name);
|
||
const key = find(this[MAP], name);
|
||
if (key === undefined) {
|
||
return null;
|
||
}
|
||
|
||
return this[MAP][key].join(', ');
|
||
}
|
||
|
||
/**
|
||
* Iterate over all headers
|
||
*
|
||
* @param Function callback Executed for each item with parameters (value, name, thisArg)
|
||
* @param Boolean thisArg `this` context for callback function
|
||
* @return Void
|
||
*/
|
||
forEach(callback) {
|
||
let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
||
|
||
let pairs = getHeaders(this);
|
||
let i = 0;
|
||
while (i < pairs.length) {
|
||
var _pairs$i = pairs[i];
|
||
const name = _pairs$i[0],
|
||
value = _pairs$i[1];
|
||
|
||
callback.call(thisArg, value, name, this);
|
||
pairs = getHeaders(this);
|
||
i++;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Overwrite header values given name
|
||
*
|
||
* @param String name Header name
|
||
* @param String value Header value
|
||
* @return Void
|
||
*/
|
||
set(name, value) {
|
||
name = `${name}`;
|
||
value = `${value}`;
|
||
validateName(name);
|
||
validateValue(value);
|
||
const key = find(this[MAP], name);
|
||
this[MAP][key !== undefined ? key : name] = [value];
|
||
}
|
||
|
||
/**
|
||
* Append a value onto existing header
|
||
*
|
||
* @param String name Header name
|
||
* @param String value Header value
|
||
* @return Void
|
||
*/
|
||
append(name, value) {
|
||
name = `${name}`;
|
||
value = `${value}`;
|
||
validateName(name);
|
||
validateValue(value);
|
||
const key = find(this[MAP], name);
|
||
if (key !== undefined) {
|
||
this[MAP][key].push(value);
|
||
} else {
|
||
this[MAP][name] = [value];
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Check for header name existence
|
||
*
|
||
* @param String name Header name
|
||
* @return Boolean
|
||
*/
|
||
has(name) {
|
||
name = `${name}`;
|
||
validateName(name);
|
||
return find(this[MAP], name) !== undefined;
|
||
}
|
||
|
||
/**
|
||
* Delete all header values given name
|
||
*
|
||
* @param String name Header name
|
||
* @return Void
|
||
*/
|
||
delete(name) {
|
||
name = `${name}`;
|
||
validateName(name);
|
||
const key = find(this[MAP], name);
|
||
if (key !== undefined) {
|
||
delete this[MAP][key];
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Return raw headers (non-spec api)
|
||
*
|
||
* @return Object
|
||
*/
|
||
raw() {
|
||
return this[MAP];
|
||
}
|
||
|
||
/**
|
||
* Get an iterator on keys.
|
||
*
|
||
* @return Iterator
|
||
*/
|
||
keys() {
|
||
return createHeadersIterator(this, 'key');
|
||
}
|
||
|
||
/**
|
||
* Get an iterator on values.
|
||
*
|
||
* @return Iterator
|
||
*/
|
||
values() {
|
||
return createHeadersIterator(this, 'value');
|
||
}
|
||
|
||
/**
|
||
* Get an iterator on entries.
|
||
*
|
||
* This is the default iterator of the Headers object.
|
||
*
|
||
* @return Iterator
|
||
*/
|
||
[Symbol.iterator]() {
|
||
return createHeadersIterator(this, 'key+value');
|
||
}
|
||
}
|
||
Headers.prototype.entries = Headers.prototype[Symbol.iterator];
|
||
|
||
Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
|
||
value: 'Headers',
|
||
writable: false,
|
||
enumerable: false,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperties(Headers.prototype, {
|
||
get: { enumerable: true },
|
||
forEach: { enumerable: true },
|
||
set: { enumerable: true },
|
||
append: { enumerable: true },
|
||
has: { enumerable: true },
|
||
delete: { enumerable: true },
|
||
keys: { enumerable: true },
|
||
values: { enumerable: true },
|
||
entries: { enumerable: true }
|
||
});
|
||
|
||
function getHeaders(headers) {
|
||
let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
|
||
|
||
const keys = Object.keys(headers[MAP]).sort();
|
||
return keys.map(kind === 'key' ? function (k) {
|
||
return k.toLowerCase();
|
||
} : kind === 'value' ? function (k) {
|
||
return headers[MAP][k].join(', ');
|
||
} : function (k) {
|
||
return [k.toLowerCase(), headers[MAP][k].join(', ')];
|
||
});
|
||
}
|
||
|
||
const INTERNAL = Symbol('internal');
|
||
|
||
function createHeadersIterator(target, kind) {
|
||
const iterator = Object.create(HeadersIteratorPrototype);
|
||
iterator[INTERNAL] = {
|
||
target,
|
||
kind,
|
||
index: 0
|
||
};
|
||
return iterator;
|
||
}
|
||
|
||
const HeadersIteratorPrototype = Object.setPrototypeOf({
|
||
next() {
|
||
// istanbul ignore if
|
||
if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
|
||
throw new TypeError('Value of `this` is not a HeadersIterator');
|
||
}
|
||
|
||
var _INTERNAL = this[INTERNAL];
|
||
const target = _INTERNAL.target,
|
||
kind = _INTERNAL.kind,
|
||
index = _INTERNAL.index;
|
||
|
||
const values = getHeaders(target, kind);
|
||
const len = values.length;
|
||
if (index >= len) {
|
||
return {
|
||
value: undefined,
|
||
done: true
|
||
};
|
||
}
|
||
|
||
this[INTERNAL].index = index + 1;
|
||
|
||
return {
|
||
value: values[index],
|
||
done: false
|
||
};
|
||
}
|
||
}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
|
||
|
||
Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
|
||
value: 'HeadersIterator',
|
||
writable: false,
|
||
enumerable: false,
|
||
configurable: true
|
||
});
|
||
|
||
/**
|
||
* Export the Headers object in a form that Node.js can consume.
|
||
*
|
||
* @param Headers headers
|
||
* @return Object
|
||
*/
|
||
function exportNodeCompatibleHeaders(headers) {
|
||
const obj = Object.assign({ __proto__: null }, headers[MAP]);
|
||
|
||
// http.request() only supports string as Host header. This hack makes
|
||
// specifying custom Host header possible.
|
||
const hostHeaderKey = find(headers[MAP], 'Host');
|
||
if (hostHeaderKey !== undefined) {
|
||
obj[hostHeaderKey] = obj[hostHeaderKey][0];
|
||
}
|
||
|
||
return obj;
|
||
}
|
||
|
||
/**
|
||
* Create a Headers object from an object of headers, ignoring those that do
|
||
* not conform to HTTP grammar productions.
|
||
*
|
||
* @param Object obj Object of headers
|
||
* @return Headers
|
||
*/
|
||
function createHeadersLenient(obj) {
|
||
const headers = new Headers();
|
||
for (const name of Object.keys(obj)) {
|
||
if (invalidTokenRegex.test(name)) {
|
||
continue;
|
||
}
|
||
if (Array.isArray(obj[name])) {
|
||
for (const val of obj[name]) {
|
||
if (invalidHeaderCharRegex.test(val)) {
|
||
continue;
|
||
}
|
||
if (headers[MAP][name] === undefined) {
|
||
headers[MAP][name] = [val];
|
||
} else {
|
||
headers[MAP][name].push(val);
|
||
}
|
||
}
|
||
} else if (!invalidHeaderCharRegex.test(obj[name])) {
|
||
headers[MAP][name] = [obj[name]];
|
||
}
|
||
}
|
||
return headers;
|
||
}
|
||
|
||
const INTERNALS$1 = Symbol('Response internals');
|
||
|
||
// fix an issue where "STATUS_CODES" aren't a named export for node <10
|
||
const STATUS_CODES = http.STATUS_CODES;
|
||
|
||
/**
|
||
* Response class
|
||
*
|
||
* @param Stream body Readable stream
|
||
* @param Object opts Response options
|
||
* @return Void
|
||
*/
|
||
class Response {
|
||
constructor() {
|
||
let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
||
let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
|
||
Body.call(this, body, opts);
|
||
|
||
const status = opts.status || 200;
|
||
const headers = new Headers(opts.headers);
|
||
|
||
if (body != null && !headers.has('Content-Type')) {
|
||
const contentType = extractContentType(body);
|
||
if (contentType) {
|
||
headers.append('Content-Type', contentType);
|
||
}
|
||
}
|
||
|
||
this[INTERNALS$1] = {
|
||
url: opts.url,
|
||
status,
|
||
statusText: opts.statusText || STATUS_CODES[status],
|
||
headers,
|
||
counter: opts.counter
|
||
};
|
||
}
|
||
|
||
get url() {
|
||
return this[INTERNALS$1].url || '';
|
||
}
|
||
|
||
get status() {
|
||
return this[INTERNALS$1].status;
|
||
}
|
||
|
||
/**
|
||
* Convenience property representing if the request ended normally
|
||
*/
|
||
get ok() {
|
||
return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
|
||
}
|
||
|
||
get redirected() {
|
||
return this[INTERNALS$1].counter > 0;
|
||
}
|
||
|
||
get statusText() {
|
||
return this[INTERNALS$1].statusText;
|
||
}
|
||
|
||
get headers() {
|
||
return this[INTERNALS$1].headers;
|
||
}
|
||
|
||
/**
|
||
* Clone this response
|
||
*
|
||
* @return Response
|
||
*/
|
||
clone() {
|
||
return new Response(clone(this), {
|
||
url: this.url,
|
||
status: this.status,
|
||
statusText: this.statusText,
|
||
headers: this.headers,
|
||
ok: this.ok,
|
||
redirected: this.redirected
|
||
});
|
||
}
|
||
}
|
||
|
||
Body.mixIn(Response.prototype);
|
||
|
||
Object.defineProperties(Response.prototype, {
|
||
url: { enumerable: true },
|
||
status: { enumerable: true },
|
||
ok: { enumerable: true },
|
||
redirected: { enumerable: true },
|
||
statusText: { enumerable: true },
|
||
headers: { enumerable: true },
|
||
clone: { enumerable: true }
|
||
});
|
||
|
||
Object.defineProperty(Response.prototype, Symbol.toStringTag, {
|
||
value: 'Response',
|
||
writable: false,
|
||
enumerable: false,
|
||
configurable: true
|
||
});
|
||
|
||
const INTERNALS$2 = Symbol('Request internals');
|
||
const URL = Url.URL || whatwgUrl.URL;
|
||
|
||
// fix an issue where "format", "parse" aren't a named export for node <10
|
||
const parse_url = Url.parse;
|
||
const format_url = Url.format;
|
||
|
||
/**
|
||
* Wrapper around `new URL` to handle arbitrary URLs
|
||
*
|
||
* @param {string} urlStr
|
||
* @return {void}
|
||
*/
|
||
function parseURL(urlStr) {
|
||
/*
|
||
Check whether the URL is absolute or not
|
||
Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
|
||
Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
|
||
*/
|
||
if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
|
||
urlStr = new URL(urlStr).toString();
|
||
}
|
||
|
||
// Fallback to old implementation for arbitrary URLs
|
||
return parse_url(urlStr);
|
||
}
|
||
|
||
const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
|
||
|
||
/**
|
||
* Check if a value is an instance of Request.
|
||
*
|
||
* @param Mixed input
|
||
* @return Boolean
|
||
*/
|
||
function isRequest(input) {
|
||
return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
|
||
}
|
||
|
||
function isAbortSignal(signal) {
|
||
const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
|
||
return !!(proto && proto.constructor.name === 'AbortSignal');
|
||
}
|
||
|
||
/**
|
||
* Request class
|
||
*
|
||
* @param Mixed input Url or Request instance
|
||
* @param Object init Custom options
|
||
* @return Void
|
||
*/
|
||
class Request {
|
||
constructor(input) {
|
||
let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
|
||
let parsedURL;
|
||
|
||
// normalize input
|
||
if (!isRequest(input)) {
|
||
if (input && input.href) {
|
||
// in order to support Node.js' Url objects; though WHATWG's URL objects
|
||
// will fall into this branch also (since their `toString()` will return
|
||
// `href` property anyway)
|
||
parsedURL = parseURL(input.href);
|
||
} else {
|
||
// coerce input to a string before attempting to parse
|
||
parsedURL = parseURL(`${input}`);
|
||
}
|
||
input = {};
|
||
} else {
|
||
parsedURL = parseURL(input.url);
|
||
}
|
||
|
||
let method = init.method || input.method || 'GET';
|
||
method = method.toUpperCase();
|
||
|
||
if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
|
||
throw new TypeError('Request with GET/HEAD method cannot have body');
|
||
}
|
||
|
||
let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
|
||
|
||
Body.call(this, inputBody, {
|
||
timeout: init.timeout || input.timeout || 0,
|
||
size: init.size || input.size || 0
|
||
});
|
||
|
||
const headers = new Headers(init.headers || input.headers || {});
|
||
|
||
if (inputBody != null && !headers.has('Content-Type')) {
|
||
const contentType = extractContentType(inputBody);
|
||
if (contentType) {
|
||
headers.append('Content-Type', contentType);
|
||
}
|
||
}
|
||
|
||
let signal = isRequest(input) ? input.signal : null;
|
||
if ('signal' in init) signal = init.signal;
|
||
|
||
if (signal != null && !isAbortSignal(signal)) {
|
||
throw new TypeError('Expected signal to be an instanceof AbortSignal');
|
||
}
|
||
|
||
this[INTERNALS$2] = {
|
||
method,
|
||
redirect: init.redirect || input.redirect || 'follow',
|
||
headers,
|
||
parsedURL,
|
||
signal
|
||
};
|
||
|
||
// node-fetch-only options
|
||
this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
|
||
this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
|
||
this.counter = init.counter || input.counter || 0;
|
||
this.agent = init.agent || input.agent;
|
||
}
|
||
|
||
get method() {
|
||
return this[INTERNALS$2].method;
|
||
}
|
||
|
||
get url() {
|
||
return format_url(this[INTERNALS$2].parsedURL);
|
||
}
|
||
|
||
get headers() {
|
||
return this[INTERNALS$2].headers;
|
||
}
|
||
|
||
get redirect() {
|
||
return this[INTERNALS$2].redirect;
|
||
}
|
||
|
||
get signal() {
|
||
return this[INTERNALS$2].signal;
|
||
}
|
||
|
||
/**
|
||
* Clone this request
|
||
*
|
||
* @return Request
|
||
*/
|
||
clone() {
|
||
return new Request(this);
|
||
}
|
||
}
|
||
|
||
Body.mixIn(Request.prototype);
|
||
|
||
Object.defineProperty(Request.prototype, Symbol.toStringTag, {
|
||
value: 'Request',
|
||
writable: false,
|
||
enumerable: false,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperties(Request.prototype, {
|
||
method: { enumerable: true },
|
||
url: { enumerable: true },
|
||
headers: { enumerable: true },
|
||
redirect: { enumerable: true },
|
||
clone: { enumerable: true },
|
||
signal: { enumerable: true }
|
||
});
|
||
|
||
/**
|
||
* Convert a Request to Node.js http request options.
|
||
*
|
||
* @param Request A Request instance
|
||
* @return Object The options object to be passed to http.request
|
||
*/
|
||
function getNodeRequestOptions(request) {
|
||
const parsedURL = request[INTERNALS$2].parsedURL;
|
||
const headers = new Headers(request[INTERNALS$2].headers);
|
||
|
||
// fetch step 1.3
|
||
if (!headers.has('Accept')) {
|
||
headers.set('Accept', '*/*');
|
||
}
|
||
|
||
// Basic fetch
|
||
if (!parsedURL.protocol || !parsedURL.hostname) {
|
||
throw new TypeError('Only absolute URLs are supported');
|
||
}
|
||
|
||
if (!/^https?:$/.test(parsedURL.protocol)) {
|
||
throw new TypeError('Only HTTP(S) protocols are supported');
|
||
}
|
||
|
||
if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
|
||
throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
|
||
}
|
||
|
||
// HTTP-network-or-cache fetch steps 2.4-2.7
|
||
let contentLengthValue = null;
|
||
if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
|
||
contentLengthValue = '0';
|
||
}
|
||
if (request.body != null) {
|
||
const totalBytes = getTotalBytes(request);
|
||
if (typeof totalBytes === 'number') {
|
||
contentLengthValue = String(totalBytes);
|
||
}
|
||
}
|
||
if (contentLengthValue) {
|
||
headers.set('Content-Length', contentLengthValue);
|
||
}
|
||
|
||
// HTTP-network-or-cache fetch step 2.11
|
||
if (!headers.has('User-Agent')) {
|
||
headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
|
||
}
|
||
|
||
// HTTP-network-or-cache fetch step 2.15
|
||
if (request.compress && !headers.has('Accept-Encoding')) {
|
||
headers.set('Accept-Encoding', 'gzip,deflate');
|
||
}
|
||
|
||
let agent = request.agent;
|
||
if (typeof agent === 'function') {
|
||
agent = agent(parsedURL);
|
||
}
|
||
|
||
if (!headers.has('Connection') && !agent) {
|
||
headers.set('Connection', 'close');
|
||
}
|
||
|
||
// HTTP-network fetch step 4.2
|
||
// chunked encoding is handled by Node.js
|
||
|
||
return Object.assign({}, parsedURL, {
|
||
method: request.method,
|
||
headers: exportNodeCompatibleHeaders(headers),
|
||
agent
|
||
});
|
||
}
|
||
|
||
/**
|
||
* abort-error.js
|
||
*
|
||
* AbortError interface for cancelled requests
|
||
*/
|
||
|
||
/**
|
||
* Create AbortError instance
|
||
*
|
||
* @param String message Error message for human
|
||
* @return AbortError
|
||
*/
|
||
function AbortError(message) {
|
||
Error.call(this, message);
|
||
|
||
this.type = 'aborted';
|
||
this.message = message;
|
||
|
||
// hide custom error implementation details from end-users
|
||
Error.captureStackTrace(this, this.constructor);
|
||
}
|
||
|
||
AbortError.prototype = Object.create(Error.prototype);
|
||
AbortError.prototype.constructor = AbortError;
|
||
AbortError.prototype.name = 'AbortError';
|
||
|
||
const URL$1 = Url.URL || whatwgUrl.URL;
|
||
|
||
// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
|
||
const PassThrough$1 = Stream.PassThrough;
|
||
|
||
const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
|
||
const orig = new URL$1(original).hostname;
|
||
const dest = new URL$1(destination).hostname;
|
||
|
||
return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
|
||
};
|
||
|
||
/**
|
||
* Fetch function
|
||
*
|
||
* @param Mixed url Absolute url or Request instance
|
||
* @param Object opts Fetch options
|
||
* @return Promise
|
||
*/
|
||
function fetch(url, opts) {
|
||
|
||
// allow custom promise
|
||
if (!fetch.Promise) {
|
||
throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
|
||
}
|
||
|
||
Body.Promise = fetch.Promise;
|
||
|
||
// wrap http.request into fetch
|
||
return new fetch.Promise(function (resolve, reject) {
|
||
// build request object
|
||
const request = new Request(url, opts);
|
||
const options = getNodeRequestOptions(request);
|
||
|
||
const send = (options.protocol === 'https:' ? https : http).request;
|
||
const signal = request.signal;
|
||
|
||
let response = null;
|
||
|
||
const abort = function abort() {
|
||
let error = new AbortError('The user aborted a request.');
|
||
reject(error);
|
||
if (request.body && request.body instanceof Stream.Readable) {
|
||
request.body.destroy(error);
|
||
}
|
||
if (!response || !response.body) return;
|
||
response.body.emit('error', error);
|
||
};
|
||
|
||
if (signal && signal.aborted) {
|
||
abort();
|
||
return;
|
||
}
|
||
|
||
const abortAndFinalize = function abortAndFinalize() {
|
||
abort();
|
||
finalize();
|
||
};
|
||
|
||
// send request
|
||
const req = send(options);
|
||
let reqTimeout;
|
||
|
||
if (signal) {
|
||
signal.addEventListener('abort', abortAndFinalize);
|
||
}
|
||
|
||
function finalize() {
|
||
req.abort();
|
||
if (signal) signal.removeEventListener('abort', abortAndFinalize);
|
||
clearTimeout(reqTimeout);
|
||
}
|
||
|
||
if (request.timeout) {
|
||
req.once('socket', function (socket) {
|
||
reqTimeout = setTimeout(function () {
|
||
reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
|
||
finalize();
|
||
}, request.timeout);
|
||
});
|
||
}
|
||
|
||
req.on('error', function (err) {
|
||
reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
|
||
finalize();
|
||
});
|
||
|
||
req.on('response', function (res) {
|
||
clearTimeout(reqTimeout);
|
||
|
||
const headers = createHeadersLenient(res.headers);
|
||
|
||
// HTTP fetch step 5
|
||
if (fetch.isRedirect(res.statusCode)) {
|
||
// HTTP fetch step 5.2
|
||
const location = headers.get('Location');
|
||
|
||
// HTTP fetch step 5.3
|
||
let locationURL = null;
|
||
try {
|
||
locationURL = location === null ? null : new URL$1(location, request.url).toString();
|
||
} catch (err) {
|
||
// error here can only be invalid URL in Location: header
|
||
// do not throw when options.redirect == manual
|
||
// let the user extract the errorneous redirect URL
|
||
if (request.redirect !== 'manual') {
|
||
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
|
||
finalize();
|
||
return;
|
||
}
|
||
}
|
||
|
||
// HTTP fetch step 5.5
|
||
switch (request.redirect) {
|
||
case 'error':
|
||
reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
|
||
finalize();
|
||
return;
|
||
case 'manual':
|
||
// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
|
||
if (locationURL !== null) {
|
||
// handle corrupted header
|
||
try {
|
||
headers.set('Location', locationURL);
|
||
} catch (err) {
|
||
// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
|
||
reject(err);
|
||
}
|
||
}
|
||
break;
|
||
case 'follow':
|
||
// HTTP-redirect fetch step 2
|
||
if (locationURL === null) {
|
||
break;
|
||
}
|
||
|
||
// HTTP-redirect fetch step 5
|
||
if (request.counter >= request.follow) {
|
||
reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
|
||
finalize();
|
||
return;
|
||
}
|
||
|
||
// HTTP-redirect fetch step 6 (counter increment)
|
||
// Create a new Request object.
|
||
const requestOpts = {
|
||
headers: new Headers(request.headers),
|
||
follow: request.follow,
|
||
counter: request.counter + 1,
|
||
agent: request.agent,
|
||
compress: request.compress,
|
||
method: request.method,
|
||
body: request.body,
|
||
signal: request.signal,
|
||
timeout: request.timeout,
|
||
size: request.size
|
||
};
|
||
|
||
if (!isDomainOrSubdomain(request.url, locationURL)) {
|
||
for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
|
||
requestOpts.headers.delete(name);
|
||
}
|
||
}
|
||
|
||
// HTTP-redirect fetch step 9
|
||
if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
|
||
reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
|
||
finalize();
|
||
return;
|
||
}
|
||
|
||
// HTTP-redirect fetch step 11
|
||
if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
|
||
requestOpts.method = 'GET';
|
||
requestOpts.body = undefined;
|
||
requestOpts.headers.delete('content-length');
|
||
}
|
||
|
||
// HTTP-redirect fetch step 15
|
||
resolve(fetch(new Request(locationURL, requestOpts)));
|
||
finalize();
|
||
return;
|
||
}
|
||
}
|
||
|
||
// prepare response
|
||
res.once('end', function () {
|
||
if (signal) signal.removeEventListener('abort', abortAndFinalize);
|
||
});
|
||
let body = res.pipe(new PassThrough$1());
|
||
|
||
const response_options = {
|
||
url: request.url,
|
||
status: res.statusCode,
|
||
statusText: res.statusMessage,
|
||
headers: headers,
|
||
size: request.size,
|
||
timeout: request.timeout,
|
||
counter: request.counter
|
||
};
|
||
|
||
// HTTP-network fetch step 12.1.1.3
|
||
const codings = headers.get('Content-Encoding');
|
||
|
||
// HTTP-network fetch step 12.1.1.4: handle content codings
|
||
|
||
// in following scenarios we ignore compression support
|
||
// 1. compression support is disabled
|
||
// 2. HEAD request
|
||
// 3. no Content-Encoding header
|
||
// 4. no content response (204)
|
||
// 5. content not modified response (304)
|
||
if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
||
response = new Response(body, response_options);
|
||
resolve(response);
|
||
return;
|
||
}
|
||
|
||
// For Node v6+
|
||
// Be less strict when decoding compressed responses, since sometimes
|
||
// servers send slightly invalid responses that are still accepted
|
||
// by common browsers.
|
||
// Always using Z_SYNC_FLUSH is what cURL does.
|
||
const zlibOptions = {
|
||
flush: zlib.Z_SYNC_FLUSH,
|
||
finishFlush: zlib.Z_SYNC_FLUSH
|
||
};
|
||
|
||
// for gzip
|
||
if (codings == 'gzip' || codings == 'x-gzip') {
|
||
body = body.pipe(zlib.createGunzip(zlibOptions));
|
||
response = new Response(body, response_options);
|
||
resolve(response);
|
||
return;
|
||
}
|
||
|
||
// for deflate
|
||
if (codings == 'deflate' || codings == 'x-deflate') {
|
||
// handle the infamous raw deflate response from old servers
|
||
// a hack for old IIS and Apache servers
|
||
const raw = res.pipe(new PassThrough$1());
|
||
raw.once('data', function (chunk) {
|
||
// see http://stackoverflow.com/questions/37519828
|
||
if ((chunk[0] & 0x0F) === 0x08) {
|
||
body = body.pipe(zlib.createInflate());
|
||
} else {
|
||
body = body.pipe(zlib.createInflateRaw());
|
||
}
|
||
response = new Response(body, response_options);
|
||
resolve(response);
|
||
});
|
||
return;
|
||
}
|
||
|
||
// for br
|
||
if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
|
||
body = body.pipe(zlib.createBrotliDecompress());
|
||
response = new Response(body, response_options);
|
||
resolve(response);
|
||
return;
|
||
}
|
||
|
||
// otherwise, use response as-is
|
||
response = new Response(body, response_options);
|
||
resolve(response);
|
||
});
|
||
|
||
writeToStream(req, request);
|
||
});
|
||
}
|
||
/**
|
||
* Redirect code matching
|
||
*
|
||
* @param Number code Status code
|
||
* @return Boolean
|
||
*/
|
||
fetch.isRedirect = function (code) {
|
||
return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
|
||
};
|
||
|
||
// expose Promise
|
||
fetch.Promise = global.Promise;
|
||
|
||
module.exports = exports = fetch;
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
exports["default"] = exports;
|
||
exports.Headers = Headers;
|
||
exports.Request = Request;
|
||
exports.Response = Response;
|
||
exports.FetchError = FetchError;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3039:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
var punycode = __nccwpck_require__(5477);
|
||
var mappingTable = __nccwpck_require__(6492);
|
||
|
||
var PROCESSING_OPTIONS = {
|
||
TRANSITIONAL: 0,
|
||
NONTRANSITIONAL: 1
|
||
};
|
||
|
||
function normalize(str) { // fix bug in v8
|
||
return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000');
|
||
}
|
||
|
||
function findStatus(val) {
|
||
var start = 0;
|
||
var end = mappingTable.length - 1;
|
||
|
||
while (start <= end) {
|
||
var mid = Math.floor((start + end) / 2);
|
||
|
||
var target = mappingTable[mid];
|
||
if (target[0][0] <= val && target[0][1] >= val) {
|
||
return target;
|
||
} else if (target[0][0] > val) {
|
||
end = mid - 1;
|
||
} else {
|
||
start = mid + 1;
|
||
}
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
||
|
||
function countSymbols(string) {
|
||
return string
|
||
// replace every surrogate pair with a BMP symbol
|
||
.replace(regexAstralSymbols, '_')
|
||
// then get the length
|
||
.length;
|
||
}
|
||
|
||
function mapChars(domain_name, useSTD3, processing_option) {
|
||
var hasError = false;
|
||
var processed = "";
|
||
|
||
var len = countSymbols(domain_name);
|
||
for (var i = 0; i < len; ++i) {
|
||
var codePoint = domain_name.codePointAt(i);
|
||
var status = findStatus(codePoint);
|
||
|
||
switch (status[1]) {
|
||
case "disallowed":
|
||
hasError = true;
|
||
processed += String.fromCodePoint(codePoint);
|
||
break;
|
||
case "ignored":
|
||
break;
|
||
case "mapped":
|
||
processed += String.fromCodePoint.apply(String, status[2]);
|
||
break;
|
||
case "deviation":
|
||
if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {
|
||
processed += String.fromCodePoint.apply(String, status[2]);
|
||
} else {
|
||
processed += String.fromCodePoint(codePoint);
|
||
}
|
||
break;
|
||
case "valid":
|
||
processed += String.fromCodePoint(codePoint);
|
||
break;
|
||
case "disallowed_STD3_mapped":
|
||
if (useSTD3) {
|
||
hasError = true;
|
||
processed += String.fromCodePoint(codePoint);
|
||
} else {
|
||
processed += String.fromCodePoint.apply(String, status[2]);
|
||
}
|
||
break;
|
||
case "disallowed_STD3_valid":
|
||
if (useSTD3) {
|
||
hasError = true;
|
||
}
|
||
|
||
processed += String.fromCodePoint(codePoint);
|
||
break;
|
||
}
|
||
}
|
||
|
||
return {
|
||
string: processed,
|
||
error: hasError
|
||
};
|
||
}
|
||
|
||
var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;
|
||
|
||
function validateLabel(label, processing_option) {
|
||
if (label.substr(0, 4) === "xn--") {
|
||
label = punycode.toUnicode(label);
|
||
processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;
|
||
}
|
||
|
||
var error = false;
|
||
|
||
if (normalize(label) !== label ||
|
||
(label[3] === "-" && label[4] === "-") ||
|
||
label[0] === "-" || label[label.length - 1] === "-" ||
|
||
label.indexOf(".") !== -1 ||
|
||
label.search(combiningMarksRegex) === 0) {
|
||
error = true;
|
||
}
|
||
|
||
var len = countSymbols(label);
|
||
for (var i = 0; i < len; ++i) {
|
||
var status = findStatus(label.codePointAt(i));
|
||
if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") ||
|
||
(processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&
|
||
status[1] !== "valid" && status[1] !== "deviation")) {
|
||
error = true;
|
||
break;
|
||
}
|
||
}
|
||
|
||
return {
|
||
label: label,
|
||
error: error
|
||
};
|
||
}
|
||
|
||
function processing(domain_name, useSTD3, processing_option) {
|
||
var result = mapChars(domain_name, useSTD3, processing_option);
|
||
result.string = normalize(result.string);
|
||
|
||
var labels = result.string.split(".");
|
||
for (var i = 0; i < labels.length; ++i) {
|
||
try {
|
||
var validation = validateLabel(labels[i]);
|
||
labels[i] = validation.label;
|
||
result.error = result.error || validation.error;
|
||
} catch(e) {
|
||
result.error = true;
|
||
}
|
||
}
|
||
|
||
return {
|
||
string: labels.join("."),
|
||
error: result.error
|
||
};
|
||
}
|
||
|
||
module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {
|
||
var result = processing(domain_name, useSTD3, processing_option);
|
||
var labels = result.string.split(".");
|
||
labels = labels.map(function(l) {
|
||
try {
|
||
return punycode.toASCII(l);
|
||
} catch(e) {
|
||
result.error = true;
|
||
return l;
|
||
}
|
||
});
|
||
|
||
if (verifyDnsLength) {
|
||
var total = labels.slice(0, labels.length - 1).join(".").length;
|
||
if (total.length > 253 || total.length === 0) {
|
||
result.error = true;
|
||
}
|
||
|
||
for (var i=0; i < labels.length; ++i) {
|
||
if (labels.length > 63 || labels.length === 0) {
|
||
result.error = true;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
if (result.error) return null;
|
||
return labels.join(".");
|
||
};
|
||
|
||
module.exports.toUnicode = function(domain_name, useSTD3) {
|
||
var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);
|
||
|
||
return {
|
||
domain: result.string,
|
||
error: result.error
|
||
};
|
||
};
|
||
|
||
module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 6542:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
var conversions = {};
|
||
module.exports = conversions;
|
||
|
||
function sign(x) {
|
||
return x < 0 ? -1 : 1;
|
||
}
|
||
|
||
function evenRound(x) {
|
||
// Round x to the nearest integer, choosing the even integer if it lies halfway between two.
|
||
if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor)
|
||
return Math.floor(x);
|
||
} else {
|
||
return Math.round(x);
|
||
}
|
||
}
|
||
|
||
function createNumberConversion(bitLength, typeOpts) {
|
||
if (!typeOpts.unsigned) {
|
||
--bitLength;
|
||
}
|
||
const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);
|
||
const upperBound = Math.pow(2, bitLength) - 1;
|
||
|
||
const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);
|
||
const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);
|
||
|
||
return function(V, opts) {
|
||
if (!opts) opts = {};
|
||
|
||
let x = +V;
|
||
|
||
if (opts.enforceRange) {
|
||
if (!Number.isFinite(x)) {
|
||
throw new TypeError("Argument is not a finite number");
|
||
}
|
||
|
||
x = sign(x) * Math.floor(Math.abs(x));
|
||
if (x < lowerBound || x > upperBound) {
|
||
throw new TypeError("Argument is not in byte range");
|
||
}
|
||
|
||
return x;
|
||
}
|
||
|
||
if (!isNaN(x) && opts.clamp) {
|
||
x = evenRound(x);
|
||
|
||
if (x < lowerBound) x = lowerBound;
|
||
if (x > upperBound) x = upperBound;
|
||
return x;
|
||
}
|
||
|
||
if (!Number.isFinite(x) || x === 0) {
|
||
return 0;
|
||
}
|
||
|
||
x = sign(x) * Math.floor(Math.abs(x));
|
||
x = x % moduloVal;
|
||
|
||
if (!typeOpts.unsigned && x >= moduloBound) {
|
||
return x - moduloVal;
|
||
} else if (typeOpts.unsigned) {
|
||
if (x < 0) {
|
||
x += moduloVal;
|
||
} else if (x === -0) { // don't return negative zero
|
||
return 0;
|
||
}
|
||
}
|
||
|
||
return x;
|
||
}
|
||
}
|
||
|
||
conversions["void"] = function () {
|
||
return undefined;
|
||
};
|
||
|
||
conversions["boolean"] = function (val) {
|
||
return !!val;
|
||
};
|
||
|
||
conversions["byte"] = createNumberConversion(8, { unsigned: false });
|
||
conversions["octet"] = createNumberConversion(8, { unsigned: true });
|
||
|
||
conversions["short"] = createNumberConversion(16, { unsigned: false });
|
||
conversions["unsigned short"] = createNumberConversion(16, { unsigned: true });
|
||
|
||
conversions["long"] = createNumberConversion(32, { unsigned: false });
|
||
conversions["unsigned long"] = createNumberConversion(32, { unsigned: true });
|
||
|
||
conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });
|
||
conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });
|
||
|
||
conversions["double"] = function (V) {
|
||
const x = +V;
|
||
|
||
if (!Number.isFinite(x)) {
|
||
throw new TypeError("Argument is not a finite floating-point value");
|
||
}
|
||
|
||
return x;
|
||
};
|
||
|
||
conversions["unrestricted double"] = function (V) {
|
||
const x = +V;
|
||
|
||
if (isNaN(x)) {
|
||
throw new TypeError("Argument is NaN");
|
||
}
|
||
|
||
return x;
|
||
};
|
||
|
||
// not quite valid, but good enough for JS
|
||
conversions["float"] = conversions["double"];
|
||
conversions["unrestricted float"] = conversions["unrestricted double"];
|
||
|
||
conversions["DOMString"] = function (V, opts) {
|
||
if (!opts) opts = {};
|
||
|
||
if (opts.treatNullAsEmptyString && V === null) {
|
||
return "";
|
||
}
|
||
|
||
return String(V);
|
||
};
|
||
|
||
conversions["ByteString"] = function (V, opts) {
|
||
const x = String(V);
|
||
let c = undefined;
|
||
for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {
|
||
if (c > 255) {
|
||
throw new TypeError("Argument is not a valid bytestring");
|
||
}
|
||
}
|
||
|
||
return x;
|
||
};
|
||
|
||
conversions["USVString"] = function (V) {
|
||
const S = String(V);
|
||
const n = S.length;
|
||
const U = [];
|
||
for (let i = 0; i < n; ++i) {
|
||
const c = S.charCodeAt(i);
|
||
if (c < 0xD800 || c > 0xDFFF) {
|
||
U.push(String.fromCodePoint(c));
|
||
} else if (0xDC00 <= c && c <= 0xDFFF) {
|
||
U.push(String.fromCodePoint(0xFFFD));
|
||
} else {
|
||
if (i === n - 1) {
|
||
U.push(String.fromCodePoint(0xFFFD));
|
||
} else {
|
||
const d = S.charCodeAt(i + 1);
|
||
if (0xDC00 <= d && d <= 0xDFFF) {
|
||
const a = c & 0x3FF;
|
||
const b = d & 0x3FF;
|
||
U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));
|
||
++i;
|
||
} else {
|
||
U.push(String.fromCodePoint(0xFFFD));
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
return U.join('');
|
||
};
|
||
|
||
conversions["Date"] = function (V, opts) {
|
||
if (!(V instanceof Date)) {
|
||
throw new TypeError("Argument is not a Date object");
|
||
}
|
||
if (isNaN(V)) {
|
||
return undefined;
|
||
}
|
||
|
||
return V;
|
||
};
|
||
|
||
conversions["RegExp"] = function (V, opts) {
|
||
if (!(V instanceof RegExp)) {
|
||
V = new RegExp(V);
|
||
}
|
||
|
||
return V;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 394:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
const usm = __nccwpck_require__(1234);
|
||
|
||
exports.implementation = class URLImpl {
|
||
constructor(constructorArgs) {
|
||
const url = constructorArgs[0];
|
||
const base = constructorArgs[1];
|
||
|
||
let parsedBase = null;
|
||
if (base !== undefined) {
|
||
parsedBase = usm.basicURLParse(base);
|
||
if (parsedBase === "failure") {
|
||
throw new TypeError("Invalid base URL");
|
||
}
|
||
}
|
||
|
||
const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });
|
||
if (parsedURL === "failure") {
|
||
throw new TypeError("Invalid URL");
|
||
}
|
||
|
||
this._url = parsedURL;
|
||
|
||
// TODO: query stuff
|
||
}
|
||
|
||
get href() {
|
||
return usm.serializeURL(this._url);
|
||
}
|
||
|
||
set href(v) {
|
||
const parsedURL = usm.basicURLParse(v);
|
||
if (parsedURL === "failure") {
|
||
throw new TypeError("Invalid URL");
|
||
}
|
||
|
||
this._url = parsedURL;
|
||
}
|
||
|
||
get origin() {
|
||
return usm.serializeURLOrigin(this._url);
|
||
}
|
||
|
||
get protocol() {
|
||
return this._url.scheme + ":";
|
||
}
|
||
|
||
set protocol(v) {
|
||
usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" });
|
||
}
|
||
|
||
get username() {
|
||
return this._url.username;
|
||
}
|
||
|
||
set username(v) {
|
||
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
|
||
return;
|
||
}
|
||
|
||
usm.setTheUsername(this._url, v);
|
||
}
|
||
|
||
get password() {
|
||
return this._url.password;
|
||
}
|
||
|
||
set password(v) {
|
||
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
|
||
return;
|
||
}
|
||
|
||
usm.setThePassword(this._url, v);
|
||
}
|
||
|
||
get host() {
|
||
const url = this._url;
|
||
|
||
if (url.host === null) {
|
||
return "";
|
||
}
|
||
|
||
if (url.port === null) {
|
||
return usm.serializeHost(url.host);
|
||
}
|
||
|
||
return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port);
|
||
}
|
||
|
||
set host(v) {
|
||
if (this._url.cannotBeABaseURL) {
|
||
return;
|
||
}
|
||
|
||
usm.basicURLParse(v, { url: this._url, stateOverride: "host" });
|
||
}
|
||
|
||
get hostname() {
|
||
if (this._url.host === null) {
|
||
return "";
|
||
}
|
||
|
||
return usm.serializeHost(this._url.host);
|
||
}
|
||
|
||
set hostname(v) {
|
||
if (this._url.cannotBeABaseURL) {
|
||
return;
|
||
}
|
||
|
||
usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" });
|
||
}
|
||
|
||
get port() {
|
||
if (this._url.port === null) {
|
||
return "";
|
||
}
|
||
|
||
return usm.serializeInteger(this._url.port);
|
||
}
|
||
|
||
set port(v) {
|
||
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
|
||
return;
|
||
}
|
||
|
||
if (v === "") {
|
||
this._url.port = null;
|
||
} else {
|
||
usm.basicURLParse(v, { url: this._url, stateOverride: "port" });
|
||
}
|
||
}
|
||
|
||
get pathname() {
|
||
if (this._url.cannotBeABaseURL) {
|
||
return this._url.path[0];
|
||
}
|
||
|
||
if (this._url.path.length === 0) {
|
||
return "";
|
||
}
|
||
|
||
return "/" + this._url.path.join("/");
|
||
}
|
||
|
||
set pathname(v) {
|
||
if (this._url.cannotBeABaseURL) {
|
||
return;
|
||
}
|
||
|
||
this._url.path = [];
|
||
usm.basicURLParse(v, { url: this._url, stateOverride: "path start" });
|
||
}
|
||
|
||
get search() {
|
||
if (this._url.query === null || this._url.query === "") {
|
||
return "";
|
||
}
|
||
|
||
return "?" + this._url.query;
|
||
}
|
||
|
||
set search(v) {
|
||
// TODO: query stuff
|
||
|
||
const url = this._url;
|
||
|
||
if (v === "") {
|
||
url.query = null;
|
||
return;
|
||
}
|
||
|
||
const input = v[0] === "?" ? v.substring(1) : v;
|
||
url.query = "";
|
||
usm.basicURLParse(input, { url, stateOverride: "query" });
|
||
}
|
||
|
||
get hash() {
|
||
if (this._url.fragment === null || this._url.fragment === "") {
|
||
return "";
|
||
}
|
||
|
||
return "#" + this._url.fragment;
|
||
}
|
||
|
||
set hash(v) {
|
||
if (v === "") {
|
||
this._url.fragment = null;
|
||
return;
|
||
}
|
||
|
||
const input = v[0] === "#" ? v.substring(1) : v;
|
||
this._url.fragment = "";
|
||
usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" });
|
||
}
|
||
|
||
toJSON() {
|
||
return this.href;
|
||
}
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2047:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const conversions = __nccwpck_require__(6542);
|
||
const utils = __nccwpck_require__(3387);
|
||
const Impl = __nccwpck_require__(394);
|
||
|
||
const impl = utils.implSymbol;
|
||
|
||
function URL(url) {
|
||
if (!this || this[impl] || !(this instanceof URL)) {
|
||
throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");
|
||
}
|
||
if (arguments.length < 1) {
|
||
throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present.");
|
||
}
|
||
const args = [];
|
||
for (let i = 0; i < arguments.length && i < 2; ++i) {
|
||
args[i] = arguments[i];
|
||
}
|
||
args[0] = conversions["USVString"](args[0]);
|
||
if (args[1] !== undefined) {
|
||
args[1] = conversions["USVString"](args[1]);
|
||
}
|
||
|
||
module.exports.setup(this, args);
|
||
}
|
||
|
||
URL.prototype.toJSON = function toJSON() {
|
||
if (!this || !module.exports.is(this)) {
|
||
throw new TypeError("Illegal invocation");
|
||
}
|
||
const args = [];
|
||
for (let i = 0; i < arguments.length && i < 0; ++i) {
|
||
args[i] = arguments[i];
|
||
}
|
||
return this[impl].toJSON.apply(this[impl], args);
|
||
};
|
||
Object.defineProperty(URL.prototype, "href", {
|
||
get() {
|
||
return this[impl].href;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].href = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
URL.prototype.toString = function () {
|
||
if (!this || !module.exports.is(this)) {
|
||
throw new TypeError("Illegal invocation");
|
||
}
|
||
return this.href;
|
||
};
|
||
|
||
Object.defineProperty(URL.prototype, "origin", {
|
||
get() {
|
||
return this[impl].origin;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperty(URL.prototype, "protocol", {
|
||
get() {
|
||
return this[impl].protocol;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].protocol = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperty(URL.prototype, "username", {
|
||
get() {
|
||
return this[impl].username;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].username = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperty(URL.prototype, "password", {
|
||
get() {
|
||
return this[impl].password;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].password = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperty(URL.prototype, "host", {
|
||
get() {
|
||
return this[impl].host;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].host = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperty(URL.prototype, "hostname", {
|
||
get() {
|
||
return this[impl].hostname;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].hostname = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperty(URL.prototype, "port", {
|
||
get() {
|
||
return this[impl].port;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].port = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperty(URL.prototype, "pathname", {
|
||
get() {
|
||
return this[impl].pathname;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].pathname = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperty(URL.prototype, "search", {
|
||
get() {
|
||
return this[impl].search;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].search = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
Object.defineProperty(URL.prototype, "hash", {
|
||
get() {
|
||
return this[impl].hash;
|
||
},
|
||
set(V) {
|
||
V = conversions["USVString"](V);
|
||
this[impl].hash = V;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
|
||
|
||
module.exports = {
|
||
is(obj) {
|
||
return !!obj && obj[impl] instanceof Impl.implementation;
|
||
},
|
||
create(constructorArgs, privateData) {
|
||
let obj = Object.create(URL.prototype);
|
||
this.setup(obj, constructorArgs, privateData);
|
||
return obj;
|
||
},
|
||
setup(obj, constructorArgs, privateData) {
|
||
if (!privateData) privateData = {};
|
||
privateData.wrapper = obj;
|
||
|
||
obj[impl] = new Impl.implementation(constructorArgs, privateData);
|
||
obj[impl][utils.wrapperSymbol] = obj;
|
||
},
|
||
interface: URL,
|
||
expose: {
|
||
Window: { URL: URL },
|
||
Worker: { URL: URL }
|
||
}
|
||
};
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 301:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
exports.URL = __nccwpck_require__(2047)["interface"];
|
||
exports.serializeURL = __nccwpck_require__(1234).serializeURL;
|
||
exports.serializeURLOrigin = __nccwpck_require__(1234).serializeURLOrigin;
|
||
exports.basicURLParse = __nccwpck_require__(1234).basicURLParse;
|
||
exports.setTheUsername = __nccwpck_require__(1234).setTheUsername;
|
||
exports.setThePassword = __nccwpck_require__(1234).setThePassword;
|
||
exports.serializeHost = __nccwpck_require__(1234).serializeHost;
|
||
exports.serializeInteger = __nccwpck_require__(1234).serializeInteger;
|
||
exports.parseURL = __nccwpck_require__(1234).parseURL;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1234:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
const punycode = __nccwpck_require__(5477);
|
||
const tr46 = __nccwpck_require__(3039);
|
||
|
||
const specialSchemes = {
|
||
ftp: 21,
|
||
file: null,
|
||
gopher: 70,
|
||
http: 80,
|
||
https: 443,
|
||
ws: 80,
|
||
wss: 443
|
||
};
|
||
|
||
const failure = Symbol("failure");
|
||
|
||
function countSymbols(str) {
|
||
return punycode.ucs2.decode(str).length;
|
||
}
|
||
|
||
function at(input, idx) {
|
||
const c = input[idx];
|
||
return isNaN(c) ? undefined : String.fromCodePoint(c);
|
||
}
|
||
|
||
function isASCIIDigit(c) {
|
||
return c >= 0x30 && c <= 0x39;
|
||
}
|
||
|
||
function isASCIIAlpha(c) {
|
||
return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);
|
||
}
|
||
|
||
function isASCIIAlphanumeric(c) {
|
||
return isASCIIAlpha(c) || isASCIIDigit(c);
|
||
}
|
||
|
||
function isASCIIHex(c) {
|
||
return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);
|
||
}
|
||
|
||
function isSingleDot(buffer) {
|
||
return buffer === "." || buffer.toLowerCase() === "%2e";
|
||
}
|
||
|
||
function isDoubleDot(buffer) {
|
||
buffer = buffer.toLowerCase();
|
||
return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e";
|
||
}
|
||
|
||
function isWindowsDriveLetterCodePoints(cp1, cp2) {
|
||
return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);
|
||
}
|
||
|
||
function isWindowsDriveLetterString(string) {
|
||
return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|");
|
||
}
|
||
|
||
function isNormalizedWindowsDriveLetterString(string) {
|
||
return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":";
|
||
}
|
||
|
||
function containsForbiddenHostCodePoint(string) {
|
||
return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1;
|
||
}
|
||
|
||
function containsForbiddenHostCodePointExcludingPercent(string) {
|
||
return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1;
|
||
}
|
||
|
||
function isSpecialScheme(scheme) {
|
||
return specialSchemes[scheme] !== undefined;
|
||
}
|
||
|
||
function isSpecial(url) {
|
||
return isSpecialScheme(url.scheme);
|
||
}
|
||
|
||
function defaultPort(scheme) {
|
||
return specialSchemes[scheme];
|
||
}
|
||
|
||
function percentEncode(c) {
|
||
let hex = c.toString(16).toUpperCase();
|
||
if (hex.length === 1) {
|
||
hex = "0" + hex;
|
||
}
|
||
|
||
return "%" + hex;
|
||
}
|
||
|
||
function utf8PercentEncode(c) {
|
||
const buf = new Buffer(c);
|
||
|
||
let str = "";
|
||
|
||
for (let i = 0; i < buf.length; ++i) {
|
||
str += percentEncode(buf[i]);
|
||
}
|
||
|
||
return str;
|
||
}
|
||
|
||
function utf8PercentDecode(str) {
|
||
const input = new Buffer(str);
|
||
const output = [];
|
||
for (let i = 0; i < input.length; ++i) {
|
||
if (input[i] !== 37) {
|
||
output.push(input[i]);
|
||
} else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {
|
||
output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));
|
||
i += 2;
|
||
} else {
|
||
output.push(input[i]);
|
||
}
|
||
}
|
||
return new Buffer(output).toString();
|
||
}
|
||
|
||
function isC0ControlPercentEncode(c) {
|
||
return c <= 0x1F || c > 0x7E;
|
||
}
|
||
|
||
const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);
|
||
function isPathPercentEncode(c) {
|
||
return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);
|
||
}
|
||
|
||
const extraUserinfoPercentEncodeSet =
|
||
new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);
|
||
function isUserinfoPercentEncode(c) {
|
||
return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);
|
||
}
|
||
|
||
function percentEncodeChar(c, encodeSetPredicate) {
|
||
const cStr = String.fromCodePoint(c);
|
||
|
||
if (encodeSetPredicate(c)) {
|
||
return utf8PercentEncode(cStr);
|
||
}
|
||
|
||
return cStr;
|
||
}
|
||
|
||
function parseIPv4Number(input) {
|
||
let R = 10;
|
||
|
||
if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") {
|
||
input = input.substring(2);
|
||
R = 16;
|
||
} else if (input.length >= 2 && input.charAt(0) === "0") {
|
||
input = input.substring(1);
|
||
R = 8;
|
||
}
|
||
|
||
if (input === "") {
|
||
return 0;
|
||
}
|
||
|
||
const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/);
|
||
if (regex.test(input)) {
|
||
return failure;
|
||
}
|
||
|
||
return parseInt(input, R);
|
||
}
|
||
|
||
function parseIPv4(input) {
|
||
const parts = input.split(".");
|
||
if (parts[parts.length - 1] === "") {
|
||
if (parts.length > 1) {
|
||
parts.pop();
|
||
}
|
||
}
|
||
|
||
if (parts.length > 4) {
|
||
return input;
|
||
}
|
||
|
||
const numbers = [];
|
||
for (const part of parts) {
|
||
if (part === "") {
|
||
return input;
|
||
}
|
||
const n = parseIPv4Number(part);
|
||
if (n === failure) {
|
||
return input;
|
||
}
|
||
|
||
numbers.push(n);
|
||
}
|
||
|
||
for (let i = 0; i < numbers.length - 1; ++i) {
|
||
if (numbers[i] > 255) {
|
||
return failure;
|
||
}
|
||
}
|
||
if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {
|
||
return failure;
|
||
}
|
||
|
||
let ipv4 = numbers.pop();
|
||
let counter = 0;
|
||
|
||
for (const n of numbers) {
|
||
ipv4 += n * Math.pow(256, 3 - counter);
|
||
++counter;
|
||
}
|
||
|
||
return ipv4;
|
||
}
|
||
|
||
function serializeIPv4(address) {
|
||
let output = "";
|
||
let n = address;
|
||
|
||
for (let i = 1; i <= 4; ++i) {
|
||
output = String(n % 256) + output;
|
||
if (i !== 4) {
|
||
output = "." + output;
|
||
}
|
||
n = Math.floor(n / 256);
|
||
}
|
||
|
||
return output;
|
||
}
|
||
|
||
function parseIPv6(input) {
|
||
const address = [0, 0, 0, 0, 0, 0, 0, 0];
|
||
let pieceIndex = 0;
|
||
let compress = null;
|
||
let pointer = 0;
|
||
|
||
input = punycode.ucs2.decode(input);
|
||
|
||
if (input[pointer] === 58) {
|
||
if (input[pointer + 1] !== 58) {
|
||
return failure;
|
||
}
|
||
|
||
pointer += 2;
|
||
++pieceIndex;
|
||
compress = pieceIndex;
|
||
}
|
||
|
||
while (pointer < input.length) {
|
||
if (pieceIndex === 8) {
|
||
return failure;
|
||
}
|
||
|
||
if (input[pointer] === 58) {
|
||
if (compress !== null) {
|
||
return failure;
|
||
}
|
||
++pointer;
|
||
++pieceIndex;
|
||
compress = pieceIndex;
|
||
continue;
|
||
}
|
||
|
||
let value = 0;
|
||
let length = 0;
|
||
|
||
while (length < 4 && isASCIIHex(input[pointer])) {
|
||
value = value * 0x10 + parseInt(at(input, pointer), 16);
|
||
++pointer;
|
||
++length;
|
||
}
|
||
|
||
if (input[pointer] === 46) {
|
||
if (length === 0) {
|
||
return failure;
|
||
}
|
||
|
||
pointer -= length;
|
||
|
||
if (pieceIndex > 6) {
|
||
return failure;
|
||
}
|
||
|
||
let numbersSeen = 0;
|
||
|
||
while (input[pointer] !== undefined) {
|
||
let ipv4Piece = null;
|
||
|
||
if (numbersSeen > 0) {
|
||
if (input[pointer] === 46 && numbersSeen < 4) {
|
||
++pointer;
|
||
} else {
|
||
return failure;
|
||
}
|
||
}
|
||
|
||
if (!isASCIIDigit(input[pointer])) {
|
||
return failure;
|
||
}
|
||
|
||
while (isASCIIDigit(input[pointer])) {
|
||
const number = parseInt(at(input, pointer));
|
||
if (ipv4Piece === null) {
|
||
ipv4Piece = number;
|
||
} else if (ipv4Piece === 0) {
|
||
return failure;
|
||
} else {
|
||
ipv4Piece = ipv4Piece * 10 + number;
|
||
}
|
||
if (ipv4Piece > 255) {
|
||
return failure;
|
||
}
|
||
++pointer;
|
||
}
|
||
|
||
address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;
|
||
|
||
++numbersSeen;
|
||
|
||
if (numbersSeen === 2 || numbersSeen === 4) {
|
||
++pieceIndex;
|
||
}
|
||
}
|
||
|
||
if (numbersSeen !== 4) {
|
||
return failure;
|
||
}
|
||
|
||
break;
|
||
} else if (input[pointer] === 58) {
|
||
++pointer;
|
||
if (input[pointer] === undefined) {
|
||
return failure;
|
||
}
|
||
} else if (input[pointer] !== undefined) {
|
||
return failure;
|
||
}
|
||
|
||
address[pieceIndex] = value;
|
||
++pieceIndex;
|
||
}
|
||
|
||
if (compress !== null) {
|
||
let swaps = pieceIndex - compress;
|
||
pieceIndex = 7;
|
||
while (pieceIndex !== 0 && swaps > 0) {
|
||
const temp = address[compress + swaps - 1];
|
||
address[compress + swaps - 1] = address[pieceIndex];
|
||
address[pieceIndex] = temp;
|
||
--pieceIndex;
|
||
--swaps;
|
||
}
|
||
} else if (compress === null && pieceIndex !== 8) {
|
||
return failure;
|
||
}
|
||
|
||
return address;
|
||
}
|
||
|
||
function serializeIPv6(address) {
|
||
let output = "";
|
||
const seqResult = findLongestZeroSequence(address);
|
||
const compress = seqResult.idx;
|
||
let ignore0 = false;
|
||
|
||
for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {
|
||
if (ignore0 && address[pieceIndex] === 0) {
|
||
continue;
|
||
} else if (ignore0) {
|
||
ignore0 = false;
|
||
}
|
||
|
||
if (compress === pieceIndex) {
|
||
const separator = pieceIndex === 0 ? "::" : ":";
|
||
output += separator;
|
||
ignore0 = true;
|
||
continue;
|
||
}
|
||
|
||
output += address[pieceIndex].toString(16);
|
||
|
||
if (pieceIndex !== 7) {
|
||
output += ":";
|
||
}
|
||
}
|
||
|
||
return output;
|
||
}
|
||
|
||
function parseHost(input, isSpecialArg) {
|
||
if (input[0] === "[") {
|
||
if (input[input.length - 1] !== "]") {
|
||
return failure;
|
||
}
|
||
|
||
return parseIPv6(input.substring(1, input.length - 1));
|
||
}
|
||
|
||
if (!isSpecialArg) {
|
||
return parseOpaqueHost(input);
|
||
}
|
||
|
||
const domain = utf8PercentDecode(input);
|
||
const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);
|
||
if (asciiDomain === null) {
|
||
return failure;
|
||
}
|
||
|
||
if (containsForbiddenHostCodePoint(asciiDomain)) {
|
||
return failure;
|
||
}
|
||
|
||
const ipv4Host = parseIPv4(asciiDomain);
|
||
if (typeof ipv4Host === "number" || ipv4Host === failure) {
|
||
return ipv4Host;
|
||
}
|
||
|
||
return asciiDomain;
|
||
}
|
||
|
||
function parseOpaqueHost(input) {
|
||
if (containsForbiddenHostCodePointExcludingPercent(input)) {
|
||
return failure;
|
||
}
|
||
|
||
let output = "";
|
||
const decoded = punycode.ucs2.decode(input);
|
||
for (let i = 0; i < decoded.length; ++i) {
|
||
output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);
|
||
}
|
||
return output;
|
||
}
|
||
|
||
function findLongestZeroSequence(arr) {
|
||
let maxIdx = null;
|
||
let maxLen = 1; // only find elements > 1
|
||
let currStart = null;
|
||
let currLen = 0;
|
||
|
||
for (let i = 0; i < arr.length; ++i) {
|
||
if (arr[i] !== 0) {
|
||
if (currLen > maxLen) {
|
||
maxIdx = currStart;
|
||
maxLen = currLen;
|
||
}
|
||
|
||
currStart = null;
|
||
currLen = 0;
|
||
} else {
|
||
if (currStart === null) {
|
||
currStart = i;
|
||
}
|
||
++currLen;
|
||
}
|
||
}
|
||
|
||
// if trailing zeros
|
||
if (currLen > maxLen) {
|
||
maxIdx = currStart;
|
||
maxLen = currLen;
|
||
}
|
||
|
||
return {
|
||
idx: maxIdx,
|
||
len: maxLen
|
||
};
|
||
}
|
||
|
||
function serializeHost(host) {
|
||
if (typeof host === "number") {
|
||
return serializeIPv4(host);
|
||
}
|
||
|
||
// IPv6 serializer
|
||
if (host instanceof Array) {
|
||
return "[" + serializeIPv6(host) + "]";
|
||
}
|
||
|
||
return host;
|
||
}
|
||
|
||
function trimControlChars(url) {
|
||
return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, "");
|
||
}
|
||
|
||
function trimTabAndNewline(url) {
|
||
return url.replace(/\u0009|\u000A|\u000D/g, "");
|
||
}
|
||
|
||
function shortenPath(url) {
|
||
const path = url.path;
|
||
if (path.length === 0) {
|
||
return;
|
||
}
|
||
if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {
|
||
return;
|
||
}
|
||
|
||
path.pop();
|
||
}
|
||
|
||
function includesCredentials(url) {
|
||
return url.username !== "" || url.password !== "";
|
||
}
|
||
|
||
function cannotHaveAUsernamePasswordPort(url) {
|
||
return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file";
|
||
}
|
||
|
||
function isNormalizedWindowsDriveLetter(string) {
|
||
return /^[A-Za-z]:$/.test(string);
|
||
}
|
||
|
||
function URLStateMachine(input, base, encodingOverride, url, stateOverride) {
|
||
this.pointer = 0;
|
||
this.input = input;
|
||
this.base = base || null;
|
||
this.encodingOverride = encodingOverride || "utf-8";
|
||
this.stateOverride = stateOverride;
|
||
this.url = url;
|
||
this.failure = false;
|
||
this.parseError = false;
|
||
|
||
if (!this.url) {
|
||
this.url = {
|
||
scheme: "",
|
||
username: "",
|
||
password: "",
|
||
host: null,
|
||
port: null,
|
||
path: [],
|
||
query: null,
|
||
fragment: null,
|
||
|
||
cannotBeABaseURL: false
|
||
};
|
||
|
||
const res = trimControlChars(this.input);
|
||
if (res !== this.input) {
|
||
this.parseError = true;
|
||
}
|
||
this.input = res;
|
||
}
|
||
|
||
const res = trimTabAndNewline(this.input);
|
||
if (res !== this.input) {
|
||
this.parseError = true;
|
||
}
|
||
this.input = res;
|
||
|
||
this.state = stateOverride || "scheme start";
|
||
|
||
this.buffer = "";
|
||
this.atFlag = false;
|
||
this.arrFlag = false;
|
||
this.passwordTokenSeenFlag = false;
|
||
|
||
this.input = punycode.ucs2.decode(this.input);
|
||
|
||
for (; this.pointer <= this.input.length; ++this.pointer) {
|
||
const c = this.input[this.pointer];
|
||
const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);
|
||
|
||
// exec state machine
|
||
const ret = this["parse " + this.state](c, cStr);
|
||
if (!ret) {
|
||
break; // terminate algorithm
|
||
} else if (ret === failure) {
|
||
this.failure = true;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) {
|
||
if (isASCIIAlpha(c)) {
|
||
this.buffer += cStr.toLowerCase();
|
||
this.state = "scheme";
|
||
} else if (!this.stateOverride) {
|
||
this.state = "no scheme";
|
||
--this.pointer;
|
||
} else {
|
||
this.parseError = true;
|
||
return failure;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) {
|
||
if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {
|
||
this.buffer += cStr.toLowerCase();
|
||
} else if (c === 58) {
|
||
if (this.stateOverride) {
|
||
if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {
|
||
return false;
|
||
}
|
||
|
||
if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {
|
||
return false;
|
||
}
|
||
|
||
if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") {
|
||
return false;
|
||
}
|
||
|
||
if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) {
|
||
return false;
|
||
}
|
||
}
|
||
this.url.scheme = this.buffer;
|
||
this.buffer = "";
|
||
if (this.stateOverride) {
|
||
return false;
|
||
}
|
||
if (this.url.scheme === "file") {
|
||
if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {
|
||
this.parseError = true;
|
||
}
|
||
this.state = "file";
|
||
} else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {
|
||
this.state = "special relative or authority";
|
||
} else if (isSpecial(this.url)) {
|
||
this.state = "special authority slashes";
|
||
} else if (this.input[this.pointer + 1] === 47) {
|
||
this.state = "path or authority";
|
||
++this.pointer;
|
||
} else {
|
||
this.url.cannotBeABaseURL = true;
|
||
this.url.path.push("");
|
||
this.state = "cannot-be-a-base-URL path";
|
||
}
|
||
} else if (!this.stateOverride) {
|
||
this.buffer = "";
|
||
this.state = "no scheme";
|
||
this.pointer = -1;
|
||
} else {
|
||
this.parseError = true;
|
||
return failure;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) {
|
||
if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) {
|
||
return failure;
|
||
} else if (this.base.cannotBeABaseURL && c === 35) {
|
||
this.url.scheme = this.base.scheme;
|
||
this.url.path = this.base.path.slice();
|
||
this.url.query = this.base.query;
|
||
this.url.fragment = "";
|
||
this.url.cannotBeABaseURL = true;
|
||
this.state = "fragment";
|
||
} else if (this.base.scheme === "file") {
|
||
this.state = "file";
|
||
--this.pointer;
|
||
} else {
|
||
this.state = "relative";
|
||
--this.pointer;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) {
|
||
if (c === 47 && this.input[this.pointer + 1] === 47) {
|
||
this.state = "special authority ignore slashes";
|
||
++this.pointer;
|
||
} else {
|
||
this.parseError = true;
|
||
this.state = "relative";
|
||
--this.pointer;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) {
|
||
if (c === 47) {
|
||
this.state = "authority";
|
||
} else {
|
||
this.state = "path";
|
||
--this.pointer;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse relative"] = function parseRelative(c) {
|
||
this.url.scheme = this.base.scheme;
|
||
if (isNaN(c)) {
|
||
this.url.username = this.base.username;
|
||
this.url.password = this.base.password;
|
||
this.url.host = this.base.host;
|
||
this.url.port = this.base.port;
|
||
this.url.path = this.base.path.slice();
|
||
this.url.query = this.base.query;
|
||
} else if (c === 47) {
|
||
this.state = "relative slash";
|
||
} else if (c === 63) {
|
||
this.url.username = this.base.username;
|
||
this.url.password = this.base.password;
|
||
this.url.host = this.base.host;
|
||
this.url.port = this.base.port;
|
||
this.url.path = this.base.path.slice();
|
||
this.url.query = "";
|
||
this.state = "query";
|
||
} else if (c === 35) {
|
||
this.url.username = this.base.username;
|
||
this.url.password = this.base.password;
|
||
this.url.host = this.base.host;
|
||
this.url.port = this.base.port;
|
||
this.url.path = this.base.path.slice();
|
||
this.url.query = this.base.query;
|
||
this.url.fragment = "";
|
||
this.state = "fragment";
|
||
} else if (isSpecial(this.url) && c === 92) {
|
||
this.parseError = true;
|
||
this.state = "relative slash";
|
||
} else {
|
||
this.url.username = this.base.username;
|
||
this.url.password = this.base.password;
|
||
this.url.host = this.base.host;
|
||
this.url.port = this.base.port;
|
||
this.url.path = this.base.path.slice(0, this.base.path.length - 1);
|
||
|
||
this.state = "path";
|
||
--this.pointer;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) {
|
||
if (isSpecial(this.url) && (c === 47 || c === 92)) {
|
||
if (c === 92) {
|
||
this.parseError = true;
|
||
}
|
||
this.state = "special authority ignore slashes";
|
||
} else if (c === 47) {
|
||
this.state = "authority";
|
||
} else {
|
||
this.url.username = this.base.username;
|
||
this.url.password = this.base.password;
|
||
this.url.host = this.base.host;
|
||
this.url.port = this.base.port;
|
||
this.state = "path";
|
||
--this.pointer;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) {
|
||
if (c === 47 && this.input[this.pointer + 1] === 47) {
|
||
this.state = "special authority ignore slashes";
|
||
++this.pointer;
|
||
} else {
|
||
this.parseError = true;
|
||
this.state = "special authority ignore slashes";
|
||
--this.pointer;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) {
|
||
if (c !== 47 && c !== 92) {
|
||
this.state = "authority";
|
||
--this.pointer;
|
||
} else {
|
||
this.parseError = true;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) {
|
||
if (c === 64) {
|
||
this.parseError = true;
|
||
if (this.atFlag) {
|
||
this.buffer = "%40" + this.buffer;
|
||
}
|
||
this.atFlag = true;
|
||
|
||
// careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars
|
||
const len = countSymbols(this.buffer);
|
||
for (let pointer = 0; pointer < len; ++pointer) {
|
||
const codePoint = this.buffer.codePointAt(pointer);
|
||
|
||
if (codePoint === 58 && !this.passwordTokenSeenFlag) {
|
||
this.passwordTokenSeenFlag = true;
|
||
continue;
|
||
}
|
||
const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);
|
||
if (this.passwordTokenSeenFlag) {
|
||
this.url.password += encodedCodePoints;
|
||
} else {
|
||
this.url.username += encodedCodePoints;
|
||
}
|
||
}
|
||
this.buffer = "";
|
||
} else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||
|
||
(isSpecial(this.url) && c === 92)) {
|
||
if (this.atFlag && this.buffer === "") {
|
||
this.parseError = true;
|
||
return failure;
|
||
}
|
||
this.pointer -= countSymbols(this.buffer) + 1;
|
||
this.buffer = "";
|
||
this.state = "host";
|
||
} else {
|
||
this.buffer += cStr;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse hostname"] =
|
||
URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) {
|
||
if (this.stateOverride && this.url.scheme === "file") {
|
||
--this.pointer;
|
||
this.state = "file host";
|
||
} else if (c === 58 && !this.arrFlag) {
|
||
if (this.buffer === "") {
|
||
this.parseError = true;
|
||
return failure;
|
||
}
|
||
|
||
const host = parseHost(this.buffer, isSpecial(this.url));
|
||
if (host === failure) {
|
||
return failure;
|
||
}
|
||
|
||
this.url.host = host;
|
||
this.buffer = "";
|
||
this.state = "port";
|
||
if (this.stateOverride === "hostname") {
|
||
return false;
|
||
}
|
||
} else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||
|
||
(isSpecial(this.url) && c === 92)) {
|
||
--this.pointer;
|
||
if (isSpecial(this.url) && this.buffer === "") {
|
||
this.parseError = true;
|
||
return failure;
|
||
} else if (this.stateOverride && this.buffer === "" &&
|
||
(includesCredentials(this.url) || this.url.port !== null)) {
|
||
this.parseError = true;
|
||
return false;
|
||
}
|
||
|
||
const host = parseHost(this.buffer, isSpecial(this.url));
|
||
if (host === failure) {
|
||
return failure;
|
||
}
|
||
|
||
this.url.host = host;
|
||
this.buffer = "";
|
||
this.state = "path start";
|
||
if (this.stateOverride) {
|
||
return false;
|
||
}
|
||
} else {
|
||
if (c === 91) {
|
||
this.arrFlag = true;
|
||
} else if (c === 93) {
|
||
this.arrFlag = false;
|
||
}
|
||
this.buffer += cStr;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) {
|
||
if (isASCIIDigit(c)) {
|
||
this.buffer += cStr;
|
||
} else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||
|
||
(isSpecial(this.url) && c === 92) ||
|
||
this.stateOverride) {
|
||
if (this.buffer !== "") {
|
||
const port = parseInt(this.buffer);
|
||
if (port > Math.pow(2, 16) - 1) {
|
||
this.parseError = true;
|
||
return failure;
|
||
}
|
||
this.url.port = port === defaultPort(this.url.scheme) ? null : port;
|
||
this.buffer = "";
|
||
}
|
||
if (this.stateOverride) {
|
||
return false;
|
||
}
|
||
this.state = "path start";
|
||
--this.pointer;
|
||
} else {
|
||
this.parseError = true;
|
||
return failure;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]);
|
||
|
||
URLStateMachine.prototype["parse file"] = function parseFile(c) {
|
||
this.url.scheme = "file";
|
||
|
||
if (c === 47 || c === 92) {
|
||
if (c === 92) {
|
||
this.parseError = true;
|
||
}
|
||
this.state = "file slash";
|
||
} else if (this.base !== null && this.base.scheme === "file") {
|
||
if (isNaN(c)) {
|
||
this.url.host = this.base.host;
|
||
this.url.path = this.base.path.slice();
|
||
this.url.query = this.base.query;
|
||
} else if (c === 63) {
|
||
this.url.host = this.base.host;
|
||
this.url.path = this.base.path.slice();
|
||
this.url.query = "";
|
||
this.state = "query";
|
||
} else if (c === 35) {
|
||
this.url.host = this.base.host;
|
||
this.url.path = this.base.path.slice();
|
||
this.url.query = this.base.query;
|
||
this.url.fragment = "";
|
||
this.state = "fragment";
|
||
} else {
|
||
if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points
|
||
!isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) ||
|
||
(this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points
|
||
!fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) {
|
||
this.url.host = this.base.host;
|
||
this.url.path = this.base.path.slice();
|
||
shortenPath(this.url);
|
||
} else {
|
||
this.parseError = true;
|
||
}
|
||
|
||
this.state = "path";
|
||
--this.pointer;
|
||
}
|
||
} else {
|
||
this.state = "path";
|
||
--this.pointer;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) {
|
||
if (c === 47 || c === 92) {
|
||
if (c === 92) {
|
||
this.parseError = true;
|
||
}
|
||
this.state = "file host";
|
||
} else {
|
||
if (this.base !== null && this.base.scheme === "file") {
|
||
if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {
|
||
this.url.path.push(this.base.path[0]);
|
||
} else {
|
||
this.url.host = this.base.host;
|
||
}
|
||
}
|
||
this.state = "path";
|
||
--this.pointer;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) {
|
||
if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {
|
||
--this.pointer;
|
||
if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {
|
||
this.parseError = true;
|
||
this.state = "path";
|
||
} else if (this.buffer === "") {
|
||
this.url.host = "";
|
||
if (this.stateOverride) {
|
||
return false;
|
||
}
|
||
this.state = "path start";
|
||
} else {
|
||
let host = parseHost(this.buffer, isSpecial(this.url));
|
||
if (host === failure) {
|
||
return failure;
|
||
}
|
||
if (host === "localhost") {
|
||
host = "";
|
||
}
|
||
this.url.host = host;
|
||
|
||
if (this.stateOverride) {
|
||
return false;
|
||
}
|
||
|
||
this.buffer = "";
|
||
this.state = "path start";
|
||
}
|
||
} else {
|
||
this.buffer += cStr;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse path start"] = function parsePathStart(c) {
|
||
if (isSpecial(this.url)) {
|
||
if (c === 92) {
|
||
this.parseError = true;
|
||
}
|
||
this.state = "path";
|
||
|
||
if (c !== 47 && c !== 92) {
|
||
--this.pointer;
|
||
}
|
||
} else if (!this.stateOverride && c === 63) {
|
||
this.url.query = "";
|
||
this.state = "query";
|
||
} else if (!this.stateOverride && c === 35) {
|
||
this.url.fragment = "";
|
||
this.state = "fragment";
|
||
} else if (c !== undefined) {
|
||
this.state = "path";
|
||
if (c !== 47) {
|
||
--this.pointer;
|
||
}
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse path"] = function parsePath(c) {
|
||
if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) ||
|
||
(!this.stateOverride && (c === 63 || c === 35))) {
|
||
if (isSpecial(this.url) && c === 92) {
|
||
this.parseError = true;
|
||
}
|
||
|
||
if (isDoubleDot(this.buffer)) {
|
||
shortenPath(this.url);
|
||
if (c !== 47 && !(isSpecial(this.url) && c === 92)) {
|
||
this.url.path.push("");
|
||
}
|
||
} else if (isSingleDot(this.buffer) && c !== 47 &&
|
||
!(isSpecial(this.url) && c === 92)) {
|
||
this.url.path.push("");
|
||
} else if (!isSingleDot(this.buffer)) {
|
||
if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {
|
||
if (this.url.host !== "" && this.url.host !== null) {
|
||
this.parseError = true;
|
||
this.url.host = "";
|
||
}
|
||
this.buffer = this.buffer[0] + ":";
|
||
}
|
||
this.url.path.push(this.buffer);
|
||
}
|
||
this.buffer = "";
|
||
if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) {
|
||
while (this.url.path.length > 1 && this.url.path[0] === "") {
|
||
this.parseError = true;
|
||
this.url.path.shift();
|
||
}
|
||
}
|
||
if (c === 63) {
|
||
this.url.query = "";
|
||
this.state = "query";
|
||
}
|
||
if (c === 35) {
|
||
this.url.fragment = "";
|
||
this.state = "fragment";
|
||
}
|
||
} else {
|
||
// TODO: If c is not a URL code point and not "%", parse error.
|
||
|
||
if (c === 37 &&
|
||
(!isASCIIHex(this.input[this.pointer + 1]) ||
|
||
!isASCIIHex(this.input[this.pointer + 2]))) {
|
||
this.parseError = true;
|
||
}
|
||
|
||
this.buffer += percentEncodeChar(c, isPathPercentEncode);
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) {
|
||
if (c === 63) {
|
||
this.url.query = "";
|
||
this.state = "query";
|
||
} else if (c === 35) {
|
||
this.url.fragment = "";
|
||
this.state = "fragment";
|
||
} else {
|
||
// TODO: Add: not a URL code point
|
||
if (!isNaN(c) && c !== 37) {
|
||
this.parseError = true;
|
||
}
|
||
|
||
if (c === 37 &&
|
||
(!isASCIIHex(this.input[this.pointer + 1]) ||
|
||
!isASCIIHex(this.input[this.pointer + 2]))) {
|
||
this.parseError = true;
|
||
}
|
||
|
||
if (!isNaN(c)) {
|
||
this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);
|
||
}
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) {
|
||
if (isNaN(c) || (!this.stateOverride && c === 35)) {
|
||
if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") {
|
||
this.encodingOverride = "utf-8";
|
||
}
|
||
|
||
const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead
|
||
for (let i = 0; i < buffer.length; ++i) {
|
||
if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 ||
|
||
buffer[i] === 0x3C || buffer[i] === 0x3E) {
|
||
this.url.query += percentEncode(buffer[i]);
|
||
} else {
|
||
this.url.query += String.fromCodePoint(buffer[i]);
|
||
}
|
||
}
|
||
|
||
this.buffer = "";
|
||
if (c === 35) {
|
||
this.url.fragment = "";
|
||
this.state = "fragment";
|
||
}
|
||
} else {
|
||
// TODO: If c is not a URL code point and not "%", parse error.
|
||
if (c === 37 &&
|
||
(!isASCIIHex(this.input[this.pointer + 1]) ||
|
||
!isASCIIHex(this.input[this.pointer + 2]))) {
|
||
this.parseError = true;
|
||
}
|
||
|
||
this.buffer += cStr;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
URLStateMachine.prototype["parse fragment"] = function parseFragment(c) {
|
||
if (isNaN(c)) { // do nothing
|
||
} else if (c === 0x0) {
|
||
this.parseError = true;
|
||
} else {
|
||
// TODO: If c is not a URL code point and not "%", parse error.
|
||
if (c === 37 &&
|
||
(!isASCIIHex(this.input[this.pointer + 1]) ||
|
||
!isASCIIHex(this.input[this.pointer + 2]))) {
|
||
this.parseError = true;
|
||
}
|
||
|
||
this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
function serializeURL(url, excludeFragment) {
|
||
let output = url.scheme + ":";
|
||
if (url.host !== null) {
|
||
output += "//";
|
||
|
||
if (url.username !== "" || url.password !== "") {
|
||
output += url.username;
|
||
if (url.password !== "") {
|
||
output += ":" + url.password;
|
||
}
|
||
output += "@";
|
||
}
|
||
|
||
output += serializeHost(url.host);
|
||
|
||
if (url.port !== null) {
|
||
output += ":" + url.port;
|
||
}
|
||
} else if (url.host === null && url.scheme === "file") {
|
||
output += "//";
|
||
}
|
||
|
||
if (url.cannotBeABaseURL) {
|
||
output += url.path[0];
|
||
} else {
|
||
for (const string of url.path) {
|
||
output += "/" + string;
|
||
}
|
||
}
|
||
|
||
if (url.query !== null) {
|
||
output += "?" + url.query;
|
||
}
|
||
|
||
if (!excludeFragment && url.fragment !== null) {
|
||
output += "#" + url.fragment;
|
||
}
|
||
|
||
return output;
|
||
}
|
||
|
||
function serializeOrigin(tuple) {
|
||
let result = tuple.scheme + "://";
|
||
result += serializeHost(tuple.host);
|
||
|
||
if (tuple.port !== null) {
|
||
result += ":" + tuple.port;
|
||
}
|
||
|
||
return result;
|
||
}
|
||
|
||
module.exports.serializeURL = serializeURL;
|
||
|
||
module.exports.serializeURLOrigin = function (url) {
|
||
// https://url.spec.whatwg.org/#concept-url-origin
|
||
switch (url.scheme) {
|
||
case "blob":
|
||
try {
|
||
return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0]));
|
||
} catch (e) {
|
||
// serializing an opaque origin returns "null"
|
||
return "null";
|
||
}
|
||
case "ftp":
|
||
case "gopher":
|
||
case "http":
|
||
case "https":
|
||
case "ws":
|
||
case "wss":
|
||
return serializeOrigin({
|
||
scheme: url.scheme,
|
||
host: url.host,
|
||
port: url.port
|
||
});
|
||
case "file":
|
||
// spec says "exercise to the reader", chrome says "file://"
|
||
return "file://";
|
||
default:
|
||
// serializing an opaque origin returns "null"
|
||
return "null";
|
||
}
|
||
};
|
||
|
||
module.exports.basicURLParse = function (input, options) {
|
||
if (options === undefined) {
|
||
options = {};
|
||
}
|
||
|
||
const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);
|
||
if (usm.failure) {
|
||
return "failure";
|
||
}
|
||
|
||
return usm.url;
|
||
};
|
||
|
||
module.exports.setTheUsername = function (url, username) {
|
||
url.username = "";
|
||
const decoded = punycode.ucs2.decode(username);
|
||
for (let i = 0; i < decoded.length; ++i) {
|
||
url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);
|
||
}
|
||
};
|
||
|
||
module.exports.setThePassword = function (url, password) {
|
||
url.password = "";
|
||
const decoded = punycode.ucs2.decode(password);
|
||
for (let i = 0; i < decoded.length; ++i) {
|
||
url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);
|
||
}
|
||
};
|
||
|
||
module.exports.serializeHost = serializeHost;
|
||
|
||
module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;
|
||
|
||
module.exports.serializeInteger = function (integer) {
|
||
return String(integer);
|
||
};
|
||
|
||
module.exports.parseURL = function (input, options) {
|
||
if (options === undefined) {
|
||
options = {};
|
||
}
|
||
|
||
// We don't handle blobs, so this just delegates:
|
||
return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3387:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
module.exports.mixin = function mixin(target, source) {
|
||
const keys = Object.getOwnPropertyNames(source);
|
||
for (let i = 0; i < keys.length; ++i) {
|
||
Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));
|
||
}
|
||
};
|
||
|
||
module.exports.wrapperSymbol = Symbol("wrapper");
|
||
module.exports.implSymbol = Symbol("impl");
|
||
|
||
module.exports.wrapperForImpl = function (impl) {
|
||
return impl[module.exports.wrapperSymbol];
|
||
};
|
||
|
||
module.exports.implForWrapper = function (wrapper) {
|
||
return wrapper[module.exports.implSymbol];
|
||
};
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4293:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const asn1 = exports;
|
||
|
||
asn1.bignum = __nccwpck_require__(6641);
|
||
|
||
asn1.define = (__nccwpck_require__(5245).define);
|
||
asn1.base = __nccwpck_require__(8096);
|
||
asn1.constants = __nccwpck_require__(3371);
|
||
asn1.decoders = __nccwpck_require__(4952);
|
||
asn1.encoders = __nccwpck_require__(9083);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5245:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const encoders = __nccwpck_require__(9083);
|
||
const decoders = __nccwpck_require__(4952);
|
||
const inherits = __nccwpck_require__(4124);
|
||
|
||
const api = exports;
|
||
|
||
api.define = function define(name, body) {
|
||
return new Entity(name, body);
|
||
};
|
||
|
||
function Entity(name, body) {
|
||
this.name = name;
|
||
this.body = body;
|
||
|
||
this.decoders = {};
|
||
this.encoders = {};
|
||
}
|
||
|
||
Entity.prototype._createNamed = function createNamed(Base) {
|
||
const name = this.name;
|
||
|
||
function Generated(entity) {
|
||
this._initNamed(entity, name);
|
||
}
|
||
inherits(Generated, Base);
|
||
Generated.prototype._initNamed = function _initNamed(entity, name) {
|
||
Base.call(this, entity, name);
|
||
};
|
||
|
||
return new Generated(this);
|
||
};
|
||
|
||
Entity.prototype._getDecoder = function _getDecoder(enc) {
|
||
enc = enc || 'der';
|
||
// Lazily create decoder
|
||
if (!this.decoders.hasOwnProperty(enc))
|
||
this.decoders[enc] = this._createNamed(decoders[enc]);
|
||
return this.decoders[enc];
|
||
};
|
||
|
||
Entity.prototype.decode = function decode(data, enc, options) {
|
||
return this._getDecoder(enc).decode(data, options);
|
||
};
|
||
|
||
Entity.prototype._getEncoder = function _getEncoder(enc) {
|
||
enc = enc || 'der';
|
||
// Lazily create encoder
|
||
if (!this.encoders.hasOwnProperty(enc))
|
||
this.encoders[enc] = this._createNamed(encoders[enc]);
|
||
return this.encoders[enc];
|
||
};
|
||
|
||
Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
|
||
return this._getEncoder(enc).encode(data, reporter);
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5298:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const inherits = __nccwpck_require__(4124);
|
||
const Reporter = (__nccwpck_require__(3744)/* .Reporter */ .b);
|
||
const Buffer = (__nccwpck_require__(5118).Buffer);
|
||
|
||
function DecoderBuffer(base, options) {
|
||
Reporter.call(this, options);
|
||
if (!Buffer.isBuffer(base)) {
|
||
this.error('Input not Buffer');
|
||
return;
|
||
}
|
||
|
||
this.base = base;
|
||
this.offset = 0;
|
||
this.length = base.length;
|
||
}
|
||
inherits(DecoderBuffer, Reporter);
|
||
exports.C = DecoderBuffer;
|
||
|
||
DecoderBuffer.isDecoderBuffer = function isDecoderBuffer(data) {
|
||
if (data instanceof DecoderBuffer) {
|
||
return true;
|
||
}
|
||
|
||
// Or accept compatible API
|
||
const isCompatible = typeof data === 'object' &&
|
||
Buffer.isBuffer(data.base) &&
|
||
data.constructor.name === 'DecoderBuffer' &&
|
||
typeof data.offset === 'number' &&
|
||
typeof data.length === 'number' &&
|
||
typeof data.save === 'function' &&
|
||
typeof data.restore === 'function' &&
|
||
typeof data.isEmpty === 'function' &&
|
||
typeof data.readUInt8 === 'function' &&
|
||
typeof data.skip === 'function' &&
|
||
typeof data.raw === 'function';
|
||
|
||
return isCompatible;
|
||
};
|
||
|
||
DecoderBuffer.prototype.save = function save() {
|
||
return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };
|
||
};
|
||
|
||
DecoderBuffer.prototype.restore = function restore(save) {
|
||
// Return skipped data
|
||
const res = new DecoderBuffer(this.base);
|
||
res.offset = save.offset;
|
||
res.length = this.offset;
|
||
|
||
this.offset = save.offset;
|
||
Reporter.prototype.restore.call(this, save.reporter);
|
||
|
||
return res;
|
||
};
|
||
|
||
DecoderBuffer.prototype.isEmpty = function isEmpty() {
|
||
return this.offset === this.length;
|
||
};
|
||
|
||
DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {
|
||
if (this.offset + 1 <= this.length)
|
||
return this.base.readUInt8(this.offset++, true);
|
||
else
|
||
return this.error(fail || 'DecoderBuffer overrun');
|
||
};
|
||
|
||
DecoderBuffer.prototype.skip = function skip(bytes, fail) {
|
||
if (!(this.offset + bytes <= this.length))
|
||
return this.error(fail || 'DecoderBuffer overrun');
|
||
|
||
const res = new DecoderBuffer(this.base);
|
||
|
||
// Share reporter state
|
||
res._reporterState = this._reporterState;
|
||
|
||
res.offset = this.offset;
|
||
res.length = this.offset + bytes;
|
||
this.offset += bytes;
|
||
return res;
|
||
};
|
||
|
||
DecoderBuffer.prototype.raw = function raw(save) {
|
||
return this.base.slice(save ? save.offset : this.offset, this.length);
|
||
};
|
||
|
||
function EncoderBuffer(value, reporter) {
|
||
if (Array.isArray(value)) {
|
||
this.length = 0;
|
||
this.value = value.map(function(item) {
|
||
if (!EncoderBuffer.isEncoderBuffer(item))
|
||
item = new EncoderBuffer(item, reporter);
|
||
this.length += item.length;
|
||
return item;
|
||
}, this);
|
||
} else if (typeof value === 'number') {
|
||
if (!(0 <= value && value <= 0xff))
|
||
return reporter.error('non-byte EncoderBuffer value');
|
||
this.value = value;
|
||
this.length = 1;
|
||
} else if (typeof value === 'string') {
|
||
this.value = value;
|
||
this.length = Buffer.byteLength(value);
|
||
} else if (Buffer.isBuffer(value)) {
|
||
this.value = value;
|
||
this.length = value.length;
|
||
} else {
|
||
return reporter.error('Unsupported type: ' + typeof value);
|
||
}
|
||
}
|
||
exports.R = EncoderBuffer;
|
||
|
||
EncoderBuffer.isEncoderBuffer = function isEncoderBuffer(data) {
|
||
if (data instanceof EncoderBuffer) {
|
||
return true;
|
||
}
|
||
|
||
// Or accept compatible API
|
||
const isCompatible = typeof data === 'object' &&
|
||
data.constructor.name === 'EncoderBuffer' &&
|
||
typeof data.length === 'number' &&
|
||
typeof data.join === 'function';
|
||
|
||
return isCompatible;
|
||
};
|
||
|
||
EncoderBuffer.prototype.join = function join(out, offset) {
|
||
if (!out)
|
||
out = Buffer.alloc(this.length);
|
||
if (!offset)
|
||
offset = 0;
|
||
|
||
if (this.length === 0)
|
||
return out;
|
||
|
||
if (Array.isArray(this.value)) {
|
||
this.value.forEach(function(item) {
|
||
item.join(out, offset);
|
||
offset += item.length;
|
||
});
|
||
} else {
|
||
if (typeof this.value === 'number')
|
||
out[offset] = this.value;
|
||
else if (typeof this.value === 'string')
|
||
out.write(this.value, offset);
|
||
else if (Buffer.isBuffer(this.value))
|
||
this.value.copy(out, offset);
|
||
offset += this.length;
|
||
}
|
||
|
||
return out;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 8096:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const base = exports;
|
||
|
||
base.Reporter = (__nccwpck_require__(3744)/* .Reporter */ .b);
|
||
base.DecoderBuffer = (__nccwpck_require__(5298)/* .DecoderBuffer */ .C);
|
||
base.EncoderBuffer = (__nccwpck_require__(5298)/* .EncoderBuffer */ .R);
|
||
base.Node = __nccwpck_require__(842);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 842:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const Reporter = (__nccwpck_require__(3744)/* .Reporter */ .b);
|
||
const EncoderBuffer = (__nccwpck_require__(5298)/* .EncoderBuffer */ .R);
|
||
const DecoderBuffer = (__nccwpck_require__(5298)/* .DecoderBuffer */ .C);
|
||
const assert = __nccwpck_require__(910);
|
||
|
||
// Supported tags
|
||
const tags = [
|
||
'seq', 'seqof', 'set', 'setof', 'objid', 'bool',
|
||
'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',
|
||
'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',
|
||
'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'
|
||
];
|
||
|
||
// Public methods list
|
||
const methods = [
|
||
'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',
|
||
'any', 'contains'
|
||
].concat(tags);
|
||
|
||
// Overrided methods list
|
||
const overrided = [
|
||
'_peekTag', '_decodeTag', '_use',
|
||
'_decodeStr', '_decodeObjid', '_decodeTime',
|
||
'_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',
|
||
|
||
'_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',
|
||
'_encodeNull', '_encodeInt', '_encodeBool'
|
||
];
|
||
|
||
function Node(enc, parent, name) {
|
||
const state = {};
|
||
this._baseState = state;
|
||
|
||
state.name = name;
|
||
state.enc = enc;
|
||
|
||
state.parent = parent || null;
|
||
state.children = null;
|
||
|
||
// State
|
||
state.tag = null;
|
||
state.args = null;
|
||
state.reverseArgs = null;
|
||
state.choice = null;
|
||
state.optional = false;
|
||
state.any = false;
|
||
state.obj = false;
|
||
state.use = null;
|
||
state.useDecoder = null;
|
||
state.key = null;
|
||
state['default'] = null;
|
||
state.explicit = null;
|
||
state.implicit = null;
|
||
state.contains = null;
|
||
|
||
// Should create new instance on each method
|
||
if (!state.parent) {
|
||
state.children = [];
|
||
this._wrap();
|
||
}
|
||
}
|
||
module.exports = Node;
|
||
|
||
const stateProps = [
|
||
'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
|
||
'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
|
||
'implicit', 'contains'
|
||
];
|
||
|
||
Node.prototype.clone = function clone() {
|
||
const state = this._baseState;
|
||
const cstate = {};
|
||
stateProps.forEach(function(prop) {
|
||
cstate[prop] = state[prop];
|
||
});
|
||
const res = new this.constructor(cstate.parent);
|
||
res._baseState = cstate;
|
||
return res;
|
||
};
|
||
|
||
Node.prototype._wrap = function wrap() {
|
||
const state = this._baseState;
|
||
methods.forEach(function(method) {
|
||
this[method] = function _wrappedMethod() {
|
||
const clone = new this.constructor(this);
|
||
state.children.push(clone);
|
||
return clone[method].apply(clone, arguments);
|
||
};
|
||
}, this);
|
||
};
|
||
|
||
Node.prototype._init = function init(body) {
|
||
const state = this._baseState;
|
||
|
||
assert(state.parent === null);
|
||
body.call(this);
|
||
|
||
// Filter children
|
||
state.children = state.children.filter(function(child) {
|
||
return child._baseState.parent === this;
|
||
}, this);
|
||
assert.equal(state.children.length, 1, 'Root node can have only one child');
|
||
};
|
||
|
||
Node.prototype._useArgs = function useArgs(args) {
|
||
const state = this._baseState;
|
||
|
||
// Filter children and args
|
||
const children = args.filter(function(arg) {
|
||
return arg instanceof this.constructor;
|
||
}, this);
|
||
args = args.filter(function(arg) {
|
||
return !(arg instanceof this.constructor);
|
||
}, this);
|
||
|
||
if (children.length !== 0) {
|
||
assert(state.children === null);
|
||
state.children = children;
|
||
|
||
// Replace parent to maintain backward link
|
||
children.forEach(function(child) {
|
||
child._baseState.parent = this;
|
||
}, this);
|
||
}
|
||
if (args.length !== 0) {
|
||
assert(state.args === null);
|
||
state.args = args;
|
||
state.reverseArgs = args.map(function(arg) {
|
||
if (typeof arg !== 'object' || arg.constructor !== Object)
|
||
return arg;
|
||
|
||
const res = {};
|
||
Object.keys(arg).forEach(function(key) {
|
||
if (key == (key | 0))
|
||
key |= 0;
|
||
const value = arg[key];
|
||
res[value] = key;
|
||
});
|
||
return res;
|
||
});
|
||
}
|
||
};
|
||
|
||
//
|
||
// Overrided methods
|
||
//
|
||
|
||
overrided.forEach(function(method) {
|
||
Node.prototype[method] = function _overrided() {
|
||
const state = this._baseState;
|
||
throw new Error(method + ' not implemented for encoding: ' + state.enc);
|
||
};
|
||
});
|
||
|
||
//
|
||
// Public methods
|
||
//
|
||
|
||
tags.forEach(function(tag) {
|
||
Node.prototype[tag] = function _tagMethod() {
|
||
const state = this._baseState;
|
||
const args = Array.prototype.slice.call(arguments);
|
||
|
||
assert(state.tag === null);
|
||
state.tag = tag;
|
||
|
||
this._useArgs(args);
|
||
|
||
return this;
|
||
};
|
||
});
|
||
|
||
Node.prototype.use = function use(item) {
|
||
assert(item);
|
||
const state = this._baseState;
|
||
|
||
assert(state.use === null);
|
||
state.use = item;
|
||
|
||
return this;
|
||
};
|
||
|
||
Node.prototype.optional = function optional() {
|
||
const state = this._baseState;
|
||
|
||
state.optional = true;
|
||
|
||
return this;
|
||
};
|
||
|
||
Node.prototype.def = function def(val) {
|
||
const state = this._baseState;
|
||
|
||
assert(state['default'] === null);
|
||
state['default'] = val;
|
||
state.optional = true;
|
||
|
||
return this;
|
||
};
|
||
|
||
Node.prototype.explicit = function explicit(num) {
|
||
const state = this._baseState;
|
||
|
||
assert(state.explicit === null && state.implicit === null);
|
||
state.explicit = num;
|
||
|
||
return this;
|
||
};
|
||
|
||
Node.prototype.implicit = function implicit(num) {
|
||
const state = this._baseState;
|
||
|
||
assert(state.explicit === null && state.implicit === null);
|
||
state.implicit = num;
|
||
|
||
return this;
|
||
};
|
||
|
||
Node.prototype.obj = function obj() {
|
||
const state = this._baseState;
|
||
const args = Array.prototype.slice.call(arguments);
|
||
|
||
state.obj = true;
|
||
|
||
if (args.length !== 0)
|
||
this._useArgs(args);
|
||
|
||
return this;
|
||
};
|
||
|
||
Node.prototype.key = function key(newKey) {
|
||
const state = this._baseState;
|
||
|
||
assert(state.key === null);
|
||
state.key = newKey;
|
||
|
||
return this;
|
||
};
|
||
|
||
Node.prototype.any = function any() {
|
||
const state = this._baseState;
|
||
|
||
state.any = true;
|
||
|
||
return this;
|
||
};
|
||
|
||
Node.prototype.choice = function choice(obj) {
|
||
const state = this._baseState;
|
||
|
||
assert(state.choice === null);
|
||
state.choice = obj;
|
||
this._useArgs(Object.keys(obj).map(function(key) {
|
||
return obj[key];
|
||
}));
|
||
|
||
return this;
|
||
};
|
||
|
||
Node.prototype.contains = function contains(item) {
|
||
const state = this._baseState;
|
||
|
||
assert(state.use === null);
|
||
state.contains = item;
|
||
|
||
return this;
|
||
};
|
||
|
||
//
|
||
// Decoding
|
||
//
|
||
|
||
Node.prototype._decode = function decode(input, options) {
|
||
const state = this._baseState;
|
||
|
||
// Decode root node
|
||
if (state.parent === null)
|
||
return input.wrapResult(state.children[0]._decode(input, options));
|
||
|
||
let result = state['default'];
|
||
let present = true;
|
||
|
||
let prevKey = null;
|
||
if (state.key !== null)
|
||
prevKey = input.enterKey(state.key);
|
||
|
||
// Check if tag is there
|
||
if (state.optional) {
|
||
let tag = null;
|
||
if (state.explicit !== null)
|
||
tag = state.explicit;
|
||
else if (state.implicit !== null)
|
||
tag = state.implicit;
|
||
else if (state.tag !== null)
|
||
tag = state.tag;
|
||
|
||
if (tag === null && !state.any) {
|
||
// Trial and Error
|
||
const save = input.save();
|
||
try {
|
||
if (state.choice === null)
|
||
this._decodeGeneric(state.tag, input, options);
|
||
else
|
||
this._decodeChoice(input, options);
|
||
present = true;
|
||
} catch (e) {
|
||
present = false;
|
||
}
|
||
input.restore(save);
|
||
} else {
|
||
present = this._peekTag(input, tag, state.any);
|
||
|
||
if (input.isError(present))
|
||
return present;
|
||
}
|
||
}
|
||
|
||
// Push object on stack
|
||
let prevObj;
|
||
if (state.obj && present)
|
||
prevObj = input.enterObject();
|
||
|
||
if (present) {
|
||
// Unwrap explicit values
|
||
if (state.explicit !== null) {
|
||
const explicit = this._decodeTag(input, state.explicit);
|
||
if (input.isError(explicit))
|
||
return explicit;
|
||
input = explicit;
|
||
}
|
||
|
||
const start = input.offset;
|
||
|
||
// Unwrap implicit and normal values
|
||
if (state.use === null && state.choice === null) {
|
||
let save;
|
||
if (state.any)
|
||
save = input.save();
|
||
const body = this._decodeTag(
|
||
input,
|
||
state.implicit !== null ? state.implicit : state.tag,
|
||
state.any
|
||
);
|
||
if (input.isError(body))
|
||
return body;
|
||
|
||
if (state.any)
|
||
result = input.raw(save);
|
||
else
|
||
input = body;
|
||
}
|
||
|
||
if (options && options.track && state.tag !== null)
|
||
options.track(input.path(), start, input.length, 'tagged');
|
||
|
||
if (options && options.track && state.tag !== null)
|
||
options.track(input.path(), input.offset, input.length, 'content');
|
||
|
||
// Select proper method for tag
|
||
if (state.any) {
|
||
// no-op
|
||
} else if (state.choice === null) {
|
||
result = this._decodeGeneric(state.tag, input, options);
|
||
} else {
|
||
result = this._decodeChoice(input, options);
|
||
}
|
||
|
||
if (input.isError(result))
|
||
return result;
|
||
|
||
// Decode children
|
||
if (!state.any && state.choice === null && state.children !== null) {
|
||
state.children.forEach(function decodeChildren(child) {
|
||
// NOTE: We are ignoring errors here, to let parser continue with other
|
||
// parts of encoded data
|
||
child._decode(input, options);
|
||
});
|
||
}
|
||
|
||
// Decode contained/encoded by schema, only in bit or octet strings
|
||
if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {
|
||
const data = new DecoderBuffer(result);
|
||
result = this._getUse(state.contains, input._reporterState.obj)
|
||
._decode(data, options);
|
||
}
|
||
}
|
||
|
||
// Pop object
|
||
if (state.obj && present)
|
||
result = input.leaveObject(prevObj);
|
||
|
||
// Set key
|
||
if (state.key !== null && (result !== null || present === true))
|
||
input.leaveKey(prevKey, state.key, result);
|
||
else if (prevKey !== null)
|
||
input.exitKey(prevKey);
|
||
|
||
return result;
|
||
};
|
||
|
||
Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {
|
||
const state = this._baseState;
|
||
|
||
if (tag === 'seq' || tag === 'set')
|
||
return null;
|
||
if (tag === 'seqof' || tag === 'setof')
|
||
return this._decodeList(input, tag, state.args[0], options);
|
||
else if (/str$/.test(tag))
|
||
return this._decodeStr(input, tag, options);
|
||
else if (tag === 'objid' && state.args)
|
||
return this._decodeObjid(input, state.args[0], state.args[1], options);
|
||
else if (tag === 'objid')
|
||
return this._decodeObjid(input, null, null, options);
|
||
else if (tag === 'gentime' || tag === 'utctime')
|
||
return this._decodeTime(input, tag, options);
|
||
else if (tag === 'null_')
|
||
return this._decodeNull(input, options);
|
||
else if (tag === 'bool')
|
||
return this._decodeBool(input, options);
|
||
else if (tag === 'objDesc')
|
||
return this._decodeStr(input, tag, options);
|
||
else if (tag === 'int' || tag === 'enum')
|
||
return this._decodeInt(input, state.args && state.args[0], options);
|
||
|
||
if (state.use !== null) {
|
||
return this._getUse(state.use, input._reporterState.obj)
|
||
._decode(input, options);
|
||
} else {
|
||
return input.error('unknown tag: ' + tag);
|
||
}
|
||
};
|
||
|
||
Node.prototype._getUse = function _getUse(entity, obj) {
|
||
|
||
const state = this._baseState;
|
||
// Create altered use decoder if implicit is set
|
||
state.useDecoder = this._use(entity, obj);
|
||
assert(state.useDecoder._baseState.parent === null);
|
||
state.useDecoder = state.useDecoder._baseState.children[0];
|
||
if (state.implicit !== state.useDecoder._baseState.implicit) {
|
||
state.useDecoder = state.useDecoder.clone();
|
||
state.useDecoder._baseState.implicit = state.implicit;
|
||
}
|
||
return state.useDecoder;
|
||
};
|
||
|
||
Node.prototype._decodeChoice = function decodeChoice(input, options) {
|
||
const state = this._baseState;
|
||
let result = null;
|
||
let match = false;
|
||
|
||
Object.keys(state.choice).some(function(key) {
|
||
const save = input.save();
|
||
const node = state.choice[key];
|
||
try {
|
||
const value = node._decode(input, options);
|
||
if (input.isError(value))
|
||
return false;
|
||
|
||
result = { type: key, value: value };
|
||
match = true;
|
||
} catch (e) {
|
||
input.restore(save);
|
||
return false;
|
||
}
|
||
return true;
|
||
}, this);
|
||
|
||
if (!match)
|
||
return input.error('Choice not matched');
|
||
|
||
return result;
|
||
};
|
||
|
||
//
|
||
// Encoding
|
||
//
|
||
|
||
Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) {
|
||
return new EncoderBuffer(data, this.reporter);
|
||
};
|
||
|
||
Node.prototype._encode = function encode(data, reporter, parent) {
|
||
const state = this._baseState;
|
||
if (state['default'] !== null && state['default'] === data)
|
||
return;
|
||
|
||
const result = this._encodeValue(data, reporter, parent);
|
||
if (result === undefined)
|
||
return;
|
||
|
||
if (this._skipDefault(result, reporter, parent))
|
||
return;
|
||
|
||
return result;
|
||
};
|
||
|
||
Node.prototype._encodeValue = function encode(data, reporter, parent) {
|
||
const state = this._baseState;
|
||
|
||
// Decode root node
|
||
if (state.parent === null)
|
||
return state.children[0]._encode(data, reporter || new Reporter());
|
||
|
||
let result = null;
|
||
|
||
// Set reporter to share it with a child class
|
||
this.reporter = reporter;
|
||
|
||
// Check if data is there
|
||
if (state.optional && data === undefined) {
|
||
if (state['default'] !== null)
|
||
data = state['default'];
|
||
else
|
||
return;
|
||
}
|
||
|
||
// Encode children first
|
||
let content = null;
|
||
let primitive = false;
|
||
if (state.any) {
|
||
// Anything that was given is translated to buffer
|
||
result = this._createEncoderBuffer(data);
|
||
} else if (state.choice) {
|
||
result = this._encodeChoice(data, reporter);
|
||
} else if (state.contains) {
|
||
content = this._getUse(state.contains, parent)._encode(data, reporter);
|
||
primitive = true;
|
||
} else if (state.children) {
|
||
content = state.children.map(function(child) {
|
||
if (child._baseState.tag === 'null_')
|
||
return child._encode(null, reporter, data);
|
||
|
||
if (child._baseState.key === null)
|
||
return reporter.error('Child should have a key');
|
||
const prevKey = reporter.enterKey(child._baseState.key);
|
||
|
||
if (typeof data !== 'object')
|
||
return reporter.error('Child expected, but input is not object');
|
||
|
||
const res = child._encode(data[child._baseState.key], reporter, data);
|
||
reporter.leaveKey(prevKey);
|
||
|
||
return res;
|
||
}, this).filter(function(child) {
|
||
return child;
|
||
});
|
||
content = this._createEncoderBuffer(content);
|
||
} else {
|
||
if (state.tag === 'seqof' || state.tag === 'setof') {
|
||
// TODO(indutny): this should be thrown on DSL level
|
||
if (!(state.args && state.args.length === 1))
|
||
return reporter.error('Too many args for : ' + state.tag);
|
||
|
||
if (!Array.isArray(data))
|
||
return reporter.error('seqof/setof, but data is not Array');
|
||
|
||
const child = this.clone();
|
||
child._baseState.implicit = null;
|
||
content = this._createEncoderBuffer(data.map(function(item) {
|
||
const state = this._baseState;
|
||
|
||
return this._getUse(state.args[0], data)._encode(item, reporter);
|
||
}, child));
|
||
} else if (state.use !== null) {
|
||
result = this._getUse(state.use, parent)._encode(data, reporter);
|
||
} else {
|
||
content = this._encodePrimitive(state.tag, data);
|
||
primitive = true;
|
||
}
|
||
}
|
||
|
||
// Encode data itself
|
||
if (!state.any && state.choice === null) {
|
||
const tag = state.implicit !== null ? state.implicit : state.tag;
|
||
const cls = state.implicit === null ? 'universal' : 'context';
|
||
|
||
if (tag === null) {
|
||
if (state.use === null)
|
||
reporter.error('Tag could be omitted only for .use()');
|
||
} else {
|
||
if (state.use === null)
|
||
result = this._encodeComposite(tag, primitive, cls, content);
|
||
}
|
||
}
|
||
|
||
// Wrap in explicit
|
||
if (state.explicit !== null)
|
||
result = this._encodeComposite(state.explicit, false, 'context', result);
|
||
|
||
return result;
|
||
};
|
||
|
||
Node.prototype._encodeChoice = function encodeChoice(data, reporter) {
|
||
const state = this._baseState;
|
||
|
||
const node = state.choice[data.type];
|
||
if (!node) {
|
||
assert(
|
||
false,
|
||
data.type + ' not found in ' +
|
||
JSON.stringify(Object.keys(state.choice)));
|
||
}
|
||
return node._encode(data.value, reporter);
|
||
};
|
||
|
||
Node.prototype._encodePrimitive = function encodePrimitive(tag, data) {
|
||
const state = this._baseState;
|
||
|
||
if (/str$/.test(tag))
|
||
return this._encodeStr(data, tag);
|
||
else if (tag === 'objid' && state.args)
|
||
return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);
|
||
else if (tag === 'objid')
|
||
return this._encodeObjid(data, null, null);
|
||
else if (tag === 'gentime' || tag === 'utctime')
|
||
return this._encodeTime(data, tag);
|
||
else if (tag === 'null_')
|
||
return this._encodeNull();
|
||
else if (tag === 'int' || tag === 'enum')
|
||
return this._encodeInt(data, state.args && state.reverseArgs[0]);
|
||
else if (tag === 'bool')
|
||
return this._encodeBool(data);
|
||
else if (tag === 'objDesc')
|
||
return this._encodeStr(data, tag);
|
||
else
|
||
throw new Error('Unsupported tag: ' + tag);
|
||
};
|
||
|
||
Node.prototype._isNumstr = function isNumstr(str) {
|
||
return /^[0-9 ]*$/.test(str);
|
||
};
|
||
|
||
Node.prototype._isPrintstr = function isPrintstr(str) {
|
||
return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str);
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3744:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const inherits = __nccwpck_require__(4124);
|
||
|
||
function Reporter(options) {
|
||
this._reporterState = {
|
||
obj: null,
|
||
path: [],
|
||
options: options || {},
|
||
errors: []
|
||
};
|
||
}
|
||
exports.b = Reporter;
|
||
|
||
Reporter.prototype.isError = function isError(obj) {
|
||
return obj instanceof ReporterError;
|
||
};
|
||
|
||
Reporter.prototype.save = function save() {
|
||
const state = this._reporterState;
|
||
|
||
return { obj: state.obj, pathLen: state.path.length };
|
||
};
|
||
|
||
Reporter.prototype.restore = function restore(data) {
|
||
const state = this._reporterState;
|
||
|
||
state.obj = data.obj;
|
||
state.path = state.path.slice(0, data.pathLen);
|
||
};
|
||
|
||
Reporter.prototype.enterKey = function enterKey(key) {
|
||
return this._reporterState.path.push(key);
|
||
};
|
||
|
||
Reporter.prototype.exitKey = function exitKey(index) {
|
||
const state = this._reporterState;
|
||
|
||
state.path = state.path.slice(0, index - 1);
|
||
};
|
||
|
||
Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
|
||
const state = this._reporterState;
|
||
|
||
this.exitKey(index);
|
||
if (state.obj !== null)
|
||
state.obj[key] = value;
|
||
};
|
||
|
||
Reporter.prototype.path = function path() {
|
||
return this._reporterState.path.join('/');
|
||
};
|
||
|
||
Reporter.prototype.enterObject = function enterObject() {
|
||
const state = this._reporterState;
|
||
|
||
const prev = state.obj;
|
||
state.obj = {};
|
||
return prev;
|
||
};
|
||
|
||
Reporter.prototype.leaveObject = function leaveObject(prev) {
|
||
const state = this._reporterState;
|
||
|
||
const now = state.obj;
|
||
state.obj = prev;
|
||
return now;
|
||
};
|
||
|
||
Reporter.prototype.error = function error(msg) {
|
||
let err;
|
||
const state = this._reporterState;
|
||
|
||
const inherited = msg instanceof ReporterError;
|
||
if (inherited) {
|
||
err = msg;
|
||
} else {
|
||
err = new ReporterError(state.path.map(function(elem) {
|
||
return '[' + JSON.stringify(elem) + ']';
|
||
}).join(''), msg.message || msg, msg.stack);
|
||
}
|
||
|
||
if (!state.options.partial)
|
||
throw err;
|
||
|
||
if (!inherited)
|
||
state.errors.push(err);
|
||
|
||
return err;
|
||
};
|
||
|
||
Reporter.prototype.wrapResult = function wrapResult(result) {
|
||
const state = this._reporterState;
|
||
if (!state.options.partial)
|
||
return result;
|
||
|
||
return {
|
||
result: this.isError(result) ? null : result,
|
||
errors: state.errors
|
||
};
|
||
};
|
||
|
||
function ReporterError(path, msg) {
|
||
this.path = path;
|
||
this.rethrow(msg);
|
||
}
|
||
inherits(ReporterError, Error);
|
||
|
||
ReporterError.prototype.rethrow = function rethrow(msg) {
|
||
this.message = msg + ' at: ' + (this.path || '(shallow)');
|
||
if (Error.captureStackTrace)
|
||
Error.captureStackTrace(this, ReporterError);
|
||
|
||
if (!this.stack) {
|
||
try {
|
||
// IE only adds stack when thrown
|
||
throw new Error(this.message);
|
||
} catch (e) {
|
||
this.stack = e.stack;
|
||
}
|
||
}
|
||
return this;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1188:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
// Helper
|
||
function reverse(map) {
|
||
const res = {};
|
||
|
||
Object.keys(map).forEach(function(key) {
|
||
// Convert key to integer if it is stringified
|
||
if ((key | 0) == key)
|
||
key = key | 0;
|
||
|
||
const value = map[key];
|
||
res[value] = key;
|
||
});
|
||
|
||
return res;
|
||
}
|
||
|
||
exports.tagClass = {
|
||
0: 'universal',
|
||
1: 'application',
|
||
2: 'context',
|
||
3: 'private'
|
||
};
|
||
exports.tagClassByName = reverse(exports.tagClass);
|
||
|
||
exports.tag = {
|
||
0x00: 'end',
|
||
0x01: 'bool',
|
||
0x02: 'int',
|
||
0x03: 'bitstr',
|
||
0x04: 'octstr',
|
||
0x05: 'null_',
|
||
0x06: 'objid',
|
||
0x07: 'objDesc',
|
||
0x08: 'external',
|
||
0x09: 'real',
|
||
0x0a: 'enum',
|
||
0x0b: 'embed',
|
||
0x0c: 'utf8str',
|
||
0x0d: 'relativeOid',
|
||
0x10: 'seq',
|
||
0x11: 'set',
|
||
0x12: 'numstr',
|
||
0x13: 'printstr',
|
||
0x14: 't61str',
|
||
0x15: 'videostr',
|
||
0x16: 'ia5str',
|
||
0x17: 'utctime',
|
||
0x18: 'gentime',
|
||
0x19: 'graphstr',
|
||
0x1a: 'iso646str',
|
||
0x1b: 'genstr',
|
||
0x1c: 'unistr',
|
||
0x1d: 'charstr',
|
||
0x1e: 'bmpstr'
|
||
};
|
||
exports.tagByName = reverse(exports.tag);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3371:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const constants = exports;
|
||
|
||
// Helper
|
||
constants._reverse = function reverse(map) {
|
||
const res = {};
|
||
|
||
Object.keys(map).forEach(function(key) {
|
||
// Convert key to integer if it is stringified
|
||
if ((key | 0) == key)
|
||
key = key | 0;
|
||
|
||
const value = map[key];
|
||
res[value] = key;
|
||
});
|
||
|
||
return res;
|
||
};
|
||
|
||
constants.der = __nccwpck_require__(1188);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3332:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const inherits = __nccwpck_require__(4124);
|
||
|
||
const bignum = __nccwpck_require__(6641);
|
||
const DecoderBuffer = (__nccwpck_require__(5298)/* .DecoderBuffer */ .C);
|
||
const Node = __nccwpck_require__(842);
|
||
|
||
// Import DER constants
|
||
const der = __nccwpck_require__(1188);
|
||
|
||
function DERDecoder(entity) {
|
||
this.enc = 'der';
|
||
this.name = entity.name;
|
||
this.entity = entity;
|
||
|
||
// Construct base tree
|
||
this.tree = new DERNode();
|
||
this.tree._init(entity.body);
|
||
}
|
||
module.exports = DERDecoder;
|
||
|
||
DERDecoder.prototype.decode = function decode(data, options) {
|
||
if (!DecoderBuffer.isDecoderBuffer(data)) {
|
||
data = new DecoderBuffer(data, options);
|
||
}
|
||
|
||
return this.tree._decode(data, options);
|
||
};
|
||
|
||
// Tree methods
|
||
|
||
function DERNode(parent) {
|
||
Node.call(this, 'der', parent);
|
||
}
|
||
inherits(DERNode, Node);
|
||
|
||
DERNode.prototype._peekTag = function peekTag(buffer, tag, any) {
|
||
if (buffer.isEmpty())
|
||
return false;
|
||
|
||
const state = buffer.save();
|
||
const decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"');
|
||
if (buffer.isError(decodedTag))
|
||
return decodedTag;
|
||
|
||
buffer.restore(state);
|
||
|
||
return decodedTag.tag === tag || decodedTag.tagStr === tag ||
|
||
(decodedTag.tagStr + 'of') === tag || any;
|
||
};
|
||
|
||
DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {
|
||
const decodedTag = derDecodeTag(buffer,
|
||
'Failed to decode tag of "' + tag + '"');
|
||
if (buffer.isError(decodedTag))
|
||
return decodedTag;
|
||
|
||
let len = derDecodeLen(buffer,
|
||
decodedTag.primitive,
|
||
'Failed to get length of "' + tag + '"');
|
||
|
||
// Failure
|
||
if (buffer.isError(len))
|
||
return len;
|
||
|
||
if (!any &&
|
||
decodedTag.tag !== tag &&
|
||
decodedTag.tagStr !== tag &&
|
||
decodedTag.tagStr + 'of' !== tag) {
|
||
return buffer.error('Failed to match tag: "' + tag + '"');
|
||
}
|
||
|
||
if (decodedTag.primitive || len !== null)
|
||
return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
|
||
|
||
// Indefinite length... find END tag
|
||
const state = buffer.save();
|
||
const res = this._skipUntilEnd(
|
||
buffer,
|
||
'Failed to skip indefinite length body: "' + this.tag + '"');
|
||
if (buffer.isError(res))
|
||
return res;
|
||
|
||
len = buffer.offset - state.offset;
|
||
buffer.restore(state);
|
||
return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
|
||
};
|
||
|
||
DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
|
||
for (;;) {
|
||
const tag = derDecodeTag(buffer, fail);
|
||
if (buffer.isError(tag))
|
||
return tag;
|
||
const len = derDecodeLen(buffer, tag.primitive, fail);
|
||
if (buffer.isError(len))
|
||
return len;
|
||
|
||
let res;
|
||
if (tag.primitive || len !== null)
|
||
res = buffer.skip(len);
|
||
else
|
||
res = this._skipUntilEnd(buffer, fail);
|
||
|
||
// Failure
|
||
if (buffer.isError(res))
|
||
return res;
|
||
|
||
if (tag.tagStr === 'end')
|
||
break;
|
||
}
|
||
};
|
||
|
||
DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,
|
||
options) {
|
||
const result = [];
|
||
while (!buffer.isEmpty()) {
|
||
const possibleEnd = this._peekTag(buffer, 'end');
|
||
if (buffer.isError(possibleEnd))
|
||
return possibleEnd;
|
||
|
||
const res = decoder.decode(buffer, 'der', options);
|
||
if (buffer.isError(res) && possibleEnd)
|
||
break;
|
||
result.push(res);
|
||
}
|
||
return result;
|
||
};
|
||
|
||
DERNode.prototype._decodeStr = function decodeStr(buffer, tag) {
|
||
if (tag === 'bitstr') {
|
||
const unused = buffer.readUInt8();
|
||
if (buffer.isError(unused))
|
||
return unused;
|
||
return { unused: unused, data: buffer.raw() };
|
||
} else if (tag === 'bmpstr') {
|
||
const raw = buffer.raw();
|
||
if (raw.length % 2 === 1)
|
||
return buffer.error('Decoding of string type: bmpstr length mismatch');
|
||
|
||
let str = '';
|
||
for (let i = 0; i < raw.length / 2; i++) {
|
||
str += String.fromCharCode(raw.readUInt16BE(i * 2));
|
||
}
|
||
return str;
|
||
} else if (tag === 'numstr') {
|
||
const numstr = buffer.raw().toString('ascii');
|
||
if (!this._isNumstr(numstr)) {
|
||
return buffer.error('Decoding of string type: ' +
|
||
'numstr unsupported characters');
|
||
}
|
||
return numstr;
|
||
} else if (tag === 'octstr') {
|
||
return buffer.raw();
|
||
} else if (tag === 'objDesc') {
|
||
return buffer.raw();
|
||
} else if (tag === 'printstr') {
|
||
const printstr = buffer.raw().toString('ascii');
|
||
if (!this._isPrintstr(printstr)) {
|
||
return buffer.error('Decoding of string type: ' +
|
||
'printstr unsupported characters');
|
||
}
|
||
return printstr;
|
||
} else if (/str$/.test(tag)) {
|
||
return buffer.raw().toString();
|
||
} else {
|
||
return buffer.error('Decoding of string type: ' + tag + ' unsupported');
|
||
}
|
||
};
|
||
|
||
DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {
|
||
let result;
|
||
const identifiers = [];
|
||
let ident = 0;
|
||
let subident = 0;
|
||
while (!buffer.isEmpty()) {
|
||
subident = buffer.readUInt8();
|
||
ident <<= 7;
|
||
ident |= subident & 0x7f;
|
||
if ((subident & 0x80) === 0) {
|
||
identifiers.push(ident);
|
||
ident = 0;
|
||
}
|
||
}
|
||
if (subident & 0x80)
|
||
identifiers.push(ident);
|
||
|
||
const first = (identifiers[0] / 40) | 0;
|
||
const second = identifiers[0] % 40;
|
||
|
||
if (relative)
|
||
result = identifiers;
|
||
else
|
||
result = [first, second].concat(identifiers.slice(1));
|
||
|
||
if (values) {
|
||
let tmp = values[result.join(' ')];
|
||
if (tmp === undefined)
|
||
tmp = values[result.join('.')];
|
||
if (tmp !== undefined)
|
||
result = tmp;
|
||
}
|
||
|
||
return result;
|
||
};
|
||
|
||
DERNode.prototype._decodeTime = function decodeTime(buffer, tag) {
|
||
const str = buffer.raw().toString();
|
||
|
||
let year;
|
||
let mon;
|
||
let day;
|
||
let hour;
|
||
let min;
|
||
let sec;
|
||
if (tag === 'gentime') {
|
||
year = str.slice(0, 4) | 0;
|
||
mon = str.slice(4, 6) | 0;
|
||
day = str.slice(6, 8) | 0;
|
||
hour = str.slice(8, 10) | 0;
|
||
min = str.slice(10, 12) | 0;
|
||
sec = str.slice(12, 14) | 0;
|
||
} else if (tag === 'utctime') {
|
||
year = str.slice(0, 2) | 0;
|
||
mon = str.slice(2, 4) | 0;
|
||
day = str.slice(4, 6) | 0;
|
||
hour = str.slice(6, 8) | 0;
|
||
min = str.slice(8, 10) | 0;
|
||
sec = str.slice(10, 12) | 0;
|
||
if (year < 70)
|
||
year = 2000 + year;
|
||
else
|
||
year = 1900 + year;
|
||
} else {
|
||
return buffer.error('Decoding ' + tag + ' time is not supported yet');
|
||
}
|
||
|
||
return Date.UTC(year, mon - 1, day, hour, min, sec, 0);
|
||
};
|
||
|
||
DERNode.prototype._decodeNull = function decodeNull() {
|
||
return null;
|
||
};
|
||
|
||
DERNode.prototype._decodeBool = function decodeBool(buffer) {
|
||
const res = buffer.readUInt8();
|
||
if (buffer.isError(res))
|
||
return res;
|
||
else
|
||
return res !== 0;
|
||
};
|
||
|
||
DERNode.prototype._decodeInt = function decodeInt(buffer, values) {
|
||
// Bigint, return as it is (assume big endian)
|
||
const raw = buffer.raw();
|
||
let res = new bignum(raw);
|
||
|
||
if (values)
|
||
res = values[res.toString(10)] || res;
|
||
|
||
return res;
|
||
};
|
||
|
||
DERNode.prototype._use = function use(entity, obj) {
|
||
if (typeof entity === 'function')
|
||
entity = entity(obj);
|
||
return entity._getDecoder('der').tree;
|
||
};
|
||
|
||
// Utility methods
|
||
|
||
function derDecodeTag(buf, fail) {
|
||
let tag = buf.readUInt8(fail);
|
||
if (buf.isError(tag))
|
||
return tag;
|
||
|
||
const cls = der.tagClass[tag >> 6];
|
||
const primitive = (tag & 0x20) === 0;
|
||
|
||
// Multi-octet tag - load
|
||
if ((tag & 0x1f) === 0x1f) {
|
||
let oct = tag;
|
||
tag = 0;
|
||
while ((oct & 0x80) === 0x80) {
|
||
oct = buf.readUInt8(fail);
|
||
if (buf.isError(oct))
|
||
return oct;
|
||
|
||
tag <<= 7;
|
||
tag |= oct & 0x7f;
|
||
}
|
||
} else {
|
||
tag &= 0x1f;
|
||
}
|
||
const tagStr = der.tag[tag];
|
||
|
||
return {
|
||
cls: cls,
|
||
primitive: primitive,
|
||
tag: tag,
|
||
tagStr: tagStr
|
||
};
|
||
}
|
||
|
||
function derDecodeLen(buf, primitive, fail) {
|
||
let len = buf.readUInt8(fail);
|
||
if (buf.isError(len))
|
||
return len;
|
||
|
||
// Indefinite form
|
||
if (!primitive && len === 0x80)
|
||
return null;
|
||
|
||
// Definite form
|
||
if ((len & 0x80) === 0) {
|
||
// Short form
|
||
return len;
|
||
}
|
||
|
||
// Long form
|
||
const num = len & 0x7f;
|
||
if (num > 4)
|
||
return buf.error('length octect is too long');
|
||
|
||
len = 0;
|
||
for (let i = 0; i < num; i++) {
|
||
len <<= 8;
|
||
const j = buf.readUInt8(fail);
|
||
if (buf.isError(j))
|
||
return j;
|
||
len |= j;
|
||
}
|
||
|
||
return len;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4952:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const decoders = exports;
|
||
|
||
decoders.der = __nccwpck_require__(3332);
|
||
decoders.pem = __nccwpck_require__(8361);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 8361:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const inherits = __nccwpck_require__(4124);
|
||
const Buffer = (__nccwpck_require__(5118).Buffer);
|
||
|
||
const DERDecoder = __nccwpck_require__(3332);
|
||
|
||
function PEMDecoder(entity) {
|
||
DERDecoder.call(this, entity);
|
||
this.enc = 'pem';
|
||
}
|
||
inherits(PEMDecoder, DERDecoder);
|
||
module.exports = PEMDecoder;
|
||
|
||
PEMDecoder.prototype.decode = function decode(data, options) {
|
||
const lines = data.toString().split(/[\r\n]+/g);
|
||
|
||
const label = options.label.toUpperCase();
|
||
|
||
const re = /^-----(BEGIN|END) ([^-]+)-----$/;
|
||
let start = -1;
|
||
let end = -1;
|
||
for (let i = 0; i < lines.length; i++) {
|
||
const match = lines[i].match(re);
|
||
if (match === null)
|
||
continue;
|
||
|
||
if (match[2] !== label)
|
||
continue;
|
||
|
||
if (start === -1) {
|
||
if (match[1] !== 'BEGIN')
|
||
break;
|
||
start = i;
|
||
} else {
|
||
if (match[1] !== 'END')
|
||
break;
|
||
end = i;
|
||
break;
|
||
}
|
||
}
|
||
if (start === -1 || end === -1)
|
||
throw new Error('PEM section not found for: ' + label);
|
||
|
||
const base64 = lines.slice(start + 1, end).join('');
|
||
// Remove excessive symbols
|
||
base64.replace(/[^a-z0-9+/=]+/gi, '');
|
||
|
||
const input = Buffer.from(base64, 'base64');
|
||
return DERDecoder.prototype.decode.call(this, input, options);
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5769:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const inherits = __nccwpck_require__(4124);
|
||
const Buffer = (__nccwpck_require__(5118).Buffer);
|
||
const Node = __nccwpck_require__(842);
|
||
|
||
// Import DER constants
|
||
const der = __nccwpck_require__(1188);
|
||
|
||
function DEREncoder(entity) {
|
||
this.enc = 'der';
|
||
this.name = entity.name;
|
||
this.entity = entity;
|
||
|
||
// Construct base tree
|
||
this.tree = new DERNode();
|
||
this.tree._init(entity.body);
|
||
}
|
||
module.exports = DEREncoder;
|
||
|
||
DEREncoder.prototype.encode = function encode(data, reporter) {
|
||
return this.tree._encode(data, reporter).join();
|
||
};
|
||
|
||
// Tree methods
|
||
|
||
function DERNode(parent) {
|
||
Node.call(this, 'der', parent);
|
||
}
|
||
inherits(DERNode, Node);
|
||
|
||
DERNode.prototype._encodeComposite = function encodeComposite(tag,
|
||
primitive,
|
||
cls,
|
||
content) {
|
||
const encodedTag = encodeTag(tag, primitive, cls, this.reporter);
|
||
|
||
// Short form
|
||
if (content.length < 0x80) {
|
||
const header = Buffer.alloc(2);
|
||
header[0] = encodedTag;
|
||
header[1] = content.length;
|
||
return this._createEncoderBuffer([ header, content ]);
|
||
}
|
||
|
||
// Long form
|
||
// Count octets required to store length
|
||
let lenOctets = 1;
|
||
for (let i = content.length; i >= 0x100; i >>= 8)
|
||
lenOctets++;
|
||
|
||
const header = Buffer.alloc(1 + 1 + lenOctets);
|
||
header[0] = encodedTag;
|
||
header[1] = 0x80 | lenOctets;
|
||
|
||
for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)
|
||
header[i] = j & 0xff;
|
||
|
||
return this._createEncoderBuffer([ header, content ]);
|
||
};
|
||
|
||
DERNode.prototype._encodeStr = function encodeStr(str, tag) {
|
||
if (tag === 'bitstr') {
|
||
return this._createEncoderBuffer([ str.unused | 0, str.data ]);
|
||
} else if (tag === 'bmpstr') {
|
||
const buf = Buffer.alloc(str.length * 2);
|
||
for (let i = 0; i < str.length; i++) {
|
||
buf.writeUInt16BE(str.charCodeAt(i), i * 2);
|
||
}
|
||
return this._createEncoderBuffer(buf);
|
||
} else if (tag === 'numstr') {
|
||
if (!this._isNumstr(str)) {
|
||
return this.reporter.error('Encoding of string type: numstr supports ' +
|
||
'only digits and space');
|
||
}
|
||
return this._createEncoderBuffer(str);
|
||
} else if (tag === 'printstr') {
|
||
if (!this._isPrintstr(str)) {
|
||
return this.reporter.error('Encoding of string type: printstr supports ' +
|
||
'only latin upper and lower case letters, ' +
|
||
'digits, space, apostrophe, left and rigth ' +
|
||
'parenthesis, plus sign, comma, hyphen, ' +
|
||
'dot, slash, colon, equal sign, ' +
|
||
'question mark');
|
||
}
|
||
return this._createEncoderBuffer(str);
|
||
} else if (/str$/.test(tag)) {
|
||
return this._createEncoderBuffer(str);
|
||
} else if (tag === 'objDesc') {
|
||
return this._createEncoderBuffer(str);
|
||
} else {
|
||
return this.reporter.error('Encoding of string type: ' + tag +
|
||
' unsupported');
|
||
}
|
||
};
|
||
|
||
DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {
|
||
if (typeof id === 'string') {
|
||
if (!values)
|
||
return this.reporter.error('string objid given, but no values map found');
|
||
if (!values.hasOwnProperty(id))
|
||
return this.reporter.error('objid not found in values map');
|
||
id = values[id].split(/[\s.]+/g);
|
||
for (let i = 0; i < id.length; i++)
|
||
id[i] |= 0;
|
||
} else if (Array.isArray(id)) {
|
||
id = id.slice();
|
||
for (let i = 0; i < id.length; i++)
|
||
id[i] |= 0;
|
||
}
|
||
|
||
if (!Array.isArray(id)) {
|
||
return this.reporter.error('objid() should be either array or string, ' +
|
||
'got: ' + JSON.stringify(id));
|
||
}
|
||
|
||
if (!relative) {
|
||
if (id[1] >= 40)
|
||
return this.reporter.error('Second objid identifier OOB');
|
||
id.splice(0, 2, id[0] * 40 + id[1]);
|
||
}
|
||
|
||
// Count number of octets
|
||
let size = 0;
|
||
for (let i = 0; i < id.length; i++) {
|
||
let ident = id[i];
|
||
for (size++; ident >= 0x80; ident >>= 7)
|
||
size++;
|
||
}
|
||
|
||
const objid = Buffer.alloc(size);
|
||
let offset = objid.length - 1;
|
||
for (let i = id.length - 1; i >= 0; i--) {
|
||
let ident = id[i];
|
||
objid[offset--] = ident & 0x7f;
|
||
while ((ident >>= 7) > 0)
|
||
objid[offset--] = 0x80 | (ident & 0x7f);
|
||
}
|
||
|
||
return this._createEncoderBuffer(objid);
|
||
};
|
||
|
||
function two(num) {
|
||
if (num < 10)
|
||
return '0' + num;
|
||
else
|
||
return num;
|
||
}
|
||
|
||
DERNode.prototype._encodeTime = function encodeTime(time, tag) {
|
||
let str;
|
||
const date = new Date(time);
|
||
|
||
if (tag === 'gentime') {
|
||
str = [
|
||
two(date.getUTCFullYear()),
|
||
two(date.getUTCMonth() + 1),
|
||
two(date.getUTCDate()),
|
||
two(date.getUTCHours()),
|
||
two(date.getUTCMinutes()),
|
||
two(date.getUTCSeconds()),
|
||
'Z'
|
||
].join('');
|
||
} else if (tag === 'utctime') {
|
||
str = [
|
||
two(date.getUTCFullYear() % 100),
|
||
two(date.getUTCMonth() + 1),
|
||
two(date.getUTCDate()),
|
||
two(date.getUTCHours()),
|
||
two(date.getUTCMinutes()),
|
||
two(date.getUTCSeconds()),
|
||
'Z'
|
||
].join('');
|
||
} else {
|
||
this.reporter.error('Encoding ' + tag + ' time is not supported yet');
|
||
}
|
||
|
||
return this._encodeStr(str, 'octstr');
|
||
};
|
||
|
||
DERNode.prototype._encodeNull = function encodeNull() {
|
||
return this._createEncoderBuffer('');
|
||
};
|
||
|
||
DERNode.prototype._encodeInt = function encodeInt(num, values) {
|
||
if (typeof num === 'string') {
|
||
if (!values)
|
||
return this.reporter.error('String int or enum given, but no values map');
|
||
if (!values.hasOwnProperty(num)) {
|
||
return this.reporter.error('Values map doesn\'t contain: ' +
|
||
JSON.stringify(num));
|
||
}
|
||
num = values[num];
|
||
}
|
||
|
||
// Bignum, assume big endian
|
||
if (typeof num !== 'number' && !Buffer.isBuffer(num)) {
|
||
const numArray = num.toArray();
|
||
if (!num.sign && numArray[0] & 0x80) {
|
||
numArray.unshift(0);
|
||
}
|
||
num = Buffer.from(numArray);
|
||
}
|
||
|
||
if (Buffer.isBuffer(num)) {
|
||
let size = num.length;
|
||
if (num.length === 0)
|
||
size++;
|
||
|
||
const out = Buffer.alloc(size);
|
||
num.copy(out);
|
||
if (num.length === 0)
|
||
out[0] = 0;
|
||
return this._createEncoderBuffer(out);
|
||
}
|
||
|
||
if (num < 0x80)
|
||
return this._createEncoderBuffer(num);
|
||
|
||
if (num < 0x100)
|
||
return this._createEncoderBuffer([0, num]);
|
||
|
||
let size = 1;
|
||
for (let i = num; i >= 0x100; i >>= 8)
|
||
size++;
|
||
|
||
const out = new Array(size);
|
||
for (let i = out.length - 1; i >= 0; i--) {
|
||
out[i] = num & 0xff;
|
||
num >>= 8;
|
||
}
|
||
if(out[0] & 0x80) {
|
||
out.unshift(0);
|
||
}
|
||
|
||
return this._createEncoderBuffer(Buffer.from(out));
|
||
};
|
||
|
||
DERNode.prototype._encodeBool = function encodeBool(value) {
|
||
return this._createEncoderBuffer(value ? 0xff : 0);
|
||
};
|
||
|
||
DERNode.prototype._use = function use(entity, obj) {
|
||
if (typeof entity === 'function')
|
||
entity = entity(obj);
|
||
return entity._getEncoder('der').tree;
|
||
};
|
||
|
||
DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {
|
||
const state = this._baseState;
|
||
let i;
|
||
if (state['default'] === null)
|
||
return false;
|
||
|
||
const data = dataBuffer.join();
|
||
if (state.defaultBuffer === undefined)
|
||
state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();
|
||
|
||
if (data.length !== state.defaultBuffer.length)
|
||
return false;
|
||
|
||
for (i=0; i < data.length; i++)
|
||
if (data[i] !== state.defaultBuffer[i])
|
||
return false;
|
||
|
||
return true;
|
||
};
|
||
|
||
// Utility methods
|
||
|
||
function encodeTag(tag, primitive, cls, reporter) {
|
||
let res;
|
||
|
||
if (tag === 'seqof')
|
||
tag = 'seq';
|
||
else if (tag === 'setof')
|
||
tag = 'set';
|
||
|
||
if (der.tagByName.hasOwnProperty(tag))
|
||
res = der.tagByName[tag];
|
||
else if (typeof tag === 'number' && (tag | 0) === tag)
|
||
res = tag;
|
||
else
|
||
return reporter.error('Unknown tag: ' + tag);
|
||
|
||
if (res >= 0x1f)
|
||
return reporter.error('Multi-octet tag encoding unsupported');
|
||
|
||
if (!primitive)
|
||
res |= 0x20;
|
||
|
||
res |= (der.tagClassByName[cls || 'universal'] << 6);
|
||
|
||
return res;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 9083:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const encoders = exports;
|
||
|
||
encoders.der = __nccwpck_require__(5769);
|
||
encoders.pem = __nccwpck_require__(279);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 279:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
const inherits = __nccwpck_require__(4124);
|
||
|
||
const DEREncoder = __nccwpck_require__(5769);
|
||
|
||
function PEMEncoder(entity) {
|
||
DEREncoder.call(this, entity);
|
||
this.enc = 'pem';
|
||
}
|
||
inherits(PEMEncoder, DEREncoder);
|
||
module.exports = PEMEncoder;
|
||
|
||
PEMEncoder.prototype.encode = function encode(data, options) {
|
||
const buf = DEREncoder.prototype.encode.call(this, data);
|
||
|
||
const p = buf.toString('base64');
|
||
const out = [ '-----BEGIN ' + options.label + '-----' ];
|
||
for (let i = 0; i < p.length; i += 64)
|
||
out.push(p.slice(i, i + 64));
|
||
out.push('-----END ' + options.label + '-----');
|
||
return out.join('\n');
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3682:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
var register = __nccwpck_require__(4670)
|
||
var addHook = __nccwpck_require__(5549)
|
||
var removeHook = __nccwpck_require__(6819)
|
||
|
||
// bind with array of arguments: https://stackoverflow.com/a/21792913
|
||
var bind = Function.bind
|
||
var bindable = bind.bind(bind)
|
||
|
||
function bindApi (hook, state, name) {
|
||
var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state])
|
||
hook.api = { remove: removeHookRef }
|
||
hook.remove = removeHookRef
|
||
|
||
;['before', 'error', 'after', 'wrap'].forEach(function (kind) {
|
||
var args = name ? [state, kind, name] : [state, kind]
|
||
hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args)
|
||
})
|
||
}
|
||
|
||
function HookSingular () {
|
||
var singularHookName = 'h'
|
||
var singularHookState = {
|
||
registry: {}
|
||
}
|
||
var singularHook = register.bind(null, singularHookState, singularHookName)
|
||
bindApi(singularHook, singularHookState, singularHookName)
|
||
return singularHook
|
||
}
|
||
|
||
function HookCollection () {
|
||
var state = {
|
||
registry: {}
|
||
}
|
||
|
||
var hook = register.bind(null, state)
|
||
bindApi(hook, state)
|
||
|
||
return hook
|
||
}
|
||
|
||
var collectionHookDeprecationMessageDisplayed = false
|
||
function Hook () {
|
||
if (!collectionHookDeprecationMessageDisplayed) {
|
||
console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4')
|
||
collectionHookDeprecationMessageDisplayed = true
|
||
}
|
||
return HookCollection()
|
||
}
|
||
|
||
Hook.Singular = HookSingular.bind()
|
||
Hook.Collection = HookCollection.bind()
|
||
|
||
module.exports = Hook
|
||
// expose constructors as a named property for TypeScript
|
||
module.exports.Hook = Hook
|
||
module.exports.Singular = Hook.Singular
|
||
module.exports.Collection = Hook.Collection
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5549:
|
||
/***/ ((module) => {
|
||
|
||
module.exports = addHook;
|
||
|
||
function addHook(state, kind, name, hook) {
|
||
var orig = hook;
|
||
if (!state.registry[name]) {
|
||
state.registry[name] = [];
|
||
}
|
||
|
||
if (kind === "before") {
|
||
hook = function (method, options) {
|
||
return Promise.resolve()
|
||
.then(orig.bind(null, options))
|
||
.then(method.bind(null, options));
|
||
};
|
||
}
|
||
|
||
if (kind === "after") {
|
||
hook = function (method, options) {
|
||
var result;
|
||
return Promise.resolve()
|
||
.then(method.bind(null, options))
|
||
.then(function (result_) {
|
||
result = result_;
|
||
return orig(result, options);
|
||
})
|
||
.then(function () {
|
||
return result;
|
||
});
|
||
};
|
||
}
|
||
|
||
if (kind === "error") {
|
||
hook = function (method, options) {
|
||
return Promise.resolve()
|
||
.then(method.bind(null, options))
|
||
.catch(function (error) {
|
||
return orig(error, options);
|
||
});
|
||
};
|
||
}
|
||
|
||
state.registry[name].push({
|
||
hook: hook,
|
||
orig: orig,
|
||
});
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4670:
|
||
/***/ ((module) => {
|
||
|
||
module.exports = register;
|
||
|
||
function register(state, name, method, options) {
|
||
if (typeof method !== "function") {
|
||
throw new Error("method for before hook must be a function");
|
||
}
|
||
|
||
if (!options) {
|
||
options = {};
|
||
}
|
||
|
||
if (Array.isArray(name)) {
|
||
return name.reverse().reduce(function (callback, name) {
|
||
return register.bind(null, state, name, callback, options);
|
||
}, method)();
|
||
}
|
||
|
||
return Promise.resolve().then(function () {
|
||
if (!state.registry[name]) {
|
||
return method(options);
|
||
}
|
||
|
||
return state.registry[name].reduce(function (method, registered) {
|
||
return registered.hook.bind(null, method, options);
|
||
}, method)();
|
||
});
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 6819:
|
||
/***/ ((module) => {
|
||
|
||
module.exports = removeHook;
|
||
|
||
function removeHook(state, name, method) {
|
||
if (!state.registry[name]) {
|
||
return;
|
||
}
|
||
|
||
var index = state.registry[name]
|
||
.map(function (registered) {
|
||
return registered.orig;
|
||
})
|
||
.indexOf(method);
|
||
|
||
if (index === -1) {
|
||
return;
|
||
}
|
||
|
||
state.registry[name].splice(index, 1);
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 6641:
|
||
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
|
||
|
||
/* module decorator */ module = __nccwpck_require__.nmd(module);
|
||
(function (module, exports) {
|
||
'use strict';
|
||
|
||
// Utils
|
||
function assert (val, msg) {
|
||
if (!val) throw new Error(msg || 'Assertion failed');
|
||
}
|
||
|
||
// Could use `inherits` module, but don't want to move from single file
|
||
// architecture yet.
|
||
function inherits (ctor, superCtor) {
|
||
ctor.super_ = superCtor;
|
||
var TempCtor = function () {};
|
||
TempCtor.prototype = superCtor.prototype;
|
||
ctor.prototype = new TempCtor();
|
||
ctor.prototype.constructor = ctor;
|
||
}
|
||
|
||
// BN
|
||
|
||
function BN (number, base, endian) {
|
||
if (BN.isBN(number)) {
|
||
return number;
|
||
}
|
||
|
||
this.negative = 0;
|
||
this.words = null;
|
||
this.length = 0;
|
||
|
||
// Reduction context
|
||
this.red = null;
|
||
|
||
if (number !== null) {
|
||
if (base === 'le' || base === 'be') {
|
||
endian = base;
|
||
base = 10;
|
||
}
|
||
|
||
this._init(number || 0, base || 10, endian || 'be');
|
||
}
|
||
}
|
||
if (typeof module === 'object') {
|
||
module.exports = BN;
|
||
} else {
|
||
exports.BN = BN;
|
||
}
|
||
|
||
BN.BN = BN;
|
||
BN.wordSize = 26;
|
||
|
||
var Buffer;
|
||
try {
|
||
if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {
|
||
Buffer = window.Buffer;
|
||
} else {
|
||
Buffer = (__nccwpck_require__(4300).Buffer);
|
||
}
|
||
} catch (e) {
|
||
}
|
||
|
||
BN.isBN = function isBN (num) {
|
||
if (num instanceof BN) {
|
||
return true;
|
||
}
|
||
|
||
return num !== null && typeof num === 'object' &&
|
||
num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
|
||
};
|
||
|
||
BN.max = function max (left, right) {
|
||
if (left.cmp(right) > 0) return left;
|
||
return right;
|
||
};
|
||
|
||
BN.min = function min (left, right) {
|
||
if (left.cmp(right) < 0) return left;
|
||
return right;
|
||
};
|
||
|
||
BN.prototype._init = function init (number, base, endian) {
|
||
if (typeof number === 'number') {
|
||
return this._initNumber(number, base, endian);
|
||
}
|
||
|
||
if (typeof number === 'object') {
|
||
return this._initArray(number, base, endian);
|
||
}
|
||
|
||
if (base === 'hex') {
|
||
base = 16;
|
||
}
|
||
assert(base === (base | 0) && base >= 2 && base <= 36);
|
||
|
||
number = number.toString().replace(/\s+/g, '');
|
||
var start = 0;
|
||
if (number[0] === '-') {
|
||
start++;
|
||
this.negative = 1;
|
||
}
|
||
|
||
if (start < number.length) {
|
||
if (base === 16) {
|
||
this._parseHex(number, start, endian);
|
||
} else {
|
||
this._parseBase(number, base, start);
|
||
if (endian === 'le') {
|
||
this._initArray(this.toArray(), base, endian);
|
||
}
|
||
}
|
||
}
|
||
};
|
||
|
||
BN.prototype._initNumber = function _initNumber (number, base, endian) {
|
||
if (number < 0) {
|
||
this.negative = 1;
|
||
number = -number;
|
||
}
|
||
if (number < 0x4000000) {
|
||
this.words = [ number & 0x3ffffff ];
|
||
this.length = 1;
|
||
} else if (number < 0x10000000000000) {
|
||
this.words = [
|
||
number & 0x3ffffff,
|
||
(number / 0x4000000) & 0x3ffffff
|
||
];
|
||
this.length = 2;
|
||
} else {
|
||
assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)
|
||
this.words = [
|
||
number & 0x3ffffff,
|
||
(number / 0x4000000) & 0x3ffffff,
|
||
1
|
||
];
|
||
this.length = 3;
|
||
}
|
||
|
||
if (endian !== 'le') return;
|
||
|
||
// Reverse the bytes
|
||
this._initArray(this.toArray(), base, endian);
|
||
};
|
||
|
||
BN.prototype._initArray = function _initArray (number, base, endian) {
|
||
// Perhaps a Uint8Array
|
||
assert(typeof number.length === 'number');
|
||
if (number.length <= 0) {
|
||
this.words = [ 0 ];
|
||
this.length = 1;
|
||
return this;
|
||
}
|
||
|
||
this.length = Math.ceil(number.length / 3);
|
||
this.words = new Array(this.length);
|
||
for (var i = 0; i < this.length; i++) {
|
||
this.words[i] = 0;
|
||
}
|
||
|
||
var j, w;
|
||
var off = 0;
|
||
if (endian === 'be') {
|
||
for (i = number.length - 1, j = 0; i >= 0; i -= 3) {
|
||
w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
|
||
this.words[j] |= (w << off) & 0x3ffffff;
|
||
this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
|
||
off += 24;
|
||
if (off >= 26) {
|
||
off -= 26;
|
||
j++;
|
||
}
|
||
}
|
||
} else if (endian === 'le') {
|
||
for (i = 0, j = 0; i < number.length; i += 3) {
|
||
w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
|
||
this.words[j] |= (w << off) & 0x3ffffff;
|
||
this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
|
||
off += 24;
|
||
if (off >= 26) {
|
||
off -= 26;
|
||
j++;
|
||
}
|
||
}
|
||
}
|
||
return this.strip();
|
||
};
|
||
|
||
function parseHex4Bits (string, index) {
|
||
var c = string.charCodeAt(index);
|
||
// 'A' - 'F'
|
||
if (c >= 65 && c <= 70) {
|
||
return c - 55;
|
||
// 'a' - 'f'
|
||
} else if (c >= 97 && c <= 102) {
|
||
return c - 87;
|
||
// '0' - '9'
|
||
} else {
|
||
return (c - 48) & 0xf;
|
||
}
|
||
}
|
||
|
||
function parseHexByte (string, lowerBound, index) {
|
||
var r = parseHex4Bits(string, index);
|
||
if (index - 1 >= lowerBound) {
|
||
r |= parseHex4Bits(string, index - 1) << 4;
|
||
}
|
||
return r;
|
||
}
|
||
|
||
BN.prototype._parseHex = function _parseHex (number, start, endian) {
|
||
// Create possibly bigger array to ensure that it fits the number
|
||
this.length = Math.ceil((number.length - start) / 6);
|
||
this.words = new Array(this.length);
|
||
for (var i = 0; i < this.length; i++) {
|
||
this.words[i] = 0;
|
||
}
|
||
|
||
// 24-bits chunks
|
||
var off = 0;
|
||
var j = 0;
|
||
|
||
var w;
|
||
if (endian === 'be') {
|
||
for (i = number.length - 1; i >= start; i -= 2) {
|
||
w = parseHexByte(number, start, i) << off;
|
||
this.words[j] |= w & 0x3ffffff;
|
||
if (off >= 18) {
|
||
off -= 18;
|
||
j += 1;
|
||
this.words[j] |= w >>> 26;
|
||
} else {
|
||
off += 8;
|
||
}
|
||
}
|
||
} else {
|
||
var parseLength = number.length - start;
|
||
for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {
|
||
w = parseHexByte(number, start, i) << off;
|
||
this.words[j] |= w & 0x3ffffff;
|
||
if (off >= 18) {
|
||
off -= 18;
|
||
j += 1;
|
||
this.words[j] |= w >>> 26;
|
||
} else {
|
||
off += 8;
|
||
}
|
||
}
|
||
}
|
||
|
||
this.strip();
|
||
};
|
||
|
||
function parseBase (str, start, end, mul) {
|
||
var r = 0;
|
||
var len = Math.min(str.length, end);
|
||
for (var i = start; i < len; i++) {
|
||
var c = str.charCodeAt(i) - 48;
|
||
|
||
r *= mul;
|
||
|
||
// 'a'
|
||
if (c >= 49) {
|
||
r += c - 49 + 0xa;
|
||
|
||
// 'A'
|
||
} else if (c >= 17) {
|
||
r += c - 17 + 0xa;
|
||
|
||
// '0' - '9'
|
||
} else {
|
||
r += c;
|
||
}
|
||
}
|
||
return r;
|
||
}
|
||
|
||
BN.prototype._parseBase = function _parseBase (number, base, start) {
|
||
// Initialize as zero
|
||
this.words = [ 0 ];
|
||
this.length = 1;
|
||
|
||
// Find length of limb in base
|
||
for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {
|
||
limbLen++;
|
||
}
|
||
limbLen--;
|
||
limbPow = (limbPow / base) | 0;
|
||
|
||
var total = number.length - start;
|
||
var mod = total % limbLen;
|
||
var end = Math.min(total, total - mod) + start;
|
||
|
||
var word = 0;
|
||
for (var i = start; i < end; i += limbLen) {
|
||
word = parseBase(number, i, i + limbLen, base);
|
||
|
||
this.imuln(limbPow);
|
||
if (this.words[0] + word < 0x4000000) {
|
||
this.words[0] += word;
|
||
} else {
|
||
this._iaddn(word);
|
||
}
|
||
}
|
||
|
||
if (mod !== 0) {
|
||
var pow = 1;
|
||
word = parseBase(number, i, number.length, base);
|
||
|
||
for (i = 0; i < mod; i++) {
|
||
pow *= base;
|
||
}
|
||
|
||
this.imuln(pow);
|
||
if (this.words[0] + word < 0x4000000) {
|
||
this.words[0] += word;
|
||
} else {
|
||
this._iaddn(word);
|
||
}
|
||
}
|
||
|
||
this.strip();
|
||
};
|
||
|
||
BN.prototype.copy = function copy (dest) {
|
||
dest.words = new Array(this.length);
|
||
for (var i = 0; i < this.length; i++) {
|
||
dest.words[i] = this.words[i];
|
||
}
|
||
dest.length = this.length;
|
||
dest.negative = this.negative;
|
||
dest.red = this.red;
|
||
};
|
||
|
||
BN.prototype.clone = function clone () {
|
||
var r = new BN(null);
|
||
this.copy(r);
|
||
return r;
|
||
};
|
||
|
||
BN.prototype._expand = function _expand (size) {
|
||
while (this.length < size) {
|
||
this.words[this.length++] = 0;
|
||
}
|
||
return this;
|
||
};
|
||
|
||
// Remove leading `0` from `this`
|
||
BN.prototype.strip = function strip () {
|
||
while (this.length > 1 && this.words[this.length - 1] === 0) {
|
||
this.length--;
|
||
}
|
||
return this._normSign();
|
||
};
|
||
|
||
BN.prototype._normSign = function _normSign () {
|
||
// -0 = 0
|
||
if (this.length === 1 && this.words[0] === 0) {
|
||
this.negative = 0;
|
||
}
|
||
return this;
|
||
};
|
||
|
||
BN.prototype.inspect = function inspect () {
|
||
return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';
|
||
};
|
||
|
||
/*
|
||
|
||
var zeros = [];
|
||
var groupSizes = [];
|
||
var groupBases = [];
|
||
|
||
var s = '';
|
||
var i = -1;
|
||
while (++i < BN.wordSize) {
|
||
zeros[i] = s;
|
||
s += '0';
|
||
}
|
||
groupSizes[0] = 0;
|
||
groupSizes[1] = 0;
|
||
groupBases[0] = 0;
|
||
groupBases[1] = 0;
|
||
var base = 2 - 1;
|
||
while (++base < 36 + 1) {
|
||
var groupSize = 0;
|
||
var groupBase = 1;
|
||
while (groupBase < (1 << BN.wordSize) / base) {
|
||
groupBase *= base;
|
||
groupSize += 1;
|
||
}
|
||
groupSizes[base] = groupSize;
|
||
groupBases[base] = groupBase;
|
||
}
|
||
|
||
*/
|
||
|
||
var zeros = [
|
||
'',
|
||
'0',
|
||
'00',
|
||
'000',
|
||
'0000',
|
||
'00000',
|
||
'000000',
|
||
'0000000',
|
||
'00000000',
|
||
'000000000',
|
||
'0000000000',
|
||
'00000000000',
|
||
'000000000000',
|
||
'0000000000000',
|
||
'00000000000000',
|
||
'000000000000000',
|
||
'0000000000000000',
|
||
'00000000000000000',
|
||
'000000000000000000',
|
||
'0000000000000000000',
|
||
'00000000000000000000',
|
||
'000000000000000000000',
|
||
'0000000000000000000000',
|
||
'00000000000000000000000',
|
||
'000000000000000000000000',
|
||
'0000000000000000000000000'
|
||
];
|
||
|
||
var groupSizes = [
|
||
0, 0,
|
||
25, 16, 12, 11, 10, 9, 8,
|
||
8, 7, 7, 7, 7, 6, 6,
|
||
6, 6, 6, 6, 6, 5, 5,
|
||
5, 5, 5, 5, 5, 5, 5,
|
||
5, 5, 5, 5, 5, 5, 5
|
||
];
|
||
|
||
var groupBases = [
|
||
0, 0,
|
||
33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,
|
||
43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,
|
||
16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,
|
||
6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
|
||
24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176
|
||
];
|
||
|
||
BN.prototype.toString = function toString (base, padding) {
|
||
base = base || 10;
|
||
padding = padding | 0 || 1;
|
||
|
||
var out;
|
||
if (base === 16 || base === 'hex') {
|
||
out = '';
|
||
var off = 0;
|
||
var carry = 0;
|
||
for (var i = 0; i < this.length; i++) {
|
||
var w = this.words[i];
|
||
var word = (((w << off) | carry) & 0xffffff).toString(16);
|
||
carry = (w >>> (24 - off)) & 0xffffff;
|
||
if (carry !== 0 || i !== this.length - 1) {
|
||
out = zeros[6 - word.length] + word + out;
|
||
} else {
|
||
out = word + out;
|
||
}
|
||
off += 2;
|
||
if (off >= 26) {
|
||
off -= 26;
|
||
i--;
|
||
}
|
||
}
|
||
if (carry !== 0) {
|
||
out = carry.toString(16) + out;
|
||
}
|
||
while (out.length % padding !== 0) {
|
||
out = '0' + out;
|
||
}
|
||
if (this.negative !== 0) {
|
||
out = '-' + out;
|
||
}
|
||
return out;
|
||
}
|
||
|
||
if (base === (base | 0) && base >= 2 && base <= 36) {
|
||
// var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));
|
||
var groupSize = groupSizes[base];
|
||
// var groupBase = Math.pow(base, groupSize);
|
||
var groupBase = groupBases[base];
|
||
out = '';
|
||
var c = this.clone();
|
||
c.negative = 0;
|
||
while (!c.isZero()) {
|
||
var r = c.modn(groupBase).toString(base);
|
||
c = c.idivn(groupBase);
|
||
|
||
if (!c.isZero()) {
|
||
out = zeros[groupSize - r.length] + r + out;
|
||
} else {
|
||
out = r + out;
|
||
}
|
||
}
|
||
if (this.isZero()) {
|
||
out = '0' + out;
|
||
}
|
||
while (out.length % padding !== 0) {
|
||
out = '0' + out;
|
||
}
|
||
if (this.negative !== 0) {
|
||
out = '-' + out;
|
||
}
|
||
return out;
|
||
}
|
||
|
||
assert(false, 'Base should be between 2 and 36');
|
||
};
|
||
|
||
BN.prototype.toNumber = function toNumber () {
|
||
var ret = this.words[0];
|
||
if (this.length === 2) {
|
||
ret += this.words[1] * 0x4000000;
|
||
} else if (this.length === 3 && this.words[2] === 0x01) {
|
||
// NOTE: at this stage it is known that the top bit is set
|
||
ret += 0x10000000000000 + (this.words[1] * 0x4000000);
|
||
} else if (this.length > 2) {
|
||
assert(false, 'Number can only safely store up to 53 bits');
|
||
}
|
||
return (this.negative !== 0) ? -ret : ret;
|
||
};
|
||
|
||
BN.prototype.toJSON = function toJSON () {
|
||
return this.toString(16);
|
||
};
|
||
|
||
BN.prototype.toBuffer = function toBuffer (endian, length) {
|
||
assert(typeof Buffer !== 'undefined');
|
||
return this.toArrayLike(Buffer, endian, length);
|
||
};
|
||
|
||
BN.prototype.toArray = function toArray (endian, length) {
|
||
return this.toArrayLike(Array, endian, length);
|
||
};
|
||
|
||
BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {
|
||
var byteLength = this.byteLength();
|
||
var reqLength = length || Math.max(1, byteLength);
|
||
assert(byteLength <= reqLength, 'byte array longer than desired length');
|
||
assert(reqLength > 0, 'Requested array length <= 0');
|
||
|
||
this.strip();
|
||
var littleEndian = endian === 'le';
|
||
var res = new ArrayType(reqLength);
|
||
|
||
var b, i;
|
||
var q = this.clone();
|
||
if (!littleEndian) {
|
||
// Assume big-endian
|
||
for (i = 0; i < reqLength - byteLength; i++) {
|
||
res[i] = 0;
|
||
}
|
||
|
||
for (i = 0; !q.isZero(); i++) {
|
||
b = q.andln(0xff);
|
||
q.iushrn(8);
|
||
|
||
res[reqLength - i - 1] = b;
|
||
}
|
||
} else {
|
||
for (i = 0; !q.isZero(); i++) {
|
||
b = q.andln(0xff);
|
||
q.iushrn(8);
|
||
|
||
res[i] = b;
|
||
}
|
||
|
||
for (; i < reqLength; i++) {
|
||
res[i] = 0;
|
||
}
|
||
}
|
||
|
||
return res;
|
||
};
|
||
|
||
if (Math.clz32) {
|
||
BN.prototype._countBits = function _countBits (w) {
|
||
return 32 - Math.clz32(w);
|
||
};
|
||
} else {
|
||
BN.prototype._countBits = function _countBits (w) {
|
||
var t = w;
|
||
var r = 0;
|
||
if (t >= 0x1000) {
|
||
r += 13;
|
||
t >>>= 13;
|
||
}
|
||
if (t >= 0x40) {
|
||
r += 7;
|
||
t >>>= 7;
|
||
}
|
||
if (t >= 0x8) {
|
||
r += 4;
|
||
t >>>= 4;
|
||
}
|
||
if (t >= 0x02) {
|
||
r += 2;
|
||
t >>>= 2;
|
||
}
|
||
return r + t;
|
||
};
|
||
}
|
||
|
||
BN.prototype._zeroBits = function _zeroBits (w) {
|
||
// Short-cut
|
||
if (w === 0) return 26;
|
||
|
||
var t = w;
|
||
var r = 0;
|
||
if ((t & 0x1fff) === 0) {
|
||
r += 13;
|
||
t >>>= 13;
|
||
}
|
||
if ((t & 0x7f) === 0) {
|
||
r += 7;
|
||
t >>>= 7;
|
||
}
|
||
if ((t & 0xf) === 0) {
|
||
r += 4;
|
||
t >>>= 4;
|
||
}
|
||
if ((t & 0x3) === 0) {
|
||
r += 2;
|
||
t >>>= 2;
|
||
}
|
||
if ((t & 0x1) === 0) {
|
||
r++;
|
||
}
|
||
return r;
|
||
};
|
||
|
||
// Return number of used bits in a BN
|
||
BN.prototype.bitLength = function bitLength () {
|
||
var w = this.words[this.length - 1];
|
||
var hi = this._countBits(w);
|
||
return (this.length - 1) * 26 + hi;
|
||
};
|
||
|
||
function toBitArray (num) {
|
||
var w = new Array(num.bitLength());
|
||
|
||
for (var bit = 0; bit < w.length; bit++) {
|
||
var off = (bit / 26) | 0;
|
||
var wbit = bit % 26;
|
||
|
||
w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;
|
||
}
|
||
|
||
return w;
|
||
}
|
||
|
||
// Number of trailing zero bits
|
||
BN.prototype.zeroBits = function zeroBits () {
|
||
if (this.isZero()) return 0;
|
||
|
||
var r = 0;
|
||
for (var i = 0; i < this.length; i++) {
|
||
var b = this._zeroBits(this.words[i]);
|
||
r += b;
|
||
if (b !== 26) break;
|
||
}
|
||
return r;
|
||
};
|
||
|
||
BN.prototype.byteLength = function byteLength () {
|
||
return Math.ceil(this.bitLength() / 8);
|
||
};
|
||
|
||
BN.prototype.toTwos = function toTwos (width) {
|
||
if (this.negative !== 0) {
|
||
return this.abs().inotn(width).iaddn(1);
|
||
}
|
||
return this.clone();
|
||
};
|
||
|
||
BN.prototype.fromTwos = function fromTwos (width) {
|
||
if (this.testn(width - 1)) {
|
||
return this.notn(width).iaddn(1).ineg();
|
||
}
|
||
return this.clone();
|
||
};
|
||
|
||
BN.prototype.isNeg = function isNeg () {
|
||
return this.negative !== 0;
|
||
};
|
||
|
||
// Return negative clone of `this`
|
||
BN.prototype.neg = function neg () {
|
||
return this.clone().ineg();
|
||
};
|
||
|
||
BN.prototype.ineg = function ineg () {
|
||
if (!this.isZero()) {
|
||
this.negative ^= 1;
|
||
}
|
||
|
||
return this;
|
||
};
|
||
|
||
// Or `num` with `this` in-place
|
||
BN.prototype.iuor = function iuor (num) {
|
||
while (this.length < num.length) {
|
||
this.words[this.length++] = 0;
|
||
}
|
||
|
||
for (var i = 0; i < num.length; i++) {
|
||
this.words[i] = this.words[i] | num.words[i];
|
||
}
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
BN.prototype.ior = function ior (num) {
|
||
assert((this.negative | num.negative) === 0);
|
||
return this.iuor(num);
|
||
};
|
||
|
||
// Or `num` with `this`
|
||
BN.prototype.or = function or (num) {
|
||
if (this.length > num.length) return this.clone().ior(num);
|
||
return num.clone().ior(this);
|
||
};
|
||
|
||
BN.prototype.uor = function uor (num) {
|
||
if (this.length > num.length) return this.clone().iuor(num);
|
||
return num.clone().iuor(this);
|
||
};
|
||
|
||
// And `num` with `this` in-place
|
||
BN.prototype.iuand = function iuand (num) {
|
||
// b = min-length(num, this)
|
||
var b;
|
||
if (this.length > num.length) {
|
||
b = num;
|
||
} else {
|
||
b = this;
|
||
}
|
||
|
||
for (var i = 0; i < b.length; i++) {
|
||
this.words[i] = this.words[i] & num.words[i];
|
||
}
|
||
|
||
this.length = b.length;
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
BN.prototype.iand = function iand (num) {
|
||
assert((this.negative | num.negative) === 0);
|
||
return this.iuand(num);
|
||
};
|
||
|
||
// And `num` with `this`
|
||
BN.prototype.and = function and (num) {
|
||
if (this.length > num.length) return this.clone().iand(num);
|
||
return num.clone().iand(this);
|
||
};
|
||
|
||
BN.prototype.uand = function uand (num) {
|
||
if (this.length > num.length) return this.clone().iuand(num);
|
||
return num.clone().iuand(this);
|
||
};
|
||
|
||
// Xor `num` with `this` in-place
|
||
BN.prototype.iuxor = function iuxor (num) {
|
||
// a.length > b.length
|
||
var a;
|
||
var b;
|
||
if (this.length > num.length) {
|
||
a = this;
|
||
b = num;
|
||
} else {
|
||
a = num;
|
||
b = this;
|
||
}
|
||
|
||
for (var i = 0; i < b.length; i++) {
|
||
this.words[i] = a.words[i] ^ b.words[i];
|
||
}
|
||
|
||
if (this !== a) {
|
||
for (; i < a.length; i++) {
|
||
this.words[i] = a.words[i];
|
||
}
|
||
}
|
||
|
||
this.length = a.length;
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
BN.prototype.ixor = function ixor (num) {
|
||
assert((this.negative | num.negative) === 0);
|
||
return this.iuxor(num);
|
||
};
|
||
|
||
// Xor `num` with `this`
|
||
BN.prototype.xor = function xor (num) {
|
||
if (this.length > num.length) return this.clone().ixor(num);
|
||
return num.clone().ixor(this);
|
||
};
|
||
|
||
BN.prototype.uxor = function uxor (num) {
|
||
if (this.length > num.length) return this.clone().iuxor(num);
|
||
return num.clone().iuxor(this);
|
||
};
|
||
|
||
// Not ``this`` with ``width`` bitwidth
|
||
BN.prototype.inotn = function inotn (width) {
|
||
assert(typeof width === 'number' && width >= 0);
|
||
|
||
var bytesNeeded = Math.ceil(width / 26) | 0;
|
||
var bitsLeft = width % 26;
|
||
|
||
// Extend the buffer with leading zeroes
|
||
this._expand(bytesNeeded);
|
||
|
||
if (bitsLeft > 0) {
|
||
bytesNeeded--;
|
||
}
|
||
|
||
// Handle complete words
|
||
for (var i = 0; i < bytesNeeded; i++) {
|
||
this.words[i] = ~this.words[i] & 0x3ffffff;
|
||
}
|
||
|
||
// Handle the residue
|
||
if (bitsLeft > 0) {
|
||
this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));
|
||
}
|
||
|
||
// And remove leading zeroes
|
||
return this.strip();
|
||
};
|
||
|
||
BN.prototype.notn = function notn (width) {
|
||
return this.clone().inotn(width);
|
||
};
|
||
|
||
// Set `bit` of `this`
|
||
BN.prototype.setn = function setn (bit, val) {
|
||
assert(typeof bit === 'number' && bit >= 0);
|
||
|
||
var off = (bit / 26) | 0;
|
||
var wbit = bit % 26;
|
||
|
||
this._expand(off + 1);
|
||
|
||
if (val) {
|
||
this.words[off] = this.words[off] | (1 << wbit);
|
||
} else {
|
||
this.words[off] = this.words[off] & ~(1 << wbit);
|
||
}
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
// Add `num` to `this` in-place
|
||
BN.prototype.iadd = function iadd (num) {
|
||
var r;
|
||
|
||
// negative + positive
|
||
if (this.negative !== 0 && num.negative === 0) {
|
||
this.negative = 0;
|
||
r = this.isub(num);
|
||
this.negative ^= 1;
|
||
return this._normSign();
|
||
|
||
// positive + negative
|
||
} else if (this.negative === 0 && num.negative !== 0) {
|
||
num.negative = 0;
|
||
r = this.isub(num);
|
||
num.negative = 1;
|
||
return r._normSign();
|
||
}
|
||
|
||
// a.length > b.length
|
||
var a, b;
|
||
if (this.length > num.length) {
|
||
a = this;
|
||
b = num;
|
||
} else {
|
||
a = num;
|
||
b = this;
|
||
}
|
||
|
||
var carry = 0;
|
||
for (var i = 0; i < b.length; i++) {
|
||
r = (a.words[i] | 0) + (b.words[i] | 0) + carry;
|
||
this.words[i] = r & 0x3ffffff;
|
||
carry = r >>> 26;
|
||
}
|
||
for (; carry !== 0 && i < a.length; i++) {
|
||
r = (a.words[i] | 0) + carry;
|
||
this.words[i] = r & 0x3ffffff;
|
||
carry = r >>> 26;
|
||
}
|
||
|
||
this.length = a.length;
|
||
if (carry !== 0) {
|
||
this.words[this.length] = carry;
|
||
this.length++;
|
||
// Copy the rest of the words
|
||
} else if (a !== this) {
|
||
for (; i < a.length; i++) {
|
||
this.words[i] = a.words[i];
|
||
}
|
||
}
|
||
|
||
return this;
|
||
};
|
||
|
||
// Add `num` to `this`
|
||
BN.prototype.add = function add (num) {
|
||
var res;
|
||
if (num.negative !== 0 && this.negative === 0) {
|
||
num.negative = 0;
|
||
res = this.sub(num);
|
||
num.negative ^= 1;
|
||
return res;
|
||
} else if (num.negative === 0 && this.negative !== 0) {
|
||
this.negative = 0;
|
||
res = num.sub(this);
|
||
this.negative = 1;
|
||
return res;
|
||
}
|
||
|
||
if (this.length > num.length) return this.clone().iadd(num);
|
||
|
||
return num.clone().iadd(this);
|
||
};
|
||
|
||
// Subtract `num` from `this` in-place
|
||
BN.prototype.isub = function isub (num) {
|
||
// this - (-num) = this + num
|
||
if (num.negative !== 0) {
|
||
num.negative = 0;
|
||
var r = this.iadd(num);
|
||
num.negative = 1;
|
||
return r._normSign();
|
||
|
||
// -this - num = -(this + num)
|
||
} else if (this.negative !== 0) {
|
||
this.negative = 0;
|
||
this.iadd(num);
|
||
this.negative = 1;
|
||
return this._normSign();
|
||
}
|
||
|
||
// At this point both numbers are positive
|
||
var cmp = this.cmp(num);
|
||
|
||
// Optimization - zeroify
|
||
if (cmp === 0) {
|
||
this.negative = 0;
|
||
this.length = 1;
|
||
this.words[0] = 0;
|
||
return this;
|
||
}
|
||
|
||
// a > b
|
||
var a, b;
|
||
if (cmp > 0) {
|
||
a = this;
|
||
b = num;
|
||
} else {
|
||
a = num;
|
||
b = this;
|
||
}
|
||
|
||
var carry = 0;
|
||
for (var i = 0; i < b.length; i++) {
|
||
r = (a.words[i] | 0) - (b.words[i] | 0) + carry;
|
||
carry = r >> 26;
|
||
this.words[i] = r & 0x3ffffff;
|
||
}
|
||
for (; carry !== 0 && i < a.length; i++) {
|
||
r = (a.words[i] | 0) + carry;
|
||
carry = r >> 26;
|
||
this.words[i] = r & 0x3ffffff;
|
||
}
|
||
|
||
// Copy rest of the words
|
||
if (carry === 0 && i < a.length && a !== this) {
|
||
for (; i < a.length; i++) {
|
||
this.words[i] = a.words[i];
|
||
}
|
||
}
|
||
|
||
this.length = Math.max(this.length, i);
|
||
|
||
if (a !== this) {
|
||
this.negative = 1;
|
||
}
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
// Subtract `num` from `this`
|
||
BN.prototype.sub = function sub (num) {
|
||
return this.clone().isub(num);
|
||
};
|
||
|
||
function smallMulTo (self, num, out) {
|
||
out.negative = num.negative ^ self.negative;
|
||
var len = (self.length + num.length) | 0;
|
||
out.length = len;
|
||
len = (len - 1) | 0;
|
||
|
||
// Peel one iteration (compiler can't do it, because of code complexity)
|
||
var a = self.words[0] | 0;
|
||
var b = num.words[0] | 0;
|
||
var r = a * b;
|
||
|
||
var lo = r & 0x3ffffff;
|
||
var carry = (r / 0x4000000) | 0;
|
||
out.words[0] = lo;
|
||
|
||
for (var k = 1; k < len; k++) {
|
||
// Sum all words with the same `i + j = k` and accumulate `ncarry`,
|
||
// note that ncarry could be >= 0x3ffffff
|
||
var ncarry = carry >>> 26;
|
||
var rword = carry & 0x3ffffff;
|
||
var maxJ = Math.min(k, num.length - 1);
|
||
for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
|
||
var i = (k - j) | 0;
|
||
a = self.words[i] | 0;
|
||
b = num.words[j] | 0;
|
||
r = a * b + rword;
|
||
ncarry += (r / 0x4000000) | 0;
|
||
rword = r & 0x3ffffff;
|
||
}
|
||
out.words[k] = rword | 0;
|
||
carry = ncarry | 0;
|
||
}
|
||
if (carry !== 0) {
|
||
out.words[k] = carry | 0;
|
||
} else {
|
||
out.length--;
|
||
}
|
||
|
||
return out.strip();
|
||
}
|
||
|
||
// TODO(indutny): it may be reasonable to omit it for users who don't need
|
||
// to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit
|
||
// multiplication (like elliptic secp256k1).
|
||
var comb10MulTo = function comb10MulTo (self, num, out) {
|
||
var a = self.words;
|
||
var b = num.words;
|
||
var o = out.words;
|
||
var c = 0;
|
||
var lo;
|
||
var mid;
|
||
var hi;
|
||
var a0 = a[0] | 0;
|
||
var al0 = a0 & 0x1fff;
|
||
var ah0 = a0 >>> 13;
|
||
var a1 = a[1] | 0;
|
||
var al1 = a1 & 0x1fff;
|
||
var ah1 = a1 >>> 13;
|
||
var a2 = a[2] | 0;
|
||
var al2 = a2 & 0x1fff;
|
||
var ah2 = a2 >>> 13;
|
||
var a3 = a[3] | 0;
|
||
var al3 = a3 & 0x1fff;
|
||
var ah3 = a3 >>> 13;
|
||
var a4 = a[4] | 0;
|
||
var al4 = a4 & 0x1fff;
|
||
var ah4 = a4 >>> 13;
|
||
var a5 = a[5] | 0;
|
||
var al5 = a5 & 0x1fff;
|
||
var ah5 = a5 >>> 13;
|
||
var a6 = a[6] | 0;
|
||
var al6 = a6 & 0x1fff;
|
||
var ah6 = a6 >>> 13;
|
||
var a7 = a[7] | 0;
|
||
var al7 = a7 & 0x1fff;
|
||
var ah7 = a7 >>> 13;
|
||
var a8 = a[8] | 0;
|
||
var al8 = a8 & 0x1fff;
|
||
var ah8 = a8 >>> 13;
|
||
var a9 = a[9] | 0;
|
||
var al9 = a9 & 0x1fff;
|
||
var ah9 = a9 >>> 13;
|
||
var b0 = b[0] | 0;
|
||
var bl0 = b0 & 0x1fff;
|
||
var bh0 = b0 >>> 13;
|
||
var b1 = b[1] | 0;
|
||
var bl1 = b1 & 0x1fff;
|
||
var bh1 = b1 >>> 13;
|
||
var b2 = b[2] | 0;
|
||
var bl2 = b2 & 0x1fff;
|
||
var bh2 = b2 >>> 13;
|
||
var b3 = b[3] | 0;
|
||
var bl3 = b3 & 0x1fff;
|
||
var bh3 = b3 >>> 13;
|
||
var b4 = b[4] | 0;
|
||
var bl4 = b4 & 0x1fff;
|
||
var bh4 = b4 >>> 13;
|
||
var b5 = b[5] | 0;
|
||
var bl5 = b5 & 0x1fff;
|
||
var bh5 = b5 >>> 13;
|
||
var b6 = b[6] | 0;
|
||
var bl6 = b6 & 0x1fff;
|
||
var bh6 = b6 >>> 13;
|
||
var b7 = b[7] | 0;
|
||
var bl7 = b7 & 0x1fff;
|
||
var bh7 = b7 >>> 13;
|
||
var b8 = b[8] | 0;
|
||
var bl8 = b8 & 0x1fff;
|
||
var bh8 = b8 >>> 13;
|
||
var b9 = b[9] | 0;
|
||
var bl9 = b9 & 0x1fff;
|
||
var bh9 = b9 >>> 13;
|
||
|
||
out.negative = self.negative ^ num.negative;
|
||
out.length = 19;
|
||
/* k = 0 */
|
||
lo = Math.imul(al0, bl0);
|
||
mid = Math.imul(al0, bh0);
|
||
mid = (mid + Math.imul(ah0, bl0)) | 0;
|
||
hi = Math.imul(ah0, bh0);
|
||
var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;
|
||
w0 &= 0x3ffffff;
|
||
/* k = 1 */
|
||
lo = Math.imul(al1, bl0);
|
||
mid = Math.imul(al1, bh0);
|
||
mid = (mid + Math.imul(ah1, bl0)) | 0;
|
||
hi = Math.imul(ah1, bh0);
|
||
lo = (lo + Math.imul(al0, bl1)) | 0;
|
||
mid = (mid + Math.imul(al0, bh1)) | 0;
|
||
mid = (mid + Math.imul(ah0, bl1)) | 0;
|
||
hi = (hi + Math.imul(ah0, bh1)) | 0;
|
||
var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;
|
||
w1 &= 0x3ffffff;
|
||
/* k = 2 */
|
||
lo = Math.imul(al2, bl0);
|
||
mid = Math.imul(al2, bh0);
|
||
mid = (mid + Math.imul(ah2, bl0)) | 0;
|
||
hi = Math.imul(ah2, bh0);
|
||
lo = (lo + Math.imul(al1, bl1)) | 0;
|
||
mid = (mid + Math.imul(al1, bh1)) | 0;
|
||
mid = (mid + Math.imul(ah1, bl1)) | 0;
|
||
hi = (hi + Math.imul(ah1, bh1)) | 0;
|
||
lo = (lo + Math.imul(al0, bl2)) | 0;
|
||
mid = (mid + Math.imul(al0, bh2)) | 0;
|
||
mid = (mid + Math.imul(ah0, bl2)) | 0;
|
||
hi = (hi + Math.imul(ah0, bh2)) | 0;
|
||
var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;
|
||
w2 &= 0x3ffffff;
|
||
/* k = 3 */
|
||
lo = Math.imul(al3, bl0);
|
||
mid = Math.imul(al3, bh0);
|
||
mid = (mid + Math.imul(ah3, bl0)) | 0;
|
||
hi = Math.imul(ah3, bh0);
|
||
lo = (lo + Math.imul(al2, bl1)) | 0;
|
||
mid = (mid + Math.imul(al2, bh1)) | 0;
|
||
mid = (mid + Math.imul(ah2, bl1)) | 0;
|
||
hi = (hi + Math.imul(ah2, bh1)) | 0;
|
||
lo = (lo + Math.imul(al1, bl2)) | 0;
|
||
mid = (mid + Math.imul(al1, bh2)) | 0;
|
||
mid = (mid + Math.imul(ah1, bl2)) | 0;
|
||
hi = (hi + Math.imul(ah1, bh2)) | 0;
|
||
lo = (lo + Math.imul(al0, bl3)) | 0;
|
||
mid = (mid + Math.imul(al0, bh3)) | 0;
|
||
mid = (mid + Math.imul(ah0, bl3)) | 0;
|
||
hi = (hi + Math.imul(ah0, bh3)) | 0;
|
||
var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;
|
||
w3 &= 0x3ffffff;
|
||
/* k = 4 */
|
||
lo = Math.imul(al4, bl0);
|
||
mid = Math.imul(al4, bh0);
|
||
mid = (mid + Math.imul(ah4, bl0)) | 0;
|
||
hi = Math.imul(ah4, bh0);
|
||
lo = (lo + Math.imul(al3, bl1)) | 0;
|
||
mid = (mid + Math.imul(al3, bh1)) | 0;
|
||
mid = (mid + Math.imul(ah3, bl1)) | 0;
|
||
hi = (hi + Math.imul(ah3, bh1)) | 0;
|
||
lo = (lo + Math.imul(al2, bl2)) | 0;
|
||
mid = (mid + Math.imul(al2, bh2)) | 0;
|
||
mid = (mid + Math.imul(ah2, bl2)) | 0;
|
||
hi = (hi + Math.imul(ah2, bh2)) | 0;
|
||
lo = (lo + Math.imul(al1, bl3)) | 0;
|
||
mid = (mid + Math.imul(al1, bh3)) | 0;
|
||
mid = (mid + Math.imul(ah1, bl3)) | 0;
|
||
hi = (hi + Math.imul(ah1, bh3)) | 0;
|
||
lo = (lo + Math.imul(al0, bl4)) | 0;
|
||
mid = (mid + Math.imul(al0, bh4)) | 0;
|
||
mid = (mid + Math.imul(ah0, bl4)) | 0;
|
||
hi = (hi + Math.imul(ah0, bh4)) | 0;
|
||
var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;
|
||
w4 &= 0x3ffffff;
|
||
/* k = 5 */
|
||
lo = Math.imul(al5, bl0);
|
||
mid = Math.imul(al5, bh0);
|
||
mid = (mid + Math.imul(ah5, bl0)) | 0;
|
||
hi = Math.imul(ah5, bh0);
|
||
lo = (lo + Math.imul(al4, bl1)) | 0;
|
||
mid = (mid + Math.imul(al4, bh1)) | 0;
|
||
mid = (mid + Math.imul(ah4, bl1)) | 0;
|
||
hi = (hi + Math.imul(ah4, bh1)) | 0;
|
||
lo = (lo + Math.imul(al3, bl2)) | 0;
|
||
mid = (mid + Math.imul(al3, bh2)) | 0;
|
||
mid = (mid + Math.imul(ah3, bl2)) | 0;
|
||
hi = (hi + Math.imul(ah3, bh2)) | 0;
|
||
lo = (lo + Math.imul(al2, bl3)) | 0;
|
||
mid = (mid + Math.imul(al2, bh3)) | 0;
|
||
mid = (mid + Math.imul(ah2, bl3)) | 0;
|
||
hi = (hi + Math.imul(ah2, bh3)) | 0;
|
||
lo = (lo + Math.imul(al1, bl4)) | 0;
|
||
mid = (mid + Math.imul(al1, bh4)) | 0;
|
||
mid = (mid + Math.imul(ah1, bl4)) | 0;
|
||
hi = (hi + Math.imul(ah1, bh4)) | 0;
|
||
lo = (lo + Math.imul(al0, bl5)) | 0;
|
||
mid = (mid + Math.imul(al0, bh5)) | 0;
|
||
mid = (mid + Math.imul(ah0, bl5)) | 0;
|
||
hi = (hi + Math.imul(ah0, bh5)) | 0;
|
||
var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;
|
||
w5 &= 0x3ffffff;
|
||
/* k = 6 */
|
||
lo = Math.imul(al6, bl0);
|
||
mid = Math.imul(al6, bh0);
|
||
mid = (mid + Math.imul(ah6, bl0)) | 0;
|
||
hi = Math.imul(ah6, bh0);
|
||
lo = (lo + Math.imul(al5, bl1)) | 0;
|
||
mid = (mid + Math.imul(al5, bh1)) | 0;
|
||
mid = (mid + Math.imul(ah5, bl1)) | 0;
|
||
hi = (hi + Math.imul(ah5, bh1)) | 0;
|
||
lo = (lo + Math.imul(al4, bl2)) | 0;
|
||
mid = (mid + Math.imul(al4, bh2)) | 0;
|
||
mid = (mid + Math.imul(ah4, bl2)) | 0;
|
||
hi = (hi + Math.imul(ah4, bh2)) | 0;
|
||
lo = (lo + Math.imul(al3, bl3)) | 0;
|
||
mid = (mid + Math.imul(al3, bh3)) | 0;
|
||
mid = (mid + Math.imul(ah3, bl3)) | 0;
|
||
hi = (hi + Math.imul(ah3, bh3)) | 0;
|
||
lo = (lo + Math.imul(al2, bl4)) | 0;
|
||
mid = (mid + Math.imul(al2, bh4)) | 0;
|
||
mid = (mid + Math.imul(ah2, bl4)) | 0;
|
||
hi = (hi + Math.imul(ah2, bh4)) | 0;
|
||
lo = (lo + Math.imul(al1, bl5)) | 0;
|
||
mid = (mid + Math.imul(al1, bh5)) | 0;
|
||
mid = (mid + Math.imul(ah1, bl5)) | 0;
|
||
hi = (hi + Math.imul(ah1, bh5)) | 0;
|
||
lo = (lo + Math.imul(al0, bl6)) | 0;
|
||
mid = (mid + Math.imul(al0, bh6)) | 0;
|
||
mid = (mid + Math.imul(ah0, bl6)) | 0;
|
||
hi = (hi + Math.imul(ah0, bh6)) | 0;
|
||
var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;
|
||
w6 &= 0x3ffffff;
|
||
/* k = 7 */
|
||
lo = Math.imul(al7, bl0);
|
||
mid = Math.imul(al7, bh0);
|
||
mid = (mid + Math.imul(ah7, bl0)) | 0;
|
||
hi = Math.imul(ah7, bh0);
|
||
lo = (lo + Math.imul(al6, bl1)) | 0;
|
||
mid = (mid + Math.imul(al6, bh1)) | 0;
|
||
mid = (mid + Math.imul(ah6, bl1)) | 0;
|
||
hi = (hi + Math.imul(ah6, bh1)) | 0;
|
||
lo = (lo + Math.imul(al5, bl2)) | 0;
|
||
mid = (mid + Math.imul(al5, bh2)) | 0;
|
||
mid = (mid + Math.imul(ah5, bl2)) | 0;
|
||
hi = (hi + Math.imul(ah5, bh2)) | 0;
|
||
lo = (lo + Math.imul(al4, bl3)) | 0;
|
||
mid = (mid + Math.imul(al4, bh3)) | 0;
|
||
mid = (mid + Math.imul(ah4, bl3)) | 0;
|
||
hi = (hi + Math.imul(ah4, bh3)) | 0;
|
||
lo = (lo + Math.imul(al3, bl4)) | 0;
|
||
mid = (mid + Math.imul(al3, bh4)) | 0;
|
||
mid = (mid + Math.imul(ah3, bl4)) | 0;
|
||
hi = (hi + Math.imul(ah3, bh4)) | 0;
|
||
lo = (lo + Math.imul(al2, bl5)) | 0;
|
||
mid = (mid + Math.imul(al2, bh5)) | 0;
|
||
mid = (mid + Math.imul(ah2, bl5)) | 0;
|
||
hi = (hi + Math.imul(ah2, bh5)) | 0;
|
||
lo = (lo + Math.imul(al1, bl6)) | 0;
|
||
mid = (mid + Math.imul(al1, bh6)) | 0;
|
||
mid = (mid + Math.imul(ah1, bl6)) | 0;
|
||
hi = (hi + Math.imul(ah1, bh6)) | 0;
|
||
lo = (lo + Math.imul(al0, bl7)) | 0;
|
||
mid = (mid + Math.imul(al0, bh7)) | 0;
|
||
mid = (mid + Math.imul(ah0, bl7)) | 0;
|
||
hi = (hi + Math.imul(ah0, bh7)) | 0;
|
||
var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;
|
||
w7 &= 0x3ffffff;
|
||
/* k = 8 */
|
||
lo = Math.imul(al8, bl0);
|
||
mid = Math.imul(al8, bh0);
|
||
mid = (mid + Math.imul(ah8, bl0)) | 0;
|
||
hi = Math.imul(ah8, bh0);
|
||
lo = (lo + Math.imul(al7, bl1)) | 0;
|
||
mid = (mid + Math.imul(al7, bh1)) | 0;
|
||
mid = (mid + Math.imul(ah7, bl1)) | 0;
|
||
hi = (hi + Math.imul(ah7, bh1)) | 0;
|
||
lo = (lo + Math.imul(al6, bl2)) | 0;
|
||
mid = (mid + Math.imul(al6, bh2)) | 0;
|
||
mid = (mid + Math.imul(ah6, bl2)) | 0;
|
||
hi = (hi + Math.imul(ah6, bh2)) | 0;
|
||
lo = (lo + Math.imul(al5, bl3)) | 0;
|
||
mid = (mid + Math.imul(al5, bh3)) | 0;
|
||
mid = (mid + Math.imul(ah5, bl3)) | 0;
|
||
hi = (hi + Math.imul(ah5, bh3)) | 0;
|
||
lo = (lo + Math.imul(al4, bl4)) | 0;
|
||
mid = (mid + Math.imul(al4, bh4)) | 0;
|
||
mid = (mid + Math.imul(ah4, bl4)) | 0;
|
||
hi = (hi + Math.imul(ah4, bh4)) | 0;
|
||
lo = (lo + Math.imul(al3, bl5)) | 0;
|
||
mid = (mid + Math.imul(al3, bh5)) | 0;
|
||
mid = (mid + Math.imul(ah3, bl5)) | 0;
|
||
hi = (hi + Math.imul(ah3, bh5)) | 0;
|
||
lo = (lo + Math.imul(al2, bl6)) | 0;
|
||
mid = (mid + Math.imul(al2, bh6)) | 0;
|
||
mid = (mid + Math.imul(ah2, bl6)) | 0;
|
||
hi = (hi + Math.imul(ah2, bh6)) | 0;
|
||
lo = (lo + Math.imul(al1, bl7)) | 0;
|
||
mid = (mid + Math.imul(al1, bh7)) | 0;
|
||
mid = (mid + Math.imul(ah1, bl7)) | 0;
|
||
hi = (hi + Math.imul(ah1, bh7)) | 0;
|
||
lo = (lo + Math.imul(al0, bl8)) | 0;
|
||
mid = (mid + Math.imul(al0, bh8)) | 0;
|
||
mid = (mid + Math.imul(ah0, bl8)) | 0;
|
||
hi = (hi + Math.imul(ah0, bh8)) | 0;
|
||
var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;
|
||
w8 &= 0x3ffffff;
|
||
/* k = 9 */
|
||
lo = Math.imul(al9, bl0);
|
||
mid = Math.imul(al9, bh0);
|
||
mid = (mid + Math.imul(ah9, bl0)) | 0;
|
||
hi = Math.imul(ah9, bh0);
|
||
lo = (lo + Math.imul(al8, bl1)) | 0;
|
||
mid = (mid + Math.imul(al8, bh1)) | 0;
|
||
mid = (mid + Math.imul(ah8, bl1)) | 0;
|
||
hi = (hi + Math.imul(ah8, bh1)) | 0;
|
||
lo = (lo + Math.imul(al7, bl2)) | 0;
|
||
mid = (mid + Math.imul(al7, bh2)) | 0;
|
||
mid = (mid + Math.imul(ah7, bl2)) | 0;
|
||
hi = (hi + Math.imul(ah7, bh2)) | 0;
|
||
lo = (lo + Math.imul(al6, bl3)) | 0;
|
||
mid = (mid + Math.imul(al6, bh3)) | 0;
|
||
mid = (mid + Math.imul(ah6, bl3)) | 0;
|
||
hi = (hi + Math.imul(ah6, bh3)) | 0;
|
||
lo = (lo + Math.imul(al5, bl4)) | 0;
|
||
mid = (mid + Math.imul(al5, bh4)) | 0;
|
||
mid = (mid + Math.imul(ah5, bl4)) | 0;
|
||
hi = (hi + Math.imul(ah5, bh4)) | 0;
|
||
lo = (lo + Math.imul(al4, bl5)) | 0;
|
||
mid = (mid + Math.imul(al4, bh5)) | 0;
|
||
mid = (mid + Math.imul(ah4, bl5)) | 0;
|
||
hi = (hi + Math.imul(ah4, bh5)) | 0;
|
||
lo = (lo + Math.imul(al3, bl6)) | 0;
|
||
mid = (mid + Math.imul(al3, bh6)) | 0;
|
||
mid = (mid + Math.imul(ah3, bl6)) | 0;
|
||
hi = (hi + Math.imul(ah3, bh6)) | 0;
|
||
lo = (lo + Math.imul(al2, bl7)) | 0;
|
||
mid = (mid + Math.imul(al2, bh7)) | 0;
|
||
mid = (mid + Math.imul(ah2, bl7)) | 0;
|
||
hi = (hi + Math.imul(ah2, bh7)) | 0;
|
||
lo = (lo + Math.imul(al1, bl8)) | 0;
|
||
mid = (mid + Math.imul(al1, bh8)) | 0;
|
||
mid = (mid + Math.imul(ah1, bl8)) | 0;
|
||
hi = (hi + Math.imul(ah1, bh8)) | 0;
|
||
lo = (lo + Math.imul(al0, bl9)) | 0;
|
||
mid = (mid + Math.imul(al0, bh9)) | 0;
|
||
mid = (mid + Math.imul(ah0, bl9)) | 0;
|
||
hi = (hi + Math.imul(ah0, bh9)) | 0;
|
||
var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;
|
||
w9 &= 0x3ffffff;
|
||
/* k = 10 */
|
||
lo = Math.imul(al9, bl1);
|
||
mid = Math.imul(al9, bh1);
|
||
mid = (mid + Math.imul(ah9, bl1)) | 0;
|
||
hi = Math.imul(ah9, bh1);
|
||
lo = (lo + Math.imul(al8, bl2)) | 0;
|
||
mid = (mid + Math.imul(al8, bh2)) | 0;
|
||
mid = (mid + Math.imul(ah8, bl2)) | 0;
|
||
hi = (hi + Math.imul(ah8, bh2)) | 0;
|
||
lo = (lo + Math.imul(al7, bl3)) | 0;
|
||
mid = (mid + Math.imul(al7, bh3)) | 0;
|
||
mid = (mid + Math.imul(ah7, bl3)) | 0;
|
||
hi = (hi + Math.imul(ah7, bh3)) | 0;
|
||
lo = (lo + Math.imul(al6, bl4)) | 0;
|
||
mid = (mid + Math.imul(al6, bh4)) | 0;
|
||
mid = (mid + Math.imul(ah6, bl4)) | 0;
|
||
hi = (hi + Math.imul(ah6, bh4)) | 0;
|
||
lo = (lo + Math.imul(al5, bl5)) | 0;
|
||
mid = (mid + Math.imul(al5, bh5)) | 0;
|
||
mid = (mid + Math.imul(ah5, bl5)) | 0;
|
||
hi = (hi + Math.imul(ah5, bh5)) | 0;
|
||
lo = (lo + Math.imul(al4, bl6)) | 0;
|
||
mid = (mid + Math.imul(al4, bh6)) | 0;
|
||
mid = (mid + Math.imul(ah4, bl6)) | 0;
|
||
hi = (hi + Math.imul(ah4, bh6)) | 0;
|
||
lo = (lo + Math.imul(al3, bl7)) | 0;
|
||
mid = (mid + Math.imul(al3, bh7)) | 0;
|
||
mid = (mid + Math.imul(ah3, bl7)) | 0;
|
||
hi = (hi + Math.imul(ah3, bh7)) | 0;
|
||
lo = (lo + Math.imul(al2, bl8)) | 0;
|
||
mid = (mid + Math.imul(al2, bh8)) | 0;
|
||
mid = (mid + Math.imul(ah2, bl8)) | 0;
|
||
hi = (hi + Math.imul(ah2, bh8)) | 0;
|
||
lo = (lo + Math.imul(al1, bl9)) | 0;
|
||
mid = (mid + Math.imul(al1, bh9)) | 0;
|
||
mid = (mid + Math.imul(ah1, bl9)) | 0;
|
||
hi = (hi + Math.imul(ah1, bh9)) | 0;
|
||
var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;
|
||
w10 &= 0x3ffffff;
|
||
/* k = 11 */
|
||
lo = Math.imul(al9, bl2);
|
||
mid = Math.imul(al9, bh2);
|
||
mid = (mid + Math.imul(ah9, bl2)) | 0;
|
||
hi = Math.imul(ah9, bh2);
|
||
lo = (lo + Math.imul(al8, bl3)) | 0;
|
||
mid = (mid + Math.imul(al8, bh3)) | 0;
|
||
mid = (mid + Math.imul(ah8, bl3)) | 0;
|
||
hi = (hi + Math.imul(ah8, bh3)) | 0;
|
||
lo = (lo + Math.imul(al7, bl4)) | 0;
|
||
mid = (mid + Math.imul(al7, bh4)) | 0;
|
||
mid = (mid + Math.imul(ah7, bl4)) | 0;
|
||
hi = (hi + Math.imul(ah7, bh4)) | 0;
|
||
lo = (lo + Math.imul(al6, bl5)) | 0;
|
||
mid = (mid + Math.imul(al6, bh5)) | 0;
|
||
mid = (mid + Math.imul(ah6, bl5)) | 0;
|
||
hi = (hi + Math.imul(ah6, bh5)) | 0;
|
||
lo = (lo + Math.imul(al5, bl6)) | 0;
|
||
mid = (mid + Math.imul(al5, bh6)) | 0;
|
||
mid = (mid + Math.imul(ah5, bl6)) | 0;
|
||
hi = (hi + Math.imul(ah5, bh6)) | 0;
|
||
lo = (lo + Math.imul(al4, bl7)) | 0;
|
||
mid = (mid + Math.imul(al4, bh7)) | 0;
|
||
mid = (mid + Math.imul(ah4, bl7)) | 0;
|
||
hi = (hi + Math.imul(ah4, bh7)) | 0;
|
||
lo = (lo + Math.imul(al3, bl8)) | 0;
|
||
mid = (mid + Math.imul(al3, bh8)) | 0;
|
||
mid = (mid + Math.imul(ah3, bl8)) | 0;
|
||
hi = (hi + Math.imul(ah3, bh8)) | 0;
|
||
lo = (lo + Math.imul(al2, bl9)) | 0;
|
||
mid = (mid + Math.imul(al2, bh9)) | 0;
|
||
mid = (mid + Math.imul(ah2, bl9)) | 0;
|
||
hi = (hi + Math.imul(ah2, bh9)) | 0;
|
||
var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;
|
||
w11 &= 0x3ffffff;
|
||
/* k = 12 */
|
||
lo = Math.imul(al9, bl3);
|
||
mid = Math.imul(al9, bh3);
|
||
mid = (mid + Math.imul(ah9, bl3)) | 0;
|
||
hi = Math.imul(ah9, bh3);
|
||
lo = (lo + Math.imul(al8, bl4)) | 0;
|
||
mid = (mid + Math.imul(al8, bh4)) | 0;
|
||
mid = (mid + Math.imul(ah8, bl4)) | 0;
|
||
hi = (hi + Math.imul(ah8, bh4)) | 0;
|
||
lo = (lo + Math.imul(al7, bl5)) | 0;
|
||
mid = (mid + Math.imul(al7, bh5)) | 0;
|
||
mid = (mid + Math.imul(ah7, bl5)) | 0;
|
||
hi = (hi + Math.imul(ah7, bh5)) | 0;
|
||
lo = (lo + Math.imul(al6, bl6)) | 0;
|
||
mid = (mid + Math.imul(al6, bh6)) | 0;
|
||
mid = (mid + Math.imul(ah6, bl6)) | 0;
|
||
hi = (hi + Math.imul(ah6, bh6)) | 0;
|
||
lo = (lo + Math.imul(al5, bl7)) | 0;
|
||
mid = (mid + Math.imul(al5, bh7)) | 0;
|
||
mid = (mid + Math.imul(ah5, bl7)) | 0;
|
||
hi = (hi + Math.imul(ah5, bh7)) | 0;
|
||
lo = (lo + Math.imul(al4, bl8)) | 0;
|
||
mid = (mid + Math.imul(al4, bh8)) | 0;
|
||
mid = (mid + Math.imul(ah4, bl8)) | 0;
|
||
hi = (hi + Math.imul(ah4, bh8)) | 0;
|
||
lo = (lo + Math.imul(al3, bl9)) | 0;
|
||
mid = (mid + Math.imul(al3, bh9)) | 0;
|
||
mid = (mid + Math.imul(ah3, bl9)) | 0;
|
||
hi = (hi + Math.imul(ah3, bh9)) | 0;
|
||
var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;
|
||
w12 &= 0x3ffffff;
|
||
/* k = 13 */
|
||
lo = Math.imul(al9, bl4);
|
||
mid = Math.imul(al9, bh4);
|
||
mid = (mid + Math.imul(ah9, bl4)) | 0;
|
||
hi = Math.imul(ah9, bh4);
|
||
lo = (lo + Math.imul(al8, bl5)) | 0;
|
||
mid = (mid + Math.imul(al8, bh5)) | 0;
|
||
mid = (mid + Math.imul(ah8, bl5)) | 0;
|
||
hi = (hi + Math.imul(ah8, bh5)) | 0;
|
||
lo = (lo + Math.imul(al7, bl6)) | 0;
|
||
mid = (mid + Math.imul(al7, bh6)) | 0;
|
||
mid = (mid + Math.imul(ah7, bl6)) | 0;
|
||
hi = (hi + Math.imul(ah7, bh6)) | 0;
|
||
lo = (lo + Math.imul(al6, bl7)) | 0;
|
||
mid = (mid + Math.imul(al6, bh7)) | 0;
|
||
mid = (mid + Math.imul(ah6, bl7)) | 0;
|
||
hi = (hi + Math.imul(ah6, bh7)) | 0;
|
||
lo = (lo + Math.imul(al5, bl8)) | 0;
|
||
mid = (mid + Math.imul(al5, bh8)) | 0;
|
||
mid = (mid + Math.imul(ah5, bl8)) | 0;
|
||
hi = (hi + Math.imul(ah5, bh8)) | 0;
|
||
lo = (lo + Math.imul(al4, bl9)) | 0;
|
||
mid = (mid + Math.imul(al4, bh9)) | 0;
|
||
mid = (mid + Math.imul(ah4, bl9)) | 0;
|
||
hi = (hi + Math.imul(ah4, bh9)) | 0;
|
||
var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;
|
||
w13 &= 0x3ffffff;
|
||
/* k = 14 */
|
||
lo = Math.imul(al9, bl5);
|
||
mid = Math.imul(al9, bh5);
|
||
mid = (mid + Math.imul(ah9, bl5)) | 0;
|
||
hi = Math.imul(ah9, bh5);
|
||
lo = (lo + Math.imul(al8, bl6)) | 0;
|
||
mid = (mid + Math.imul(al8, bh6)) | 0;
|
||
mid = (mid + Math.imul(ah8, bl6)) | 0;
|
||
hi = (hi + Math.imul(ah8, bh6)) | 0;
|
||
lo = (lo + Math.imul(al7, bl7)) | 0;
|
||
mid = (mid + Math.imul(al7, bh7)) | 0;
|
||
mid = (mid + Math.imul(ah7, bl7)) | 0;
|
||
hi = (hi + Math.imul(ah7, bh7)) | 0;
|
||
lo = (lo + Math.imul(al6, bl8)) | 0;
|
||
mid = (mid + Math.imul(al6, bh8)) | 0;
|
||
mid = (mid + Math.imul(ah6, bl8)) | 0;
|
||
hi = (hi + Math.imul(ah6, bh8)) | 0;
|
||
lo = (lo + Math.imul(al5, bl9)) | 0;
|
||
mid = (mid + Math.imul(al5, bh9)) | 0;
|
||
mid = (mid + Math.imul(ah5, bl9)) | 0;
|
||
hi = (hi + Math.imul(ah5, bh9)) | 0;
|
||
var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;
|
||
w14 &= 0x3ffffff;
|
||
/* k = 15 */
|
||
lo = Math.imul(al9, bl6);
|
||
mid = Math.imul(al9, bh6);
|
||
mid = (mid + Math.imul(ah9, bl6)) | 0;
|
||
hi = Math.imul(ah9, bh6);
|
||
lo = (lo + Math.imul(al8, bl7)) | 0;
|
||
mid = (mid + Math.imul(al8, bh7)) | 0;
|
||
mid = (mid + Math.imul(ah8, bl7)) | 0;
|
||
hi = (hi + Math.imul(ah8, bh7)) | 0;
|
||
lo = (lo + Math.imul(al7, bl8)) | 0;
|
||
mid = (mid + Math.imul(al7, bh8)) | 0;
|
||
mid = (mid + Math.imul(ah7, bl8)) | 0;
|
||
hi = (hi + Math.imul(ah7, bh8)) | 0;
|
||
lo = (lo + Math.imul(al6, bl9)) | 0;
|
||
mid = (mid + Math.imul(al6, bh9)) | 0;
|
||
mid = (mid + Math.imul(ah6, bl9)) | 0;
|
||
hi = (hi + Math.imul(ah6, bh9)) | 0;
|
||
var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;
|
||
w15 &= 0x3ffffff;
|
||
/* k = 16 */
|
||
lo = Math.imul(al9, bl7);
|
||
mid = Math.imul(al9, bh7);
|
||
mid = (mid + Math.imul(ah9, bl7)) | 0;
|
||
hi = Math.imul(ah9, bh7);
|
||
lo = (lo + Math.imul(al8, bl8)) | 0;
|
||
mid = (mid + Math.imul(al8, bh8)) | 0;
|
||
mid = (mid + Math.imul(ah8, bl8)) | 0;
|
||
hi = (hi + Math.imul(ah8, bh8)) | 0;
|
||
lo = (lo + Math.imul(al7, bl9)) | 0;
|
||
mid = (mid + Math.imul(al7, bh9)) | 0;
|
||
mid = (mid + Math.imul(ah7, bl9)) | 0;
|
||
hi = (hi + Math.imul(ah7, bh9)) | 0;
|
||
var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;
|
||
w16 &= 0x3ffffff;
|
||
/* k = 17 */
|
||
lo = Math.imul(al9, bl8);
|
||
mid = Math.imul(al9, bh8);
|
||
mid = (mid + Math.imul(ah9, bl8)) | 0;
|
||
hi = Math.imul(ah9, bh8);
|
||
lo = (lo + Math.imul(al8, bl9)) | 0;
|
||
mid = (mid + Math.imul(al8, bh9)) | 0;
|
||
mid = (mid + Math.imul(ah8, bl9)) | 0;
|
||
hi = (hi + Math.imul(ah8, bh9)) | 0;
|
||
var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;
|
||
w17 &= 0x3ffffff;
|
||
/* k = 18 */
|
||
lo = Math.imul(al9, bl9);
|
||
mid = Math.imul(al9, bh9);
|
||
mid = (mid + Math.imul(ah9, bl9)) | 0;
|
||
hi = Math.imul(ah9, bh9);
|
||
var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
|
||
c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;
|
||
w18 &= 0x3ffffff;
|
||
o[0] = w0;
|
||
o[1] = w1;
|
||
o[2] = w2;
|
||
o[3] = w3;
|
||
o[4] = w4;
|
||
o[5] = w5;
|
||
o[6] = w6;
|
||
o[7] = w7;
|
||
o[8] = w8;
|
||
o[9] = w9;
|
||
o[10] = w10;
|
||
o[11] = w11;
|
||
o[12] = w12;
|
||
o[13] = w13;
|
||
o[14] = w14;
|
||
o[15] = w15;
|
||
o[16] = w16;
|
||
o[17] = w17;
|
||
o[18] = w18;
|
||
if (c !== 0) {
|
||
o[19] = c;
|
||
out.length++;
|
||
}
|
||
return out;
|
||
};
|
||
|
||
// Polyfill comb
|
||
if (!Math.imul) {
|
||
comb10MulTo = smallMulTo;
|
||
}
|
||
|
||
function bigMulTo (self, num, out) {
|
||
out.negative = num.negative ^ self.negative;
|
||
out.length = self.length + num.length;
|
||
|
||
var carry = 0;
|
||
var hncarry = 0;
|
||
for (var k = 0; k < out.length - 1; k++) {
|
||
// Sum all words with the same `i + j = k` and accumulate `ncarry`,
|
||
// note that ncarry could be >= 0x3ffffff
|
||
var ncarry = hncarry;
|
||
hncarry = 0;
|
||
var rword = carry & 0x3ffffff;
|
||
var maxJ = Math.min(k, num.length - 1);
|
||
for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
|
||
var i = k - j;
|
||
var a = self.words[i] | 0;
|
||
var b = num.words[j] | 0;
|
||
var r = a * b;
|
||
|
||
var lo = r & 0x3ffffff;
|
||
ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;
|
||
lo = (lo + rword) | 0;
|
||
rword = lo & 0x3ffffff;
|
||
ncarry = (ncarry + (lo >>> 26)) | 0;
|
||
|
||
hncarry += ncarry >>> 26;
|
||
ncarry &= 0x3ffffff;
|
||
}
|
||
out.words[k] = rword;
|
||
carry = ncarry;
|
||
ncarry = hncarry;
|
||
}
|
||
if (carry !== 0) {
|
||
out.words[k] = carry;
|
||
} else {
|
||
out.length--;
|
||
}
|
||
|
||
return out.strip();
|
||
}
|
||
|
||
function jumboMulTo (self, num, out) {
|
||
var fftm = new FFTM();
|
||
return fftm.mulp(self, num, out);
|
||
}
|
||
|
||
BN.prototype.mulTo = function mulTo (num, out) {
|
||
var res;
|
||
var len = this.length + num.length;
|
||
if (this.length === 10 && num.length === 10) {
|
||
res = comb10MulTo(this, num, out);
|
||
} else if (len < 63) {
|
||
res = smallMulTo(this, num, out);
|
||
} else if (len < 1024) {
|
||
res = bigMulTo(this, num, out);
|
||
} else {
|
||
res = jumboMulTo(this, num, out);
|
||
}
|
||
|
||
return res;
|
||
};
|
||
|
||
// Cooley-Tukey algorithm for FFT
|
||
// slightly revisited to rely on looping instead of recursion
|
||
|
||
function FFTM (x, y) {
|
||
this.x = x;
|
||
this.y = y;
|
||
}
|
||
|
||
FFTM.prototype.makeRBT = function makeRBT (N) {
|
||
var t = new Array(N);
|
||
var l = BN.prototype._countBits(N) - 1;
|
||
for (var i = 0; i < N; i++) {
|
||
t[i] = this.revBin(i, l, N);
|
||
}
|
||
|
||
return t;
|
||
};
|
||
|
||
// Returns binary-reversed representation of `x`
|
||
FFTM.prototype.revBin = function revBin (x, l, N) {
|
||
if (x === 0 || x === N - 1) return x;
|
||
|
||
var rb = 0;
|
||
for (var i = 0; i < l; i++) {
|
||
rb |= (x & 1) << (l - i - 1);
|
||
x >>= 1;
|
||
}
|
||
|
||
return rb;
|
||
};
|
||
|
||
// Performs "tweedling" phase, therefore 'emulating'
|
||
// behaviour of the recursive algorithm
|
||
FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {
|
||
for (var i = 0; i < N; i++) {
|
||
rtws[i] = rws[rbt[i]];
|
||
itws[i] = iws[rbt[i]];
|
||
}
|
||
};
|
||
|
||
FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {
|
||
this.permute(rbt, rws, iws, rtws, itws, N);
|
||
|
||
for (var s = 1; s < N; s <<= 1) {
|
||
var l = s << 1;
|
||
|
||
var rtwdf = Math.cos(2 * Math.PI / l);
|
||
var itwdf = Math.sin(2 * Math.PI / l);
|
||
|
||
for (var p = 0; p < N; p += l) {
|
||
var rtwdf_ = rtwdf;
|
||
var itwdf_ = itwdf;
|
||
|
||
for (var j = 0; j < s; j++) {
|
||
var re = rtws[p + j];
|
||
var ie = itws[p + j];
|
||
|
||
var ro = rtws[p + j + s];
|
||
var io = itws[p + j + s];
|
||
|
||
var rx = rtwdf_ * ro - itwdf_ * io;
|
||
|
||
io = rtwdf_ * io + itwdf_ * ro;
|
||
ro = rx;
|
||
|
||
rtws[p + j] = re + ro;
|
||
itws[p + j] = ie + io;
|
||
|
||
rtws[p + j + s] = re - ro;
|
||
itws[p + j + s] = ie - io;
|
||
|
||
/* jshint maxdepth : false */
|
||
if (j !== l) {
|
||
rx = rtwdf * rtwdf_ - itwdf * itwdf_;
|
||
|
||
itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
|
||
rtwdf_ = rx;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
|
||
FFTM.prototype.guessLen13b = function guessLen13b (n, m) {
|
||
var N = Math.max(m, n) | 1;
|
||
var odd = N & 1;
|
||
var i = 0;
|
||
for (N = N / 2 | 0; N; N = N >>> 1) {
|
||
i++;
|
||
}
|
||
|
||
return 1 << i + 1 + odd;
|
||
};
|
||
|
||
FFTM.prototype.conjugate = function conjugate (rws, iws, N) {
|
||
if (N <= 1) return;
|
||
|
||
for (var i = 0; i < N / 2; i++) {
|
||
var t = rws[i];
|
||
|
||
rws[i] = rws[N - i - 1];
|
||
rws[N - i - 1] = t;
|
||
|
||
t = iws[i];
|
||
|
||
iws[i] = -iws[N - i - 1];
|
||
iws[N - i - 1] = -t;
|
||
}
|
||
};
|
||
|
||
FFTM.prototype.normalize13b = function normalize13b (ws, N) {
|
||
var carry = 0;
|
||
for (var i = 0; i < N / 2; i++) {
|
||
var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +
|
||
Math.round(ws[2 * i] / N) +
|
||
carry;
|
||
|
||
ws[i] = w & 0x3ffffff;
|
||
|
||
if (w < 0x4000000) {
|
||
carry = 0;
|
||
} else {
|
||
carry = w / 0x4000000 | 0;
|
||
}
|
||
}
|
||
|
||
return ws;
|
||
};
|
||
|
||
FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {
|
||
var carry = 0;
|
||
for (var i = 0; i < len; i++) {
|
||
carry = carry + (ws[i] | 0);
|
||
|
||
rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;
|
||
rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;
|
||
}
|
||
|
||
// Pad with zeroes
|
||
for (i = 2 * len; i < N; ++i) {
|
||
rws[i] = 0;
|
||
}
|
||
|
||
assert(carry === 0);
|
||
assert((carry & ~0x1fff) === 0);
|
||
};
|
||
|
||
FFTM.prototype.stub = function stub (N) {
|
||
var ph = new Array(N);
|
||
for (var i = 0; i < N; i++) {
|
||
ph[i] = 0;
|
||
}
|
||
|
||
return ph;
|
||
};
|
||
|
||
FFTM.prototype.mulp = function mulp (x, y, out) {
|
||
var N = 2 * this.guessLen13b(x.length, y.length);
|
||
|
||
var rbt = this.makeRBT(N);
|
||
|
||
var _ = this.stub(N);
|
||
|
||
var rws = new Array(N);
|
||
var rwst = new Array(N);
|
||
var iwst = new Array(N);
|
||
|
||
var nrws = new Array(N);
|
||
var nrwst = new Array(N);
|
||
var niwst = new Array(N);
|
||
|
||
var rmws = out.words;
|
||
rmws.length = N;
|
||
|
||
this.convert13b(x.words, x.length, rws, N);
|
||
this.convert13b(y.words, y.length, nrws, N);
|
||
|
||
this.transform(rws, _, rwst, iwst, N, rbt);
|
||
this.transform(nrws, _, nrwst, niwst, N, rbt);
|
||
|
||
for (var i = 0; i < N; i++) {
|
||
var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];
|
||
iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];
|
||
rwst[i] = rx;
|
||
}
|
||
|
||
this.conjugate(rwst, iwst, N);
|
||
this.transform(rwst, iwst, rmws, _, N, rbt);
|
||
this.conjugate(rmws, _, N);
|
||
this.normalize13b(rmws, N);
|
||
|
||
out.negative = x.negative ^ y.negative;
|
||
out.length = x.length + y.length;
|
||
return out.strip();
|
||
};
|
||
|
||
// Multiply `this` by `num`
|
||
BN.prototype.mul = function mul (num) {
|
||
var out = new BN(null);
|
||
out.words = new Array(this.length + num.length);
|
||
return this.mulTo(num, out);
|
||
};
|
||
|
||
// Multiply employing FFT
|
||
BN.prototype.mulf = function mulf (num) {
|
||
var out = new BN(null);
|
||
out.words = new Array(this.length + num.length);
|
||
return jumboMulTo(this, num, out);
|
||
};
|
||
|
||
// In-place Multiplication
|
||
BN.prototype.imul = function imul (num) {
|
||
return this.clone().mulTo(num, this);
|
||
};
|
||
|
||
BN.prototype.imuln = function imuln (num) {
|
||
assert(typeof num === 'number');
|
||
assert(num < 0x4000000);
|
||
|
||
// Carry
|
||
var carry = 0;
|
||
for (var i = 0; i < this.length; i++) {
|
||
var w = (this.words[i] | 0) * num;
|
||
var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);
|
||
carry >>= 26;
|
||
carry += (w / 0x4000000) | 0;
|
||
// NOTE: lo is 27bit maximum
|
||
carry += lo >>> 26;
|
||
this.words[i] = lo & 0x3ffffff;
|
||
}
|
||
|
||
if (carry !== 0) {
|
||
this.words[i] = carry;
|
||
this.length++;
|
||
}
|
||
|
||
return this;
|
||
};
|
||
|
||
BN.prototype.muln = function muln (num) {
|
||
return this.clone().imuln(num);
|
||
};
|
||
|
||
// `this` * `this`
|
||
BN.prototype.sqr = function sqr () {
|
||
return this.mul(this);
|
||
};
|
||
|
||
// `this` * `this` in-place
|
||
BN.prototype.isqr = function isqr () {
|
||
return this.imul(this.clone());
|
||
};
|
||
|
||
// Math.pow(`this`, `num`)
|
||
BN.prototype.pow = function pow (num) {
|
||
var w = toBitArray(num);
|
||
if (w.length === 0) return new BN(1);
|
||
|
||
// Skip leading zeroes
|
||
var res = this;
|
||
for (var i = 0; i < w.length; i++, res = res.sqr()) {
|
||
if (w[i] !== 0) break;
|
||
}
|
||
|
||
if (++i < w.length) {
|
||
for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {
|
||
if (w[i] === 0) continue;
|
||
|
||
res = res.mul(q);
|
||
}
|
||
}
|
||
|
||
return res;
|
||
};
|
||
|
||
// Shift-left in-place
|
||
BN.prototype.iushln = function iushln (bits) {
|
||
assert(typeof bits === 'number' && bits >= 0);
|
||
var r = bits % 26;
|
||
var s = (bits - r) / 26;
|
||
var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);
|
||
var i;
|
||
|
||
if (r !== 0) {
|
||
var carry = 0;
|
||
|
||
for (i = 0; i < this.length; i++) {
|
||
var newCarry = this.words[i] & carryMask;
|
||
var c = ((this.words[i] | 0) - newCarry) << r;
|
||
this.words[i] = c | carry;
|
||
carry = newCarry >>> (26 - r);
|
||
}
|
||
|
||
if (carry) {
|
||
this.words[i] = carry;
|
||
this.length++;
|
||
}
|
||
}
|
||
|
||
if (s !== 0) {
|
||
for (i = this.length - 1; i >= 0; i--) {
|
||
this.words[i + s] = this.words[i];
|
||
}
|
||
|
||
for (i = 0; i < s; i++) {
|
||
this.words[i] = 0;
|
||
}
|
||
|
||
this.length += s;
|
||
}
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
BN.prototype.ishln = function ishln (bits) {
|
||
// TODO(indutny): implement me
|
||
assert(this.negative === 0);
|
||
return this.iushln(bits);
|
||
};
|
||
|
||
// Shift-right in-place
|
||
// NOTE: `hint` is a lowest bit before trailing zeroes
|
||
// NOTE: if `extended` is present - it will be filled with destroyed bits
|
||
BN.prototype.iushrn = function iushrn (bits, hint, extended) {
|
||
assert(typeof bits === 'number' && bits >= 0);
|
||
var h;
|
||
if (hint) {
|
||
h = (hint - (hint % 26)) / 26;
|
||
} else {
|
||
h = 0;
|
||
}
|
||
|
||
var r = bits % 26;
|
||
var s = Math.min((bits - r) / 26, this.length);
|
||
var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
|
||
var maskedWords = extended;
|
||
|
||
h -= s;
|
||
h = Math.max(0, h);
|
||
|
||
// Extended mode, copy masked part
|
||
if (maskedWords) {
|
||
for (var i = 0; i < s; i++) {
|
||
maskedWords.words[i] = this.words[i];
|
||
}
|
||
maskedWords.length = s;
|
||
}
|
||
|
||
if (s === 0) {
|
||
// No-op, we should not move anything at all
|
||
} else if (this.length > s) {
|
||
this.length -= s;
|
||
for (i = 0; i < this.length; i++) {
|
||
this.words[i] = this.words[i + s];
|
||
}
|
||
} else {
|
||
this.words[0] = 0;
|
||
this.length = 1;
|
||
}
|
||
|
||
var carry = 0;
|
||
for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {
|
||
var word = this.words[i] | 0;
|
||
this.words[i] = (carry << (26 - r)) | (word >>> r);
|
||
carry = word & mask;
|
||
}
|
||
|
||
// Push carried bits as a mask
|
||
if (maskedWords && carry !== 0) {
|
||
maskedWords.words[maskedWords.length++] = carry;
|
||
}
|
||
|
||
if (this.length === 0) {
|
||
this.words[0] = 0;
|
||
this.length = 1;
|
||
}
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
BN.prototype.ishrn = function ishrn (bits, hint, extended) {
|
||
// TODO(indutny): implement me
|
||
assert(this.negative === 0);
|
||
return this.iushrn(bits, hint, extended);
|
||
};
|
||
|
||
// Shift-left
|
||
BN.prototype.shln = function shln (bits) {
|
||
return this.clone().ishln(bits);
|
||
};
|
||
|
||
BN.prototype.ushln = function ushln (bits) {
|
||
return this.clone().iushln(bits);
|
||
};
|
||
|
||
// Shift-right
|
||
BN.prototype.shrn = function shrn (bits) {
|
||
return this.clone().ishrn(bits);
|
||
};
|
||
|
||
BN.prototype.ushrn = function ushrn (bits) {
|
||
return this.clone().iushrn(bits);
|
||
};
|
||
|
||
// Test if n bit is set
|
||
BN.prototype.testn = function testn (bit) {
|
||
assert(typeof bit === 'number' && bit >= 0);
|
||
var r = bit % 26;
|
||
var s = (bit - r) / 26;
|
||
var q = 1 << r;
|
||
|
||
// Fast case: bit is much higher than all existing words
|
||
if (this.length <= s) return false;
|
||
|
||
// Check bit and return
|
||
var w = this.words[s];
|
||
|
||
return !!(w & q);
|
||
};
|
||
|
||
// Return only lowers bits of number (in-place)
|
||
BN.prototype.imaskn = function imaskn (bits) {
|
||
assert(typeof bits === 'number' && bits >= 0);
|
||
var r = bits % 26;
|
||
var s = (bits - r) / 26;
|
||
|
||
assert(this.negative === 0, 'imaskn works only with positive numbers');
|
||
|
||
if (this.length <= s) {
|
||
return this;
|
||
}
|
||
|
||
if (r !== 0) {
|
||
s++;
|
||
}
|
||
this.length = Math.min(s, this.length);
|
||
|
||
if (r !== 0) {
|
||
var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
|
||
this.words[this.length - 1] &= mask;
|
||
}
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
// Return only lowers bits of number
|
||
BN.prototype.maskn = function maskn (bits) {
|
||
return this.clone().imaskn(bits);
|
||
};
|
||
|
||
// Add plain number `num` to `this`
|
||
BN.prototype.iaddn = function iaddn (num) {
|
||
assert(typeof num === 'number');
|
||
assert(num < 0x4000000);
|
||
if (num < 0) return this.isubn(-num);
|
||
|
||
// Possible sign change
|
||
if (this.negative !== 0) {
|
||
if (this.length === 1 && (this.words[0] | 0) < num) {
|
||
this.words[0] = num - (this.words[0] | 0);
|
||
this.negative = 0;
|
||
return this;
|
||
}
|
||
|
||
this.negative = 0;
|
||
this.isubn(num);
|
||
this.negative = 1;
|
||
return this;
|
||
}
|
||
|
||
// Add without checks
|
||
return this._iaddn(num);
|
||
};
|
||
|
||
BN.prototype._iaddn = function _iaddn (num) {
|
||
this.words[0] += num;
|
||
|
||
// Carry
|
||
for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {
|
||
this.words[i] -= 0x4000000;
|
||
if (i === this.length - 1) {
|
||
this.words[i + 1] = 1;
|
||
} else {
|
||
this.words[i + 1]++;
|
||
}
|
||
}
|
||
this.length = Math.max(this.length, i + 1);
|
||
|
||
return this;
|
||
};
|
||
|
||
// Subtract plain number `num` from `this`
|
||
BN.prototype.isubn = function isubn (num) {
|
||
assert(typeof num === 'number');
|
||
assert(num < 0x4000000);
|
||
if (num < 0) return this.iaddn(-num);
|
||
|
||
if (this.negative !== 0) {
|
||
this.negative = 0;
|
||
this.iaddn(num);
|
||
this.negative = 1;
|
||
return this;
|
||
}
|
||
|
||
this.words[0] -= num;
|
||
|
||
if (this.length === 1 && this.words[0] < 0) {
|
||
this.words[0] = -this.words[0];
|
||
this.negative = 1;
|
||
} else {
|
||
// Carry
|
||
for (var i = 0; i < this.length && this.words[i] < 0; i++) {
|
||
this.words[i] += 0x4000000;
|
||
this.words[i + 1] -= 1;
|
||
}
|
||
}
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
BN.prototype.addn = function addn (num) {
|
||
return this.clone().iaddn(num);
|
||
};
|
||
|
||
BN.prototype.subn = function subn (num) {
|
||
return this.clone().isubn(num);
|
||
};
|
||
|
||
BN.prototype.iabs = function iabs () {
|
||
this.negative = 0;
|
||
|
||
return this;
|
||
};
|
||
|
||
BN.prototype.abs = function abs () {
|
||
return this.clone().iabs();
|
||
};
|
||
|
||
BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {
|
||
var len = num.length + shift;
|
||
var i;
|
||
|
||
this._expand(len);
|
||
|
||
var w;
|
||
var carry = 0;
|
||
for (i = 0; i < num.length; i++) {
|
||
w = (this.words[i + shift] | 0) + carry;
|
||
var right = (num.words[i] | 0) * mul;
|
||
w -= right & 0x3ffffff;
|
||
carry = (w >> 26) - ((right / 0x4000000) | 0);
|
||
this.words[i + shift] = w & 0x3ffffff;
|
||
}
|
||
for (; i < this.length - shift; i++) {
|
||
w = (this.words[i + shift] | 0) + carry;
|
||
carry = w >> 26;
|
||
this.words[i + shift] = w & 0x3ffffff;
|
||
}
|
||
|
||
if (carry === 0) return this.strip();
|
||
|
||
// Subtraction overflow
|
||
assert(carry === -1);
|
||
carry = 0;
|
||
for (i = 0; i < this.length; i++) {
|
||
w = -(this.words[i] | 0) + carry;
|
||
carry = w >> 26;
|
||
this.words[i] = w & 0x3ffffff;
|
||
}
|
||
this.negative = 1;
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
BN.prototype._wordDiv = function _wordDiv (num, mode) {
|
||
var shift = this.length - num.length;
|
||
|
||
var a = this.clone();
|
||
var b = num;
|
||
|
||
// Normalize
|
||
var bhi = b.words[b.length - 1] | 0;
|
||
var bhiBits = this._countBits(bhi);
|
||
shift = 26 - bhiBits;
|
||
if (shift !== 0) {
|
||
b = b.ushln(shift);
|
||
a.iushln(shift);
|
||
bhi = b.words[b.length - 1] | 0;
|
||
}
|
||
|
||
// Initialize quotient
|
||
var m = a.length - b.length;
|
||
var q;
|
||
|
||
if (mode !== 'mod') {
|
||
q = new BN(null);
|
||
q.length = m + 1;
|
||
q.words = new Array(q.length);
|
||
for (var i = 0; i < q.length; i++) {
|
||
q.words[i] = 0;
|
||
}
|
||
}
|
||
|
||
var diff = a.clone()._ishlnsubmul(b, 1, m);
|
||
if (diff.negative === 0) {
|
||
a = diff;
|
||
if (q) {
|
||
q.words[m] = 1;
|
||
}
|
||
}
|
||
|
||
for (var j = m - 1; j >= 0; j--) {
|
||
var qj = (a.words[b.length + j] | 0) * 0x4000000 +
|
||
(a.words[b.length + j - 1] | 0);
|
||
|
||
// NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max
|
||
// (0x7ffffff)
|
||
qj = Math.min((qj / bhi) | 0, 0x3ffffff);
|
||
|
||
a._ishlnsubmul(b, qj, j);
|
||
while (a.negative !== 0) {
|
||
qj--;
|
||
a.negative = 0;
|
||
a._ishlnsubmul(b, 1, j);
|
||
if (!a.isZero()) {
|
||
a.negative ^= 1;
|
||
}
|
||
}
|
||
if (q) {
|
||
q.words[j] = qj;
|
||
}
|
||
}
|
||
if (q) {
|
||
q.strip();
|
||
}
|
||
a.strip();
|
||
|
||
// Denormalize
|
||
if (mode !== 'div' && shift !== 0) {
|
||
a.iushrn(shift);
|
||
}
|
||
|
||
return {
|
||
div: q || null,
|
||
mod: a
|
||
};
|
||
};
|
||
|
||
// NOTE: 1) `mode` can be set to `mod` to request mod only,
|
||
// to `div` to request div only, or be absent to
|
||
// request both div & mod
|
||
// 2) `positive` is true if unsigned mod is requested
|
||
BN.prototype.divmod = function divmod (num, mode, positive) {
|
||
assert(!num.isZero());
|
||
|
||
if (this.isZero()) {
|
||
return {
|
||
div: new BN(0),
|
||
mod: new BN(0)
|
||
};
|
||
}
|
||
|
||
var div, mod, res;
|
||
if (this.negative !== 0 && num.negative === 0) {
|
||
res = this.neg().divmod(num, mode);
|
||
|
||
if (mode !== 'mod') {
|
||
div = res.div.neg();
|
||
}
|
||
|
||
if (mode !== 'div') {
|
||
mod = res.mod.neg();
|
||
if (positive && mod.negative !== 0) {
|
||
mod.iadd(num);
|
||
}
|
||
}
|
||
|
||
return {
|
||
div: div,
|
||
mod: mod
|
||
};
|
||
}
|
||
|
||
if (this.negative === 0 && num.negative !== 0) {
|
||
res = this.divmod(num.neg(), mode);
|
||
|
||
if (mode !== 'mod') {
|
||
div = res.div.neg();
|
||
}
|
||
|
||
return {
|
||
div: div,
|
||
mod: res.mod
|
||
};
|
||
}
|
||
|
||
if ((this.negative & num.negative) !== 0) {
|
||
res = this.neg().divmod(num.neg(), mode);
|
||
|
||
if (mode !== 'div') {
|
||
mod = res.mod.neg();
|
||
if (positive && mod.negative !== 0) {
|
||
mod.isub(num);
|
||
}
|
||
}
|
||
|
||
return {
|
||
div: res.div,
|
||
mod: mod
|
||
};
|
||
}
|
||
|
||
// Both numbers are positive at this point
|
||
|
||
// Strip both numbers to approximate shift value
|
||
if (num.length > this.length || this.cmp(num) < 0) {
|
||
return {
|
||
div: new BN(0),
|
||
mod: this
|
||
};
|
||
}
|
||
|
||
// Very short reduction
|
||
if (num.length === 1) {
|
||
if (mode === 'div') {
|
||
return {
|
||
div: this.divn(num.words[0]),
|
||
mod: null
|
||
};
|
||
}
|
||
|
||
if (mode === 'mod') {
|
||
return {
|
||
div: null,
|
||
mod: new BN(this.modn(num.words[0]))
|
||
};
|
||
}
|
||
|
||
return {
|
||
div: this.divn(num.words[0]),
|
||
mod: new BN(this.modn(num.words[0]))
|
||
};
|
||
}
|
||
|
||
return this._wordDiv(num, mode);
|
||
};
|
||
|
||
// Find `this` / `num`
|
||
BN.prototype.div = function div (num) {
|
||
return this.divmod(num, 'div', false).div;
|
||
};
|
||
|
||
// Find `this` % `num`
|
||
BN.prototype.mod = function mod (num) {
|
||
return this.divmod(num, 'mod', false).mod;
|
||
};
|
||
|
||
BN.prototype.umod = function umod (num) {
|
||
return this.divmod(num, 'mod', true).mod;
|
||
};
|
||
|
||
// Find Round(`this` / `num`)
|
||
BN.prototype.divRound = function divRound (num) {
|
||
var dm = this.divmod(num);
|
||
|
||
// Fast case - exact division
|
||
if (dm.mod.isZero()) return dm.div;
|
||
|
||
var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;
|
||
|
||
var half = num.ushrn(1);
|
||
var r2 = num.andln(1);
|
||
var cmp = mod.cmp(half);
|
||
|
||
// Round down
|
||
if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;
|
||
|
||
// Round up
|
||
return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
|
||
};
|
||
|
||
BN.prototype.modn = function modn (num) {
|
||
assert(num <= 0x3ffffff);
|
||
var p = (1 << 26) % num;
|
||
|
||
var acc = 0;
|
||
for (var i = this.length - 1; i >= 0; i--) {
|
||
acc = (p * acc + (this.words[i] | 0)) % num;
|
||
}
|
||
|
||
return acc;
|
||
};
|
||
|
||
// In-place division by number
|
||
BN.prototype.idivn = function idivn (num) {
|
||
assert(num <= 0x3ffffff);
|
||
|
||
var carry = 0;
|
||
for (var i = this.length - 1; i >= 0; i--) {
|
||
var w = (this.words[i] | 0) + carry * 0x4000000;
|
||
this.words[i] = (w / num) | 0;
|
||
carry = w % num;
|
||
}
|
||
|
||
return this.strip();
|
||
};
|
||
|
||
BN.prototype.divn = function divn (num) {
|
||
return this.clone().idivn(num);
|
||
};
|
||
|
||
BN.prototype.egcd = function egcd (p) {
|
||
assert(p.negative === 0);
|
||
assert(!p.isZero());
|
||
|
||
var x = this;
|
||
var y = p.clone();
|
||
|
||
if (x.negative !== 0) {
|
||
x = x.umod(p);
|
||
} else {
|
||
x = x.clone();
|
||
}
|
||
|
||
// A * x + B * y = x
|
||
var A = new BN(1);
|
||
var B = new BN(0);
|
||
|
||
// C * x + D * y = y
|
||
var C = new BN(0);
|
||
var D = new BN(1);
|
||
|
||
var g = 0;
|
||
|
||
while (x.isEven() && y.isEven()) {
|
||
x.iushrn(1);
|
||
y.iushrn(1);
|
||
++g;
|
||
}
|
||
|
||
var yp = y.clone();
|
||
var xp = x.clone();
|
||
|
||
while (!x.isZero()) {
|
||
for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
|
||
if (i > 0) {
|
||
x.iushrn(i);
|
||
while (i-- > 0) {
|
||
if (A.isOdd() || B.isOdd()) {
|
||
A.iadd(yp);
|
||
B.isub(xp);
|
||
}
|
||
|
||
A.iushrn(1);
|
||
B.iushrn(1);
|
||
}
|
||
}
|
||
|
||
for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
|
||
if (j > 0) {
|
||
y.iushrn(j);
|
||
while (j-- > 0) {
|
||
if (C.isOdd() || D.isOdd()) {
|
||
C.iadd(yp);
|
||
D.isub(xp);
|
||
}
|
||
|
||
C.iushrn(1);
|
||
D.iushrn(1);
|
||
}
|
||
}
|
||
|
||
if (x.cmp(y) >= 0) {
|
||
x.isub(y);
|
||
A.isub(C);
|
||
B.isub(D);
|
||
} else {
|
||
y.isub(x);
|
||
C.isub(A);
|
||
D.isub(B);
|
||
}
|
||
}
|
||
|
||
return {
|
||
a: C,
|
||
b: D,
|
||
gcd: y.iushln(g)
|
||
};
|
||
};
|
||
|
||
// This is reduced incarnation of the binary EEA
|
||
// above, designated to invert members of the
|
||
// _prime_ fields F(p) at a maximal speed
|
||
BN.prototype._invmp = function _invmp (p) {
|
||
assert(p.negative === 0);
|
||
assert(!p.isZero());
|
||
|
||
var a = this;
|
||
var b = p.clone();
|
||
|
||
if (a.negative !== 0) {
|
||
a = a.umod(p);
|
||
} else {
|
||
a = a.clone();
|
||
}
|
||
|
||
var x1 = new BN(1);
|
||
var x2 = new BN(0);
|
||
|
||
var delta = b.clone();
|
||
|
||
while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {
|
||
for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
|
||
if (i > 0) {
|
||
a.iushrn(i);
|
||
while (i-- > 0) {
|
||
if (x1.isOdd()) {
|
||
x1.iadd(delta);
|
||
}
|
||
|
||
x1.iushrn(1);
|
||
}
|
||
}
|
||
|
||
for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
|
||
if (j > 0) {
|
||
b.iushrn(j);
|
||
while (j-- > 0) {
|
||
if (x2.isOdd()) {
|
||
x2.iadd(delta);
|
||
}
|
||
|
||
x2.iushrn(1);
|
||
}
|
||
}
|
||
|
||
if (a.cmp(b) >= 0) {
|
||
a.isub(b);
|
||
x1.isub(x2);
|
||
} else {
|
||
b.isub(a);
|
||
x2.isub(x1);
|
||
}
|
||
}
|
||
|
||
var res;
|
||
if (a.cmpn(1) === 0) {
|
||
res = x1;
|
||
} else {
|
||
res = x2;
|
||
}
|
||
|
||
if (res.cmpn(0) < 0) {
|
||
res.iadd(p);
|
||
}
|
||
|
||
return res;
|
||
};
|
||
|
||
BN.prototype.gcd = function gcd (num) {
|
||
if (this.isZero()) return num.abs();
|
||
if (num.isZero()) return this.abs();
|
||
|
||
var a = this.clone();
|
||
var b = num.clone();
|
||
a.negative = 0;
|
||
b.negative = 0;
|
||
|
||
// Remove common factor of two
|
||
for (var shift = 0; a.isEven() && b.isEven(); shift++) {
|
||
a.iushrn(1);
|
||
b.iushrn(1);
|
||
}
|
||
|
||
do {
|
||
while (a.isEven()) {
|
||
a.iushrn(1);
|
||
}
|
||
while (b.isEven()) {
|
||
b.iushrn(1);
|
||
}
|
||
|
||
var r = a.cmp(b);
|
||
if (r < 0) {
|
||
// Swap `a` and `b` to make `a` always bigger than `b`
|
||
var t = a;
|
||
a = b;
|
||
b = t;
|
||
} else if (r === 0 || b.cmpn(1) === 0) {
|
||
break;
|
||
}
|
||
|
||
a.isub(b);
|
||
} while (true);
|
||
|
||
return b.iushln(shift);
|
||
};
|
||
|
||
// Invert number in the field F(num)
|
||
BN.prototype.invm = function invm (num) {
|
||
return this.egcd(num).a.umod(num);
|
||
};
|
||
|
||
BN.prototype.isEven = function isEven () {
|
||
return (this.words[0] & 1) === 0;
|
||
};
|
||
|
||
BN.prototype.isOdd = function isOdd () {
|
||
return (this.words[0] & 1) === 1;
|
||
};
|
||
|
||
// And first word and num
|
||
BN.prototype.andln = function andln (num) {
|
||
return this.words[0] & num;
|
||
};
|
||
|
||
// Increment at the bit position in-line
|
||
BN.prototype.bincn = function bincn (bit) {
|
||
assert(typeof bit === 'number');
|
||
var r = bit % 26;
|
||
var s = (bit - r) / 26;
|
||
var q = 1 << r;
|
||
|
||
// Fast case: bit is much higher than all existing words
|
||
if (this.length <= s) {
|
||
this._expand(s + 1);
|
||
this.words[s] |= q;
|
||
return this;
|
||
}
|
||
|
||
// Add bit and propagate, if needed
|
||
var carry = q;
|
||
for (var i = s; carry !== 0 && i < this.length; i++) {
|
||
var w = this.words[i] | 0;
|
||
w += carry;
|
||
carry = w >>> 26;
|
||
w &= 0x3ffffff;
|
||
this.words[i] = w;
|
||
}
|
||
if (carry !== 0) {
|
||
this.words[i] = carry;
|
||
this.length++;
|
||
}
|
||
return this;
|
||
};
|
||
|
||
BN.prototype.isZero = function isZero () {
|
||
return this.length === 1 && this.words[0] === 0;
|
||
};
|
||
|
||
BN.prototype.cmpn = function cmpn (num) {
|
||
var negative = num < 0;
|
||
|
||
if (this.negative !== 0 && !negative) return -1;
|
||
if (this.negative === 0 && negative) return 1;
|
||
|
||
this.strip();
|
||
|
||
var res;
|
||
if (this.length > 1) {
|
||
res = 1;
|
||
} else {
|
||
if (negative) {
|
||
num = -num;
|
||
}
|
||
|
||
assert(num <= 0x3ffffff, 'Number is too big');
|
||
|
||
var w = this.words[0] | 0;
|
||
res = w === num ? 0 : w < num ? -1 : 1;
|
||
}
|
||
if (this.negative !== 0) return -res | 0;
|
||
return res;
|
||
};
|
||
|
||
// Compare two numbers and return:
|
||
// 1 - if `this` > `num`
|
||
// 0 - if `this` == `num`
|
||
// -1 - if `this` < `num`
|
||
BN.prototype.cmp = function cmp (num) {
|
||
if (this.negative !== 0 && num.negative === 0) return -1;
|
||
if (this.negative === 0 && num.negative !== 0) return 1;
|
||
|
||
var res = this.ucmp(num);
|
||
if (this.negative !== 0) return -res | 0;
|
||
return res;
|
||
};
|
||
|
||
// Unsigned comparison
|
||
BN.prototype.ucmp = function ucmp (num) {
|
||
// At this point both numbers have the same sign
|
||
if (this.length > num.length) return 1;
|
||
if (this.length < num.length) return -1;
|
||
|
||
var res = 0;
|
||
for (var i = this.length - 1; i >= 0; i--) {
|
||
var a = this.words[i] | 0;
|
||
var b = num.words[i] | 0;
|
||
|
||
if (a === b) continue;
|
||
if (a < b) {
|
||
res = -1;
|
||
} else if (a > b) {
|
||
res = 1;
|
||
}
|
||
break;
|
||
}
|
||
return res;
|
||
};
|
||
|
||
BN.prototype.gtn = function gtn (num) {
|
||
return this.cmpn(num) === 1;
|
||
};
|
||
|
||
BN.prototype.gt = function gt (num) {
|
||
return this.cmp(num) === 1;
|
||
};
|
||
|
||
BN.prototype.gten = function gten (num) {
|
||
return this.cmpn(num) >= 0;
|
||
};
|
||
|
||
BN.prototype.gte = function gte (num) {
|
||
return this.cmp(num) >= 0;
|
||
};
|
||
|
||
BN.prototype.ltn = function ltn (num) {
|
||
return this.cmpn(num) === -1;
|
||
};
|
||
|
||
BN.prototype.lt = function lt (num) {
|
||
return this.cmp(num) === -1;
|
||
};
|
||
|
||
BN.prototype.lten = function lten (num) {
|
||
return this.cmpn(num) <= 0;
|
||
};
|
||
|
||
BN.prototype.lte = function lte (num) {
|
||
return this.cmp(num) <= 0;
|
||
};
|
||
|
||
BN.prototype.eqn = function eqn (num) {
|
||
return this.cmpn(num) === 0;
|
||
};
|
||
|
||
BN.prototype.eq = function eq (num) {
|
||
return this.cmp(num) === 0;
|
||
};
|
||
|
||
//
|
||
// A reduce context, could be using montgomery or something better, depending
|
||
// on the `m` itself.
|
||
//
|
||
BN.red = function red (num) {
|
||
return new Red(num);
|
||
};
|
||
|
||
BN.prototype.toRed = function toRed (ctx) {
|
||
assert(!this.red, 'Already a number in reduction context');
|
||
assert(this.negative === 0, 'red works only with positives');
|
||
return ctx.convertTo(this)._forceRed(ctx);
|
||
};
|
||
|
||
BN.prototype.fromRed = function fromRed () {
|
||
assert(this.red, 'fromRed works only with numbers in reduction context');
|
||
return this.red.convertFrom(this);
|
||
};
|
||
|
||
BN.prototype._forceRed = function _forceRed (ctx) {
|
||
this.red = ctx;
|
||
return this;
|
||
};
|
||
|
||
BN.prototype.forceRed = function forceRed (ctx) {
|
||
assert(!this.red, 'Already a number in reduction context');
|
||
return this._forceRed(ctx);
|
||
};
|
||
|
||
BN.prototype.redAdd = function redAdd (num) {
|
||
assert(this.red, 'redAdd works only with red numbers');
|
||
return this.red.add(this, num);
|
||
};
|
||
|
||
BN.prototype.redIAdd = function redIAdd (num) {
|
||
assert(this.red, 'redIAdd works only with red numbers');
|
||
return this.red.iadd(this, num);
|
||
};
|
||
|
||
BN.prototype.redSub = function redSub (num) {
|
||
assert(this.red, 'redSub works only with red numbers');
|
||
return this.red.sub(this, num);
|
||
};
|
||
|
||
BN.prototype.redISub = function redISub (num) {
|
||
assert(this.red, 'redISub works only with red numbers');
|
||
return this.red.isub(this, num);
|
||
};
|
||
|
||
BN.prototype.redShl = function redShl (num) {
|
||
assert(this.red, 'redShl works only with red numbers');
|
||
return this.red.shl(this, num);
|
||
};
|
||
|
||
BN.prototype.redMul = function redMul (num) {
|
||
assert(this.red, 'redMul works only with red numbers');
|
||
this.red._verify2(this, num);
|
||
return this.red.mul(this, num);
|
||
};
|
||
|
||
BN.prototype.redIMul = function redIMul (num) {
|
||
assert(this.red, 'redMul works only with red numbers');
|
||
this.red._verify2(this, num);
|
||
return this.red.imul(this, num);
|
||
};
|
||
|
||
BN.prototype.redSqr = function redSqr () {
|
||
assert(this.red, 'redSqr works only with red numbers');
|
||
this.red._verify1(this);
|
||
return this.red.sqr(this);
|
||
};
|
||
|
||
BN.prototype.redISqr = function redISqr () {
|
||
assert(this.red, 'redISqr works only with red numbers');
|
||
this.red._verify1(this);
|
||
return this.red.isqr(this);
|
||
};
|
||
|
||
// Square root over p
|
||
BN.prototype.redSqrt = function redSqrt () {
|
||
assert(this.red, 'redSqrt works only with red numbers');
|
||
this.red._verify1(this);
|
||
return this.red.sqrt(this);
|
||
};
|
||
|
||
BN.prototype.redInvm = function redInvm () {
|
||
assert(this.red, 'redInvm works only with red numbers');
|
||
this.red._verify1(this);
|
||
return this.red.invm(this);
|
||
};
|
||
|
||
// Return negative clone of `this` % `red modulo`
|
||
BN.prototype.redNeg = function redNeg () {
|
||
assert(this.red, 'redNeg works only with red numbers');
|
||
this.red._verify1(this);
|
||
return this.red.neg(this);
|
||
};
|
||
|
||
BN.prototype.redPow = function redPow (num) {
|
||
assert(this.red && !num.red, 'redPow(normalNum)');
|
||
this.red._verify1(this);
|
||
return this.red.pow(this, num);
|
||
};
|
||
|
||
// Prime numbers with efficient reduction
|
||
var primes = {
|
||
k256: null,
|
||
p224: null,
|
||
p192: null,
|
||
p25519: null
|
||
};
|
||
|
||
// Pseudo-Mersenne prime
|
||
function MPrime (name, p) {
|
||
// P = 2 ^ N - K
|
||
this.name = name;
|
||
this.p = new BN(p, 16);
|
||
this.n = this.p.bitLength();
|
||
this.k = new BN(1).iushln(this.n).isub(this.p);
|
||
|
||
this.tmp = this._tmp();
|
||
}
|
||
|
||
MPrime.prototype._tmp = function _tmp () {
|
||
var tmp = new BN(null);
|
||
tmp.words = new Array(Math.ceil(this.n / 13));
|
||
return tmp;
|
||
};
|
||
|
||
MPrime.prototype.ireduce = function ireduce (num) {
|
||
// Assumes that `num` is less than `P^2`
|
||
// num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)
|
||
var r = num;
|
||
var rlen;
|
||
|
||
do {
|
||
this.split(r, this.tmp);
|
||
r = this.imulK(r);
|
||
r = r.iadd(this.tmp);
|
||
rlen = r.bitLength();
|
||
} while (rlen > this.n);
|
||
|
||
var cmp = rlen < this.n ? -1 : r.ucmp(this.p);
|
||
if (cmp === 0) {
|
||
r.words[0] = 0;
|
||
r.length = 1;
|
||
} else if (cmp > 0) {
|
||
r.isub(this.p);
|
||
} else {
|
||
if (r.strip !== undefined) {
|
||
// r is BN v4 instance
|
||
r.strip();
|
||
} else {
|
||
// r is BN v5 instance
|
||
r._strip();
|
||
}
|
||
}
|
||
|
||
return r;
|
||
};
|
||
|
||
MPrime.prototype.split = function split (input, out) {
|
||
input.iushrn(this.n, 0, out);
|
||
};
|
||
|
||
MPrime.prototype.imulK = function imulK (num) {
|
||
return num.imul(this.k);
|
||
};
|
||
|
||
function K256 () {
|
||
MPrime.call(
|
||
this,
|
||
'k256',
|
||
'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');
|
||
}
|
||
inherits(K256, MPrime);
|
||
|
||
K256.prototype.split = function split (input, output) {
|
||
// 256 = 9 * 26 + 22
|
||
var mask = 0x3fffff;
|
||
|
||
var outLen = Math.min(input.length, 9);
|
||
for (var i = 0; i < outLen; i++) {
|
||
output.words[i] = input.words[i];
|
||
}
|
||
output.length = outLen;
|
||
|
||
if (input.length <= 9) {
|
||
input.words[0] = 0;
|
||
input.length = 1;
|
||
return;
|
||
}
|
||
|
||
// Shift by 9 limbs
|
||
var prev = input.words[9];
|
||
output.words[output.length++] = prev & mask;
|
||
|
||
for (i = 10; i < input.length; i++) {
|
||
var next = input.words[i] | 0;
|
||
input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);
|
||
prev = next;
|
||
}
|
||
prev >>>= 22;
|
||
input.words[i - 10] = prev;
|
||
if (prev === 0 && input.length > 10) {
|
||
input.length -= 10;
|
||
} else {
|
||
input.length -= 9;
|
||
}
|
||
};
|
||
|
||
K256.prototype.imulK = function imulK (num) {
|
||
// K = 0x1000003d1 = [ 0x40, 0x3d1 ]
|
||
num.words[num.length] = 0;
|
||
num.words[num.length + 1] = 0;
|
||
num.length += 2;
|
||
|
||
// bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
|
||
var lo = 0;
|
||
for (var i = 0; i < num.length; i++) {
|
||
var w = num.words[i] | 0;
|
||
lo += w * 0x3d1;
|
||
num.words[i] = lo & 0x3ffffff;
|
||
lo = w * 0x40 + ((lo / 0x4000000) | 0);
|
||
}
|
||
|
||
// Fast length reduction
|
||
if (num.words[num.length - 1] === 0) {
|
||
num.length--;
|
||
if (num.words[num.length - 1] === 0) {
|
||
num.length--;
|
||
}
|
||
}
|
||
return num;
|
||
};
|
||
|
||
function P224 () {
|
||
MPrime.call(
|
||
this,
|
||
'p224',
|
||
'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');
|
||
}
|
||
inherits(P224, MPrime);
|
||
|
||
function P192 () {
|
||
MPrime.call(
|
||
this,
|
||
'p192',
|
||
'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');
|
||
}
|
||
inherits(P192, MPrime);
|
||
|
||
function P25519 () {
|
||
// 2 ^ 255 - 19
|
||
MPrime.call(
|
||
this,
|
||
'25519',
|
||
'7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');
|
||
}
|
||
inherits(P25519, MPrime);
|
||
|
||
P25519.prototype.imulK = function imulK (num) {
|
||
// K = 0x13
|
||
var carry = 0;
|
||
for (var i = 0; i < num.length; i++) {
|
||
var hi = (num.words[i] | 0) * 0x13 + carry;
|
||
var lo = hi & 0x3ffffff;
|
||
hi >>>= 26;
|
||
|
||
num.words[i] = lo;
|
||
carry = hi;
|
||
}
|
||
if (carry !== 0) {
|
||
num.words[num.length++] = carry;
|
||
}
|
||
return num;
|
||
};
|
||
|
||
// Exported mostly for testing purposes, use plain name instead
|
||
BN._prime = function prime (name) {
|
||
// Cached version of prime
|
||
if (primes[name]) return primes[name];
|
||
|
||
var prime;
|
||
if (name === 'k256') {
|
||
prime = new K256();
|
||
} else if (name === 'p224') {
|
||
prime = new P224();
|
||
} else if (name === 'p192') {
|
||
prime = new P192();
|
||
} else if (name === 'p25519') {
|
||
prime = new P25519();
|
||
} else {
|
||
throw new Error('Unknown prime ' + name);
|
||
}
|
||
primes[name] = prime;
|
||
|
||
return prime;
|
||
};
|
||
|
||
//
|
||
// Base reduction engine
|
||
//
|
||
function Red (m) {
|
||
if (typeof m === 'string') {
|
||
var prime = BN._prime(m);
|
||
this.m = prime.p;
|
||
this.prime = prime;
|
||
} else {
|
||
assert(m.gtn(1), 'modulus must be greater than 1');
|
||
this.m = m;
|
||
this.prime = null;
|
||
}
|
||
}
|
||
|
||
Red.prototype._verify1 = function _verify1 (a) {
|
||
assert(a.negative === 0, 'red works only with positives');
|
||
assert(a.red, 'red works only with red numbers');
|
||
};
|
||
|
||
Red.prototype._verify2 = function _verify2 (a, b) {
|
||
assert((a.negative | b.negative) === 0, 'red works only with positives');
|
||
assert(a.red && a.red === b.red,
|
||
'red works only with red numbers');
|
||
};
|
||
|
||
Red.prototype.imod = function imod (a) {
|
||
if (this.prime) return this.prime.ireduce(a)._forceRed(this);
|
||
return a.umod(this.m)._forceRed(this);
|
||
};
|
||
|
||
Red.prototype.neg = function neg (a) {
|
||
if (a.isZero()) {
|
||
return a.clone();
|
||
}
|
||
|
||
return this.m.sub(a)._forceRed(this);
|
||
};
|
||
|
||
Red.prototype.add = function add (a, b) {
|
||
this._verify2(a, b);
|
||
|
||
var res = a.add(b);
|
||
if (res.cmp(this.m) >= 0) {
|
||
res.isub(this.m);
|
||
}
|
||
return res._forceRed(this);
|
||
};
|
||
|
||
Red.prototype.iadd = function iadd (a, b) {
|
||
this._verify2(a, b);
|
||
|
||
var res = a.iadd(b);
|
||
if (res.cmp(this.m) >= 0) {
|
||
res.isub(this.m);
|
||
}
|
||
return res;
|
||
};
|
||
|
||
Red.prototype.sub = function sub (a, b) {
|
||
this._verify2(a, b);
|
||
|
||
var res = a.sub(b);
|
||
if (res.cmpn(0) < 0) {
|
||
res.iadd(this.m);
|
||
}
|
||
return res._forceRed(this);
|
||
};
|
||
|
||
Red.prototype.isub = function isub (a, b) {
|
||
this._verify2(a, b);
|
||
|
||
var res = a.isub(b);
|
||
if (res.cmpn(0) < 0) {
|
||
res.iadd(this.m);
|
||
}
|
||
return res;
|
||
};
|
||
|
||
Red.prototype.shl = function shl (a, num) {
|
||
this._verify1(a);
|
||
return this.imod(a.ushln(num));
|
||
};
|
||
|
||
Red.prototype.imul = function imul (a, b) {
|
||
this._verify2(a, b);
|
||
return this.imod(a.imul(b));
|
||
};
|
||
|
||
Red.prototype.mul = function mul (a, b) {
|
||
this._verify2(a, b);
|
||
return this.imod(a.mul(b));
|
||
};
|
||
|
||
Red.prototype.isqr = function isqr (a) {
|
||
return this.imul(a, a.clone());
|
||
};
|
||
|
||
Red.prototype.sqr = function sqr (a) {
|
||
return this.mul(a, a);
|
||
};
|
||
|
||
Red.prototype.sqrt = function sqrt (a) {
|
||
if (a.isZero()) return a.clone();
|
||
|
||
var mod3 = this.m.andln(3);
|
||
assert(mod3 % 2 === 1);
|
||
|
||
// Fast case
|
||
if (mod3 === 3) {
|
||
var pow = this.m.add(new BN(1)).iushrn(2);
|
||
return this.pow(a, pow);
|
||
}
|
||
|
||
// Tonelli-Shanks algorithm (Totally unoptimized and slow)
|
||
//
|
||
// Find Q and S, that Q * 2 ^ S = (P - 1)
|
||
var q = this.m.subn(1);
|
||
var s = 0;
|
||
while (!q.isZero() && q.andln(1) === 0) {
|
||
s++;
|
||
q.iushrn(1);
|
||
}
|
||
assert(!q.isZero());
|
||
|
||
var one = new BN(1).toRed(this);
|
||
var nOne = one.redNeg();
|
||
|
||
// Find quadratic non-residue
|
||
// NOTE: Max is such because of generalized Riemann hypothesis.
|
||
var lpow = this.m.subn(1).iushrn(1);
|
||
var z = this.m.bitLength();
|
||
z = new BN(2 * z * z).toRed(this);
|
||
|
||
while (this.pow(z, lpow).cmp(nOne) !== 0) {
|
||
z.redIAdd(nOne);
|
||
}
|
||
|
||
var c = this.pow(z, q);
|
||
var r = this.pow(a, q.addn(1).iushrn(1));
|
||
var t = this.pow(a, q);
|
||
var m = s;
|
||
while (t.cmp(one) !== 0) {
|
||
var tmp = t;
|
||
for (var i = 0; tmp.cmp(one) !== 0; i++) {
|
||
tmp = tmp.redSqr();
|
||
}
|
||
assert(i < m);
|
||
var b = this.pow(c, new BN(1).iushln(m - i - 1));
|
||
|
||
r = r.redMul(b);
|
||
c = b.redSqr();
|
||
t = t.redMul(c);
|
||
m = i;
|
||
}
|
||
|
||
return r;
|
||
};
|
||
|
||
Red.prototype.invm = function invm (a) {
|
||
var inv = a._invmp(this.m);
|
||
if (inv.negative !== 0) {
|
||
inv.negative = 0;
|
||
return this.imod(inv).redNeg();
|
||
} else {
|
||
return this.imod(inv);
|
||
}
|
||
};
|
||
|
||
Red.prototype.pow = function pow (a, num) {
|
||
if (num.isZero()) return new BN(1).toRed(this);
|
||
if (num.cmpn(1) === 0) return a.clone();
|
||
|
||
var windowSize = 4;
|
||
var wnd = new Array(1 << windowSize);
|
||
wnd[0] = new BN(1).toRed(this);
|
||
wnd[1] = a;
|
||
for (var i = 2; i < wnd.length; i++) {
|
||
wnd[i] = this.mul(wnd[i - 1], a);
|
||
}
|
||
|
||
var res = wnd[0];
|
||
var current = 0;
|
||
var currentLen = 0;
|
||
var start = num.bitLength() % 26;
|
||
if (start === 0) {
|
||
start = 26;
|
||
}
|
||
|
||
for (i = num.length - 1; i >= 0; i--) {
|
||
var word = num.words[i];
|
||
for (var j = start - 1; j >= 0; j--) {
|
||
var bit = (word >> j) & 1;
|
||
if (res !== wnd[0]) {
|
||
res = this.sqr(res);
|
||
}
|
||
|
||
if (bit === 0 && current === 0) {
|
||
currentLen = 0;
|
||
continue;
|
||
}
|
||
|
||
current <<= 1;
|
||
current |= bit;
|
||
currentLen++;
|
||
if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;
|
||
|
||
res = this.mul(res, wnd[current]);
|
||
currentLen = 0;
|
||
current = 0;
|
||
}
|
||
start = 26;
|
||
}
|
||
|
||
return res;
|
||
};
|
||
|
||
Red.prototype.convertTo = function convertTo (num) {
|
||
var r = num.umod(this.m);
|
||
|
||
return r === num ? r.clone() : r;
|
||
};
|
||
|
||
Red.prototype.convertFrom = function convertFrom (num) {
|
||
var res = num.clone();
|
||
res.red = null;
|
||
return res;
|
||
};
|
||
|
||
//
|
||
// Montgomery method engine
|
||
//
|
||
|
||
BN.mont = function mont (num) {
|
||
return new Mont(num);
|
||
};
|
||
|
||
function Mont (m) {
|
||
Red.call(this, m);
|
||
|
||
this.shift = this.m.bitLength();
|
||
if (this.shift % 26 !== 0) {
|
||
this.shift += 26 - (this.shift % 26);
|
||
}
|
||
|
||
this.r = new BN(1).iushln(this.shift);
|
||
this.r2 = this.imod(this.r.sqr());
|
||
this.rinv = this.r._invmp(this.m);
|
||
|
||
this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
|
||
this.minv = this.minv.umod(this.r);
|
||
this.minv = this.r.sub(this.minv);
|
||
}
|
||
inherits(Mont, Red);
|
||
|
||
Mont.prototype.convertTo = function convertTo (num) {
|
||
return this.imod(num.ushln(this.shift));
|
||
};
|
||
|
||
Mont.prototype.convertFrom = function convertFrom (num) {
|
||
var r = this.imod(num.mul(this.rinv));
|
||
r.red = null;
|
||
return r;
|
||
};
|
||
|
||
Mont.prototype.imul = function imul (a, b) {
|
||
if (a.isZero() || b.isZero()) {
|
||
a.words[0] = 0;
|
||
a.length = 1;
|
||
return a;
|
||
}
|
||
|
||
var t = a.imul(b);
|
||
var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
|
||
var u = t.isub(c).iushrn(this.shift);
|
||
var res = u;
|
||
|
||
if (u.cmp(this.m) >= 0) {
|
||
res = u.isub(this.m);
|
||
} else if (u.cmpn(0) < 0) {
|
||
res = u.iadd(this.m);
|
||
}
|
||
|
||
return res._forceRed(this);
|
||
};
|
||
|
||
Mont.prototype.mul = function mul (a, b) {
|
||
if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);
|
||
|
||
var t = a.mul(b);
|
||
var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
|
||
var u = t.isub(c).iushrn(this.shift);
|
||
var res = u;
|
||
if (u.cmp(this.m) >= 0) {
|
||
res = u.isub(this.m);
|
||
} else if (u.cmpn(0) < 0) {
|
||
res = u.iadd(this.m);
|
||
}
|
||
|
||
return res._forceRed(this);
|
||
};
|
||
|
||
Mont.prototype.invm = function invm (a) {
|
||
// (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R
|
||
var res = this.imod(a._invmp(this.m).mul(this.r2));
|
||
return res._forceRed(this);
|
||
};
|
||
})( false || module, this);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 8932:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
class Deprecation extends Error {
|
||
constructor(message) {
|
||
super(message); // Maintains proper stack trace (only available on V8)
|
||
|
||
/* istanbul ignore next */
|
||
|
||
if (Error.captureStackTrace) {
|
||
Error.captureStackTrace(this, this.constructor);
|
||
}
|
||
|
||
this.name = 'Deprecation';
|
||
}
|
||
|
||
}
|
||
|
||
exports.Deprecation = Deprecation;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4124:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
try {
|
||
var util = __nccwpck_require__(3837);
|
||
/* istanbul ignore next */
|
||
if (typeof util.inherits !== 'function') throw '';
|
||
module.exports = util.inherits;
|
||
} catch (e) {
|
||
/* istanbul ignore next */
|
||
module.exports = __nccwpck_require__(8544);
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 8544:
|
||
/***/ ((module) => {
|
||
|
||
if (typeof Object.create === 'function') {
|
||
// implementation from standard node.js 'util' module
|
||
module.exports = function inherits(ctor, superCtor) {
|
||
if (superCtor) {
|
||
ctor.super_ = superCtor
|
||
ctor.prototype = Object.create(superCtor.prototype, {
|
||
constructor: {
|
||
value: ctor,
|
||
enumerable: false,
|
||
writable: true,
|
||
configurable: true
|
||
}
|
||
})
|
||
}
|
||
};
|
||
} else {
|
||
// old school shim for old browsers
|
||
module.exports = function inherits(ctor, superCtor) {
|
||
if (superCtor) {
|
||
ctor.super_ = superCtor
|
||
var TempCtor = function () {}
|
||
TempCtor.prototype = superCtor.prototype
|
||
ctor.prototype = new TempCtor()
|
||
ctor.prototype.constructor = ctor
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3287:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
/*!
|
||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||
*
|
||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
* Released under the MIT License.
|
||
*/
|
||
|
||
function isObject(o) {
|
||
return Object.prototype.toString.call(o) === '[object Object]';
|
||
}
|
||
|
||
function isPlainObject(o) {
|
||
var ctor,prot;
|
||
|
||
if (isObject(o) === false) return false;
|
||
|
||
// If has modified constructor
|
||
ctor = o.constructor;
|
||
if (ctor === undefined) return true;
|
||
|
||
// If has modified prototype
|
||
prot = ctor.prototype;
|
||
if (isObject(prot) === false) return false;
|
||
|
||
// If constructor does not have an Object-specific method
|
||
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
||
return false;
|
||
}
|
||
|
||
// Most likely a plain Object
|
||
return true;
|
||
}
|
||
|
||
exports.isPlainObject = isPlainObject;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 910:
|
||
/***/ ((module) => {
|
||
|
||
module.exports = assert;
|
||
|
||
function assert(val, msg) {
|
||
if (!val)
|
||
throw new Error(msg || 'Assertion failed');
|
||
}
|
||
|
||
assert.equal = function assertEqual(l, r, msg) {
|
||
if (l != r)
|
||
throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 7760:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||
|
||
if (!globalThis.DOMException) {
|
||
try {
|
||
const { MessageChannel } = __nccwpck_require__(1267),
|
||
port = new MessageChannel().port1,
|
||
ab = new ArrayBuffer()
|
||
port.postMessage(ab, [ab, ab])
|
||
} catch (err) {
|
||
err.constructor.name === 'DOMException' && (
|
||
globalThis.DOMException = err.constructor
|
||
)
|
||
}
|
||
}
|
||
|
||
module.exports = globalThis.DOMException
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1223:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
var wrappy = __nccwpck_require__(2940)
|
||
module.exports = wrappy(once)
|
||
module.exports.strict = wrappy(onceStrict)
|
||
|
||
once.proto = once(function () {
|
||
Object.defineProperty(Function.prototype, 'once', {
|
||
value: function () {
|
||
return once(this)
|
||
},
|
||
configurable: true
|
||
})
|
||
|
||
Object.defineProperty(Function.prototype, 'onceStrict', {
|
||
value: function () {
|
||
return onceStrict(this)
|
||
},
|
||
configurable: true
|
||
})
|
||
})
|
||
|
||
function once (fn) {
|
||
var f = function () {
|
||
if (f.called) return f.value
|
||
f.called = true
|
||
return f.value = fn.apply(this, arguments)
|
||
}
|
||
f.called = false
|
||
return f
|
||
}
|
||
|
||
function onceStrict (fn) {
|
||
var f = function () {
|
||
if (f.called)
|
||
throw new Error(f.onceError)
|
||
f.called = true
|
||
return f.value = fn.apply(this, arguments)
|
||
}
|
||
var name = fn.name || 'Function wrapped with `once`'
|
||
f.onceError = name + " shouldn't be called more than once"
|
||
f.called = false
|
||
return f
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 7946:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
var __webpack_unused_export__;
|
||
/*! OpenPGP.js v5.3.0 - 2022-06-08 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||
const e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};__webpack_unused_export__ = ({value:!0});var t=__nccwpck_require__(4300),r=__nccwpck_require__(2781),i=__nccwpck_require__(6113),n=__nccwpck_require__(9796),a=__nccwpck_require__(2037),s=__nccwpck_require__(3837),o=__nccwpck_require__(4293);function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=/*#__PURE__*/c(t),h=/*#__PURE__*/c(r),f=/*#__PURE__*/c(i),d=/*#__PURE__*/c(n),l=/*#__PURE__*/c(a),p=/*#__PURE__*/c(s),y=/*#__PURE__*/c(o);const b=Symbol("doneWritingPromise"),m=Symbol("doneWritingResolve"),g=Symbol("doneWritingReject"),w=Symbol("readingIndex");class v extends Array{constructor(){super(),this[b]=new Promise(((e,t)=>{this[m]=e,this[g]=t})),this[b].catch((()=>{}))}}function _(e){return e&&e.getReader&&Array.isArray(e)}function k(e){if(!_(e)){const t=e.getWriter(),r=t.releaseLock;return t.releaseLock=()=>{t.closed.catch((function(){})),r.call(t)},t}this.stream=e}v.prototype.getReader=function(){return void 0===this[w]&&(this[w]=0),{read:async()=>(await this[b],this[w]===this.length?{value:void 0,done:!0}:{value:this[this[w]++],done:!1})}},v.prototype.readToEnd=async function(e){await this[b];const t=e(this.slice(this[w]));return this.length=0,t},v.prototype.clone=function(){const e=new v;return e[b]=this[b].then((()=>{e.push(...this)})),e},k.prototype.write=async function(e){this.stream.push(e)},k.prototype.close=async function(){this.stream[m]()},k.prototype.abort=async function(e){return this.stream[g](e),e},k.prototype.releaseLock=function(){};const A="object"==typeof e.process&&"object"==typeof e.process.versions,S=A&&h.default.Readable;function E(t){return _(t)?"array":e.ReadableStream&&e.ReadableStream.prototype.isPrototypeOf(t)?"web":z&&z.prototype.isPrototypeOf(t)?"ponyfill":S&&S.prototype.isPrototypeOf(t)?"node":!(!t||!t.getReader)&&"web-like"}function P(e){return Uint8Array.prototype.isPrototypeOf(e)}function x(e){if(1===e.length)return e[0];let t=0;for(let r=0;r<e.length;r++){if(!P(e[r]))throw Error("concatUint8Array: Data must be in the form of a Uint8Array");t+=e[r].length}const r=new Uint8Array(t);let i=0;return e.forEach((function(e){r.set(e,i),i+=e.length})),r}const M=A&&u.default.Buffer,C=A&&h.default.Readable;let K,D;if(C){K=function(e){let t=!1;return new z({start(r){e.pause(),e.on("data",(i=>{t||(M.isBuffer(i)&&(i=new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),r.enqueue(i),e.pause())})),e.on("end",(()=>{t||r.close()})),e.on("error",(e=>r.error(e)))},pull(){e.resume()},cancel(r){t=!0,e.destroy(r)}})};class e extends C{constructor(e,t){super(t),this._reader=H(e)}async _read(e){try{for(;;){const{done:e,value:t}=await this._reader.read();if(e){this.push(null);break}if(!this.push(t)||this._cancelling){this._reading=!1;break}}}catch(e){this.emit("error",e)}}_destroy(e){this._reader.cancel(e)}}D=function(t,r){return new e(t,r)}}const R=new WeakSet,U=Symbol("externalBuffer");function I(e){if(this.stream=e,e[U]&&(this[U]=e[U].slice()),_(e)){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{},void(this._cancel=()=>{})}let t=E(e);if("node"===t&&(e=K(e)),t){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{t.closed.catch((function(){})),t.releaseLock()},void(this._cancel=t.cancel.bind(t))}let r=!1;this._read=async()=>r||R.has(e)?{value:void 0,done:!0}:(r=!0,{value:e,done:!1}),this._releaseLock=()=>{if(r)try{R.add(e)}catch(e){}}}I.prototype.read=async function(){if(this[U]&&this[U].length){return{done:!1,value:this[U].shift()}}return this._read()},I.prototype.releaseLock=function(){this[U]&&(this.stream[U]=this[U]),this._releaseLock()},I.prototype.cancel=function(e){return this._cancel(e)},I.prototype.readLine=async function(){let e,t=[];for(;!e;){let{done:r,value:i}=await this.read();if(i+="",r)return t.length?W(t):void 0;const n=i.indexOf("\n")+1;n&&(e=W(t.concat(i.substr(0,n))),t=[]),n!==i.length&&t.push(i.substr(n))}return this.unshift(...t),e},I.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const r=t[0];return this.unshift(re(t,1)),r},I.prototype.readBytes=async function(e){const t=[];let r=0;for(;;){const{done:i,value:n}=await this.read();if(i)return t.length?W(t):void 0;if(t.push(n),r+=n.length,r>=e){const r=W(t);return this.unshift(re(r,e)),re(r,0,e)}}},I.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},I.prototype.unshift=function(...e){this[U]||(this[U]=[]),1===e.length&&P(e[0])&&this[U].length&&e[0].length&&this[U][0].byteOffset>=e[0].length?this[U][0]=new Uint8Array(this[U][0].buffer,this[U][0].byteOffset-e[0].length,this[U][0].byteLength+e[0].length):this[U].unshift(...e.filter((e=>e&&e.length)))},I.prototype.readToEnd=async function(e=W){const t=[];for(;;){const{done:e,value:r}=await this.read();if(e)break;t.push(r)}return e(t)};let B,T,{ReadableStream:z,WritableStream:q,TransformStream:O}=e;async function F(){if(O)return;const[t,r]=await Promise.all([Promise.resolve().then((function(){return ud})),Promise.resolve().then((function(){return Kd}))]);({ReadableStream:z,WritableStream:q,TransformStream:O}=t);const{createReadableStreamWrapper:i}=r;e.ReadableStream&&z!==e.ReadableStream&&(B=i(z),T=i(e.ReadableStream))}const N=A&&u.default.Buffer;function j(e){let t=E(e);return"node"===t?K(e):"web"===t&&B?B(e):t?e:new z({start(t){t.enqueue(e),t.close()}})}function L(e){if(E(e))return e;const t=new v;return(async()=>{const r=G(t);await r.write(e),await r.close()})(),t}function W(e){return e.some((e=>E(e)&&!_(e)))?function(e){e=e.map(j);const t=Z((async function(e){await Promise.all(i.map((t=>ne(t,e))))}));let r=Promise.resolve();const i=e.map(((i,n)=>X(i,((i,a)=>(r=r.then((()=>V(i,t.writable,{preventClose:n!==e.length-1}))),r)))));return t.readable}(e):e.some((e=>_(e)))?function(e){const t=new v;let r=Promise.resolve();return e.forEach(((i,n)=>(r=r.then((()=>V(i,t,{preventClose:n!==e.length-1}))),r))),t}(e):"string"==typeof e[0]?e.join(""):N&&N.isBuffer(e[0])?N.concat(e):x(e)}function H(e){return new I(e)}function G(e){return new k(e)}async function V(e,t,{preventClose:r=!1,preventAbort:i=!1,preventCancel:n=!1}={}){if(E(e)&&!_(e)){e=j(e);try{if(e[U]){const r=G(t);for(let t=0;t<e[U].length;t++)await r.ready,await r.write(e[U][t]);r.releaseLock()}await e.pipeTo(t,{preventClose:r,preventAbort:i,preventCancel:n})}catch(e){}return}const a=H(e=L(e)),s=G(t);try{for(;;){await s.ready;const{done:e,value:t}=await a.read();if(e){r||await s.close();break}await s.write(t)}}catch(e){i||await s.abort(e)}finally{a.releaseLock(),s.releaseLock()}}function $(e,t){const r=new O(t);return V(e,r.writable),r.readable}function Z(e){let t,r,i=!1;return{readable:new z({start(e){r=e},pull(){t?t():i=!0},cancel:e},{highWaterMark:0}),writable:new q({write:async function(e){r.enqueue(e),i?i=!1:(await new Promise((e=>{t=e})),t=null)},close:r.close.bind(r),abort:r.error.bind(r)})}}function Y(e,t=(()=>{}),r=(()=>{})){if(_(e)){const i=new v;return(async()=>{const n=await ie(e),a=t(n),s=r();let o;o=void 0!==a&&void 0!==s?W([a,s]):void 0!==a?a:s;const c=G(i);await c.write(o),await c.close()})(),i}if(E(e))return $(e,{async transform(e,r){try{const i=await t(e);void 0!==i&&r.enqueue(i)}catch(e){r.error(e)}},async flush(e){try{const t=await r();void 0!==t&&e.enqueue(t)}catch(t){e.error(t)}}});const i=t(e),n=r();return void 0!==i&&void 0!==n?W([i,n]):void 0!==i?i:n}function X(e,t){if(E(e)&&!_(e)){let r;const i=new O({start(e){r=e}}),n=V(e,i.writable),a=Z((async function(e){r.error(e),await n,await new Promise(setTimeout)}));return t(i.readable,a.writable),a.readable}e=L(e);const r=new v;return t(e,r),r}function Q(e,t){let r;const i=X(e,((e,n)=>{const a=H(e);a.remainder=()=>(a.releaseLock(),V(e,n),i),r=t(a)}));return r}function J(e){if(_(e))return e.clone();if(E(e)){const t=function(e){if(_(e))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(E(e)){const t=j(e).tee();return t[0][U]=t[1][U]=e[U],t}return[re(e),re(e)]}(e);return te(e,t[0]),t[1]}return re(e)}function ee(e){return _(e)?J(e):E(e)?new z({start(t){const r=X(e,(async(e,r)=>{const i=H(e),n=G(r);try{for(;;){await n.ready;const{done:e,value:r}=await i.read();if(e){try{t.close()}catch(e){}return void await n.close()}try{t.enqueue(r)}catch(e){}await n.write(r)}}catch(e){t.error(e),await n.abort(e)}}));te(e,r)}}):re(e)}function te(e,t){Object.entries(Object.getOwnPropertyDescriptors(e.constructor.prototype)).forEach((([r,i])=>{"constructor"!==r&&(i.value?i.value=i.value.bind(t):i.get=i.get.bind(t),Object.defineProperty(e,r,i))}))}function re(e,t=0,r=1/0){if(_(e))throw Error("Not implemented");if(E(e)){if(t>=0&&r>=0){let i=0;return $(e,{transform(e,n){i<r?(i+e.length>=t&&n.enqueue(re(e,Math.max(t-i,0),r-i)),i+=e.length):n.terminate()}})}if(t<0&&(r<0||r===1/0)){let i=[];return Y(e,(e=>{e.length>=-t?i=[e]:i.push(e)}),(()=>re(W(i),t,r)))}if(0===t&&r<0){let i;return Y(e,(e=>{const n=i?W([i,e]):e;if(n.length>=-r)return i=re(n,r),re(n,t,r);i=n}))}return console.warn(`stream.slice(input, ${t}, ${r}) not implemented efficiently.`),ae((async()=>re(await ie(e),t,r)))}return e[U]&&(e=W(e[U].concat([e]))),!P(e)||N&&N.isBuffer(e)?e.slice(t,r):(r===1/0&&(r=e.length),e.subarray(t,r))}async function ie(e,t=W){return _(e)?e.readToEnd(t):E(e)?H(e).readToEnd(t):e}async function ne(e,t){if(E(e)){if(e.cancel)return e.cancel(t);if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}function ae(e){const t=new v;return(async()=>{const r=G(t);try{await r.write(await e()),await r.close()}catch(e){await r.abort(e)}})(),t}class se{constructor(e){if(void 0===e)throw Error("Invalid BigInteger input");if(e instanceof Uint8Array){const t=e,r=Array(t.length);for(let e=0;e<t.length;e++){const i=t[e].toString(16);r[e]=t[e]<=15?"0"+i:i}this.value=BigInt("0x0"+r.join(""))}else this.value=BigInt(e)}clone(){return new se(this.value)}iinc(){return this.value++,this}inc(){return this.clone().iinc()}idec(){return this.value--,this}dec(){return this.clone().idec()}iadd(e){return this.value+=e.value,this}add(e){return this.clone().iadd(e)}isub(e){return this.value-=e.value,this}sub(e){return this.clone().isub(e)}imul(e){return this.value*=e.value,this}mul(e){return this.clone().imul(e)}imod(e){return this.value%=e.value,this.isNegative()&&this.iadd(e),this}mod(e){return this.clone().imod(e)}modExp(e,t){if(t.isZero())throw Error("Modulo cannot be zero");if(t.isOne())return new se(0);if(e.isNegative())throw Error("Unsopported negative exponent");let r=e.value,i=this.value;i%=t.value;let n=BigInt(1);for(;r>BigInt(0);){const e=r&BigInt(1);r>>=BigInt(1);const a=n*i%t.value;n=e?a:n,i=i*i%t.value}return new se(n)}modInv(e){const{gcd:t,x:r}=this._egcd(e);if(!t.isOne())throw Error("Inverse does not exist");return r.add(e).mod(e)}_egcd(e){let t=BigInt(0),r=BigInt(1),i=BigInt(1),n=BigInt(0),a=this.value;for(e=e.value;e!==BigInt(0);){const s=a/e;let o=t;t=i-s*t,i=o,o=r,r=n-s*r,n=o,o=e,e=a%e,a=o}return{x:new se(i),y:new se(n),gcd:new se(a)}}gcd(e){let t=this.value;for(e=e.value;e!==BigInt(0);){const r=e;e=t%e,t=r}return new se(t)}ileftShift(e){return this.value<<=e.value,this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value>>=e.value,this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value===e.value}lt(e){return this.value<e.value}lte(e){return this.value<=e.value}gt(e){return this.value>e.value}gte(e){return this.value>=e.value}isZero(){return this.value===BigInt(0)}isOne(){return this.value===BigInt(1)}isNegative(){return this.value<BigInt(0)}isEven(){return!(this.value&BigInt(1))}abs(){const e=this.clone();return this.isNegative()&&(e.value=-e.value),e}toString(){return this.value.toString()}toNumber(){const e=Number(this.value);if(e>Number.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return e}getBit(e){return(this.value>>BigInt(e)&BigInt(1))===BigInt(0)?0:1}bitLength(){const e=new se(0),t=new se(1),r=new se(-1),i=this.isNegative()?r:e;let n=1;const a=this.clone();for(;!a.irightShift(t).equal(i);)n++;return n}byteLength(){const e=new se(0),t=new se(-1),r=this.isNegative()?t:e,i=new se(8);let n=1;const a=this.clone();for(;!a.irightShift(i).equal(r);)n++;return n}toUint8Array(e="be",t){let r=this.value.toString(16);r.length%2==1&&(r="0"+r);const i=r.length/2,n=new Uint8Array(t||i),a=t?t-i:0;let s=0;for(;s<i;)n[s+a]=parseInt(r.slice(2*s,2*s+2),16),s++;return"be"!==e&&n.reverse(),n}}const oe=(()=>{try{return"development"===process.env.NODE_ENV}catch(e){}return!1})(),ce={isString:function(e){return"string"==typeof e||String.prototype.isPrototypeOf(e)},isArray:function(e){return Array.prototype.isPrototypeOf(e)},isUint8Array:P,isStream:E,readNumber:function(e){let t=0;for(let r=0;r<e.length;r++)t+=256**r*e[e.length-1-r];return t},writeNumber:function(e,t){const r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e>>8*(t-i-1)&255;return r},readDate:function(e){const t=ce.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return ce.writeNumber(t,4)},normalizeDate:function(e=Date.now()){return null===e||e===1/0?e:new Date(1e3*Math.floor(+e/1e3))},readMPI:function(e){const t=(e[0]<<8|e[1])+7>>>3;return e.subarray(2,2+t)},leftPad(e,t){const r=new Uint8Array(t),i=t-e.length;return r.set(e,i),r},uint8ArrayToMPI:function(e){const t=ce.uint8ArrayBitLength(e);if(0===t)throw Error("Zero MPI");const r=e.subarray(e.length-Math.ceil(t/8)),i=new Uint8Array([(65280&t)>>8,255&t]);return ce.concatUint8Array([i,r])},uint8ArrayBitLength:function(e){let t;for(t=0;t<e.length&&0===e[t];t++);if(t===e.length)return 0;const r=e.subarray(t);return 8*(r.length-1)+ce.nbits(r[0])},hexToUint8Array:function(e){const t=new Uint8Array(e.length>>1);for(let r=0;r<e.length>>1;r++)t[r]=parseInt(e.substr(r<<1,2),16);return t},uint8ArrayToHex:function(e){const t=[],r=e.length;let i,n=0;for(;n<r;){for(i=e[n++].toString(16);i.length<2;)i="0"+i;t.push(""+i)}return t.join("")},stringToUint8Array:function(e){return Y(e,(e=>{if(!ce.isString(e))throw Error("stringToUint8Array: Data must be in the form of a string");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}))},uint8ArrayToString:function(e){const t=[],r=16384,i=(e=new Uint8Array(e)).length;for(let n=0;n<i;n+=r)t.push(String.fromCharCode.apply(String,e.subarray(n,n+r<i?n+r:i)));return t.join("")},encodeUTF8:function(e){const t=new TextEncoder("utf-8");function r(e,r=!1){return t.encode(e,{stream:!r})}return Y(e,r,(()=>r("",!0)))},decodeUTF8:function(e){const t=new TextDecoder("utf-8");function r(e,r=!1){return t.decode(e,{stream:!r})}return Y(e,r,(()=>r(new Uint8Array,!0)))},concat:W,concatUint8Array:x,equalsUint8Array:function(e,t){if(!ce.isUint8Array(e)||!ce.isUint8Array(t))throw Error("Data must be in the form of a Uint8Array");if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},writeChecksum:function(e){let t=0;for(let r=0;r<e.length;r++)t=t+e[r]&65535;return ce.writeNumber(t,2)},printDebug:function(e){oe&&console.log(e)},printDebugError:function(e){oe&&console.error(e)},nbits:function(e){let t=1,r=e>>>16;return 0!==r&&(e=r,t+=16),r=e>>8,0!==r&&(e=r,t+=8),r=e>>4,0!==r&&(e=r,t+=4),r=e>>2,0!==r&&(e=r,t+=2),r=e>>1,0!==r&&(e=r,t+=1),t},double:function(e){const t=new Uint8Array(e.length),r=e.length-1;for(let i=0;i<r;i++)t[i]=e[i]<<1^e[i+1]>>7;return t[r]=e[r]<<1^135*(e[0]>>7),t},shiftRight:function(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]>>=t,r>0&&(e[r]|=e[r-1]<<8-t);return e},getWebCrypto:function(){return void 0!==e&&e.crypto&&e.crypto.subtle},detectBigInt:()=>"undefined"!=typeof BigInt,getBigInteger:async function(){if(ce.detectBigInt())return se;{const{default:e}=await Promise.resolve().then((function(){return Bd}));return e}},getNodeCrypto:function(){return f.default},getNodeZlib:function(){return d.default},getNodeBuffer:function(){return(u.default||{}).Buffer},getHardwareConcurrency:function(){if("undefined"!=typeof navigator)return navigator.hardwareConcurrency||1;return l.default.cpus().length},isEmailAddress:function(e){if(!ce.isString(e))return!1;return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}|xn--[a-zA-Z\-0-9]+)))$/.test(e)},canonicalizeEOL:function(e){let t=!1;return Y(e,(e=>{let r;t&&(e=ce.concatUint8Array([new Uint8Array([13]),e])),13===e[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;const i=[];for(let t=0;r=e.indexOf(10,t)+1,r;t=r)13!==e[r-2]&&i.push(r);if(!i.length)return e;const n=new Uint8Array(e.length+i.length);let a=0;for(let t=0;t<i.length;t++){const r=e.subarray(i[t-1]||0,i[t]);n.set(r,a),a+=r.length,n[a-1]=13,n[a]=10,a++}return n.set(e.subarray(i[i.length-1]||0),a),n}),(()=>t?new Uint8Array([13]):void 0))},nativeEOL:function(e){let t=!1;return Y(e,(e=>{let r;13===(e=t&&10!==e[0]?ce.concatUint8Array([new Uint8Array([13]),e]):new Uint8Array(e))[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;let i=0;for(let t=0;t!==e.length;t=r){r=e.indexOf(13,t)+1,r||(r=e.length);const n=r-(10===e[r]?1:0);t&&e.copyWithin(i,t,n),i+=n-t}return e.subarray(0,i)}),(()=>t?new Uint8Array([13]):void 0))},removeTrailingSpaces:function(e){return e.split("\n").map((e=>{let t=e.length-1;for(;t>=0&&(" "===e[t]||"\t"===e[t]);t--);return e.substr(0,t+1)})).join("\n")},wrapError:function(e,t){if(!t)return Error(e);try{t.message=e+": "+t.message}catch(e){}return t},constructAllowedPackets:function(e){const t={};return e.forEach((e=>{if(!e.tag)throw Error("Invalid input: expected a packet class");t[e.tag]=e})),t},anyPromise:function(e){return new Promise((async(t,r)=>{let i;await Promise.all(e.map((async e=>{try{t(await e)}catch(e){i=e}}))),r(i)}))},selectUint8Array:function(e,t,r){const i=Math.max(t.length,r.length),n=new Uint8Array(i);let a=0;for(let i=0;i<n.length;i++)n[i]=t[i]&256-e|r[i]&255+e,a+=e&i<t.length|1-e&i<r.length;return n.subarray(0,a)},selectUint8:function(e,t,r){return t&256-e|r&255+e}},ue=ce.getNodeBuffer();let he,fe;function de(e){let t=new Uint8Array;return Y(e,(e=>{t=ce.concatUint8Array([t,e]);const r=[],i=Math.floor(t.length/45),n=45*i,a=he(t.subarray(0,n));for(let e=0;e<i;e++)r.push(a.substr(60*e,60)),r.push("\n");return t=t.subarray(n),r.join("")}),(()=>t.length?he(t)+"\n":""))}function le(e){let t="";return Y(e,(e=>{t+=e;let r=0;const i=[" ","\t","\r","\n"];for(let e=0;e<i.length;e++){const n=i[e];for(let e=t.indexOf(n);-1!==e;e=t.indexOf(n,e+1))r++}let n=t.length;for(;n>0&&(n-r)%4!=0;n--)i.includes(t[n])&&r--;const a=fe(t.substr(0,n));return t=t.substr(n),a}),(()=>fe(t)))}function pe(e){return le(e.replace(/-/g,"+").replace(/_/g,"/"))}function ye(e,t){let r=de(e).replace(/[\r\n]/g,"");return t&&(r=r.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,"")),r}ue?(he=e=>ue.from(e).toString("base64"),fe=e=>{const t=ue.from(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}):(he=e=>btoa(ce.uint8ArrayToString(e)),fe=e=>ce.stringToUint8Array(atob(e)));const be=Symbol("byValue");var me={curve:{p256:"p256","P-256":"p256",secp256r1:"p256",prime256v1:"p256","1.2.840.10045.3.1.7":"p256","2a8648ce3d030107":"p256","2A8648CE3D030107":"p256",p384:"p384","P-384":"p384",secp384r1:"p384","1.3.132.0.34":"p384","2b81040022":"p384","2B81040022":"p384",p521:"p521","P-521":"p521",secp521r1:"p521","1.3.132.0.35":"p521","2b81040023":"p521","2B81040023":"p521",secp256k1:"secp256k1","1.3.132.0.10":"secp256k1","2b8104000a":"secp256k1","2B8104000A":"secp256k1",ED25519:"ed25519",ed25519:"ed25519",Ed25519:"ed25519","1.3.6.1.4.1.11591.15.1":"ed25519","2b06010401da470f01":"ed25519","2B06010401DA470F01":"ed25519",X25519:"curve25519",cv25519:"curve25519",curve25519:"curve25519",Curve25519:"curve25519","1.3.6.1.4.1.3029.1.5.1":"curve25519","2b060104019755010501":"curve25519","2B060104019755010501":"curve25519",brainpoolP256r1:"brainpoolP256r1","1.3.36.3.3.2.8.1.1.7":"brainpoolP256r1","2b2403030208010107":"brainpoolP256r1","2B2403030208010107":"brainpoolP256r1",brainpoolP384r1:"brainpoolP384r1","1.3.36.3.3.2.8.1.1.11":"brainpoolP384r1","2b240303020801010b":"brainpoolP384r1","2B240303020801010B":"brainpoolP384r1",brainpoolP512r1:"brainpoolP512r1","1.3.36.3.3.2.8.1.1.13":"brainpoolP512r1","2b240303020801010d":"brainpoolP512r1","2B240303020801010D":"brainpoolP512r1"},s2k:{simple:0,salted:1,iterated:3,gnu:101},publicKey:{rsaEncryptSign:1,rsaEncrypt:2,rsaSign:3,elgamal:16,dsa:17,ecdh:18,ecdsa:19,eddsa:22,aedh:23,aedsa:24},symmetric:{plaintext:0,idea:1,tripledes:2,cast5:3,blowfish:4,aes128:7,aes192:8,aes256:9,twofish:10},compression:{uncompressed:0,zip:1,zlib:2,bzip2:3},hash:{md5:1,sha1:2,ripemd:3,sha256:8,sha384:9,sha512:10,sha224:11},webHash:{"SHA-1":2,"SHA-256":8,"SHA-384":9,"SHA-512":10},aead:{eax:1,ocb:2,experimentalGCM:100},packet:{publicKeyEncryptedSessionKey:1,signature:2,symEncryptedSessionKey:3,onePassSignature:4,secretKey:5,publicKey:6,secretSubkey:7,compressedData:8,symmetricallyEncryptedData:9,marker:10,literalData:11,trust:12,userID:13,publicSubkey:14,userAttribute:17,symEncryptedIntegrityProtectedData:18,modificationDetectionCode:19,aeadEncryptedData:20},literal:{binary:98,text:116,utf8:117,mime:109},signature:{binary:0,text:1,standalone:2,certGeneric:16,certPersona:17,certCasual:18,certPositive:19,certRevocation:48,subkeyBinding:24,keyBinding:25,key:31,keyRevocation:32,subkeyRevocation:40,timestamp:64,thirdParty:80},signatureSubpacket:{signatureCreationTime:2,signatureExpirationTime:3,exportableCertification:4,trustSignature:5,regularExpression:6,revocable:7,keyExpirationTime:9,placeholderBackwardsCompatibility:10,preferredSymmetricAlgorithms:11,revocationKey:12,issuer:16,notationData:20,preferredHashAlgorithms:21,preferredCompressionAlgorithms:22,keyServerPreferences:23,preferredKeyServer:24,primaryUserID:25,policyURI:26,keyFlags:27,signersUserID:28,reasonForRevocation:29,features:30,signatureTarget:31,embeddedSignature:32,issuerFingerprint:33,preferredAEADAlgorithms:34},keyFlags:{certifyKeys:1,signData:2,encryptCommunication:4,encryptStorage:8,splitPrivateKey:16,authentication:32,sharedPrivateKey:128},armor:{multipartSection:0,multipartLast:1,signed:2,message:3,publicKey:4,privateKey:5,signature:6},reasonForRevocation:{noReason:0,keySuperseded:1,keyCompromised:2,keyRetired:3,userIDInvalid:32},features:{modificationDetection:1,aead:2,v5Keys:4},write:function(e,t){if("number"==typeof t&&(t=this.read(e,t)),void 0!==e[t])return e[t];throw Error("Invalid enum value.")},read:function(e,t){if(e[be]||(e[be]=[],Object.entries(e).forEach((([t,r])=>{e[be][r]=t}))),void 0!==e[be][t])return e[be][t];throw Error("Invalid enum value.")}},ge={preferredHashAlgorithm:me.hash.sha256,preferredSymmetricAlgorithm:me.symmetric.aes256,preferredCompressionAlgorithm:me.compression.uncompressed,deflateLevel:6,aeadProtect:!1,preferredAEADAlgorithm:me.aead.eax,aeadChunkSizeByte:12,v5Keys:!1,s2kIterationCountByte:224,allowUnauthenticatedMessages:!1,allowUnauthenticatedStream:!1,checksumRequired:!1,minRSABits:2047,passwordCollisionCheck:!1,revocationsExpire:!1,allowInsecureDecryptionWithSigningKeys:!1,allowInsecureVerificationWithReformattedKeys:!1,constantTimePKCS1Decryption:!1,constantTimePKCS1DecryptionSupportedSymmetricAlgorithms:new Set([me.symmetric.aes128,me.symmetric.aes192,me.symmetric.aes256]),minBytesForWebCrypto:1e3,ignoreUnsupportedPackets:!0,ignoreMalformedPackets:!1,showVersion:!1,showComment:!1,versionString:"OpenPGP.js 5.3.0",commentString:"https://openpgpjs.org",maxUserIDLength:5120,knownNotations:["preferred-email-encoding@pgp.com","pka-address@gnupg.org"],useIndutnyElliptic:!0,rejectHashAlgorithms:new Set([me.hash.md5,me.hash.ripemd]),rejectMessageHashAlgorithms:new Set([me.hash.md5,me.hash.ripemd,me.hash.sha1]),rejectPublicKeyAlgorithms:new Set([me.publicKey.elgamal,me.publicKey.dsa]),rejectCurves:new Set([me.curve.brainpoolP256r1,me.curve.brainpoolP384r1,me.curve.brainpoolP512r1,me.curve.secp256k1])};function we(e){const t=e.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!t)throw Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(t[1])?me.armor.multipartSection:/MESSAGE, PART \d+/.test(t[1])?me.armor.multipartLast:/SIGNED MESSAGE/.test(t[1])?me.armor.signed:/MESSAGE/.test(t[1])?me.armor.message:/PUBLIC KEY BLOCK/.test(t[1])?me.armor.publicKey:/PRIVATE KEY BLOCK/.test(t[1])?me.armor.privateKey:/SIGNATURE/.test(t[1])?me.armor.signature:void 0}function ve(e,t){let r="";return t.showVersion&&(r+="Version: "+t.versionString+"\n"),t.showComment&&(r+="Comment: "+t.commentString+"\n"),e&&(r+="Comment: "+e+"\n"),r+="\n",r}function _e(e){return de(function(e){let t=13501623;return Y(e,(e=>{const r=Ae?Math.floor(e.length/4):0,i=new Uint32Array(e.buffer,e.byteOffset,r);for(let e=0;e<r;e++)t^=i[e],t=ke[0][t>>24&255]^ke[1][t>>16&255]^ke[2][t>>8&255]^ke[3][t>>0&255];for(let i=4*r;i<e.length;i++)t=t>>8^ke[0][255&t^e[i]]}),(()=>new Uint8Array([t,t>>8,t>>16])))}(e))}const ke=[Array(255),Array(255),Array(255),Array(255)];for(let e=0;e<=255;e++){let t=e<<16;for(let e=0;e<8;e++)t=t<<1^(0!=(8388608&t)?8801531:0);ke[0][e]=(16711680&t)>>16|65280&t|(255&t)<<16}for(let e=0;e<=255;e++)ke[1][e]=ke[0][e]>>8^ke[0][255&ke[0][e]];for(let e=0;e<=255;e++)ke[2][e]=ke[1][e]>>8^ke[0][255&ke[1][e]];for(let e=0;e<=255;e++)ke[3][e]=ke[2][e]>>8^ke[0][255&ke[2][e]];const Ae=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,255,!0),255===new Int16Array(e)[0]}();function Se(e){for(let t=0;t<e.length;t++){if(!/^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(e[t]))throw Error("Improperly formatted armor header: "+e[t]);/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(e[t])||ce.printDebugError(Error("Unknown header: "+e[t]))}}function Ee(e){let t=e,r="";const i=e.lastIndexOf("=");return i>=0&&i!==e.length-1&&(t=e.slice(0,i),r=e.slice(i+1).substr(0,4)),{body:t,checksum:r}}function Pe(e,t=ge){return new Promise((async(r,i)=>{try{const n=/^-----[^-]+-----$/m,a=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let s;const o=[];let c,u,h,f=o,d=[],l=le(X(e,(async(e,t)=>{const p=H(e);try{for(;;){let e=await p.readLine();if(void 0===e)throw Error("Misformed armored text");if(e=ce.removeTrailingSpaces(e.replace(/[\r\n]/g,"")),s)if(c)u||2!==s||(n.test(e)?(d=d.join("\r\n"),u=!0,Se(f),f=[],c=!1):d.push(e.replace(/^- /,"")));else if(n.test(e)&&i(Error("Mandatory blank line missing between armor headers and armor data")),a.test(e)){if(Se(f),c=!0,u||2!==s){r({text:d,data:l,headers:o,type:s});break}}else f.push(e);else n.test(e)&&(s=we(e))}}catch(e){return void i(e)}const y=G(t);try{for(;;){await y.ready;const{done:e,value:t}=await p.read();if(e)throw Error("Misformed armored text");const r=t+"";if(-1!==r.indexOf("=")||-1!==r.indexOf("-")){let e=await p.readToEnd();e.length||(e=""),e=r+e,e=ce.removeTrailingSpaces(e.replace(/\r/g,""));const t=e.split(n);if(1===t.length)throw Error("Misformed armored text");const i=Ee(t[0].slice(0,-1));h=i.checksum,await y.write(i.body);break}await y.write(r)}await y.ready,await y.close()}catch(e){await y.abort(e)}})));l=X(l,(async(e,r)=>{const i=ie(_e(ee(e)));i.catch((()=>{})),await V(e,r,{preventClose:!0});const n=G(r);try{const e=(await i).replace("\n","");if(h!==e&&(h||t.checksumRequired))throw Error("Ascii armor integrity check failed");await n.ready,await n.close()}catch(e){await n.abort(e)}}))}catch(e){i(e)}})).then((async e=>(_(e.data)&&(e.data=await ie(e.data)),e)))}function xe(e,t,r,i,n,a=ge){let s,o;e===me.armor.signed&&(s=t.text,o=t.hash,t=t.data);const c=ee(t),u=[];switch(e){case me.armor.multipartSection:u.push("-----BEGIN PGP MESSAGE, PART "+r+"/"+i+"-----\n"),u.push(ve(n,a)),u.push(de(t)),u.push("=",_e(c)),u.push("-----END PGP MESSAGE, PART "+r+"/"+i+"-----\n");break;case me.armor.multipartLast:u.push("-----BEGIN PGP MESSAGE, PART "+r+"-----\n"),u.push(ve(n,a)),u.push(de(t)),u.push("=",_e(c)),u.push("-----END PGP MESSAGE, PART "+r+"-----\n");break;case me.armor.signed:u.push("\n-----BEGIN PGP SIGNED MESSAGE-----\n"),u.push("Hash: "+o+"\n\n"),u.push(s.replace(/^-/gm,"- -")),u.push("\n-----BEGIN PGP SIGNATURE-----\n"),u.push(ve(n,a)),u.push(de(t)),u.push("=",_e(c)),u.push("-----END PGP SIGNATURE-----\n");break;case me.armor.message:u.push("-----BEGIN PGP MESSAGE-----\n"),u.push(ve(n,a)),u.push(de(t)),u.push("=",_e(c)),u.push("-----END PGP MESSAGE-----\n");break;case me.armor.publicKey:u.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\n"),u.push(ve(n,a)),u.push(de(t)),u.push("=",_e(c)),u.push("-----END PGP PUBLIC KEY BLOCK-----\n");break;case me.armor.privateKey:u.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"),u.push(ve(n,a)),u.push(de(t)),u.push("=",_e(c)),u.push("-----END PGP PRIVATE KEY BLOCK-----\n");break;case me.armor.signature:u.push("-----BEGIN PGP SIGNATURE-----\n"),u.push(ve(n,a)),u.push(de(t)),u.push("=",_e(c)),u.push("-----END PGP SIGNATURE-----\n")}return ce.concat(u)}class Me{constructor(){this.bytes=""}read(e){this.bytes=ce.uint8ArrayToString(e.subarray(0,8))}write(){return ce.stringToUint8Array(this.bytes)}toHex(){return ce.uint8ArrayToHex(ce.stringToUint8Array(this.bytes))}equals(e,t=!1){return t&&(e.isWildcard()||this.isWildcard())||this.bytes===e.bytes}isNull(){return""===this.bytes}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(e){return e.toHex()}static fromID(e){const t=new Me;return t.read(ce.hexToUint8Array(e)),t}static wildcard(){const e=new Me;return e.read(new Uint8Array(8)),e}}var Ce=function(){var e,t,r=!1;function i(r,i){var n=e[(t[r]+t[i])%255];return 0!==r&&0!==i||(n=0),n}var n,a,s,o,c=!1;function u(){function u(r){var i,n,a;for(n=a=function(r){var i=e[255-t[r]];return 0===r&&(i=0),i}(r),i=0;i<4;i++)a^=n=255&(n<<1|n>>>7);return a^=99}r||function(){e=[],t=[];var i,n,a=1;for(i=0;i<255;i++)e[i]=a,n=128&a,a<<=1,a&=255,128===n&&(a^=27),a^=e[i],t[e[i]]=i;e[255]=e[0],t[0]=0,r=!0}(),n=[],a=[],s=[[],[],[],[]],o=[[],[],[],[]];for(var h=0;h<256;h++){var f=u(h);n[h]=f,a[f]=h,s[0][h]=i(2,f)<<24|f<<16|f<<8|i(3,f),o[0][f]=i(14,h)<<24|i(9,h)<<16|i(13,h)<<8|i(11,h);for(var d=1;d<4;d++)s[d][h]=s[d-1][h]>>>8|s[d-1][h]<<24,o[d][f]=o[d-1][f]>>>8|o[d-1][f]<<24}c=!0}var h=function(e,t){c||u();var r=new Uint32Array(t);r.set(n,512),r.set(a,768);for(var i=0;i<4;i++)r.set(s[i],4096+1024*i>>2),r.set(o[i],8192+1024*i>>2);var h=function(e,t,r){"use asm";var i=0,n=0,a=0,s=0,o=0,c=0,u=0,h=0,f=0,d=0,l=0,p=0,y=0,b=0,m=0,g=0,w=0,v=0,_=0,k=0,A=0;var S=new e.Uint32Array(r),E=new e.Uint8Array(r);function P(e,t,r,o,c,u,h,f){e=e|0;t=t|0;r=r|0;o=o|0;c=c|0;u=u|0;h=h|0;f=f|0;var d=0,l=0,p=0,y=0,b=0,m=0,g=0,w=0;d=r|0x400,l=r|0x800,p=r|0xc00;c=c^S[(e|0)>>2],u=u^S[(e|4)>>2],h=h^S[(e|8)>>2],f=f^S[(e|12)>>2];for(w=16;(w|0)<=o<<4;w=w+16|0){y=S[(r|c>>22&1020)>>2]^S[(d|u>>14&1020)>>2]^S[(l|h>>6&1020)>>2]^S[(p|f<<2&1020)>>2]^S[(e|w|0)>>2],b=S[(r|u>>22&1020)>>2]^S[(d|h>>14&1020)>>2]^S[(l|f>>6&1020)>>2]^S[(p|c<<2&1020)>>2]^S[(e|w|4)>>2],m=S[(r|h>>22&1020)>>2]^S[(d|f>>14&1020)>>2]^S[(l|c>>6&1020)>>2]^S[(p|u<<2&1020)>>2]^S[(e|w|8)>>2],g=S[(r|f>>22&1020)>>2]^S[(d|c>>14&1020)>>2]^S[(l|u>>6&1020)>>2]^S[(p|h<<2&1020)>>2]^S[(e|w|12)>>2];c=y,u=b,h=m,f=g}i=S[(t|c>>22&1020)>>2]<<24^S[(t|u>>14&1020)>>2]<<16^S[(t|h>>6&1020)>>2]<<8^S[(t|f<<2&1020)>>2]^S[(e|w|0)>>2],n=S[(t|u>>22&1020)>>2]<<24^S[(t|h>>14&1020)>>2]<<16^S[(t|f>>6&1020)>>2]<<8^S[(t|c<<2&1020)>>2]^S[(e|w|4)>>2],a=S[(t|h>>22&1020)>>2]<<24^S[(t|f>>14&1020)>>2]<<16^S[(t|c>>6&1020)>>2]<<8^S[(t|u<<2&1020)>>2]^S[(e|w|8)>>2],s=S[(t|f>>22&1020)>>2]<<24^S[(t|c>>14&1020)>>2]<<16^S[(t|u>>6&1020)>>2]<<8^S[(t|h<<2&1020)>>2]^S[(e|w|12)>>2]}function x(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;P(0x0000,0x0800,0x1000,A,e,t,r,i)}function M(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var a=0;P(0x0400,0x0c00,0x2000,A,e,i,r,t);a=n,n=s,s=a}function C(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;P(0x0000,0x0800,0x1000,A,o^e,c^t,u^r,h^f);o=i,c=n,u=a,h=s}function K(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;var d=0;P(0x0400,0x0c00,0x2000,A,e,f,r,t);d=n,n=s,s=d;i=i^o,n=n^c,a=a^u,s=s^h;o=e,c=t,u=r,h=f}function D(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;P(0x0000,0x0800,0x1000,A,o,c,u,h);o=i=i^e,c=n=n^t,u=a=a^r,h=s=s^f}function R(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;P(0x0000,0x0800,0x1000,A,o,c,u,h);i=i^e,n=n^t,a=a^r,s=s^f;o=e,c=t,u=r,h=f}function U(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;P(0x0000,0x0800,0x1000,A,o,c,u,h);o=i,c=n,u=a,h=s;i=i^e,n=n^t,a=a^r,s=s^f}function I(e,t,r,o){e=e|0;t=t|0;r=r|0;o=o|0;P(0x0000,0x0800,0x1000,A,f,d,l,p);p=~g&p|g&p+1;l=~m&l|m&l+((p|0)==0);d=~b&d|b&d+((l|0)==0);f=~y&f|y&f+((d|0)==0);i=i^e;n=n^t;a=a^r;s=s^o}function B(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,a=0,s=0,f=0,d=0,l=0,p=0,y=0,b=0,m=0;e=e^o,t=t^c,r=r^u,i=i^h;n=w|0,a=v|0,s=_|0,f=k|0;for(;(b|0)<128;b=b+1|0){if(n>>>31){d=d^e,l=l^t,p=p^r,y=y^i}n=n<<1|a>>>31,a=a<<1|s>>>31,s=s<<1|f>>>31,f=f<<1;m=i&1;i=i>>>1|r<<31,r=r>>>1|t<<31,t=t>>>1|e<<31,e=e>>>1;if(m)e=e^0xe1000000}o=d,c=l,u=p,h=y}function T(e){e=e|0;A=e}function z(e,t,r,o){e=e|0;t=t|0;r=r|0;o=o|0;i=e,n=t,a=r,s=o}function q(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;o=e,c=t,u=r,h=i}function O(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;f=e,d=t,l=r,p=i}function F(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;y=e,b=t,m=r,g=i}function N(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;p=~g&p|g&i,l=~m&l|m&r,d=~b&d|b&t,f=~y&f|y&e}function j(e){e=e|0;if(e&15)return-1;E[e|0]=i>>>24,E[e|1]=i>>>16&255,E[e|2]=i>>>8&255,E[e|3]=i&255,E[e|4]=n>>>24,E[e|5]=n>>>16&255,E[e|6]=n>>>8&255,E[e|7]=n&255,E[e|8]=a>>>24,E[e|9]=a>>>16&255,E[e|10]=a>>>8&255,E[e|11]=a&255,E[e|12]=s>>>24,E[e|13]=s>>>16&255,E[e|14]=s>>>8&255,E[e|15]=s&255;return 16}function L(e){e=e|0;if(e&15)return-1;E[e|0]=o>>>24,E[e|1]=o>>>16&255,E[e|2]=o>>>8&255,E[e|3]=o&255,E[e|4]=c>>>24,E[e|5]=c>>>16&255,E[e|6]=c>>>8&255,E[e|7]=c&255,E[e|8]=u>>>24,E[e|9]=u>>>16&255,E[e|10]=u>>>8&255,E[e|11]=u&255,E[e|12]=h>>>24,E[e|13]=h>>>16&255,E[e|14]=h>>>8&255,E[e|15]=h&255;return 16}function W(){x(0,0,0,0);w=i,v=n,_=a,k=s}function H(e,t,r){e=e|0;t=t|0;r=r|0;var o=0;if(t&15)return-1;while((r|0)>=16){V[e&7](E[t|0]<<24|E[t|1]<<16|E[t|2]<<8|E[t|3],E[t|4]<<24|E[t|5]<<16|E[t|6]<<8|E[t|7],E[t|8]<<24|E[t|9]<<16|E[t|10]<<8|E[t|11],E[t|12]<<24|E[t|13]<<16|E[t|14]<<8|E[t|15]);E[t|0]=i>>>24,E[t|1]=i>>>16&255,E[t|2]=i>>>8&255,E[t|3]=i&255,E[t|4]=n>>>24,E[t|5]=n>>>16&255,E[t|6]=n>>>8&255,E[t|7]=n&255,E[t|8]=a>>>24,E[t|9]=a>>>16&255,E[t|10]=a>>>8&255,E[t|11]=a&255,E[t|12]=s>>>24,E[t|13]=s>>>16&255,E[t|14]=s>>>8&255,E[t|15]=s&255;o=o+16|0,t=t+16|0,r=r-16|0}return o|0}function G(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if(t&15)return-1;while((r|0)>=16){$[e&1](E[t|0]<<24|E[t|1]<<16|E[t|2]<<8|E[t|3],E[t|4]<<24|E[t|5]<<16|E[t|6]<<8|E[t|7],E[t|8]<<24|E[t|9]<<16|E[t|10]<<8|E[t|11],E[t|12]<<24|E[t|13]<<16|E[t|14]<<8|E[t|15]);i=i+16|0,t=t+16|0,r=r-16|0}return i|0}var V=[x,M,C,K,D,R,U,I];var $=[C,B];return{set_rounds:T,set_state:z,set_iv:q,set_nonce:O,set_mask:F,set_counter:N,get_state:j,get_iv:L,gcm_init:W,cipher:H,mac:G}}({Uint8Array,Uint32Array},e,t);return h.set_key=function(e,t,i,a,s,c,u,f,d){var l=r.subarray(0,60),p=r.subarray(256,316);l.set([t,i,a,s,c,u,f,d]);for(var y=e,b=1;y<4*e+28;y++){var m=l[y-1];(y%e==0||8===e&&y%e==4)&&(m=n[m>>>24]<<24^n[m>>>16&255]<<16^n[m>>>8&255]<<8^n[255&m]),y%e==0&&(m=m<<8^m>>>24^b<<24,b=b<<1^(128&b?27:0)),l[y]=l[y-e]^m}for(var g=0;g<y;g+=4)for(var w=0;w<4;w++){m=l[y-(4+g)+(4-w)%4];p[g+w]=g<4||g>=y-4?m:o[0][n[m>>>24]]^o[1][n[m>>>16&255]]^o[2][n[m>>>8&255]]^o[3][n[255&m]]}h.set_rounds(e+5)},h};return h.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},h.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},h.MAC={CBC:0,GCM:1},h.HEAP_DATA=16384,h}();function Ke(e){return e instanceof Uint8Array}function De(e,t){const r=e?e.byteLength:t||65536;if(4095&r||r<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return e=e||new Uint8Array(new ArrayBuffer(r))}function Re(e,t,r,i,n){const a=e.length-t,s=a<n?a:n;return e.set(r.subarray(i,i+s),t),s}function Ue(...e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let i=0;for(let t=0;t<e.length;t++)r.set(e[t],i),i+=e[t].length;return r}class Ie extends Error{constructor(...e){super(...e)}}class Be extends Error{constructor(...e){super(...e)}}class Te extends Error{constructor(...e){super(...e)}}const ze=[],qe=[];class Oe{constructor(e,t,r=!0,i,n,a){this.pos=0,this.len=0,this.mode=i,this.pos=0,this.len=0,this.key=e,this.iv=t,this.padding=r,this.acquire_asm(n,a)}acquire_asm(e,t){return void 0!==this.heap&&void 0!==this.asm||(this.heap=e||ze.pop()||De().subarray(Ce.HEAP_DATA),this.asm=t||qe.pop()||new Ce(null,this.heap.buffer),this.reset(this.key,this.iv)),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(ze.push(this.heap),qe.push(this.asm)),this.heap=void 0,this.asm=void 0}reset(e,t){const{asm:r}=this.acquire_asm(),i=e.length;if(16!==i&&24!==i&&32!==i)throw new Be("illegal key size");const n=new DataView(e.buffer,e.byteOffset,e.byteLength);if(r.set_key(i>>2,n.getUint32(0),n.getUint32(4),n.getUint32(8),n.getUint32(12),i>16?n.getUint32(16):0,i>16?n.getUint32(20):0,i>24?n.getUint32(24):0,i>24?n.getUint32(28):0),void 0!==t){if(16!==t.length)throw new Be("illegal iv size");let e=new DataView(t.buffer,t.byteOffset,t.byteLength);r.set_iv(e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12))}else r.set_iv(0,0,0,0)}AES_Encrypt_process(e){if(!Ke(e))throw new TypeError("data isn't of expected type");let{heap:t,asm:r}=this.acquire_asm(),i=Ce.ENC[this.mode],n=Ce.HEAP_DATA,a=this.pos,s=this.len,o=0,c=e.length||0,u=0,h=0,f=new Uint8Array(s+c&-16);for(;c>0;)h=Re(t,a+s,e,o,c),s+=h,o+=h,c-=h,h=r.cipher(i,n+a,s),h&&f.set(t.subarray(a,a+h),u),u+=h,h<s?(a+=h,s-=h):(a=0,s=0);return this.pos=a,this.len=s,f}AES_Encrypt_finish(){let{heap:e,asm:t}=this.acquire_asm(),r=Ce.ENC[this.mode],i=Ce.HEAP_DATA,n=this.pos,a=this.len,s=16-a%16,o=a;if(this.hasOwnProperty("padding")){if(this.padding){for(let t=0;t<s;++t)e[n+a+t]=s;a+=s,o=a}else if(a%16)throw new Be("data length must be a multiple of the block size")}else a+=s;const c=new Uint8Array(o);return a&&t.cipher(r,i+n,a),o&&c.set(e.subarray(n,n+o)),this.pos=0,this.len=0,this.release_asm(),c}AES_Decrypt_process(e){if(!Ke(e))throw new TypeError("data isn't of expected type");let{heap:t,asm:r}=this.acquire_asm(),i=Ce.DEC[this.mode],n=Ce.HEAP_DATA,a=this.pos,s=this.len,o=0,c=e.length||0,u=0,h=s+c&-16,f=0,d=0;this.padding&&(f=s+c-h||16,h-=f);const l=new Uint8Array(h);for(;c>0;)d=Re(t,a+s,e,o,c),s+=d,o+=d,c-=d,d=r.cipher(i,n+a,s-(c?0:f)),d&&l.set(t.subarray(a,a+d),u),u+=d,d<s?(a+=d,s-=d):(a=0,s=0);return this.pos=a,this.len=s,l}AES_Decrypt_finish(){let{heap:e,asm:t}=this.acquire_asm(),r=Ce.DEC[this.mode],i=Ce.HEAP_DATA,n=this.pos,a=this.len,s=a;if(a>0){if(a%16){if(this.hasOwnProperty("padding"))throw new Be("data length must be a multiple of the block size");a+=16-a%16}if(t.cipher(r,i+n,a),this.hasOwnProperty("padding")&&this.padding){let t=e[n+s-1];if(t<1||t>16||t>s)throw new Te("bad padding");let r=0;for(let i=t;i>1;i--)r|=t^e[n+s-i];if(r)throw new Te("bad padding");s-=t}}const o=new Uint8Array(s);return s>0&&o.set(e.subarray(n,n+s)),this.pos=0,this.len=0,this.release_asm(),o}}class Fe{static encrypt(e,t,r=!1){return new Fe(t,r).encrypt(e)}static decrypt(e,t,r=!1){return new Fe(t,r).decrypt(e)}constructor(e,t=!1,r){this.aes=r||new Oe(e,void 0,t,"ECB")}encrypt(e){return Ue(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return Ue(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}function Ne(e){const t=function(e){const t=new Fe(e);this.encrypt=function(e){return t.encrypt(e)},this.decrypt=function(e){return t.decrypt(e)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function je(e,t,r,i,n,a){const s=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],o=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],c=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],f=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],d=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],l=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];let p,y,b,m,g,w,v,_,k,A,S,E,P,x,M=0,C=t.length;const K=32===e.length?3:9;_=3===K?r?[0,32,2]:[30,-2,-2]:r?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],r&&(C=(t=function(e,t){const r=8-e.length%8;let i;if(2===t&&r<8)i=32;else if(1===t)i=r;else{if(t||!(r<8)){if(8===r)return e;throw Error("des: invalid padding")}i=0}const n=new Uint8Array(e.length+r);for(let t=0;t<e.length;t++)n[t]=e[t];for(let t=0;t<r;t++)n[e.length+t]=i;return n}(t,a)).length);let D=new Uint8Array(C),R=0;for(1===i&&(k=n[M++]<<24|n[M++]<<16|n[M++]<<8|n[M++],S=n[M++]<<24|n[M++]<<16|n[M++]<<8|n[M++],M=0);M<C;){for(w=t[M++]<<24|t[M++]<<16|t[M++]<<8|t[M++],v=t[M++]<<24|t[M++]<<16|t[M++]<<8|t[M++],1===i&&(r?(w^=k,v^=S):(A=k,E=S,k=w,S=v)),b=252645135&(w>>>4^v),v^=b,w^=b<<4,b=65535&(w>>>16^v),v^=b,w^=b<<16,b=858993459&(v>>>2^w),w^=b,v^=b<<2,b=16711935&(v>>>8^w),w^=b,v^=b<<8,b=1431655765&(w>>>1^v),v^=b,w^=b<<1,w=w<<1|w>>>31,v=v<<1|v>>>31,y=0;y<K;y+=3){for(P=_[y+1],x=_[y+2],p=_[y];p!==P;p+=x)m=v^e[p],g=(v>>>4|v<<28)^e[p+1],b=w,w=v,v=b^(o[m>>>24&63]|u[m>>>16&63]|f[m>>>8&63]|l[63&m]|s[g>>>24&63]|c[g>>>16&63]|h[g>>>8&63]|d[63&g]);b=w,w=v,v=b}w=w>>>1|w<<31,v=v>>>1|v<<31,b=1431655765&(w>>>1^v),v^=b,w^=b<<1,b=16711935&(v>>>8^w),w^=b,v^=b<<8,b=858993459&(v>>>2^w),w^=b,v^=b<<2,b=65535&(w>>>16^v),v^=b,w^=b<<16,b=252645135&(w>>>4^v),v^=b,w^=b<<4,1===i&&(r?(k=w,S=v):(w^=A,v^=E)),D[R++]=w>>>24,D[R++]=w>>>16&255,D[R++]=w>>>8&255,D[R++]=255&w,D[R++]=v>>>24,D[R++]=v>>>16&255,D[R++]=v>>>8&255,D[R++]=255&v}return r||(D=function(e,t){let r,i=null;if(2===t)r=32;else if(1===t)i=e[e.length-1];else{if(t)throw Error("des: invalid padding");r=0}if(!i){for(i=1;e[e.length-i]===r;)i++;i--}return e.subarray(0,e.length-i)}(D,a)),D}function Le(e){const t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],n=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],o=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],f=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],l=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],p=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length>8?3:1,b=Array(32*y),m=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let g,w,v,_=0,k=0;for(let A=0;A<y;A++){let y=e[_++]<<24|e[_++]<<16|e[_++]<<8|e[_++],A=e[_++]<<24|e[_++]<<16|e[_++]<<8|e[_++];v=252645135&(y>>>4^A),A^=v,y^=v<<4,v=65535&(A>>>-16^y),y^=v,A^=v<<-16,v=858993459&(y>>>2^A),A^=v,y^=v<<2,v=65535&(A>>>-16^y),y^=v,A^=v<<-16,v=1431655765&(y>>>1^A),A^=v,y^=v<<1,v=16711935&(A>>>8^y),y^=v,A^=v<<8,v=1431655765&(y>>>1^A),A^=v,y^=v<<1,v=y<<8|A>>>20&240,y=A<<24|A<<8&16711680|A>>>8&65280|A>>>24&240,A=v;for(let e=0;e<16;e++)m[e]?(y=y<<2|y>>>26,A=A<<2|A>>>26):(y=y<<1|y>>>27,A=A<<1|A>>>27),y&=-15,A&=-15,g=t[y>>>28]|r[y>>>24&15]|i[y>>>20&15]|n[y>>>16&15]|a[y>>>12&15]|s[y>>>8&15]|o[y>>>4&15],w=c[A>>>28]|u[A>>>24&15]|h[A>>>20&15]|f[A>>>16&15]|d[A>>>12&15]|l[A>>>8&15]|p[A>>>4&15],v=65535&(w>>>16^g),b[k++]=g^v,b[k++]=w^v<<16}return b}function We(e){this.key=[];for(let t=0;t<3;t++)this.key.push(new Uint8Array(e.subarray(8*t,8*t+8)));this.encrypt=function(e){return je(Le(this.key[2]),je(Le(this.key[1]),je(Le(this.key[0]),e,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function He(){this.BlockSize=8,this.KeySize=16,this.setKey=function(e){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),e.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(e),!0},this.reset=function(){for(let e=0;e<16;e++)this.masking[e]=0,this.rotate[e]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(e){const t=Array(e.length);for(let a=0;a<e.length;a+=8){let s,o=e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3],c=e[a+4]<<24|e[a+5]<<16|e[a+6]<<8|e[a+7];s=c,c=o^r(c,this.masking[0],this.rotate[0]),o=s,s=c,c=o^i(c,this.masking[1],this.rotate[1]),o=s,s=c,c=o^n(c,this.masking[2],this.rotate[2]),o=s,s=c,c=o^r(c,this.masking[3],this.rotate[3]),o=s,s=c,c=o^i(c,this.masking[4],this.rotate[4]),o=s,s=c,c=o^n(c,this.masking[5],this.rotate[5]),o=s,s=c,c=o^r(c,this.masking[6],this.rotate[6]),o=s,s=c,c=o^i(c,this.masking[7],this.rotate[7]),o=s,s=c,c=o^n(c,this.masking[8],this.rotate[8]),o=s,s=c,c=o^r(c,this.masking[9],this.rotate[9]),o=s,s=c,c=o^i(c,this.masking[10],this.rotate[10]),o=s,s=c,c=o^n(c,this.masking[11],this.rotate[11]),o=s,s=c,c=o^r(c,this.masking[12],this.rotate[12]),o=s,s=c,c=o^i(c,this.masking[13],this.rotate[13]),o=s,s=c,c=o^n(c,this.masking[14],this.rotate[14]),o=s,s=c,c=o^r(c,this.masking[15],this.rotate[15]),o=s,t[a]=c>>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=o>>>24&255,t[a+5]=o>>>16&255,t[a+6]=o>>>8&255,t[a+7]=255&o}return t},this.decrypt=function(e){const t=Array(e.length);for(let a=0;a<e.length;a+=8){let s,o=e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3],c=e[a+4]<<24|e[a+5]<<16|e[a+6]<<8|e[a+7];s=c,c=o^r(c,this.masking[15],this.rotate[15]),o=s,s=c,c=o^n(c,this.masking[14],this.rotate[14]),o=s,s=c,c=o^i(c,this.masking[13],this.rotate[13]),o=s,s=c,c=o^r(c,this.masking[12],this.rotate[12]),o=s,s=c,c=o^n(c,this.masking[11],this.rotate[11]),o=s,s=c,c=o^i(c,this.masking[10],this.rotate[10]),o=s,s=c,c=o^r(c,this.masking[9],this.rotate[9]),o=s,s=c,c=o^n(c,this.masking[8],this.rotate[8]),o=s,s=c,c=o^i(c,this.masking[7],this.rotate[7]),o=s,s=c,c=o^r(c,this.masking[6],this.rotate[6]),o=s,s=c,c=o^n(c,this.masking[5],this.rotate[5]),o=s,s=c,c=o^i(c,this.masking[4],this.rotate[4]),o=s,s=c,c=o^r(c,this.masking[3],this.rotate[3]),o=s,s=c,c=o^n(c,this.masking[2],this.rotate[2]),o=s,s=c,c=o^i(c,this.masking[1],this.rotate[1]),o=s,s=c,c=o^r(c,this.masking[0],this.rotate[0]),o=s,t[a]=c>>>24&255,t[a+1]=c>>>16&255,t[a+2]=c>>>8&255,t[a+3]=255&c,t[a+4]=o>>>24&255,t[a+5]=o>>16&255,t[a+6]=o>>8&255,t[a+7]=255&o}return t};const e=[,,,,];e[0]=[,,,,],e[0][0]=[4,0,13,15,12,14,8],e[0][1]=[5,2,16,18,17,19,10],e[0][2]=[6,3,23,22,21,20,9],e[0][3]=[7,1,26,25,27,24,11],e[1]=[,,,,],e[1][0]=[0,6,21,23,20,22,16],e[1][1]=[1,4,0,2,1,3,18],e[1][2]=[2,5,7,6,5,4,17],e[1][3]=[3,7,10,9,11,8,19],e[2]=[,,,,],e[2][0]=[4,0,13,15,12,14,8],e[2][1]=[5,2,16,18,17,19,10],e[2][2]=[6,3,23,22,21,20,9],e[2][3]=[7,1,26,25,27,24,11],e[3]=[,,,,],e[3][0]=[0,6,21,23,20,22,16],e[3][1]=[1,4,0,2,1,3,18],e[3][2]=[2,5,7,6,5,4,17],e[3][3]=[3,7,10,9,11,8,19];const t=[,,,,];function r(e,t,r){const i=t+e,n=i<<r|i>>>32-r;return(a[0][n>>>24]^a[1][n>>>16&255])-a[2][n>>>8&255]+a[3][255&n]}function i(e,t,r){const i=t^e,n=i<<r|i>>>32-r;return a[0][n>>>24]-a[1][n>>>16&255]+a[2][n>>>8&255]^a[3][255&n]}function n(e,t,r){const i=t-e,n=i<<r|i>>>32-r;return(a[0][n>>>24]+a[1][n>>>16&255]^a[2][n>>>8&255])-a[3][255&n]}t[0]=[,,,,],t[0][0]=[24,25,23,22,18],t[0][1]=[26,27,21,20,22],t[0][2]=[28,29,19,18,25],t[0][3]=[30,31,17,16,28],t[1]=[,,,,],t[1][0]=[3,2,12,13,8],t[1][1]=[1,0,14,15,13],t[1][2]=[7,6,8,9,3],t[1][3]=[5,4,10,11,7],t[2]=[,,,,],t[2][0]=[19,18,28,29,25],t[2][1]=[17,16,30,31,28],t[2][2]=[23,22,24,25,18],t[2][3]=[21,20,26,27,22],t[3]=[,,,,],t[3][0]=[8,9,7,6,3],t[3][1]=[10,11,5,4,7],t[3][2]=[12,13,3,2,8],t[3][3]=[14,15,1,0,13],this.keySchedule=function(r){const i=[,,,,,,,,],n=Array(32);let s;for(let e=0;e<4;e++)s=4*e,i[e]=r[s]<<24|r[s+1]<<16|r[s+2]<<8|r[s+3];const o=[6,7,4,5];let c,u=0;for(let r=0;r<2;r++)for(let r=0;r<4;r++){for(s=0;s<4;s++){const t=e[r][s];c=i[t[1]],c^=a[4][i[t[2]>>>2]>>>24-8*(3&t[2])&255],c^=a[5][i[t[3]>>>2]>>>24-8*(3&t[3])&255],c^=a[6][i[t[4]>>>2]>>>24-8*(3&t[4])&255],c^=a[7][i[t[5]>>>2]>>>24-8*(3&t[5])&255],c^=a[o[s]][i[t[6]>>>2]>>>24-8*(3&t[6])&255],i[t[0]]=c}for(s=0;s<4;s++){const e=t[r][s];c=a[4][i[e[0]>>>2]>>>24-8*(3&e[0])&255],c^=a[5][i[e[1]>>>2]>>>24-8*(3&e[1])&255],c^=a[6][i[e[2]>>>2]>>>24-8*(3&e[2])&255],c^=a[7][i[e[3]>>>2]>>>24-8*(3&e[3])&255],c^=a[4+s][i[e[4]>>>2]>>>24-8*(3&e[4])&255],n[u]=c,u++}}for(let e=0;e<16;e++)this.masking[e]=n[e],this.rotate[e]=31&n[16+e]};const a=[,,,,,,,,];a[0]=[821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063],a[1]=[522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321],a[2]=[2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027],a[3]=[2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730],a[4]=[2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860],a[5]=[4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975],a[6]=[2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875],a[7]=[3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]}function Ge(e){this.cast5=new He,this.cast5.setKey(e),this.encrypt=function(e){return this.cast5.encrypt(e)}}We.keySize=We.prototype.keySize=24,We.blockSize=We.prototype.blockSize=8,Ge.blockSize=Ge.prototype.blockSize=8,Ge.keySize=Ge.prototype.keySize=16;const Ve=4294967295;function $e(e,t){return(e<<t|e>>>32-t)&Ve}function Ze(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function Ye(e,t,r){e.splice(t,4,255&r,r>>>8&255,r>>>16&255,r>>>24&255)}function Xe(e,t){return e>>>8*t&255}function Qe(e){this.tf=function(){let e=null,t=null,r=-1,i=[],n=[[],[],[],[]];function a(e){return n[0][Xe(e,0)]^n[1][Xe(e,1)]^n[2][Xe(e,2)]^n[3][Xe(e,3)]}function s(e){return n[0][Xe(e,3)]^n[1][Xe(e,0)]^n[2][Xe(e,1)]^n[3][Xe(e,2)]}function o(e,t){let r=a(t[0]),n=s(t[1]);t[2]=$e(t[2]^r+n+i[4*e+8]&Ve,31),t[3]=$e(t[3],1)^r+2*n+i[4*e+9]&Ve,r=a(t[2]),n=s(t[3]),t[0]=$e(t[0]^r+n+i[4*e+10]&Ve,31),t[1]=$e(t[1],1)^r+2*n+i[4*e+11]&Ve}function c(e,t){let r=a(t[0]),n=s(t[1]);t[2]=$e(t[2],1)^r+n+i[4*e+10]&Ve,t[3]=$e(t[3]^r+2*n+i[4*e+11]&Ve,31),r=a(t[2]),n=s(t[3]),t[0]=$e(t[0],1)^r+n+i[4*e+8]&Ve,t[1]=$e(t[1]^r+2*n+i[4*e+9]&Ve,31)}return{name:"twofish",blocksize:16,open:function(t){let r,a,s,o,c;e=t;const u=[],h=[],f=[];let d;const l=[];let p,y,b;const m=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],g=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],w=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],v=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],_=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],k=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],A=[[],[]],S=[[],[],[],[]];function E(e){return e^e>>2^[0,90,180,238][3&e]}function P(e){return e^e>>1^e>>2^[0,238,180,90][3&e]}function x(e,t){let r,i,n;for(r=0;r<8;r++)i=t>>>24,t=t<<8&Ve|e>>>24,e=e<<8&Ve,n=i<<1,128&i&&(n^=333),t^=i^n<<16,n^=i>>>1,1&i&&(n^=166),t^=n<<24|n<<8;return t}function M(e,t){const r=t>>4,i=15&t,n=m[e][r^i],a=g[e][_[i]^k[r]];return v[e][_[a]^k[n]]<<4|w[e][n^a]}function C(e,t){let r=Xe(e,0),i=Xe(e,1),n=Xe(e,2),a=Xe(e,3);switch(d){case 4:r=A[1][r]^Xe(t[3],0),i=A[0][i]^Xe(t[3],1),n=A[0][n]^Xe(t[3],2),a=A[1][a]^Xe(t[3],3);case 3:r=A[1][r]^Xe(t[2],0),i=A[1][i]^Xe(t[2],1),n=A[0][n]^Xe(t[2],2),a=A[0][a]^Xe(t[2],3);case 2:r=A[0][A[0][r]^Xe(t[1],0)]^Xe(t[0],0),i=A[0][A[1][i]^Xe(t[1],1)]^Xe(t[0],1),n=A[1][A[0][n]^Xe(t[1],2)]^Xe(t[0],2),a=A[1][A[1][a]^Xe(t[1],3)]^Xe(t[0],3)}return S[0][r]^S[1][i]^S[2][n]^S[3][a]}for(e=e.slice(0,32),r=e.length;16!==r&&24!==r&&32!==r;)e[r++]=0;for(r=0;r<e.length;r+=4)f[r>>2]=Ze(e,r);for(r=0;r<256;r++)A[0][r]=M(0,r),A[1][r]=M(1,r);for(r=0;r<256;r++)p=A[1][r],y=E(p),b=P(p),S[0][r]=p+(y<<8)+(b<<16)+(b<<24),S[2][r]=y+(b<<8)+(p<<16)+(b<<24),p=A[0][r],y=E(p),b=P(p),S[1][r]=b+(b<<8)+(y<<16)+(p<<24),S[3][r]=y+(p<<8)+(b<<16)+(y<<24);for(d=f.length/2,r=0;r<d;r++)a=f[r+r],u[r]=a,s=f[r+r+1],h[r]=s,l[d-r-1]=x(a,s);for(r=0;r<40;r+=2)a=16843009*r,s=a+16843009,a=C(a,u),s=$e(C(s,h),8),i[r]=a+s&Ve,i[r+1]=$e(a+2*s,9);for(r=0;r<256;r++)switch(a=s=o=c=r,d){case 4:a=A[1][a]^Xe(l[3],0),s=A[0][s]^Xe(l[3],1),o=A[0][o]^Xe(l[3],2),c=A[1][c]^Xe(l[3],3);case 3:a=A[1][a]^Xe(l[2],0),s=A[1][s]^Xe(l[2],1),o=A[0][o]^Xe(l[2],2),c=A[0][c]^Xe(l[2],3);case 2:n[0][r]=S[0][A[0][A[0][a]^Xe(l[1],0)]^Xe(l[0],0)],n[1][r]=S[1][A[0][A[1][s]^Xe(l[1],1)]^Xe(l[0],1)],n[2][r]=S[2][A[1][A[0][o]^Xe(l[1],2)]^Xe(l[0],2)],n[3][r]=S[3][A[1][A[1][c]^Xe(l[1],3)]^Xe(l[0],3)]}},close:function(){i=[],n=[[],[],[],[]]},encrypt:function(e,n){t=e,r=n;const a=[Ze(t,r)^i[0],Ze(t,r+4)^i[1],Ze(t,r+8)^i[2],Ze(t,r+12)^i[3]];for(let e=0;e<8;e++)o(e,a);return Ye(t,r,a[2]^i[4]),Ye(t,r+4,a[3]^i[5]),Ye(t,r+8,a[0]^i[6]),Ye(t,r+12,a[1]^i[7]),r+=16,t},decrypt:function(e,n){t=e,r=n;const a=[Ze(t,r)^i[4],Ze(t,r+4)^i[5],Ze(t,r+8)^i[6],Ze(t,r+12)^i[7]];for(let e=7;e>=0;e--)c(e,a);Ye(t,r,a[2]^i[0]),Ye(t,r+4,a[3]^i[1]),Ye(t,r+8,a[0]^i[2]),Ye(t,r+12,a[1]^i[3]),r+=16},finalize:function(){return t}}}(),this.tf.open(Array.from(e),0),this.encrypt=function(e){return this.tf.encrypt(Array.from(e),0)}}function Je(){}function et(e){this.bf=new Je,this.bf.init(e),this.encrypt=function(e){return this.bf.encryptBlock(e)}}Qe.keySize=Qe.prototype.keySize=32,Qe.blockSize=Qe.prototype.blockSize=16,Je.prototype.BLOCKSIZE=8,Je.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Je.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Je.prototype.NN=16,Je.prototype._clean=function(e){if(e<0){e=(2147483647&e)+2147483648}return e},Je.prototype._F=function(e){let t;const r=255&e,i=255&(e>>>=8),n=255&(e>>>=8),a=255&(e>>>=8);return t=this.sboxes[0][a]+this.sboxes[1][n],t^=this.sboxes[2][i],t+=this.sboxes[3][r],t},Je.prototype._encryptBlock=function(e){let t,r=e[0],i=e[1];for(t=0;t<this.NN;++t){r^=this.parray[t],i=this._F(r)^i;const e=r;r=i,i=e}r^=this.parray[this.NN+0],i^=this.parray[this.NN+1],e[0]=this._clean(i),e[1]=this._clean(r)},Je.prototype.encryptBlock=function(e){let t;const r=[0,0],i=this.BLOCKSIZE/2;for(t=0;t<this.BLOCKSIZE/2;++t)r[0]=r[0]<<8|255&e[t+0],r[1]=r[1]<<8|255&e[t+i];this._encryptBlock(r);const n=[];for(t=0;t<this.BLOCKSIZE/2;++t)n[t+0]=r[0]>>>24-8*t&255,n[t+i]=r[1]>>>24-8*t&255;return n},Je.prototype._decryptBlock=function(e){let t,r=e[0],i=e[1];for(t=this.NN+1;t>1;--t){r^=this.parray[t],i=this._F(r)^i;const e=r;r=i,i=e}r^=this.parray[1],i^=this.parray[0],e[0]=this._clean(i),e[1]=this._clean(r)},Je.prototype.init=function(e){let t,r=0;for(this.parray=[],t=0;t<this.NN+2;++t){let i=0;for(let t=0;t<4;++t)i=i<<8|255&e[r],++r>=e.length&&(r=0);this.parray[t]=this.PARRAY[t]^i}for(this.sboxes=[],t=0;t<4;++t)for(this.sboxes[t]=[],r=0;r<256;++r)this.sboxes[t][r]=this.SBOXES[t][r];const i=[0,0];for(t=0;t<this.NN+2;t+=2)this._encryptBlock(i),this.parray[t+0]=i[0],this.parray[t+1]=i[1];for(t=0;t<4;++t)for(r=0;r<256;r+=2)this._encryptBlock(i),this.sboxes[t][r+0]=i[0],this.sboxes[t][r+1]=i[1]},et.keySize=et.prototype.keySize=16,et.blockSize=et.prototype.blockSize=8;const tt=Ne(128),rt=Ne(192),it=Ne(256);var nt=/*#__PURE__*/Object.freeze({__proto__:null,aes128:tt,aes192:rt,aes256:it,des:function(e){this.key=e,this.encrypt=function(e,t){return je(Le(this.key),e,!0,0,null,t)},this.decrypt=function(e,t){return je(Le(this.key),e,!1,0,null,t)}},tripledes:We,cast5:Ge,twofish:Qe,blowfish:et,idea:function(){throw Error("IDEA symmetric-key algorithm not implemented")}}),at=function(e,t,r){"use asm";var i=0,n=0,a=0,s=0,o=0,c=0,u=0;var h=0,f=0,d=0,l=0,p=0,y=0,b=0,m=0,g=0,w=0;var v=new e.Uint8Array(r);function _(e,t,r,c,u,h,f,d,l,p,y,b,m,g,w,v){e=e|0;t=t|0;r=r|0;c=c|0;u=u|0;h=h|0;f=f|0;d=d|0;l=l|0;p=p|0;y=y|0;b=b|0;m=m|0;g=g|0;w=w|0;v=v|0;var _=0,k=0,A=0,S=0,E=0,P=0,x=0,M=0,C=0,K=0,D=0,R=0,U=0,I=0,B=0,T=0,z=0,q=0,O=0,F=0,N=0,j=0,L=0,W=0,H=0,G=0,V=0,$=0,Z=0,Y=0,X=0,Q=0,J=0,ee=0,te=0,re=0,ie=0,ne=0,ae=0,se=0,oe=0,ce=0,ue=0,he=0,fe=0,de=0,le=0,pe=0,ye=0,be=0,me=0,ge=0,we=0,ve=0,_e=0,ke=0,Ae=0,Se=0,Ee=0,Pe=0,xe=0,Me=0,Ce=0,Ke=0,De=0,Re=0,Ue=0,Ie=0,Be=0,Te=0,ze=0;_=i;k=n;A=a;S=s;E=o;x=e+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=t+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=r+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=c+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=u+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=h+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=f+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=d+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=l+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=p+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=y+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=b+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=m+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=g+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=w+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;x=v+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=g^l^r^e;M=P<<1|P>>>31;x=M+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=w^p^c^t;C=P<<1|P>>>31;x=C+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=v^y^u^r;K=P<<1|P>>>31;x=K+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=M^b^h^c;D=P<<1|P>>>31;x=D+(_<<5|_>>>27)+E+(k&A|~k&S)+0x5a827999|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=C^m^f^u;R=P<<1|P>>>31;x=R+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=K^g^d^h;U=P<<1|P>>>31;x=U+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=D^w^l^f;I=P<<1|P>>>31;x=I+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=R^v^p^d;B=P<<1|P>>>31;x=B+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=U^M^y^l;T=P<<1|P>>>31;x=T+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=I^C^b^p;z=P<<1|P>>>31;x=z+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=B^K^m^y;q=P<<1|P>>>31;x=q+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=T^D^g^b;O=P<<1|P>>>31;x=O+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=z^R^w^m;F=P<<1|P>>>31;x=F+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=q^U^v^g;N=P<<1|P>>>31;x=N+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=O^I^M^w;j=P<<1|P>>>31;x=j+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=F^B^C^v;L=P<<1|P>>>31;x=L+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=N^T^K^M;W=P<<1|P>>>31;x=W+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=j^z^D^C;H=P<<1|P>>>31;x=H+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=L^q^R^K;G=P<<1|P>>>31;x=G+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=W^O^U^D;V=P<<1|P>>>31;x=V+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=H^F^I^R;$=P<<1|P>>>31;x=$+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=G^N^B^U;Z=P<<1|P>>>31;x=Z+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=V^j^T^I;Y=P<<1|P>>>31;x=Y+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=$^L^z^B;X=P<<1|P>>>31;x=X+(_<<5|_>>>27)+E+(k^A^S)+0x6ed9eba1|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Z^W^q^T;Q=P<<1|P>>>31;x=Q+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Y^H^O^z;J=P<<1|P>>>31;x=J+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=X^G^F^q;ee=P<<1|P>>>31;x=ee+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Q^V^N^O;te=P<<1|P>>>31;x=te+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=J^$^j^F;re=P<<1|P>>>31;x=re+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ee^Z^L^N;ie=P<<1|P>>>31;x=ie+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=te^Y^W^j;ne=P<<1|P>>>31;x=ne+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=re^X^H^L;ae=P<<1|P>>>31;x=ae+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ie^Q^G^W;se=P<<1|P>>>31;x=se+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ne^J^V^H;oe=P<<1|P>>>31;x=oe+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ae^ee^$^G;ce=P<<1|P>>>31;x=ce+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=se^te^Z^V;ue=P<<1|P>>>31;x=ue+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=oe^re^Y^$;he=P<<1|P>>>31;x=he+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ce^ie^X^Z;fe=P<<1|P>>>31;x=fe+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ue^ne^Q^Y;de=P<<1|P>>>31;x=de+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=he^ae^J^X;le=P<<1|P>>>31;x=le+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=fe^se^ee^Q;pe=P<<1|P>>>31;x=pe+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=de^oe^te^J;ye=P<<1|P>>>31;x=ye+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=le^ce^re^ee;be=P<<1|P>>>31;x=be+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=pe^ue^ie^te;me=P<<1|P>>>31;x=me+(_<<5|_>>>27)+E+(k&A|k&S|A&S)-0x70e44324|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ye^he^ne^re;ge=P<<1|P>>>31;x=ge+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=be^fe^ae^ie;we=P<<1|P>>>31;x=we+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=me^de^se^ne;ve=P<<1|P>>>31;x=ve+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ge^le^oe^ae;_e=P<<1|P>>>31;x=_e+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=we^pe^ce^se;ke=P<<1|P>>>31;x=ke+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ve^ye^ue^oe;Ae=P<<1|P>>>31;x=Ae+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=_e^be^he^ce;Se=P<<1|P>>>31;x=Se+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=ke^me^fe^ue;Ee=P<<1|P>>>31;x=Ee+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Ae^ge^de^he;Pe=P<<1|P>>>31;x=Pe+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Se^we^le^fe;xe=P<<1|P>>>31;x=xe+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Ee^ve^pe^de;Me=P<<1|P>>>31;x=Me+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Pe^_e^ye^le;Ce=P<<1|P>>>31;x=Ce+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=xe^ke^be^pe;Ke=P<<1|P>>>31;x=Ke+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Me^Ae^me^ye;De=P<<1|P>>>31;x=De+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Ce^Se^ge^be;Re=P<<1|P>>>31;x=Re+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Ke^Ee^we^me;Ue=P<<1|P>>>31;x=Ue+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=De^Pe^ve^ge;Ie=P<<1|P>>>31;x=Ie+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Re^xe^_e^we;Be=P<<1|P>>>31;x=Be+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Ue^Me^ke^ve;Te=P<<1|P>>>31;x=Te+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;P=Ie^Ce^Ae^_e;ze=P<<1|P>>>31;x=ze+(_<<5|_>>>27)+E+(k^A^S)-0x359d3e2a|0;E=S;S=A;A=k<<30|k>>>2;k=_;_=x;i=i+_|0;n=n+k|0;a=a+A|0;s=s+S|0;o=o+E|0}function k(e){e=e|0;_(v[e|0]<<24|v[e|1]<<16|v[e|2]<<8|v[e|3],v[e|4]<<24|v[e|5]<<16|v[e|6]<<8|v[e|7],v[e|8]<<24|v[e|9]<<16|v[e|10]<<8|v[e|11],v[e|12]<<24|v[e|13]<<16|v[e|14]<<8|v[e|15],v[e|16]<<24|v[e|17]<<16|v[e|18]<<8|v[e|19],v[e|20]<<24|v[e|21]<<16|v[e|22]<<8|v[e|23],v[e|24]<<24|v[e|25]<<16|v[e|26]<<8|v[e|27],v[e|28]<<24|v[e|29]<<16|v[e|30]<<8|v[e|31],v[e|32]<<24|v[e|33]<<16|v[e|34]<<8|v[e|35],v[e|36]<<24|v[e|37]<<16|v[e|38]<<8|v[e|39],v[e|40]<<24|v[e|41]<<16|v[e|42]<<8|v[e|43],v[e|44]<<24|v[e|45]<<16|v[e|46]<<8|v[e|47],v[e|48]<<24|v[e|49]<<16|v[e|50]<<8|v[e|51],v[e|52]<<24|v[e|53]<<16|v[e|54]<<8|v[e|55],v[e|56]<<24|v[e|57]<<16|v[e|58]<<8|v[e|59],v[e|60]<<24|v[e|61]<<16|v[e|62]<<8|v[e|63])}function A(e){e=e|0;v[e|0]=i>>>24;v[e|1]=i>>>16&255;v[e|2]=i>>>8&255;v[e|3]=i&255;v[e|4]=n>>>24;v[e|5]=n>>>16&255;v[e|6]=n>>>8&255;v[e|7]=n&255;v[e|8]=a>>>24;v[e|9]=a>>>16&255;v[e|10]=a>>>8&255;v[e|11]=a&255;v[e|12]=s>>>24;v[e|13]=s>>>16&255;v[e|14]=s>>>8&255;v[e|15]=s&255;v[e|16]=o>>>24;v[e|17]=o>>>16&255;v[e|18]=o>>>8&255;v[e|19]=o&255}function S(){i=0x67452301;n=0xefcdab89;a=0x98badcfe;s=0x10325476;o=0xc3d2e1f0;c=u=0}function E(e,t,r,h,f,d,l){e=e|0;t=t|0;r=r|0;h=h|0;f=f|0;d=d|0;l=l|0;i=e;n=t;a=r;s=h;o=f;c=d;u=l}function P(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){k(e);e=e+64|0;t=t-64|0;r=r+64|0}c=c+r|0;if(c>>>0<r>>>0)u=u+1|0;return r|0}function x(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){i=P(e,t)|0;if((i|0)==-1)return-1;e=e+i|0;t=t-i|0}i=i+t|0;c=c+t|0;if(c>>>0<t>>>0)u=u+1|0;v[e|t]=0x80;if((t|0)>=56){for(n=t+1|0;(n|0)<64;n=n+1|0)v[e|n]=0x00;k(e);t=0;v[e|0]=0}for(n=t+1|0;(n|0)<59;n=n+1|0)v[e|n]=0;v[e|56]=u>>>21&255;v[e|57]=u>>>13&255;v[e|58]=u>>>5&255;v[e|59]=u<<3&255|c>>>29;v[e|60]=c>>>21&255;v[e|61]=c>>>13&255;v[e|62]=c>>>5&255;v[e|63]=c<<3&255;k(e);if(~r)A(r);return i|0}function M(){i=h;n=f;a=d;s=l;o=p;c=64;u=0}function C(){i=y;n=b;a=m;s=g;o=w;c=64;u=0}function K(e,t,r,v,k,A,E,P,x,M,C,K,D,R,U,I){e=e|0;t=t|0;r=r|0;v=v|0;k=k|0;A=A|0;E=E|0;P=P|0;x=x|0;M=M|0;C=C|0;K=K|0;D=D|0;R=R|0;U=U|0;I=I|0;S();_(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,v^0x5c5c5c5c,k^0x5c5c5c5c,A^0x5c5c5c5c,E^0x5c5c5c5c,P^0x5c5c5c5c,x^0x5c5c5c5c,M^0x5c5c5c5c,C^0x5c5c5c5c,K^0x5c5c5c5c,D^0x5c5c5c5c,R^0x5c5c5c5c,U^0x5c5c5c5c,I^0x5c5c5c5c);y=i;b=n;m=a;g=s;w=o;S();_(e^0x36363636,t^0x36363636,r^0x36363636,v^0x36363636,k^0x36363636,A^0x36363636,E^0x36363636,P^0x36363636,x^0x36363636,M^0x36363636,C^0x36363636,K^0x36363636,D^0x36363636,R^0x36363636,U^0x36363636,I^0x36363636);h=i;f=n;d=a;l=s;p=o;c=64;u=0}function D(e,t,r){e=e|0;t=t|0;r=r|0;var c=0,u=0,h=0,f=0,d=0,l=0;if(e&63)return-1;if(~r)if(r&31)return-1;l=x(e,t,-1)|0;c=i,u=n,h=a,f=s,d=o;C();_(c,u,h,f,d,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~r)A(r);return l|0}function R(e,t,r,c,u){e=e|0;t=t|0;r=r|0;c=c|0;u=u|0;var h=0,f=0,d=0,l=0,p=0,y=0,b=0,m=0,g=0,w=0;if(e&63)return-1;if(~u)if(u&31)return-1;v[e+t|0]=r>>>24;v[e+t+1|0]=r>>>16&255;v[e+t+2|0]=r>>>8&255;v[e+t+3|0]=r&255;D(e,t+4|0,-1)|0;h=y=i,f=b=n,d=m=a,l=g=s,p=w=o;c=c-1|0;while((c|0)>0){M();_(y,b,m,g,w,0x80000000,0,0,0,0,0,0,0,0,0,672);y=i,b=n,m=a,g=s,w=o;C();_(y,b,m,g,w,0x80000000,0,0,0,0,0,0,0,0,0,672);y=i,b=n,m=a,g=s,w=o;h=h^i;f=f^n;d=d^a;l=l^s;p=p^o;c=c-1|0}i=h;n=f;a=d;s=l;o=p;if(~u)A(u);return 0}return{reset:S,init:E,process:P,finish:x,hmac_reset:M,hmac_init:K,hmac_finish:D,pbkdf2_generate_block:R}};class st{constructor(){this.pos=0,this.len=0}reset(){const{asm:e}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,e.reset(),this}process(e){if(null!==this.result)throw new Ie("state must be reset before processing new data");const{asm:t,heap:r}=this.acquire_asm();let i=this.pos,n=this.len,a=0,s=e.length,o=0;for(;s>0;)o=Re(r,i+n,e,a,s),n+=o,a+=o,s-=o,o=t.process(i,n),i+=o,n-=o,n||(i=0);return this.pos=i,this.len=n,this}finish(){if(null!==this.result)throw new Ie("state must be reset before processing new data");const{asm:e,heap:t}=this.acquire_asm();return e.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(t.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const ot=[],ct=[];class ut extends st{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=ot.pop()||De(),this.asm=ct.pop()||at({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(ot.push(this.heap),ct.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new ut).process(e).finish().result}}ut.NAME="sha1",ut.heap_pool=[],ut.asm_pool=[],ut.asm_function=at;const ht=[],ft=[];class dt extends st{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=ht.pop()||De(),this.asm=ft.pop()||function(e,t,r){"use asm";var i=0,n=0,a=0,s=0,o=0,c=0,u=0,h=0,f=0,d=0,l=0,p=0,y=0,b=0,m=0,g=0,w=0,v=0,_=0,k=0,A=0,S=0,E=0,P=0,x=0,M=0,C=new e.Uint8Array(r);function K(e,t,r,f,d,l,p,y,b,m,g,w,v,_,k,A){e=e|0;t=t|0;r=r|0;f=f|0;d=d|0;l=l|0;p=p|0;y=y|0;b=b|0;m=m|0;g=g|0;w=w|0;v=v|0;_=_|0;k=k|0;A=A|0;var S=0,E=0,P=0,x=0,M=0,C=0,K=0,D=0;S=i;E=n;P=a;x=s;M=o;C=c;K=u;D=h;D=e+D+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(K^M&(C^K))+0x428a2f98|0;x=x+D|0;D=D+(S&E^P&(S^E))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;K=t+K+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(C^x&(M^C))+0x71374491|0;P=P+K|0;K=K+(D&S^E&(D^S))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;C=r+C+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(M^P&(x^M))+0xb5c0fbcf|0;E=E+C|0;C=C+(K&D^S&(K^D))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;M=f+M+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(x^E&(P^x))+0xe9b5dba5|0;S=S+M|0;M=M+(C&K^D&(C^K))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;x=d+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(P^S&(E^P))+0x3956c25b|0;D=D+x|0;x=x+(M&C^K&(M^C))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;P=l+P+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(E^D&(S^E))+0x59f111f1|0;K=K+P|0;P=P+(x&M^C&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;E=p+E+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(S^K&(D^S))+0x923f82a4|0;C=C+E|0;E=E+(P&x^M&(P^x))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;S=y+S+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(D^C&(K^D))+0xab1c5ed5|0;M=M+S|0;S=S+(E&P^x&(E^P))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;D=b+D+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(K^M&(C^K))+0xd807aa98|0;x=x+D|0;D=D+(S&E^P&(S^E))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;K=m+K+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(C^x&(M^C))+0x12835b01|0;P=P+K|0;K=K+(D&S^E&(D^S))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;C=g+C+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(M^P&(x^M))+0x243185be|0;E=E+C|0;C=C+(K&D^S&(K^D))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;M=w+M+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(x^E&(P^x))+0x550c7dc3|0;S=S+M|0;M=M+(C&K^D&(C^K))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;x=v+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(P^S&(E^P))+0x72be5d74|0;D=D+x|0;x=x+(M&C^K&(M^C))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;P=_+P+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(E^D&(S^E))+0x80deb1fe|0;K=K+P|0;P=P+(x&M^C&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;E=k+E+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(S^K&(D^S))+0x9bdc06a7|0;C=C+E|0;E=E+(P&x^M&(P^x))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;S=A+S+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(D^C&(K^D))+0xc19bf174|0;M=M+S|0;S=S+(E&P^x&(E^P))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;e=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(k>>>17^k>>>19^k>>>10^k<<15^k<<13)+e+m|0;D=e+D+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(K^M&(C^K))+0xe49b69c1|0;x=x+D|0;D=D+(S&E^P&(S^E))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+t+g|0;K=t+K+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(C^x&(M^C))+0xefbe4786|0;P=P+K|0;K=K+(D&S^E&(D^S))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;r=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+r+w|0;C=r+C+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(M^P&(x^M))+0x0fc19dc6|0;E=E+C|0;C=C+(K&D^S&(K^D))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;f=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+f+v|0;M=f+M+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(x^E&(P^x))+0x240ca1cc|0;S=S+M|0;M=M+(C&K^D&(C^K))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;d=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+d+_|0;x=d+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(P^S&(E^P))+0x2de92c6f|0;D=D+x|0;x=x+(M&C^K&(M^C))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;l=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+l+k|0;P=l+P+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(E^D&(S^E))+0x4a7484aa|0;K=K+P|0;P=P+(x&M^C&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;p=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+p+A|0;E=p+E+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(S^K&(D^S))+0x5cb0a9dc|0;C=C+E|0;E=E+(P&x^M&(P^x))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;y=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+y+e|0;S=y+S+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(D^C&(K^D))+0x76f988da|0;M=M+S|0;S=S+(E&P^x&(E^P))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;b=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+b+t|0;D=b+D+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(K^M&(C^K))+0x983e5152|0;x=x+D|0;D=D+(S&E^P&(S^E))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;m=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+m+r|0;K=m+K+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(C^x&(M^C))+0xa831c66d|0;P=P+K|0;K=K+(D&S^E&(D^S))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;g=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+g+f|0;C=g+C+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(M^P&(x^M))+0xb00327c8|0;E=E+C|0;C=C+(K&D^S&(K^D))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;w=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+w+d|0;M=w+M+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(x^E&(P^x))+0xbf597fc7|0;S=S+M|0;M=M+(C&K^D&(C^K))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;v=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+v+l|0;x=v+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(P^S&(E^P))+0xc6e00bf3|0;D=D+x|0;x=x+(M&C^K&(M^C))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;_=(k>>>7^k>>>18^k>>>3^k<<25^k<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+_+p|0;P=_+P+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(E^D&(S^E))+0xd5a79147|0;K=K+P|0;P=P+(x&M^C&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;k=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+k+y|0;E=k+E+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(S^K&(D^S))+0x06ca6351|0;C=C+E|0;E=E+(P&x^M&(P^x))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;A=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+A+b|0;S=A+S+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(D^C&(K^D))+0x14292967|0;M=M+S|0;S=S+(E&P^x&(E^P))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;e=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(k>>>17^k>>>19^k>>>10^k<<15^k<<13)+e+m|0;D=e+D+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(K^M&(C^K))+0x27b70a85|0;x=x+D|0;D=D+(S&E^P&(S^E))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+t+g|0;K=t+K+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(C^x&(M^C))+0x2e1b2138|0;P=P+K|0;K=K+(D&S^E&(D^S))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;r=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+r+w|0;C=r+C+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(M^P&(x^M))+0x4d2c6dfc|0;E=E+C|0;C=C+(K&D^S&(K^D))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;f=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+f+v|0;M=f+M+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(x^E&(P^x))+0x53380d13|0;S=S+M|0;M=M+(C&K^D&(C^K))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;d=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+d+_|0;x=d+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(P^S&(E^P))+0x650a7354|0;D=D+x|0;x=x+(M&C^K&(M^C))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;l=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+l+k|0;P=l+P+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(E^D&(S^E))+0x766a0abb|0;K=K+P|0;P=P+(x&M^C&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;p=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+p+A|0;E=p+E+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(S^K&(D^S))+0x81c2c92e|0;C=C+E|0;E=E+(P&x^M&(P^x))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;y=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+y+e|0;S=y+S+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(D^C&(K^D))+0x92722c85|0;M=M+S|0;S=S+(E&P^x&(E^P))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;b=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+b+t|0;D=b+D+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(K^M&(C^K))+0xa2bfe8a1|0;x=x+D|0;D=D+(S&E^P&(S^E))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;m=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+m+r|0;K=m+K+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(C^x&(M^C))+0xa81a664b|0;P=P+K|0;K=K+(D&S^E&(D^S))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;g=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+g+f|0;C=g+C+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(M^P&(x^M))+0xc24b8b70|0;E=E+C|0;C=C+(K&D^S&(K^D))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;w=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+w+d|0;M=w+M+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(x^E&(P^x))+0xc76c51a3|0;S=S+M|0;M=M+(C&K^D&(C^K))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;v=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+v+l|0;x=v+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(P^S&(E^P))+0xd192e819|0;D=D+x|0;x=x+(M&C^K&(M^C))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;_=(k>>>7^k>>>18^k>>>3^k<<25^k<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+_+p|0;P=_+P+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(E^D&(S^E))+0xd6990624|0;K=K+P|0;P=P+(x&M^C&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;k=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+k+y|0;E=k+E+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(S^K&(D^S))+0xf40e3585|0;C=C+E|0;E=E+(P&x^M&(P^x))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;A=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+A+b|0;S=A+S+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(D^C&(K^D))+0x106aa070|0;M=M+S|0;S=S+(E&P^x&(E^P))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;e=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(k>>>17^k>>>19^k>>>10^k<<15^k<<13)+e+m|0;D=e+D+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(K^M&(C^K))+0x19a4c116|0;x=x+D|0;D=D+(S&E^P&(S^E))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+t+g|0;K=t+K+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(C^x&(M^C))+0x1e376c08|0;P=P+K|0;K=K+(D&S^E&(D^S))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;r=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+r+w|0;C=r+C+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(M^P&(x^M))+0x2748774c|0;E=E+C|0;C=C+(K&D^S&(K^D))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;f=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+f+v|0;M=f+M+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(x^E&(P^x))+0x34b0bcb5|0;S=S+M|0;M=M+(C&K^D&(C^K))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;d=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+d+_|0;x=d+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(P^S&(E^P))+0x391c0cb3|0;D=D+x|0;x=x+(M&C^K&(M^C))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;l=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+l+k|0;P=l+P+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(E^D&(S^E))+0x4ed8aa4a|0;K=K+P|0;P=P+(x&M^C&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;p=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+p+A|0;E=p+E+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(S^K&(D^S))+0x5b9cca4f|0;C=C+E|0;E=E+(P&x^M&(P^x))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;y=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+y+e|0;S=y+S+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(D^C&(K^D))+0x682e6ff3|0;M=M+S|0;S=S+(E&P^x&(E^P))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;b=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+b+t|0;D=b+D+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(K^M&(C^K))+0x748f82ee|0;x=x+D|0;D=D+(S&E^P&(S^E))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;m=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+m+r|0;K=m+K+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(C^x&(M^C))+0x78a5636f|0;P=P+K|0;K=K+(D&S^E&(D^S))+(D>>>2^D>>>13^D>>>22^D<<30^D<<19^D<<10)|0;g=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+g+f|0;C=g+C+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(M^P&(x^M))+0x84c87814|0;E=E+C|0;C=C+(K&D^S&(K^D))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;w=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+w+d|0;M=w+M+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(x^E&(P^x))+0x8cc70208|0;S=S+M|0;M=M+(C&K^D&(C^K))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;v=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+v+l|0;x=v+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(P^S&(E^P))+0x90befffa|0;D=D+x|0;x=x+(M&C^K&(M^C))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;_=(k>>>7^k>>>18^k>>>3^k<<25^k<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+_+p|0;P=_+P+(D>>>6^D>>>11^D>>>25^D<<26^D<<21^D<<7)+(E^D&(S^E))+0xa4506ceb|0;K=K+P|0;P=P+(x&M^C&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;k=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+k+y|0;E=k+E+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(S^K&(D^S))+0xbef9a3f7|0;C=C+E|0;E=E+(P&x^M&(P^x))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;A=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+A+b|0;S=A+S+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(D^C&(K^D))+0xc67178f2|0;M=M+S|0;S=S+(E&P^x&(E^P))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;i=i+S|0;n=n+E|0;a=a+P|0;s=s+x|0;o=o+M|0;c=c+C|0;u=u+K|0;h=h+D|0}function D(e){e=e|0;K(C[e|0]<<24|C[e|1]<<16|C[e|2]<<8|C[e|3],C[e|4]<<24|C[e|5]<<16|C[e|6]<<8|C[e|7],C[e|8]<<24|C[e|9]<<16|C[e|10]<<8|C[e|11],C[e|12]<<24|C[e|13]<<16|C[e|14]<<8|C[e|15],C[e|16]<<24|C[e|17]<<16|C[e|18]<<8|C[e|19],C[e|20]<<24|C[e|21]<<16|C[e|22]<<8|C[e|23],C[e|24]<<24|C[e|25]<<16|C[e|26]<<8|C[e|27],C[e|28]<<24|C[e|29]<<16|C[e|30]<<8|C[e|31],C[e|32]<<24|C[e|33]<<16|C[e|34]<<8|C[e|35],C[e|36]<<24|C[e|37]<<16|C[e|38]<<8|C[e|39],C[e|40]<<24|C[e|41]<<16|C[e|42]<<8|C[e|43],C[e|44]<<24|C[e|45]<<16|C[e|46]<<8|C[e|47],C[e|48]<<24|C[e|49]<<16|C[e|50]<<8|C[e|51],C[e|52]<<24|C[e|53]<<16|C[e|54]<<8|C[e|55],C[e|56]<<24|C[e|57]<<16|C[e|58]<<8|C[e|59],C[e|60]<<24|C[e|61]<<16|C[e|62]<<8|C[e|63])}function R(e){e=e|0;C[e|0]=i>>>24;C[e|1]=i>>>16&255;C[e|2]=i>>>8&255;C[e|3]=i&255;C[e|4]=n>>>24;C[e|5]=n>>>16&255;C[e|6]=n>>>8&255;C[e|7]=n&255;C[e|8]=a>>>24;C[e|9]=a>>>16&255;C[e|10]=a>>>8&255;C[e|11]=a&255;C[e|12]=s>>>24;C[e|13]=s>>>16&255;C[e|14]=s>>>8&255;C[e|15]=s&255;C[e|16]=o>>>24;C[e|17]=o>>>16&255;C[e|18]=o>>>8&255;C[e|19]=o&255;C[e|20]=c>>>24;C[e|21]=c>>>16&255;C[e|22]=c>>>8&255;C[e|23]=c&255;C[e|24]=u>>>24;C[e|25]=u>>>16&255;C[e|26]=u>>>8&255;C[e|27]=u&255;C[e|28]=h>>>24;C[e|29]=h>>>16&255;C[e|30]=h>>>8&255;C[e|31]=h&255}function U(){i=0x6a09e667;n=0xbb67ae85;a=0x3c6ef372;s=0xa54ff53a;o=0x510e527f;c=0x9b05688c;u=0x1f83d9ab;h=0x5be0cd19;f=d=0}function I(e,t,r,l,p,y,b,m,g,w){e=e|0;t=t|0;r=r|0;l=l|0;p=p|0;y=y|0;b=b|0;m=m|0;g=g|0;w=w|0;i=e;n=t;a=r;s=l;o=p;c=y;u=b;h=m;f=g;d=w}function B(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){D(e);e=e+64|0;t=t-64|0;r=r+64|0}f=f+r|0;if(f>>>0<r>>>0)d=d+1|0;return r|0}function T(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){i=B(e,t)|0;if((i|0)==-1)return-1;e=e+i|0;t=t-i|0}i=i+t|0;f=f+t|0;if(f>>>0<t>>>0)d=d+1|0;C[e|t]=0x80;if((t|0)>=56){for(n=t+1|0;(n|0)<64;n=n+1|0)C[e|n]=0x00;D(e);t=0;C[e|0]=0}for(n=t+1|0;(n|0)<59;n=n+1|0)C[e|n]=0;C[e|56]=d>>>21&255;C[e|57]=d>>>13&255;C[e|58]=d>>>5&255;C[e|59]=d<<3&255|f>>>29;C[e|60]=f>>>21&255;C[e|61]=f>>>13&255;C[e|62]=f>>>5&255;C[e|63]=f<<3&255;D(e);if(~r)R(r);return i|0}function z(){i=l;n=p;a=y;s=b;o=m;c=g;u=w;h=v;f=64;d=0}function q(){i=_;n=k;a=A;s=S;o=E;c=P;u=x;h=M;f=64;d=0}function O(e,t,r,C,D,R,I,B,T,z,q,O,F,N,j,L){e=e|0;t=t|0;r=r|0;C=C|0;D=D|0;R=R|0;I=I|0;B=B|0;T=T|0;z=z|0;q=q|0;O=O|0;F=F|0;N=N|0;j=j|0;L=L|0;U();K(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,C^0x5c5c5c5c,D^0x5c5c5c5c,R^0x5c5c5c5c,I^0x5c5c5c5c,B^0x5c5c5c5c,T^0x5c5c5c5c,z^0x5c5c5c5c,q^0x5c5c5c5c,O^0x5c5c5c5c,F^0x5c5c5c5c,N^0x5c5c5c5c,j^0x5c5c5c5c,L^0x5c5c5c5c);_=i;k=n;A=a;S=s;E=o;P=c;x=u;M=h;U();K(e^0x36363636,t^0x36363636,r^0x36363636,C^0x36363636,D^0x36363636,R^0x36363636,I^0x36363636,B^0x36363636,T^0x36363636,z^0x36363636,q^0x36363636,O^0x36363636,F^0x36363636,N^0x36363636,j^0x36363636,L^0x36363636);l=i;p=n;y=a;b=s;m=o;g=c;w=u;v=h;f=64;d=0}function F(e,t,r){e=e|0;t=t|0;r=r|0;var f=0,d=0,l=0,p=0,y=0,b=0,m=0,g=0,w=0;if(e&63)return-1;if(~r)if(r&31)return-1;w=T(e,t,-1)|0;f=i,d=n,l=a,p=s,y=o,b=c,m=u,g=h;q();K(f,d,l,p,y,b,m,g,0x80000000,0,0,0,0,0,0,768);if(~r)R(r);return w|0}function N(e,t,r,f,d){e=e|0;t=t|0;r=r|0;f=f|0;d=d|0;var l=0,p=0,y=0,b=0,m=0,g=0,w=0,v=0,_=0,k=0,A=0,S=0,E=0,P=0,x=0,M=0;if(e&63)return-1;if(~d)if(d&31)return-1;C[e+t|0]=r>>>24;C[e+t+1|0]=r>>>16&255;C[e+t+2|0]=r>>>8&255;C[e+t+3|0]=r&255;F(e,t+4|0,-1)|0;l=_=i,p=k=n,y=A=a,b=S=s,m=E=o,g=P=c,w=x=u,v=M=h;f=f-1|0;while((f|0)>0){z();K(_,k,A,S,E,P,x,M,0x80000000,0,0,0,0,0,0,768);_=i,k=n,A=a,S=s,E=o,P=c,x=u,M=h;q();K(_,k,A,S,E,P,x,M,0x80000000,0,0,0,0,0,0,768);_=i,k=n,A=a,S=s,E=o,P=c,x=u,M=h;l=l^i;p=p^n;y=y^a;b=b^s;m=m^o;g=g^c;w=w^u;v=v^h;f=f-1|0}i=l;n=p;a=y;s=b;o=m;c=g;u=w;h=v;if(~d)R(d);return 0}return{reset:U,init:I,process:B,finish:T,hmac_reset:z,hmac_init:O,hmac_finish:F,pbkdf2_generate_block:N}}({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(ht.push(this.heap),ft.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return(new dt).process(e).finish().result}}dt.NAME="sha256";var lt=pt;function pt(e,t){if(!e)throw Error(t||"Assertion failed")}pt.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)};var yt=void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function bt(e,t){return e(t={exports:{}},t.exports),t.exports}var mt=bt((function(e){e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}})),gt=bt((function(e){try{var t=p.default;if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=mt}}));function wt(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function vt(e){return 1===e.length?"0"+e:e}function _t(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var kt={inherits:gt,toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),a=n>>8,s=255&n;a?r.push(a,s):r.push(s)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},toHex:function(e){for(var t="",r=0;r<e.length;r++)t+=vt(e[r].toString(16));return t},htonl:wt,toHex32:function(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];"little"===t&&(n=wt(n)),r+=_t(n.toString(16))}return r},zero2:vt,zero8:_t,join32:function(e,t,r,i){var n=r-t;lt(n%4==0);for(var a=Array(n/4),s=0,o=t;s<a.length;s++,o+=4){var c;c="big"===i?e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3]:e[o+3]<<24|e[o+2]<<16|e[o+1]<<8|e[o],a[s]=c>>>0}return a},split32:function(e,t){for(var r=Array(4*e.length),i=0,n=0;i<e.length;i++,n+=4){var a=e[i];"big"===t?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=255&a):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=255&a)}return r},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<<t|e>>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,r){return e+t+r>>>0},sum32_4:function(e,t,r,i){return e+t+r+i>>>0},sum32_5:function(e,t,r,i,n){return e+t+r+i+n>>>0},sum64:function(e,t,r,i){var n=e[t],a=i+e[t+1]>>>0,s=(a<i?1:0)+r+n;e[t]=s>>>0,e[t+1]=a},sum64_hi:function(e,t,r,i){return(t+i>>>0<t?1:0)+e+r>>>0},sum64_lo:function(e,t,r,i){return t+i>>>0},sum64_4_hi:function(e,t,r,i,n,a,s,o){var c=0,u=t;return c+=(u=u+i>>>0)<t?1:0,c+=(u=u+a>>>0)<a?1:0,e+r+n+s+(c+=(u=u+o>>>0)<o?1:0)>>>0},sum64_4_lo:function(e,t,r,i,n,a,s,o){return t+i+a+o>>>0},sum64_5_hi:function(e,t,r,i,n,a,s,o,c,u){var h=0,f=t;return h+=(f=f+i>>>0)<t?1:0,h+=(f=f+a>>>0)<a?1:0,h+=(f=f+o>>>0)<o?1:0,e+r+n+s+c+(h+=(f=f+u>>>0)<u?1:0)>>>0},sum64_5_lo:function(e,t,r,i,n,a,s,o,c,u){return t+i+a+o+u>>>0},rotr64_hi:function(e,t,r){return(t<<32-r|e>>>r)>>>0},rotr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0},shr64_hi:function(e,t,r){return e>>>r},shr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0}};function At(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var St=At;At.prototype.update=function(e,t){if(e=kt.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=kt.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},At.prototype.digest=function(e){return this.update(this._pad()),lt(null===this.pending),this._digest(e)},At.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,i=Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=e>>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,a=8;a<this.padLength;a++)i[n++]=0;return i};var Et={BlockHash:St},Pt=kt.rotr32;function xt(e,t,r){return e&t^~e&r}function Mt(e,t,r){return e&t^e&r^t&r}function Ct(e,t,r){return e^t^r}var Kt={ft_1:function(e,t,r,i){return 0===e?xt(t,r,i):1===e||3===e?Ct(t,r,i):2===e?Mt(t,r,i):void 0},ch32:xt,maj32:Mt,p32:Ct,s0_256:function(e){return Pt(e,2)^Pt(e,13)^Pt(e,22)},s1_256:function(e){return Pt(e,6)^Pt(e,11)^Pt(e,25)},g0_256:function(e){return Pt(e,7)^Pt(e,18)^e>>>3},g1_256:function(e){return Pt(e,17)^Pt(e,19)^e>>>10}},Dt=kt.sum32,Rt=kt.sum32_4,Ut=kt.sum32_5,It=Kt.ch32,Bt=Kt.maj32,Tt=Kt.s0_256,zt=Kt.s1_256,qt=Kt.g0_256,Ot=Kt.g1_256,Ft=Et.BlockHash,Nt=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function jt(){if(!(this instanceof jt))return new jt;Ft.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Nt,this.W=Array(64)}kt.inherits(jt,Ft);var Lt=jt;function Wt(){if(!(this instanceof Wt))return new Wt;Lt.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}jt.blockSize=512,jt.outSize=256,jt.hmacStrength=192,jt.padLength=64,jt.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=Rt(Ot(r[i-2]),r[i-7],qt(r[i-15]),r[i-16]);var n=this.h[0],a=this.h[1],s=this.h[2],o=this.h[3],c=this.h[4],u=this.h[5],h=this.h[6],f=this.h[7];for(lt(this.k.length===r.length),i=0;i<r.length;i++){var d=Ut(f,zt(c),It(c,u,h),this.k[i],r[i]),l=Dt(Tt(n),Bt(n,a,s));f=h,h=u,u=c,c=Dt(o,d),o=s,s=a,a=n,n=Dt(d,l)}this.h[0]=Dt(this.h[0],n),this.h[1]=Dt(this.h[1],a),this.h[2]=Dt(this.h[2],s),this.h[3]=Dt(this.h[3],o),this.h[4]=Dt(this.h[4],c),this.h[5]=Dt(this.h[5],u),this.h[6]=Dt(this.h[6],h),this.h[7]=Dt(this.h[7],f)},jt.prototype._digest=function(e){return"hex"===e?kt.toHex32(this.h,"big"):kt.split32(this.h,"big")},kt.inherits(Wt,Lt);var Ht=Wt;Wt.blockSize=512,Wt.outSize=224,Wt.hmacStrength=192,Wt.padLength=64,Wt.prototype._digest=function(e){return"hex"===e?kt.toHex32(this.h.slice(0,7),"big"):kt.split32(this.h.slice(0,7),"big")};var Gt=kt.rotr64_hi,Vt=kt.rotr64_lo,$t=kt.shr64_hi,Zt=kt.shr64_lo,Yt=kt.sum64,Xt=kt.sum64_hi,Qt=kt.sum64_lo,Jt=kt.sum64_4_hi,er=kt.sum64_4_lo,tr=kt.sum64_5_hi,rr=kt.sum64_5_lo,ir=Et.BlockHash,nr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ar(){if(!(this instanceof ar))return new ar;ir.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=nr,this.W=Array(160)}kt.inherits(ar,ir);var sr=ar;function or(e,t,r,i,n){var a=e&r^~e&n;return a<0&&(a+=4294967296),a}function cr(e,t,r,i,n,a){var s=t&i^~t&a;return s<0&&(s+=4294967296),s}function ur(e,t,r,i,n){var a=e&r^e&n^r&n;return a<0&&(a+=4294967296),a}function hr(e,t,r,i,n,a){var s=t&i^t&a^i&a;return s<0&&(s+=4294967296),s}function fr(e,t){var r=Gt(e,t,28)^Gt(t,e,2)^Gt(t,e,7);return r<0&&(r+=4294967296),r}function dr(e,t){var r=Vt(e,t,28)^Vt(t,e,2)^Vt(t,e,7);return r<0&&(r+=4294967296),r}function lr(e,t){var r=Gt(e,t,14)^Gt(e,t,18)^Gt(t,e,9);return r<0&&(r+=4294967296),r}function pr(e,t){var r=Vt(e,t,14)^Vt(e,t,18)^Vt(t,e,9);return r<0&&(r+=4294967296),r}function yr(e,t){var r=Gt(e,t,1)^Gt(e,t,8)^$t(e,t,7);return r<0&&(r+=4294967296),r}function br(e,t){var r=Vt(e,t,1)^Vt(e,t,8)^Zt(e,t,7);return r<0&&(r+=4294967296),r}function mr(e,t){var r=Gt(e,t,19)^Gt(t,e,29)^$t(e,t,6);return r<0&&(r+=4294967296),r}function gr(e,t){var r=Vt(e,t,19)^Vt(t,e,29)^Zt(e,t,6);return r<0&&(r+=4294967296),r}function wr(){if(!(this instanceof wr))return new wr;sr.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}ar.blockSize=1024,ar.outSize=512,ar.hmacStrength=192,ar.padLength=128,ar.prototype._prepareBlock=function(e,t){for(var r=this.W,i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=mr(r[i-4],r[i-3]),a=gr(r[i-4],r[i-3]),s=r[i-14],o=r[i-13],c=yr(r[i-30],r[i-29]),u=br(r[i-30],r[i-29]),h=r[i-32],f=r[i-31];r[i]=Jt(n,a,s,o,c,u,h,f),r[i+1]=er(n,a,s,o,c,u,h,f)}},ar.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],n=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],c=this.h[5],u=this.h[6],h=this.h[7],f=this.h[8],d=this.h[9],l=this.h[10],p=this.h[11],y=this.h[12],b=this.h[13],m=this.h[14],g=this.h[15];lt(this.k.length===r.length);for(var w=0;w<r.length;w+=2){var v=m,_=g,k=lr(f,d),A=pr(f,d),S=or(f,d,l,p,y),E=cr(f,d,l,p,y,b),P=this.k[w],x=this.k[w+1],M=r[w],C=r[w+1],K=tr(v,_,k,A,S,E,P,x,M,C),D=rr(v,_,k,A,S,E,P,x,M,C);v=fr(i,n),_=dr(i,n),k=ur(i,n,a,s,o),A=hr(i,n,a,s,o,c);var R=Xt(v,_,k,A),U=Qt(v,_,k,A);m=y,g=b,y=l,b=p,l=f,p=d,f=Xt(u,h,K,D),d=Qt(h,h,K,D),u=o,h=c,o=a,c=s,a=i,s=n,i=Xt(K,D,R,U),n=Qt(K,D,R,U)}Yt(this.h,0,i,n),Yt(this.h,2,a,s),Yt(this.h,4,o,c),Yt(this.h,6,u,h),Yt(this.h,8,f,d),Yt(this.h,10,l,p),Yt(this.h,12,y,b),Yt(this.h,14,m,g)},ar.prototype._digest=function(e){return"hex"===e?kt.toHex32(this.h,"big"):kt.split32(this.h,"big")},kt.inherits(wr,sr);var vr=wr;wr.blockSize=1024,wr.outSize=384,wr.hmacStrength=192,wr.padLength=128,wr.prototype._digest=function(e){return"hex"===e?kt.toHex32(this.h.slice(0,12),"big"):kt.split32(this.h.slice(0,12),"big")};var _r=kt.rotl32,kr=kt.sum32,Ar=kt.sum32_3,Sr=kt.sum32_4,Er=Et.BlockHash;function Pr(){if(!(this instanceof Pr))return new Pr;Er.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}kt.inherits(Pr,Er);var xr=Pr;function Mr(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function Cr(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function Kr(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}Pr.blockSize=512,Pr.outSize=160,Pr.hmacStrength=192,Pr.padLength=64,Pr.prototype._update=function(e,t){for(var r=this.h[0],i=this.h[1],n=this.h[2],a=this.h[3],s=this.h[4],o=r,c=i,u=n,h=a,f=s,d=0;d<80;d++){var l=kr(_r(Sr(r,Mr(d,i,n,a),e[Dr[d]+t],Cr(d)),Ur[d]),s);r=s,s=a,a=_r(n,10),n=i,i=l,l=kr(_r(Sr(o,Mr(79-d,c,u,h),e[Rr[d]+t],Kr(d)),Ir[d]),f),o=f,f=h,h=_r(u,10),u=c,c=l}l=Ar(this.h[1],n,h),this.h[1]=Ar(this.h[2],a,f),this.h[2]=Ar(this.h[3],s,o),this.h[3]=Ar(this.h[4],r,c),this.h[4]=Ar(this.h[0],i,u),this.h[0]=l},Pr.prototype._digest=function(e){return"hex"===e?kt.toHex32(this.h,"little"):kt.split32(this.h,"little")};var Dr=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Rr=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Ur=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Ir=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Br={ripemd160:xr};function Tr(e,t){let r=e[0],i=e[1],n=e[2],a=e[3];r=qr(r,i,n,a,t[0],7,-680876936),a=qr(a,r,i,n,t[1],12,-389564586),n=qr(n,a,r,i,t[2],17,606105819),i=qr(i,n,a,r,t[3],22,-1044525330),r=qr(r,i,n,a,t[4],7,-176418897),a=qr(a,r,i,n,t[5],12,1200080426),n=qr(n,a,r,i,t[6],17,-1473231341),i=qr(i,n,a,r,t[7],22,-45705983),r=qr(r,i,n,a,t[8],7,1770035416),a=qr(a,r,i,n,t[9],12,-1958414417),n=qr(n,a,r,i,t[10],17,-42063),i=qr(i,n,a,r,t[11],22,-1990404162),r=qr(r,i,n,a,t[12],7,1804603682),a=qr(a,r,i,n,t[13],12,-40341101),n=qr(n,a,r,i,t[14],17,-1502002290),i=qr(i,n,a,r,t[15],22,1236535329),r=Or(r,i,n,a,t[1],5,-165796510),a=Or(a,r,i,n,t[6],9,-1069501632),n=Or(n,a,r,i,t[11],14,643717713),i=Or(i,n,a,r,t[0],20,-373897302),r=Or(r,i,n,a,t[5],5,-701558691),a=Or(a,r,i,n,t[10],9,38016083),n=Or(n,a,r,i,t[15],14,-660478335),i=Or(i,n,a,r,t[4],20,-405537848),r=Or(r,i,n,a,t[9],5,568446438),a=Or(a,r,i,n,t[14],9,-1019803690),n=Or(n,a,r,i,t[3],14,-187363961),i=Or(i,n,a,r,t[8],20,1163531501),r=Or(r,i,n,a,t[13],5,-1444681467),a=Or(a,r,i,n,t[2],9,-51403784),n=Or(n,a,r,i,t[7],14,1735328473),i=Or(i,n,a,r,t[12],20,-1926607734),r=Fr(r,i,n,a,t[5],4,-378558),a=Fr(a,r,i,n,t[8],11,-2022574463),n=Fr(n,a,r,i,t[11],16,1839030562),i=Fr(i,n,a,r,t[14],23,-35309556),r=Fr(r,i,n,a,t[1],4,-1530992060),a=Fr(a,r,i,n,t[4],11,1272893353),n=Fr(n,a,r,i,t[7],16,-155497632),i=Fr(i,n,a,r,t[10],23,-1094730640),r=Fr(r,i,n,a,t[13],4,681279174),a=Fr(a,r,i,n,t[0],11,-358537222),n=Fr(n,a,r,i,t[3],16,-722521979),i=Fr(i,n,a,r,t[6],23,76029189),r=Fr(r,i,n,a,t[9],4,-640364487),a=Fr(a,r,i,n,t[12],11,-421815835),n=Fr(n,a,r,i,t[15],16,530742520),i=Fr(i,n,a,r,t[2],23,-995338651),r=Nr(r,i,n,a,t[0],6,-198630844),a=Nr(a,r,i,n,t[7],10,1126891415),n=Nr(n,a,r,i,t[14],15,-1416354905),i=Nr(i,n,a,r,t[5],21,-57434055),r=Nr(r,i,n,a,t[12],6,1700485571),a=Nr(a,r,i,n,t[3],10,-1894986606),n=Nr(n,a,r,i,t[10],15,-1051523),i=Nr(i,n,a,r,t[1],21,-2054922799),r=Nr(r,i,n,a,t[8],6,1873313359),a=Nr(a,r,i,n,t[15],10,-30611744),n=Nr(n,a,r,i,t[6],15,-1560198380),i=Nr(i,n,a,r,t[13],21,1309151649),r=Nr(r,i,n,a,t[4],6,-145523070),a=Nr(a,r,i,n,t[11],10,-1120210379),n=Nr(n,a,r,i,t[2],15,718787259),i=Nr(i,n,a,r,t[9],21,-343485551),e[0]=Hr(r,e[0]),e[1]=Hr(i,e[1]),e[2]=Hr(n,e[2]),e[3]=Hr(a,e[3])}function zr(e,t,r,i,n,a){return t=Hr(Hr(t,e),Hr(i,a)),Hr(t<<n|t>>>32-n,r)}function qr(e,t,r,i,n,a,s){return zr(t&r|~t&i,e,t,n,a,s)}function Or(e,t,r,i,n,a,s){return zr(t&i|r&~i,e,t,n,a,s)}function Fr(e,t,r,i,n,a,s){return zr(t^r^i,e,t,n,a,s)}function Nr(e,t,r,i,n,a,s){return zr(r^(t|~i),e,t,n,a,s)}function jr(e){const t=[];let r;for(r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t}const Lr="0123456789abcdef".split("");function Wr(e){let t="",r=0;for(;r<4;r++)t+=Lr[e>>8*r+4&15]+Lr[e>>8*r&15];return t}function Hr(e,t){return e+t&4294967295}const Gr=ce.getWebCrypto(),Vr=ce.getNodeCrypto();function $r(e){return async function(t){const r=Vr.createHash(e);return Y(t,(e=>{r.update(e)}),(()=>new Uint8Array(r.digest())))}}function Zr(e,t){return async function(r,i=ge){if(_(r)&&(r=await ie(r)),!ce.isStream(r)&&Gr&&t&&r.length>=i.minBytesForWebCrypto)return new Uint8Array(await Gr.digest(t,r));const n=e();return Y(r,(e=>{n.update(e)}),(()=>new Uint8Array(n.digest())))}}function Yr(e,t){return async function(r,i=ge){if(_(r)&&(r=await ie(r)),ce.isStream(r)){const t=new e;return Y(r,(e=>{t.process(e)}),(()=>t.finish().result))}return Gr&&t&&r.length>=i.minBytesForWebCrypto?new Uint8Array(await Gr.digest(t,r)):e.bytes(r)}}let Xr;Xr=Vr?{md5:$r("md5"),sha1:$r("sha1"),sha224:$r("sha224"),sha256:$r("sha256"),sha384:$r("sha384"),sha512:$r("sha512"),ripemd:$r("ripemd160")}:{md5:async function(e){const t=function(e){const t=e.length,r=[1732584193,-271733879,-1732584194,271733878];let i;for(i=64;i<=e.length;i+=64)Tr(r,jr(e.substring(i-64,i)));e=e.substring(i-64);const n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<e.length;i++)n[i>>2]|=e.charCodeAt(i)<<(i%4<<3);if(n[i>>2]|=128<<(i%4<<3),i>55)for(Tr(r,n),i=0;i<16;i++)n[i]=0;return n[14]=8*t,Tr(r,n),r}(ce.uint8ArrayToString(e));return ce.hexToUint8Array(function(e){for(let t=0;t<e.length;t++)e[t]=Wr(e[t]);return e.join("")}(t))},sha1:Yr(ut,"SHA-1"),sha224:Zr(Ht),sha256:Yr(dt,"SHA-256"),sha384:Zr(vr,"SHA-384"),sha512:Zr(sr,"SHA-512"),ripemd:Zr(xr)};var Qr={md5:Xr.md5,sha1:Xr.sha1,sha224:Xr.sha224,sha256:Xr.sha256,sha384:Xr.sha384,sha512:Xr.sha512,ripemd:Xr.ripemd,digest:function(e,t){switch(e){case me.hash.md5:return this.md5(t);case me.hash.sha1:return this.sha1(t);case me.hash.ripemd:return this.ripemd(t);case me.hash.sha256:return this.sha256(t);case me.hash.sha384:return this.sha384(t);case me.hash.sha512:return this.sha512(t);case me.hash.sha224:return this.sha224(t);default:throw Error("Invalid hash function.")}},getHashByteLength:function(e){switch(e){case me.hash.md5:return 16;case me.hash.sha1:case me.hash.ripemd:return 20;case me.hash.sha256:return 32;case me.hash.sha384:return 48;case me.hash.sha512:return 64;case me.hash.sha224:return 28;default:throw Error("Invalid hash algorithm.")}}};class Jr{static encrypt(e,t,r){return new Jr(t,r).encrypt(e)}static decrypt(e,t,r){return new Jr(t,r).decrypt(e)}constructor(e,t,r){this.aes=r||new Oe(e,t,!0,"CFB"),delete this.aes.padding}encrypt(e){return Ue(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return Ue(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}var ei=bt((function(e){!function(e){var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},r=function(){throw Error("no PRNG")},i=new Uint8Array(32);i[0]=9;var n=t(),a=t([1]),s=t([56129,1]),o=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function l(e,t,r,i){return function(e,t,r,i,n){var a,s=0;for(a=0;a<n;a++)s|=e[t+a]^r[i+a];return(1&s-1>>>8)-1}(e,t,r,i,32)}function p(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function y(e){var t,r,i=1;for(t=0;t<16;t++)r=e[t]+i+65535,i=Math.floor(r/65536),e[t]=r-65536*i;e[0]+=i-1+37*(i-1)}function b(e,t,r){for(var i,n=~(r-1),a=0;a<16;a++)i=n&(e[a]^t[a]),e[a]^=i,t[a]^=i}function m(e,r){var i,n,a,s=t(),o=t();for(i=0;i<16;i++)o[i]=r[i];for(y(o),y(o),y(o),n=0;n<2;n++){for(s[0]=o[0]-65517,i=1;i<15;i++)s[i]=o[i]-65535-(s[i-1]>>16&1),s[i-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),a=s[15]>>16&1,s[14]&=65535,b(o,s,1-a)}for(i=0;i<16;i++)e[2*i]=255&o[i],e[2*i+1]=o[i]>>8}function g(e,t){var r=new Uint8Array(32),i=new Uint8Array(32);return m(r,e),m(i,t),l(r,0,i,0)}function w(e){var t=new Uint8Array(32);return m(t,e),1&t[0]}function v(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function _(e,t,r){for(var i=0;i<16;i++)e[i]=t[i]+r[i]}function k(e,t,r){for(var i=0;i<16;i++)e[i]=t[i]-r[i]}function A(e,t,r){var i,n,a=0,s=0,o=0,c=0,u=0,h=0,f=0,d=0,l=0,p=0,y=0,b=0,m=0,g=0,w=0,v=0,_=0,k=0,A=0,S=0,E=0,P=0,x=0,M=0,C=0,K=0,D=0,R=0,U=0,I=0,B=0,T=r[0],z=r[1],q=r[2],O=r[3],F=r[4],N=r[5],j=r[6],L=r[7],W=r[8],H=r[9],G=r[10],V=r[11],$=r[12],Z=r[13],Y=r[14],X=r[15];a+=(i=t[0])*T,s+=i*z,o+=i*q,c+=i*O,u+=i*F,h+=i*N,f+=i*j,d+=i*L,l+=i*W,p+=i*H,y+=i*G,b+=i*V,m+=i*$,g+=i*Z,w+=i*Y,v+=i*X,s+=(i=t[1])*T,o+=i*z,c+=i*q,u+=i*O,h+=i*F,f+=i*N,d+=i*j,l+=i*L,p+=i*W,y+=i*H,b+=i*G,m+=i*V,g+=i*$,w+=i*Z,v+=i*Y,_+=i*X,o+=(i=t[2])*T,c+=i*z,u+=i*q,h+=i*O,f+=i*F,d+=i*N,l+=i*j,p+=i*L,y+=i*W,b+=i*H,m+=i*G,g+=i*V,w+=i*$,v+=i*Z,_+=i*Y,k+=i*X,c+=(i=t[3])*T,u+=i*z,h+=i*q,f+=i*O,d+=i*F,l+=i*N,p+=i*j,y+=i*L,b+=i*W,m+=i*H,g+=i*G,w+=i*V,v+=i*$,_+=i*Z,k+=i*Y,A+=i*X,u+=(i=t[4])*T,h+=i*z,f+=i*q,d+=i*O,l+=i*F,p+=i*N,y+=i*j,b+=i*L,m+=i*W,g+=i*H,w+=i*G,v+=i*V,_+=i*$,k+=i*Z,A+=i*Y,S+=i*X,h+=(i=t[5])*T,f+=i*z,d+=i*q,l+=i*O,p+=i*F,y+=i*N,b+=i*j,m+=i*L,g+=i*W,w+=i*H,v+=i*G,_+=i*V,k+=i*$,A+=i*Z,S+=i*Y,E+=i*X,f+=(i=t[6])*T,d+=i*z,l+=i*q,p+=i*O,y+=i*F,b+=i*N,m+=i*j,g+=i*L,w+=i*W,v+=i*H,_+=i*G,k+=i*V,A+=i*$,S+=i*Z,E+=i*Y,P+=i*X,d+=(i=t[7])*T,l+=i*z,p+=i*q,y+=i*O,b+=i*F,m+=i*N,g+=i*j,w+=i*L,v+=i*W,_+=i*H,k+=i*G,A+=i*V,S+=i*$,E+=i*Z,P+=i*Y,x+=i*X,l+=(i=t[8])*T,p+=i*z,y+=i*q,b+=i*O,m+=i*F,g+=i*N,w+=i*j,v+=i*L,_+=i*W,k+=i*H,A+=i*G,S+=i*V,E+=i*$,P+=i*Z,x+=i*Y,M+=i*X,p+=(i=t[9])*T,y+=i*z,b+=i*q,m+=i*O,g+=i*F,w+=i*N,v+=i*j,_+=i*L,k+=i*W,A+=i*H,S+=i*G,E+=i*V,P+=i*$,x+=i*Z,M+=i*Y,C+=i*X,y+=(i=t[10])*T,b+=i*z,m+=i*q,g+=i*O,w+=i*F,v+=i*N,_+=i*j,k+=i*L,A+=i*W,S+=i*H,E+=i*G,P+=i*V,x+=i*$,M+=i*Z,C+=i*Y,K+=i*X,b+=(i=t[11])*T,m+=i*z,g+=i*q,w+=i*O,v+=i*F,_+=i*N,k+=i*j,A+=i*L,S+=i*W,E+=i*H,P+=i*G,x+=i*V,M+=i*$,C+=i*Z,K+=i*Y,D+=i*X,m+=(i=t[12])*T,g+=i*z,w+=i*q,v+=i*O,_+=i*F,k+=i*N,A+=i*j,S+=i*L,E+=i*W,P+=i*H,x+=i*G,M+=i*V,C+=i*$,K+=i*Z,D+=i*Y,R+=i*X,g+=(i=t[13])*T,w+=i*z,v+=i*q,_+=i*O,k+=i*F,A+=i*N,S+=i*j,E+=i*L,P+=i*W,x+=i*H,M+=i*G,C+=i*V,K+=i*$,D+=i*Z,R+=i*Y,U+=i*X,w+=(i=t[14])*T,v+=i*z,_+=i*q,k+=i*O,A+=i*F,S+=i*N,E+=i*j,P+=i*L,x+=i*W,M+=i*H,C+=i*G,K+=i*V,D+=i*$,R+=i*Z,U+=i*Y,I+=i*X,v+=(i=t[15])*T,s+=38*(k+=i*q),o+=38*(A+=i*O),c+=38*(S+=i*F),u+=38*(E+=i*N),h+=38*(P+=i*j),f+=38*(x+=i*L),d+=38*(M+=i*W),l+=38*(C+=i*H),p+=38*(K+=i*G),y+=38*(D+=i*V),b+=38*(R+=i*$),m+=38*(U+=i*Z),g+=38*(I+=i*Y),w+=38*(B+=i*X),a=(i=(a+=38*(_+=i*z))+(n=1)+65535)-65536*(n=Math.floor(i/65536)),s=(i=s+n+65535)-65536*(n=Math.floor(i/65536)),o=(i=o+n+65535)-65536*(n=Math.floor(i/65536)),c=(i=c+n+65535)-65536*(n=Math.floor(i/65536)),u=(i=u+n+65535)-65536*(n=Math.floor(i/65536)),h=(i=h+n+65535)-65536*(n=Math.floor(i/65536)),f=(i=f+n+65535)-65536*(n=Math.floor(i/65536)),d=(i=d+n+65535)-65536*(n=Math.floor(i/65536)),l=(i=l+n+65535)-65536*(n=Math.floor(i/65536)),p=(i=p+n+65535)-65536*(n=Math.floor(i/65536)),y=(i=y+n+65535)-65536*(n=Math.floor(i/65536)),b=(i=b+n+65535)-65536*(n=Math.floor(i/65536)),m=(i=m+n+65535)-65536*(n=Math.floor(i/65536)),g=(i=g+n+65535)-65536*(n=Math.floor(i/65536)),w=(i=w+n+65535)-65536*(n=Math.floor(i/65536)),v=(i=v+n+65535)-65536*(n=Math.floor(i/65536)),a=(i=(a+=n-1+37*(n-1))+(n=1)+65535)-65536*(n=Math.floor(i/65536)),s=(i=s+n+65535)-65536*(n=Math.floor(i/65536)),o=(i=o+n+65535)-65536*(n=Math.floor(i/65536)),c=(i=c+n+65535)-65536*(n=Math.floor(i/65536)),u=(i=u+n+65535)-65536*(n=Math.floor(i/65536)),h=(i=h+n+65535)-65536*(n=Math.floor(i/65536)),f=(i=f+n+65535)-65536*(n=Math.floor(i/65536)),d=(i=d+n+65535)-65536*(n=Math.floor(i/65536)),l=(i=l+n+65535)-65536*(n=Math.floor(i/65536)),p=(i=p+n+65535)-65536*(n=Math.floor(i/65536)),y=(i=y+n+65535)-65536*(n=Math.floor(i/65536)),b=(i=b+n+65535)-65536*(n=Math.floor(i/65536)),m=(i=m+n+65535)-65536*(n=Math.floor(i/65536)),g=(i=g+n+65535)-65536*(n=Math.floor(i/65536)),w=(i=w+n+65535)-65536*(n=Math.floor(i/65536)),v=(i=v+n+65535)-65536*(n=Math.floor(i/65536)),a+=n-1+37*(n-1),e[0]=a,e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=h,e[6]=f,e[7]=d,e[8]=l,e[9]=p,e[10]=y,e[11]=b,e[12]=m,e[13]=g,e[14]=w,e[15]=v}function S(e,t){A(e,t,t)}function E(e,r){var i,n=t();for(i=0;i<16;i++)n[i]=r[i];for(i=253;i>=0;i--)S(n,n),2!==i&&4!==i&&A(n,n,r);for(i=0;i<16;i++)e[i]=n[i]}function P(e,r,i){var n,a,o=new Uint8Array(32),c=new Float64Array(80),u=t(),h=t(),f=t(),d=t(),l=t(),p=t();for(a=0;a<31;a++)o[a]=r[a];for(o[31]=127&r[31]|64,o[0]&=248,v(c,i),a=0;a<16;a++)h[a]=c[a],d[a]=u[a]=f[a]=0;for(u[0]=d[0]=1,a=254;a>=0;--a)b(u,h,n=o[a>>>3]>>>(7&a)&1),b(f,d,n),_(l,u,f),k(u,u,f),_(f,h,d),k(h,h,d),S(d,l),S(p,u),A(u,f,u),A(f,h,l),_(l,u,f),k(u,u,f),S(h,u),k(f,d,p),A(u,f,s),_(u,u,d),A(f,f,u),A(u,d,p),A(d,h,c),S(h,l),b(u,h,n),b(f,d,n);for(a=0;a<16;a++)c[a+16]=u[a],c[a+32]=f[a],c[a+48]=h[a],c[a+64]=d[a];var y=c.subarray(32),g=c.subarray(16);return E(y,y),A(g,g,y),m(e,g),0}function x(e,t){return P(e,t,i)}function M(e,r){var i=t(),n=t(),a=t(),s=t(),o=t(),u=t(),h=t(),f=t(),d=t();k(i,e[1],e[0]),k(d,r[1],r[0]),A(i,i,d),_(n,e[0],e[1]),_(d,r[0],r[1]),A(n,n,d),A(a,e[3],r[3]),A(a,a,c),A(s,e[2],r[2]),_(s,s,s),k(o,n,i),k(u,s,a),_(h,s,a),_(f,n,i),A(e[0],o,u),A(e[1],f,h),A(e[2],h,u),A(e[3],o,f)}function C(e,t,r){var i;for(i=0;i<4;i++)b(e[i],t[i],r)}function K(e,r){var i=t(),n=t(),a=t();E(a,r[2]),A(i,r[0],a),A(n,r[1],a),m(e,n),e[31]^=w(i)<<7}function D(e,t,r){var i,s;for(p(e[0],n),p(e[1],a),p(e[2],a),p(e[3],n),s=255;s>=0;--s)C(e,t,i=r[s/8|0]>>(7&s)&1),M(t,e),M(e,e),C(e,t,i)}function R(e,r){var i=[t(),t(),t(),t()];p(i[0],u),p(i[1],h),p(i[2],a),A(i[3],u,h),D(e,i,r)}function U(i,n,a){var s,o,c=[t(),t(),t(),t()];for(a||r(n,32),(s=e.hash(n.subarray(0,32)))[0]&=248,s[31]&=127,s[31]|=64,R(c,s),K(i,c),o=0;o<32;o++)n[o+32]=i[o];return 0}var I=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function B(e,t){var r,i,n,a;for(i=63;i>=32;--i){for(r=0,n=i-32,a=i-12;n<a;++n)t[n]+=r-16*t[i]*I[n-(i-32)],r=Math.floor((t[n]+128)/256),t[n]-=256*r;t[n]+=r,t[i]=0}for(r=0,n=0;n<32;n++)t[n]+=r-(t[31]>>4)*I[n],r=t[n]>>8,t[n]&=255;for(n=0;n<32;n++)t[n]-=r*I[n];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,e[i]=255&t[i]}function T(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;B(e,r)}function z(e,r){var i=t(),s=t(),c=t(),u=t(),h=t(),f=t(),l=t();return p(e[2],a),v(e[1],r),S(c,e[1]),A(u,c,o),k(c,c,e[2]),_(u,e[2],u),S(h,u),S(f,h),A(l,f,h),A(i,l,c),A(i,i,u),function(e,r){var i,n=t();for(i=0;i<16;i++)n[i]=r[i];for(i=250;i>=0;i--)S(n,n),1!==i&&A(n,n,r);for(i=0;i<16;i++)e[i]=n[i]}(i,i),A(i,i,c),A(i,i,u),A(i,i,u),A(e[0],i,u),S(s,e[0]),A(s,s,u),g(s,c)&&A(e[0],e[0],d),S(s,e[0]),A(s,s,u),g(s,c)?-1:(w(e[0])===r[31]>>7&&k(e[0],n,e[0]),A(e[3],e[0],e[1]),0)}var q=64;function O(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function F(e){for(var t=0;t<e.length;t++)e[t]=0}e.scalarMult=function(e,t){if(O(e,t),32!==e.length)throw Error("bad n size");if(32!==t.length)throw Error("bad p size");var r=new Uint8Array(32);return P(r,e,t),r},e.box={},e.box.keyPair=function(){var e,t,i=new Uint8Array(32),n=new Uint8Array(32);return e=i,r(t=n,32),x(e,t),{publicKey:i,secretKey:n}},e.box.keyPair.fromSecretKey=function(e){if(O(e),32!==e.length)throw Error("bad secret key size");var t=new Uint8Array(32);return x(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.sign=function(r,i){if(O(r,i),64!==i.length)throw Error("bad secret key size");var n=new Uint8Array(q+r.length);return function(r,i,n,a){var s,o,c,u,h,f=new Float64Array(64),d=[t(),t(),t(),t()];(s=e.hash(a.subarray(0,32)))[0]&=248,s[31]&=127,s[31]|=64;var l=n+64;for(u=0;u<n;u++)r[64+u]=i[u];for(u=0;u<32;u++)r[32+u]=s[32+u];for(T(c=e.hash(r.subarray(32,l))),R(d,c),K(r,d),u=32;u<64;u++)r[u]=a[u];for(T(o=e.hash(r.subarray(0,l))),u=0;u<64;u++)f[u]=0;for(u=0;u<32;u++)f[u]=c[u];for(u=0;u<32;u++)for(h=0;h<32;h++)f[u+h]+=o[u]*s[h];B(r.subarray(32),f)}(n,r,r.length,i),n},e.sign.detached=function(t,r){for(var i=e.sign(t,r),n=new Uint8Array(q),a=0;a<n.length;a++)n[a]=i[a];return n},e.sign.detached.verify=function(r,i,n){if(O(r,i,n),i.length!==q)throw Error("bad signature size");if(32!==n.length)throw Error("bad public key size");var a,s=new Uint8Array(q+r.length),o=new Uint8Array(q+r.length);for(a=0;a<q;a++)s[a]=i[a];for(a=0;a<r.length;a++)s[a+q]=r[a];return function(r,i,n,a){var s,o,c=new Uint8Array(32),u=[t(),t(),t(),t()],h=[t(),t(),t(),t()];if(n<64)return-1;if(z(h,a))return-1;for(s=0;s<n;s++)r[s]=i[s];for(s=0;s<32;s++)r[s+32]=a[s];if(T(o=e.hash(r.subarray(0,n))),D(u,h,o),R(h,i.subarray(32)),M(u,h),K(c,u),n-=64,l(i,0,c,0)){for(s=0;s<n;s++)r[s]=0;return-1}for(s=0;s<n;s++)r[s]=i[s+64];return n}(o,s,s.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return U(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(O(e),64!==e.length)throw Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(O(e),32!==e.length)throw Error("bad seed size");for(var t=new Uint8Array(32),r=new Uint8Array(64),i=0;i<32;i++)r[i]=e[i];return U(t,r,!0),{publicKey:t,secretKey:r}},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){var i,n=new Uint8Array(r);for(i=0;i<r;i+=65536)t.getRandomValues(n.subarray(i,i+Math.min(r-i,65536)));for(i=0;i<r;i++)e[i]=n[i];F(n)}))}else(t=f.default)&&t.randomBytes&&e.setPRNG((function(e,r){var i,n=t.randomBytes(r);for(i=0;i<r;i++)e[i]=n[i];F(n)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})}));const ti=ce.getNodeCrypto();async function ri(e){const t=new Uint8Array(e);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(t);else if(ti){const e=ti.randomBytes(t.length);t.set(e)}else{if(!ni.buffer)throw Error("No secure random number generator available.");await ni.get(t)}return t}async function ii(e,t){const r=await ce.getBigInteger();if(t.lt(e))throw Error("Illegal parameter value: max <= min");const i=t.sub(e),n=i.byteLength();return new r(await ri(n+8)).mod(i).add(e)}const ni=new class{constructor(){this.buffer=null,this.size=null,this.callback=null}init(e,t){this.buffer=new Uint8Array(e),this.size=0,this.callback=t}set(e){if(!this.buffer)throw Error("RandomBuffer is not initialized");if(!(e instanceof Uint8Array))throw Error("Invalid type: buf not an Uint8Array");const t=this.buffer.length-this.size;e.length>t&&(e=e.subarray(0,t)),this.buffer.set(e,this.size),this.size+=e.length}async get(e){if(!this.buffer)throw Error("RandomBuffer is not initialized");if(!(e instanceof Uint8Array))throw Error("Invalid type: buf not an Uint8Array");if(this.size<e.length){if(!this.callback)throw Error("Random number buffer depleted");return await this.callback(),this.get(e)}for(let t=0;t<e.length;t++)e[t]=this.buffer[--this.size],this.buffer[this.size]=0}};var ai=/*#__PURE__*/Object.freeze({__proto__:null,getRandomBytes:ri,getRandomBigInteger:ii,randomBuffer:ni});async function si(e,t,r){const i=await ce.getBigInteger(),n=new i(1),a=n.leftShift(new i(e-1)),s=new i(30),o=[1,6,5,4,3,2,1,4,3,2,1,2,1,4,3,2,1,2,1,4,3,2,1,6,5,4,3,2,1,2],c=await ii(a,a.leftShift(n));let u=c.mod(s).toNumber();do{c.iadd(new i(o[u])),u=(u+o[u])%o.length,c.bitLength()>e&&(c.imod(a.leftShift(n)).iadd(a),u=c.mod(s).toNumber())}while(!await oi(c,t,r));return c}async function oi(e,t,r){return!(t&&!e.dec().gcd(t).isOne())&&(!!await async function(e){const t=await ce.getBigInteger();return ci.every((r=>0!==e.mod(new t(r))))}(e)&&(!!await async function(e,t){const r=await ce.getBigInteger();return(t=t||new r(2)).modExp(e.dec(),e).isOne()}(e)&&!!await async function(e,t,r){const i=await ce.getBigInteger(),n=e.bitLength();t||(t=Math.max(1,n/48|0));const a=e.dec();let s=0;for(;!a.getBit(s);)s++;const o=e.rightShift(new i(s));for(;t>0;t--){let t,n=(r?r():await ii(new i(2),a)).modExp(o,e);if(!n.isOne()&&!n.equal(a)){for(t=1;t<s;t++){if(n=n.mul(n).mod(e),n.isOne())return!1;if(n.equal(a))break}if(t===s)return!1}}return!0}(e,r)))}const ci=[7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999];const ui=[];async function hi(e,t){const r=e.length;if(r>t-11)throw Error("Message too long");const i=await async function(e){const t=new Uint8Array(e);let r=0;for(;r<e;){const i=await ri(e-r);for(let e=0;e<i.length;e++)0!==i[e]&&(t[r++]=i[e])}return t}(t-r-3),n=new Uint8Array(t);return n[1]=2,n.set(i,2),n.set(e,t-r),n}function fi(e,t){let r=2,i=1;for(let t=r;t<e.length;t++)i&=0!==e[t],r+=i;const n=r-2,a=e.subarray(r+1),s=0===e[0]&2===e[1]&n>=8&!i;if(t)return ce.selectUint8Array(s,a,t);if(s)return a;throw Error("Decryption error")}async function di(e,t,r){let i;if(t.length!==Qr.getHashByteLength(e))throw Error("Invalid hash length");const n=new Uint8Array(ui[e].length);for(i=0;i<ui[e].length;i++)n[i]=ui[e][i];const a=n.length+t.length;if(r<a+11)throw Error("Intended encoded message length too short");const s=new Uint8Array(r-a-3).fill(255),o=new Uint8Array(r);return o[1]=1,o.set(s,2),o.set(n,r-a),o.set(t,r-t.length),o}ui[1]=[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],ui[2]=[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],ui[3]=[48,33,48,9,6,5,43,36,3,2,1,5,0,4,20],ui[8]=[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],ui[9]=[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],ui[10]=[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64],ui[11]=[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28];var li=/*#__PURE__*/Object.freeze({__proto__:null,emeEncode:hi,emeDecode:fi,emsaEncode:di});const pi=ce.getWebCrypto(),yi=ce.getNodeCrypto(),bi=yi?y.default:void 0,mi=yi?bi.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())})):void 0,gi=yi?bi.define("RSAPubliceKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())})):void 0;var wi=/*#__PURE__*/Object.freeze({__proto__:null,sign:async function(e,t,r,i,n,a,s,o,c){if(t&&!ce.isStream(t))if(ce.getWebCrypto())try{return await async function(e,t,r,i,n,a,s,o){const c=await async function(e,t,r,i,n,a){const s=await ce.getBigInteger(),o=new s(i),c=new s(n),u=new s(r);let h=u.mod(c.dec()),f=u.mod(o.dec());return f=f.toUint8Array(),h=h.toUint8Array(),{kty:"RSA",n:ye(e,!0),e:ye(t,!0),d:ye(r,!0),p:ye(n,!0),q:ye(i,!0),dp:ye(h,!0),dq:ye(f,!0),qi:ye(a,!0),ext:!0}}(r,i,n,a,s,o),u={name:"RSASSA-PKCS1-v1_5",hash:{name:e}},h=await pi.importKey("jwk",c,u,!1,["sign"]);return new Uint8Array(await pi.sign("RSASSA-PKCS1-v1_5",h,t))}(me.read(me.webHash,e),t,r,i,n,a,s,o)}catch(e){ce.printDebugError(e)}else if(ce.getNodeCrypto())return async function(e,t,r,i,n,a,s,o){const{default:c}=await Promise.resolve().then((function(){return Rd})),u=new c(a),h=new c(s),f=new c(n),d=f.mod(h.subn(1)),l=f.mod(u.subn(1)),p=yi.createSign(me.read(me.hash,e));p.write(t),p.end();const y={version:0,modulus:new c(r),publicExponent:new c(i),privateExponent:new c(n),prime1:new c(s),prime2:new c(a),exponent1:d,exponent2:l,coefficient:new c(o)};if(void 0!==yi.createPrivateKey){const e=mi.encode(y,"der");return new Uint8Array(p.sign({key:e,format:"der",type:"pkcs1"}))}const b=mi.encode(y,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(p.sign(b))}(e,t,r,i,n,a,s,o);return async function(e,t,r,i){const n=await ce.getBigInteger();t=new n(t);const a=new n(await di(e,i,t.byteLength()));if(r=new n(r),a.gte(t))throw Error("Message size cannot exceed modulus size");return a.modExp(r,t).toUint8Array("be",t.byteLength())}(e,r,n,c)},verify:async function(e,t,r,i,n,a){if(t&&!ce.isStream(t))if(ce.getWebCrypto())try{return await async function(e,t,r,i,n){const a=function(e,t){return{kty:"RSA",n:ye(e,!0),e:ye(t,!0),ext:!0}}(i,n),s=await pi.importKey("jwk",a,{name:"RSASSA-PKCS1-v1_5",hash:{name:e}},!1,["verify"]);return pi.verify("RSASSA-PKCS1-v1_5",s,r,t)}(me.read(me.webHash,e),t,r,i,n)}catch(e){ce.printDebugError(e)}else if(ce.getNodeCrypto())return async function(e,t,r,i,n){const{default:a}=await Promise.resolve().then((function(){return Rd})),s=yi.createVerify(me.read(me.hash,e));s.write(t),s.end();const o={modulus:new a(i),publicExponent:new a(n)};let c;if(void 0!==yi.createPrivateKey){c={key:gi.encode(o,"der"),format:"der",type:"pkcs1"}}else c=gi.encode(o,"pem",{label:"RSA PUBLIC KEY"});try{return await s.verify(c,r)}catch(e){return!1}}(e,t,r,i,n);return async function(e,t,r,i,n){const a=await ce.getBigInteger();if(r=new a(r),t=new a(t),i=new a(i),t.gte(r))throw Error("Signature size cannot exceed modulus size");const s=t.modExp(i,r).toUint8Array("be",r.byteLength()),o=await di(e,n,r.byteLength());return ce.equalsUint8Array(s,o)}(e,r,i,n,a)},encrypt:async function(e,t,r){return ce.getNodeCrypto()?async function(e,t,r){const{default:i}=await Promise.resolve().then((function(){return Rd})),n={modulus:new i(t),publicExponent:new i(r)};let a;if(void 0!==yi.createPrivateKey){a={key:gi.encode(n,"der"),format:"der",type:"pkcs1",padding:yi.constants.RSA_PKCS1_PADDING}}else{a={key:gi.encode(n,"pem",{label:"RSA PUBLIC KEY"}),padding:yi.constants.RSA_PKCS1_PADDING}}return new Uint8Array(yi.publicEncrypt(a,e))}(e,t,r):async function(e,t,r){const i=await ce.getBigInteger();if(t=new i(t),e=new i(await hi(e,t.byteLength())),r=new i(r),e.gte(t))throw Error("Message size cannot exceed modulus size");return e.modExp(r,t).toUint8Array("be",t.byteLength())}(e,t,r)},decrypt:async function(e,t,r,i,n,a,s,o){return ce.getNodeCrypto()?async function(e,t,r,i,n,a,s,o){const{default:c}=await Promise.resolve().then((function(){return Rd})),u=new c(n),h=new c(a),f=new c(i),d=f.mod(h.subn(1)),l=f.mod(u.subn(1)),p={version:0,modulus:new c(t),publicExponent:new c(r),privateExponent:new c(i),prime1:new c(a),prime2:new c(n),exponent1:d,exponent2:l,coefficient:new c(s)};let y;if(void 0!==yi.createPrivateKey){y={key:mi.encode(p,"der"),format:"der",type:"pkcs1",padding:yi.constants.RSA_PKCS1_PADDING}}else{y={key:mi.encode(p,"pem",{label:"RSA PRIVATE KEY"}),padding:yi.constants.RSA_PKCS1_PADDING}}try{return new Uint8Array(yi.privateDecrypt(y,e))}catch(e){if(o)return o;throw Error("Decryption error")}}(e,t,r,i,n,a,s,o):async function(e,t,r,i,n,a,s,o){const c=await ce.getBigInteger();if(e=new c(e),t=new c(t),r=new c(r),i=new c(i),n=new c(n),a=new c(a),s=new c(s),e.gte(t))throw Error("Data too large.");const u=i.mod(a.dec()),h=i.mod(n.dec()),f=(await ii(new c(2),t)).mod(t),d=f.modInv(t).modExp(r,t),l=(e=e.mul(d).mod(t)).modExp(h,n),p=e.modExp(u,a);let y=s.mul(p.sub(l)).mod(a).mul(n).add(l);return y=y.mul(f).mod(t),fi(y.toUint8Array("be",t.byteLength()),o)}(e,t,r,i,n,a,s,o)},generate:async function(e,t){if(t=new(await ce.getBigInteger())(t),ce.getWebCrypto()){const r={name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:t.toUint8Array(),hash:{name:"SHA-1"}},i=await pi.generateKey(r,!0,["sign","verify"]),n=await pi.exportKey("jwk",i.privateKey);return{n:pe(n.n),e:t.toUint8Array(),d:pe(n.d),p:pe(n.q),q:pe(n.p),u:pe(n.qi)}}if(ce.getNodeCrypto()&&yi.generateKeyPair&&mi){const r={modulusLength:e,publicExponent:t.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},i=await new Promise(((e,t)=>yi.generateKeyPair("rsa",r,((r,i,n)=>{r?t(r):e(mi.decode(n,"der"))}))));return{n:i.modulus.toArrayLike(Uint8Array),e:i.publicExponent.toArrayLike(Uint8Array),d:i.privateExponent.toArrayLike(Uint8Array),p:i.prime2.toArrayLike(Uint8Array),q:i.prime1.toArrayLike(Uint8Array),u:i.coefficient.toArrayLike(Uint8Array)}}let r,i,n;do{i=await si(e-(e>>1),t,40),r=await si(e>>1,t,40),n=r.mul(i)}while(n.bitLength()!==e);const a=r.dec().imul(i.dec());return i.lt(r)&&([r,i]=[i,r]),{n:n.toUint8Array(),e:t.toUint8Array(),d:t.modInv(a).toUint8Array(),p:r.toUint8Array(),q:i.toUint8Array(),u:r.modInv(i).toUint8Array()}},validateParams:async function(e,t,r,i,n,a){const s=await ce.getBigInteger();if(e=new s(e),i=new s(i),n=new s(n),!i.mul(n).equal(e))return!1;const o=new s(2);if(a=new s(a),!i.mul(a).mod(n).isOne())return!1;t=new s(t),r=new s(r);const c=new s(Math.floor(e.bitLength()/3)),u=await ii(o,o.leftShift(c)),h=u.mul(r).mul(t);return!(!h.mod(i.dec()).equal(u)||!h.mod(n.dec()).equal(u))}});var vi=/*#__PURE__*/Object.freeze({__proto__:null,encrypt:async function(e,t,r,i){const n=await ce.getBigInteger();t=new n(t),r=new n(r),i=new n(i);const a=new n(await hi(e,t.byteLength())),s=await ii(new n(1),t.dec());return{c1:r.modExp(s,t).toUint8Array(),c2:i.modExp(s,t).imul(a).imod(t).toUint8Array()}},decrypt:async function(e,t,r,i,n){const a=await ce.getBigInteger();return e=new a(e),t=new a(t),r=new a(r),i=new a(i),fi(e.modExp(i,r).modInv(r).imul(t).imod(r).toUint8Array("be",r.byteLength()),n)},validateParams:async function(e,t,r,i){const n=await ce.getBigInteger();e=new n(e),t=new n(t),r=new n(r);const a=new n(1);if(t.lte(a)||t.gte(e))return!1;const s=new n(e.bitLength()),o=new n(1023);if(s.lt(o))return!1;if(!t.modExp(e.dec(),e).isOne())return!1;let c=t;const u=new n(1),h=new n(2).leftShift(new n(17));for(;u.lt(h);){if(c=c.mul(t).imod(e),c.isOne())return!1;u.iinc()}i=new n(i);const f=new n(2),d=await ii(f.leftShift(s.dec()),f.leftShift(s)),l=e.dec().imul(d).iadd(i);return!!r.equal(t.modExp(l,e))}});class _i{constructor(e){if(e instanceof _i)this.oid=e.oid;else if(ce.isArray(e)||ce.isUint8Array(e)){if(6===(e=new Uint8Array(e))[0]){if(e[1]!==e.length-2)throw Error("Length mismatch in DER encoded oid");e=e.subarray(2)}this.oid=e}else this.oid=""}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.oid=e.subarray(1,1+t),1+this.oid.length}throw Error("Invalid oid")}write(){return ce.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return ce.uint8ArrayToHex(this.oid)}getName(){const e=this.toHex();if(me.curve[e])return me.write(me.curve,e);throw Error("Unknown curve object identifier.")}}function ki(e,t){return e.keyPair({priv:t})}function Ai(e,t){const r=e.keyPair({pub:t});if(!0!==r.validate().result)throw Error("Invalid elliptic public key");return r}async function Si(e){if(!ge.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await Promise.resolve().then((function(){return Xl}));return new t.ec(e)}function Ei(e){let t,r=0;const i=e[0];return i<192?([r]=e,t=1):i<255?(r=(e[0]-192<<8)+e[1]+192,t=2):255===i&&(r=ce.readNumber(e.subarray(1,5)),t=5),{len:r,offset:t}}function Pi(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):ce.concatUint8Array([new Uint8Array([255]),ce.writeNumber(e,4)])}function xi(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function Mi(e){return new Uint8Array([192|e])}function Ci(e,t){return ce.concatUint8Array([Mi(e),Pi(t)])}function Ki(e){return[me.packet.literalData,me.packet.compressedData,me.packet.symmetricallyEncryptedData,me.packet.symEncryptedIntegrityProtectedData,me.packet.aeadEncryptedData].includes(e)}async function Di(e,t){const r=H(e);let i,n;try{const a=await r.peekBytes(2);if(!a||a.length<2||0==(128&a[0]))throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const s=await r.readByte();let o,c,u=-1,h=-1;h=0,0!=(64&s)&&(h=1),h?u=63&s:(u=(63&s)>>2,c=3&s);const f=Ki(u);let d,l=null;if(f){if("array"===ce.isStream(e)){const e=new v;i=G(e),l=e}else{const e=new O;i=G(e.writable),l=e.readable}n=t({tag:u,packet:l})}else l=[];do{if(h){const e=await r.readByte();if(d=!1,e<192)o=e;else if(e>=192&&e<224)o=(e-192<<8)+await r.readByte()+192;else if(e>223&&e<255){if(o=1<<(31&e),d=!0,!f)throw new TypeError("This packet type does not support partial lengths.")}else o=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte()}else switch(c){case 0:o=await r.readByte();break;case 1:o=await r.readByte()<<8|await r.readByte();break;case 2:o=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte();break;default:o=1/0}if(o>0){let e=0;for(;;){i&&await i.ready;const{done:t,value:n}=await r.read();if(t){if(o===1/0)break;throw Error("Unexpected end of packet")}const a=o===1/0?n:n.subarray(0,o-e);if(i?await i.write(a):l.push(a),e+=n.length,e>=o){r.unshift(n.subarray(o-e+n.length));break}}}}while(d);const p=await r.peekBytes(f?1/0:2);return i?(await i.ready,await i.close()):(l=ce.concatUint8Array(l),await t({tag:u,packet:l})),!p||!p.length}catch(e){if(i)return await i.abort(e),!0;throw e}finally{i&&await n,r.releaseLock()}}class Ri extends Error{constructor(...e){super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,Ri),this.name="UnsupportedError"}}class Ui{constructor(e,t){this.tag=e,this.rawContent=t}write(){return this.rawContent}}const Ii=ce.getWebCrypto(),Bi=ce.getNodeCrypto(),Ti={p256:"P-256",p384:"P-384",p521:"P-521"},zi=Bi?Bi.getCurves():[],qi=Bi?{secp256k1:zi.includes("secp256k1")?"secp256k1":void 0,p256:zi.includes("prime256v1")?"prime256v1":void 0,p384:zi.includes("secp384r1")?"secp384r1":void 0,p521:zi.includes("secp521r1")?"secp521r1":void 0,ed25519:zi.includes("ED25519")?"ED25519":void 0,curve25519:zi.includes("X25519")?"X25519":void 0,brainpoolP256r1:zi.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:zi.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:zi.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},Oi={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:me.publicKey.ecdsa,hash:me.hash.sha256,cipher:me.symmetric.aes128,node:qi.p256,web:Ti.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:me.publicKey.ecdsa,hash:me.hash.sha384,cipher:me.symmetric.aes192,node:qi.p384,web:Ti.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:me.publicKey.ecdsa,hash:me.hash.sha512,cipher:me.symmetric.aes256,node:qi.p521,web:Ti.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:me.publicKey.ecdsa,hash:me.hash.sha256,cipher:me.symmetric.aes128,node:qi.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:me.publicKey.eddsa,hash:me.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:me.publicKey.ecdh,hash:me.hash.sha256,cipher:me.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:me.publicKey.ecdsa,hash:me.hash.sha256,cipher:me.symmetric.aes128,node:qi.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:me.publicKey.ecdsa,hash:me.hash.sha384,cipher:me.symmetric.aes192,node:qi.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:me.publicKey.ecdsa,hash:me.hash.sha512,cipher:me.symmetric.aes256,node:qi.brainpoolP512r1,payloadSize:64}};class Fi{constructor(e,t){try{(ce.isArray(e)||ce.isUint8Array(e))&&(e=new _i(e)),e instanceof _i&&(e=e.getName()),this.name=me.write(me.curve,e)}catch(e){throw new Ri("Unknown curve")}t=t||Oi[this.name],this.keyType=t.keyType,this.oid=t.oid,this.hash=t.hash,this.cipher=t.cipher,this.node=t.node&&Oi[this.name],this.web=t.web&&Oi[this.name],this.payloadSize=t.payloadSize,this.web&&ce.getWebCrypto()?this.type="web":this.node&&ce.getNodeCrypto()?this.type="node":"curve25519"===this.name?this.type="curve25519":"ed25519"===this.name&&(this.type="ed25519")}async genKeyPair(){let e;switch(this.type){case"web":try{return await async function(e){const t=await Ii.generateKey({name:"ECDSA",namedCurve:Ti[e]},!0,["sign","verify"]),r=await Ii.exportKey("jwk",t.privateKey);return{publicKey:ji(await Ii.exportKey("jwk",t.publicKey)),privateKey:pe(r.d)}}(this.name)}catch(e){ce.printDebugError("Browser did not support generating ec key "+e.message);break}case"node":return async function(e){const t=Bi.createECDH(qi[e]);return await t.generateKeys(),{publicKey:new Uint8Array(t.getPublicKey()),privateKey:new Uint8Array(t.getPrivateKey())}}(this.name);case"curve25519":{const t=await ri(32);t[0]=127&t[0]|64,t[31]&=248;const r=t.slice().reverse();e=ei.box.keyPair.fromSecretKey(r);return{publicKey:ce.concatUint8Array([new Uint8Array([64]),e.publicKey]),privateKey:t}}case"ed25519":{const e=await ri(32),t=ei.sign.keyPair.fromSeed(e);return{publicKey:ce.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:e}}}const t=await Si(this.name);return e=await t.genKeyPair({entropy:ce.uint8ArrayToString(await ri(32))}),{publicKey:new Uint8Array(e.getPublic("array",!1)),privateKey:e.getPrivate().toArrayLike(Uint8Array)}}}async function Ni(e,t,r,i){const n={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===me.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=t.getName();if(!n[a])return!1;if("curve25519"===a){i=i.slice().reverse();const{publicKey:e}=ei.box.keyPair.fromSecretKey(i);r=new Uint8Array(r);const t=new Uint8Array([64,...e]);return!!ce.equalsUint8Array(t,r)}const s=await Si(a);try{r=Ai(s,r).getPublic()}catch(e){return!1}return!!ki(s,i).getPublic().eq(r)}function ji(e){const t=pe(e.x),r=pe(e.y),i=new Uint8Array(t.length+r.length+1);return i[0]=4,i.set(t,1),i.set(r,t.length+1),i}function Li(e,t,r){const i=e,n=r.slice(1,i+1),a=r.slice(i+1,2*i+1);return{kty:"EC",crv:t,x:ye(n,!0),y:ye(a,!0),ext:!0}}function Wi(e,t,r,i){const n=Li(e,t,r);return n.d=ye(i,!0),n}const Hi=ce.getWebCrypto(),Gi=ce.getNodeCrypto();async function Vi(e,t,r,i,n,a){const s=new Fi(e);if(r&&!ce.isStream(r)){const e={publicKey:i,privateKey:n};switch(s.type){case"web":try{return await async function(e,t,r,i){const n=e.payloadSize,a=Wi(e.payloadSize,Ti[e.name],i.publicKey,i.privateKey),s=await Hi.importKey("jwk",a,{name:"ECDSA",namedCurve:Ti[e.name],hash:{name:me.read(me.webHash,e.hash)}},!1,["sign"]),o=new Uint8Array(await Hi.sign({name:"ECDSA",namedCurve:Ti[e.name],hash:{name:me.read(me.webHash,t)}},s,r));return{r:o.slice(0,n),s:o.slice(n,n<<1)}}(s,t,r,e)}catch(e){if("p521"!==s.name&&("DataError"===e.name||"OperationError"===e.name))throw e;ce.printDebugError("Browser did not support signing: "+e.message)}break;case"node":{const i=await async function(e,t,r,i){const n=Gi.createSign(me.read(me.hash,t));n.write(r),n.end();const a=Xi.encode({version:1,parameters:e.oid,privateKey:Array.from(i.privateKey),publicKey:{unused:0,data:Array.from(i.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return Yi.decode(n.sign(a),"der")}(s,t,r,e);return{r:i.r.toArrayLike(Uint8Array),s:i.s.toArrayLike(Uint8Array)}}}}return async function(e,t,r){const i=await Si(e.name),n=ki(i,r).sign(t);return{r:n.r.toArrayLike(Uint8Array),s:n.s.toArrayLike(Uint8Array)}}(s,a,n)}async function $i(e,t,r,i,n,a){const s=new Fi(e);if(i&&!ce.isStream(i))switch(s.type){case"web":try{return await async function(e,t,{r,s:i},n,a){const s=Li(e.payloadSize,Ti[e.name],a),o=await Hi.importKey("jwk",s,{name:"ECDSA",namedCurve:Ti[e.name],hash:{name:me.read(me.webHash,e.hash)}},!1,["verify"]),c=ce.concatUint8Array([r,i]).buffer;return Hi.verify({name:"ECDSA",namedCurve:Ti[e.name],hash:{name:me.read(me.webHash,t)}},o,c,n)}(s,t,r,i,n)}catch(e){if("p521"!==s.name&&("DataError"===e.name||"OperationError"===e.name))throw e;ce.printDebugError("Browser did not support verifying: "+e.message)}break;case"node":return async function(e,t,{r,s:i},n,a){const{default:s}=await Promise.resolve().then((function(){return Rd})),o=Gi.createVerify(me.read(me.hash,t));o.write(n),o.end();const c=Ji.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:e.oid},subjectPublicKey:{unused:0,data:Array.from(a)}},"pem",{label:"PUBLIC KEY"}),u=Yi.encode({r:new s(r),s:new s(i)},"der");try{return o.verify(c,u)}catch(e){return!1}}(s,t,r,i,n)}return async function(e,t,r,i){const n=await Si(e.name);return Ai(n,i).verify(r,t)}(s,r,void 0===t?i:a,n)}const Zi=Gi?y.default:void 0,Yi=Gi?Zi.define("ECDSASignature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())})):void 0,Xi=Gi?Zi.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())})):void 0,Qi=Gi?Zi.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())})):void 0,Ji=Gi?Zi.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Qi),this.key("subjectPublicKey").bitstr())})):void 0;var en=/*#__PURE__*/Object.freeze({__proto__:null,sign:Vi,verify:$i,validateParams:async function(e,t,r){const i=new Fi(e);if(i.keyType!==me.publicKey.ecdsa)return!1;switch(i.type){case"web":case"node":{const i=await ri(8),n=me.hash.sha256,a=await Qr.digest(n,i);try{const s=await Vi(e,n,i,t,r,a);return await $i(e,n,s,i,t,a)}catch(e){return!1}}default:return Ni(me.publicKey.ecdsa,e,t,r)}}});ei.hash=e=>new Uint8Array(sr().update(e).digest());var tn=/*#__PURE__*/Object.freeze({__proto__:null,sign:async function(e,t,r,i,n,a){if(Qr.getHashByteLength(t)<Qr.getHashByteLength(me.hash.sha256))throw Error("Hash algorithm too weak: sha256 or stronger is required for EdDSA.");const s=ce.concatUint8Array([n,i.subarray(1)]),o=ei.sign.detached(a,s);return{r:o.subarray(0,32),s:o.subarray(32)}},verify:async function(e,t,{r,s:i},n,a,s){const o=ce.concatUint8Array([r,i]);return ei.sign.detached.verify(s,o,a.subarray(1))},validateParams:async function(e,t,r){if("ed25519"!==e.getName())return!1;const{publicKey:i}=ei.sign.keyPair.fromSeed(r),n=new Uint8Array([64,...i]);return ce.equalsUint8Array(t,n)}});function rn(e,t){const r=new nt["aes"+8*e.length](e),i=new Uint32Array([2795939494,2795939494]),n=an(t);let a=i;const s=n,o=n.length/2,c=new Uint32Array([0,0]);let u=new Uint32Array(4);for(let e=0;e<=5;++e)for(let t=0;t<o;++t)c[1]=o*e+(1+t),u[0]=a[0],u[1]=a[1],u[2]=s[2*t],u[3]=s[2*t+1],u=an(r.encrypt(sn(u))),a=u.subarray(0,2),a[0]^=c[0],a[1]^=c[1],s[2*t]=u[2],s[2*t+1]=u[3];return sn(a,s)}function nn(e,t){const r=new nt["aes"+8*e.length](e),i=new Uint32Array([2795939494,2795939494]),n=an(t);let a=n.subarray(0,2);const s=n.subarray(2),o=n.length/2-1,c=new Uint32Array([0,0]);let u=new Uint32Array(4);for(let e=5;e>=0;--e)for(let t=o-1;t>=0;--t)c[1]=o*e+(t+1),u[0]=a[0]^c[0],u[1]=a[1]^c[1],u[2]=s[2*t],u[3]=s[2*t+1],u=an(r.decrypt(sn(u))),a=u.subarray(0,2),s[2*t]=u[2],s[2*t+1]=u[3];if(a[0]===i[0]&&a[1]===i[1])return sn(s);throw Error("Key Data Integrity failed")}function an(e){const{length:t}=e,r=function(e){if(ce.isString(e)){const{length:t}=e,r=new ArrayBuffer(t),i=new Uint8Array(r);for(let r=0;r<t;++r)i[r]=e.charCodeAt(r);return r}return new Uint8Array(e).buffer}(e),i=new DataView(r),n=new Uint32Array(t/4);for(let e=0;e<t/4;++e)n[e]=i.getUint32(4*e);return n}function sn(){let e=0;for(let t=0;t<arguments.length;++t)e+=4*arguments[t].length;const t=new ArrayBuffer(e),r=new DataView(t);let i=0;for(let e=0;e<arguments.length;++e){for(let t=0;t<arguments[e].length;++t)r.setUint32(i+4*t,arguments[e][t]);i+=4*arguments[e].length}return new Uint8Array(t)}var on=/*#__PURE__*/Object.freeze({__proto__:null,wrap:rn,unwrap:nn});function cn(e){const t=8-e.length%8,r=new Uint8Array(e.length+t).fill(t);return r.set(e),r}function un(e){const t=e.length;if(t>0){const r=e[t-1];if(r>=1){const i=e.subarray(t-r),n=new Uint8Array(r).fill(r);if(ce.equalsUint8Array(i,n))return e.subarray(0,t-r)}}throw Error("Invalid padding")}var hn=/*#__PURE__*/Object.freeze({__proto__:null,encode:cn,decode:un});const fn=ce.getWebCrypto(),dn=ce.getNodeCrypto();function ln(e,t,r,i){return ce.concatUint8Array([t.write(),new Uint8Array([e]),r.write(),ce.stringToUint8Array("Anonymous Sender "),i.subarray(0,20)])}async function pn(e,t,r,i,n=!1,a=!1){let s;if(n){for(s=0;s<t.length&&0===t[s];s++);t=t.subarray(s)}if(a){for(s=t.length-1;s>=0&&0===t[s];s--);t=t.subarray(0,s+1)}return(await Qr.digest(e,ce.concatUint8Array([new Uint8Array([0,0,0,1]),t,i]))).subarray(0,r)}async function yn(e,t){switch(e.type){case"curve25519":{const r=await ri(32),{secretKey:i,sharedKey:n}=await bn(e,t,null,r);let{publicKey:a}=ei.box.keyPair.fromSecretKey(i);return a=ce.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:n}}case"web":if(e.web&&ce.getWebCrypto())try{return await async function(e,t){const r=Li(e.payloadSize,e.web.web,t);let i=fn.generateKey({name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]),n=fn.importKey("jwk",r,{name:"ECDH",namedCurve:e.web.web},!1,[]);[i,n]=await Promise.all([i,n]);let a=fn.deriveBits({name:"ECDH",namedCurve:e.web.web,public:n},i.privateKey,e.web.sharedSize),s=fn.exportKey("jwk",i.publicKey);[a,s]=await Promise.all([a,s]);const o=new Uint8Array(a);return{publicKey:new Uint8Array(ji(s)),sharedKey:o}}(e,t)}catch(e){ce.printDebugError(e)}break;case"node":return async function(e,t){const r=dn.createECDH(e.node.node);r.generateKeys();const i=new Uint8Array(r.computeSecret(t));return{publicKey:new Uint8Array(r.getPublicKey()),sharedKey:i}}(e,t)}return async function(e,t){const r=await Si(e.name),i=await e.genKeyPair();t=Ai(r,t);const n=ki(r,i.privateKey),a=i.publicKey,s=n.derive(t.getPublic()),o=r.curve.p.byteLength(),c=s.toArrayLike(Uint8Array,"be",o);return{publicKey:a,sharedKey:c}}(e,t)}async function bn(e,t,r,i){if(i.length!==e.payloadSize){const t=new Uint8Array(e.payloadSize);t.set(i,e.payloadSize-i.length),i=t}switch(e.type){case"curve25519":{const e=i.slice().reverse();return{secretKey:e,sharedKey:ei.scalarMult(e,t.subarray(1))}}case"web":if(e.web&&ce.getWebCrypto())try{return await async function(e,t,r,i){const n=Wi(e.payloadSize,e.web.web,r,i);let a=fn.importKey("jwk",n,{name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]);const s=Li(e.payloadSize,e.web.web,t);let o=fn.importKey("jwk",s,{name:"ECDH",namedCurve:e.web.web},!0,[]);[a,o]=await Promise.all([a,o]);let c=fn.deriveBits({name:"ECDH",namedCurve:e.web.web,public:o},a,e.web.sharedSize),u=fn.exportKey("jwk",a);[c,u]=await Promise.all([c,u]);const h=new Uint8Array(c);return{secretKey:pe(u.d),sharedKey:h}}(e,t,r,i)}catch(e){ce.printDebugError(e)}break;case"node":return async function(e,t,r){const i=dn.createECDH(e.node.node);i.setPrivateKey(r);const n=new Uint8Array(i.computeSecret(t));return{secretKey:new Uint8Array(i.getPrivateKey()),sharedKey:n}}(e,t,i)}return async function(e,t,r){const i=await Si(e.name);t=Ai(i,t),r=ki(i,r);const n=new Uint8Array(r.getPrivate()),a=r.derive(t.getPublic()),s=i.curve.p.byteLength(),o=a.toArrayLike(Uint8Array,"be",s);return{secretKey:n,sharedKey:o}}(e,t,i)}var mn=/*#__PURE__*/Object.freeze({__proto__:null,validateParams:async function(e,t,r){return Ni(me.publicKey.ecdh,e,t,r)},encrypt:async function(e,t,r,i,n){const a=cn(r),s=new Fi(e),{publicKey:o,sharedKey:c}=await yn(s,i),u=ln(me.publicKey.ecdh,e,t,n),{keySize:h}=_n(t.cipher);return{publicKey:o,wrappedKey:rn(await pn(t.hash,c,h,u),a)}},decrypt:async function(e,t,r,i,n,a,s){const o=new Fi(e),{sharedKey:c}=await bn(o,r,n,a),u=ln(me.publicKey.ecdh,e,t,s),{keySize:h}=_n(t.cipher);let f;for(let e=0;e<3;e++)try{return un(nn(await pn(t.hash,c,h,u,1===e,2===e),i))}catch(e){f=e}throw f}});var gn={rsa:wi,elgamal:vi,elliptic:/*#__PURE__*/Object.freeze({__proto__:null,Curve:Fi,ecdh:mn,ecdsa:en,eddsa:tn,generate:async function(e){const t=await ce.getBigInteger();e=new Fi(e);const r=await e.genKeyPair(),i=new t(r.publicKey).toUint8Array(),n=new t(r.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:i,secret:n,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return Oi[me.write(me.curve,e.toHex())].hash}}),dsa:/*#__PURE__*/Object.freeze({__proto__:null,sign:async function(e,t,r,i,n,a){const s=await ce.getBigInteger(),o=new s(1);let c,u,h,f;i=new s(i),n=new s(n),r=new s(r),a=new s(a),r=r.mod(i),a=a.mod(n);const d=new s(t.subarray(0,n.byteLength())).mod(n);for(;;){if(c=await ii(o,n),u=r.modExp(c,i).imod(n),u.isZero())continue;const e=a.mul(u).imod(n);if(f=d.add(e).imod(n),h=c.modInv(n).imul(f).imod(n),!h.isZero())break}return{r:u.toUint8Array("be",n.byteLength()),s:h.toUint8Array("be",n.byteLength())}},verify:async function(e,t,r,i,n,a,s,o){const c=await ce.getBigInteger(),u=new c(0);if(t=new c(t),r=new c(r),a=new c(a),s=new c(s),n=new c(n),o=new c(o),t.lte(u)||t.gte(s)||r.lte(u)||r.gte(s))return ce.printDebug("invalid DSA Signature"),!1;const h=new c(i.subarray(0,s.byteLength())).imod(s),f=r.modInv(s);if(f.isZero())return ce.printDebug("invalid DSA Signature"),!1;n=n.mod(a),o=o.mod(a);const d=h.mul(f).imod(s),l=t.mul(f).imod(s),p=n.modExp(d,a),y=o.modExp(l,a);return p.mul(y).imod(a).imod(s).equal(t)},validateParams:async function(e,t,r,i,n){const a=await ce.getBigInteger();e=new a(e),t=new a(t),r=new a(r),i=new a(i);const s=new a(1);if(r.lte(s)||r.gte(e))return!1;if(!e.dec().mod(t).isZero())return!1;if(!r.modExp(t,e).isOne())return!1;const o=new a(t.bitLength()),c=new a(150);if(o.lt(c)||!await oi(t,null,32))return!1;n=new a(n);const u=new a(2),h=await ii(u.leftShift(o.dec()),u.leftShift(o)),f=t.mul(h).add(n);return!!i.equal(r.modExp(f,e))}}),nacl:ei};class wn{constructor(e){e=void 0===e?new Uint8Array([]):ce.isString(e)?ce.stringToUint8Array(e):new Uint8Array(e),this.data=e}read(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.data=e.subarray(1,1+t),1+this.data.length}throw Error("Invalid symmetric key")}write(){return ce.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class vn{constructor(e){if(e){const{hash:t,cipher:r}=e;this.hash=t,this.cipher=r}else this.hash=null,this.cipher=null}read(e){if(e.length<4||3!==e[0]||1!==e[1])throw Error("Cannot read KDFParams");return this.hash=e[2],this.cipher=e[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}function _n(e){const t=me.read(me.symmetric,e);return nt[t]}function kn(e){try{e.getName()}catch(e){throw new Ri("Unknown curve OID")}}var An=/*#__PURE__*/Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,r,i){switch(e){case me.publicKey.rsaEncrypt:case me.publicKey.rsaEncryptSign:{const{n:e,e:i}=t;return{c:await gn.rsa.encrypt(r,e,i)}}case me.publicKey.elgamal:{const{p:e,g:i,y:n}=t;return gn.elgamal.encrypt(r,e,i,n)}case me.publicKey.ecdh:{const{oid:e,Q:n,kdfParams:a}=t,{publicKey:s,wrappedKey:o}=await gn.elliptic.ecdh.encrypt(e,a,r,n,i);return{V:s,C:new wn(o)}}default:return[]}},publicKeyDecrypt:async function(e,t,r,i,n,a){switch(e){case me.publicKey.rsaEncryptSign:case me.publicKey.rsaEncrypt:{const{c:e}=i,{n,e:s}=t,{d:o,p:c,q:u,u:h}=r;return gn.rsa.decrypt(e,n,s,o,c,u,h,a)}case me.publicKey.elgamal:{const{c1:e,c2:n}=i,s=t.p,o=r.x;return gn.elgamal.decrypt(e,n,s,o,a)}case me.publicKey.ecdh:{const{oid:e,Q:a,kdfParams:s}=t,{d:o}=r,{V:c,C:u}=i;return gn.elliptic.ecdh.decrypt(e,s,c,u.data,a,o,n)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(e,t){let r=0;switch(e){case me.publicKey.rsaEncrypt:case me.publicKey.rsaEncryptSign:case me.publicKey.rsaSign:{const e=ce.readMPI(t.subarray(r));r+=e.length+2;const i=ce.readMPI(t.subarray(r));return r+=i.length+2,{read:r,publicParams:{n:e,e:i}}}case me.publicKey.dsa:{const e=ce.readMPI(t.subarray(r));r+=e.length+2;const i=ce.readMPI(t.subarray(r));r+=i.length+2;const n=ce.readMPI(t.subarray(r));r+=n.length+2;const a=ce.readMPI(t.subarray(r));return r+=a.length+2,{read:r,publicParams:{p:e,q:i,g:n,y:a}}}case me.publicKey.elgamal:{const e=ce.readMPI(t.subarray(r));r+=e.length+2;const i=ce.readMPI(t.subarray(r));r+=i.length+2;const n=ce.readMPI(t.subarray(r));return r+=n.length+2,{read:r,publicParams:{p:e,g:i,y:n}}}case me.publicKey.ecdsa:{const e=new _i;r+=e.read(t),kn(e);const i=ce.readMPI(t.subarray(r));return r+=i.length+2,{read:r,publicParams:{oid:e,Q:i}}}case me.publicKey.eddsa:{const e=new _i;r+=e.read(t),kn(e);let i=ce.readMPI(t.subarray(r));return r+=i.length+2,i=ce.leftPad(i,33),{read:r,publicParams:{oid:e,Q:i}}}case me.publicKey.ecdh:{const e=new _i;r+=e.read(t),kn(e);const i=ce.readMPI(t.subarray(r));r+=i.length+2;const n=new vn;return r+=n.read(t.subarray(r)),{read:r,publicParams:{oid:e,Q:i,kdfParams:n}}}default:throw new Ri("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(e,t,r){let i=0;switch(e){case me.publicKey.rsaEncrypt:case me.publicKey.rsaEncryptSign:case me.publicKey.rsaSign:{const e=ce.readMPI(t.subarray(i));i+=e.length+2;const r=ce.readMPI(t.subarray(i));i+=r.length+2;const n=ce.readMPI(t.subarray(i));i+=n.length+2;const a=ce.readMPI(t.subarray(i));return i+=a.length+2,{read:i,privateParams:{d:e,p:r,q:n,u:a}}}case me.publicKey.dsa:case me.publicKey.elgamal:{const e=ce.readMPI(t.subarray(i));return i+=e.length+2,{read:i,privateParams:{x:e}}}case me.publicKey.ecdsa:case me.publicKey.ecdh:{const e=new Fi(r.oid);let n=ce.readMPI(t.subarray(i));return i+=n.length+2,n=ce.leftPad(n,e.payloadSize),{read:i,privateParams:{d:n}}}case me.publicKey.eddsa:{const e=new Fi(r.oid);let n=ce.readMPI(t.subarray(i));return i+=n.length+2,n=ce.leftPad(n,e.payloadSize),{read:i,privateParams:{seed:n}}}default:throw new Ri("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let r=0;switch(e){case me.publicKey.rsaEncrypt:case me.publicKey.rsaEncryptSign:return{c:ce.readMPI(t.subarray(r))};case me.publicKey.elgamal:{const e=ce.readMPI(t.subarray(r));r+=e.length+2;return{c1:e,c2:ce.readMPI(t.subarray(r))}}case me.publicKey.ecdh:{const e=ce.readMPI(t.subarray(r));r+=e.length+2;const i=new wn;return i.read(t.subarray(r)),{V:e,C:i}}default:throw new Ri("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const r=Object.keys(t).map((e=>{const r=t[e];return ce.isUint8Array(r)?ce.uint8ArrayToMPI(r):r.write()}));return ce.concatUint8Array(r)},generateParams:function(e,t,r){switch(e){case me.publicKey.rsaEncrypt:case me.publicKey.rsaEncryptSign:case me.publicKey.rsaSign:return gn.rsa.generate(t,65537).then((({n:e,e:t,d:r,p:i,q:n,u:a})=>({privateParams:{d:r,p:i,q:n,u:a},publicParams:{n:e,e:t}})));case me.publicKey.ecdsa:return gn.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{d:r},publicParams:{oid:new _i(e),Q:t}})));case me.publicKey.eddsa:return gn.elliptic.generate(r).then((({oid:e,Q:t,secret:r})=>({privateParams:{seed:r},publicParams:{oid:new _i(e),Q:t}})));case me.publicKey.ecdh:return gn.elliptic.generate(r).then((({oid:e,Q:t,secret:r,hash:i,cipher:n})=>({privateParams:{d:r},publicParams:{oid:new _i(e),Q:t,kdfParams:new vn({hash:i,cipher:n})}})));case me.publicKey.dsa:case me.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(e,t,r){if(!t||!r)throw Error("Missing key parameters");switch(e){case me.publicKey.rsaEncrypt:case me.publicKey.rsaEncryptSign:case me.publicKey.rsaSign:{const{n:e,e:i}=t,{d:n,p:a,q:s,u:o}=r;return gn.rsa.validateParams(e,i,n,a,s,o)}case me.publicKey.dsa:{const{p:e,q:i,g:n,y:a}=t,{x:s}=r;return gn.dsa.validateParams(e,i,n,a,s)}case me.publicKey.elgamal:{const{p:e,g:i,y:n}=t,{x:a}=r;return gn.elgamal.validateParams(e,i,n,a)}case me.publicKey.ecdsa:case me.publicKey.ecdh:{const i=gn.elliptic[me.read(me.publicKey,e)],{oid:n,Q:a}=t,{d:s}=r;return i.validateParams(n,a,s)}case me.publicKey.eddsa:{const{oid:e,Q:i}=t,{seed:n}=r;return gn.elliptic.eddsa.validateParams(e,i,n)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=_n(e),r=await ri(t),i=new Uint8Array([r[r.length-2],r[r.length-1]]);return ce.concat([r,i])},generateSessionKey:function(e){const{keySize:t}=_n(e);return ri(t)},getAEADMode:function(e){const t=me.read(me.aead,e);return ra[t]},getCipher:_n});const Sn=ce.getWebCrypto(),En=ce.getNodeCrypto(),Pn=En?En.getCiphers():[],xn={idea:Pn.includes("idea-cfb")?"idea-cfb":void 0,tripledes:Pn.includes("des-ede3-cfb")?"des-ede3-cfb":void 0,cast5:Pn.includes("cast5-cfb")?"cast5-cfb":void 0,blowfish:Pn.includes("bf-cfb")?"bf-cfb":void 0,aes128:Pn.includes("aes-128-cfb")?"aes-128-cfb":void 0,aes192:Pn.includes("aes-192-cfb")?"aes-192-cfb":void 0,aes256:Pn.includes("aes-256-cfb")?"aes-256-cfb":void 0};var Mn=/*#__PURE__*/Object.freeze({__proto__:null,encrypt:async function(e,t,r,i,n){const a=me.read(me.symmetric,e);if(ce.getNodeCrypto()&&xn[a])return function(e,t,r,i){const n=me.read(me.symmetric,e),a=new En.createCipheriv(xn[n],t,i);return Y(r,(e=>new Uint8Array(a.update(e))))}(e,t,r,i);if("aes"===a.substr(0,3))return function(e,t,r,i,n){if(ce.getWebCrypto()&&24!==t.length&&!ce.isStream(r)&&r.length>=3e3*n.minBytesForWebCrypto)return async function(e,t,r,i){const n="AES-CBC",a=await Sn.importKey("raw",t,{name:n},!1,["encrypt"]),{blockSize:s}=_n(e),o=ce.concatUint8Array([new Uint8Array(s),r]),c=new Uint8Array(await Sn.encrypt({name:n,iv:i},a,o)).subarray(0,r.length);return function(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]^t[r]}(c,r),c}(e,t,r,i);const a=new Jr(t,i);return Y(r,(e=>a.aes.AES_Encrypt_process(e)),(()=>a.aes.AES_Encrypt_finish()))}(e,t,r,i,n);const s=new nt[a](t),o=s.blockSize,c=i.slice();let u=new Uint8Array;const h=e=>{e&&(u=ce.concatUint8Array([u,e]));const t=new Uint8Array(u.length);let r,i=0;for(;e?u.length>=o:u.length;){const e=s.encrypt(c);for(r=0;r<o;r++)c[r]=u[r]^e[r],t[i++]=c[r];u=u.subarray(o)}return t.subarray(0,i)};return Y(r,h,h)},decrypt:async function(e,t,r,i){const n=me.read(me.symmetric,e);if(ce.getNodeCrypto()&&xn[n])return function(e,t,r,i){const n=me.read(me.symmetric,e),a=new En.createDecipheriv(xn[n],t,i);return Y(r,(e=>new Uint8Array(a.update(e))))}(e,t,r,i);if("aes"===n.substr(0,3))return function(e,t,r,i){if(ce.isStream(r)){const e=new Jr(t,i);return Y(r,(t=>e.aes.AES_Decrypt_process(t)),(()=>e.aes.AES_Decrypt_finish()))}return Jr.decrypt(r,t,i)}(0,t,r,i);const a=new nt[n](t),s=a.blockSize;let o=i,c=new Uint8Array;const u=e=>{e&&(c=ce.concatUint8Array([c,e]));const t=new Uint8Array(c.length);let r,i=0;for(;e?c.length>=s:c.length;){const e=a.encrypt(o);for(o=c,r=0;r<s;r++)t[i++]=o[r]^e[r];c=c.subarray(s)}return t.subarray(0,i)};return Y(r,u,u)}});class Cn{static encrypt(e,t,r){return new Cn(t,r).encrypt(e)}static decrypt(e,t,r){return new Cn(t,r).encrypt(e)}constructor(e,t,r){this.aes=r||new Oe(e,void 0,!1,"CTR"),delete this.aes.padding,this.AES_CTR_set_options(t)}encrypt(e){return Ue(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return Ue(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}AES_CTR_set_options(e,t,r){let{asm:i}=this.aes.acquire_asm();if(void 0!==r){if(r<8||r>48)throw new Be("illegal counter size");let e=Math.pow(2,r)-1;i.set_mask(0,0,e/4294967296|0,0|e)}else r=48,i.set_mask(0,0,65535,4294967295);if(void 0===e)throw Error("nonce is required");{let t=e.length;if(!t||t>16)throw new Be("illegal nonce size");let r=new DataView(new ArrayBuffer(16));new Uint8Array(r.buffer).set(e),i.set_nonce(r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12))}if(void 0!==t){if(t<0||t>=Math.pow(2,r))throw new Be("illegal counter value");i.set_counter(0,0,t/4294967296|0,0|t)}}}class Kn{static encrypt(e,t,r=!0,i){return new Kn(t,i,r).encrypt(e)}static decrypt(e,t,r=!0,i){return new Kn(t,i,r).decrypt(e)}constructor(e,t,r=!0,i){this.aes=i||new Oe(e,t,r,"CBC")}encrypt(e){return Ue(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return Ue(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}const Dn=ce.getWebCrypto(),Rn=ce.getNodeCrypto();function Un(e,t){const r=e.length-16;for(let i=0;i<16;i++)e[i+r]^=t[i];return e}const In=new Uint8Array(16);async function Bn(e){const t=await async function(e){if(ce.getWebCrypto()&&24!==e.length)return e=await Dn.importKey("raw",e,{name:"AES-CBC",length:8*e.length},!1,["encrypt"]),async function(t){const r=await Dn.encrypt({name:"AES-CBC",iv:In,length:128},e,t);return new Uint8Array(r).subarray(0,r.byteLength-16)};if(ce.getNodeCrypto())return async function(t){const r=new Rn.createCipheriv("aes-"+8*e.length+"-cbc",e,In).update(t);return new Uint8Array(r)};return async function(t){return Kn.encrypt(t,e,!1,In)}}(e),r=ce.double(await t(In)),i=ce.double(r);return async function(e){return(await t(function(e,t,r){if(e.length&&e.length%16==0)return Un(e,t);const i=new Uint8Array(e.length+(16-e.length%16));return i.set(e),i[e.length]=128,Un(i,r)}(e,r,i))).subarray(-16)}}const Tn=ce.getWebCrypto(),zn=ce.getNodeCrypto(),qn=ce.getNodeBuffer(),On=new Uint8Array(16),Fn=new Uint8Array(16);Fn[15]=1;const Nn=new Uint8Array(16);async function jn(e){const t=await Bn(e);return function(e,r){return t(ce.concatUint8Array([e,r]))}}async function Ln(e){return ce.getWebCrypto()&&24!==e.length?(e=await Tn.importKey("raw",e,{name:"AES-CTR",length:8*e.length},!1,["encrypt"]),async function(t,r){const i=await Tn.encrypt({name:"AES-CTR",counter:r,length:128},e,t);return new Uint8Array(i)}):ce.getNodeCrypto()?async function(t,r){const i=new zn.createCipheriv("aes-"+8*e.length+"-ctr",e,r),n=qn.concat([i.update(t),i.final()]);return new Uint8Array(n)}:async function(t,r){return Cn.encrypt(t,e,r)}}async function Wn(e,t){if(e!==me.symmetric.aes128&&e!==me.symmetric.aes192&&e!==me.symmetric.aes256)throw Error("EAX mode supports only AES cipher");const[r,i]=await Promise.all([jn(t),Ln(t)]);return{encrypt:async function(e,t,n){const[a,s]=await Promise.all([r(On,t),r(Fn,n)]),o=await i(e,a),c=await r(Nn,o);for(let e=0;e<16;e++)c[e]^=s[e]^a[e];return ce.concatUint8Array([o,c])},decrypt:async function(e,t,n){if(e.length<16)throw Error("Invalid EAX ciphertext");const a=e.subarray(0,-16),s=e.subarray(-16),[o,c,u]=await Promise.all([r(On,t),r(Fn,n),r(Nn,a)]),h=u;for(let e=0;e<16;e++)h[e]^=c[e]^o[e];if(!ce.equalsUint8Array(s,h))throw Error("Authentication tag mismatch");return await i(a,o)}}}Nn[15]=2,Wn.getNonce=function(e,t){const r=e.slice();for(let e=0;e<t.length;e++)r[8+e]^=t[e];return r},Wn.blockLength=16,Wn.ivLength=16,Wn.tagLength=16;function Hn(e){let t=0;for(let r=1;0==(e&r);r<<=1)t++;return t}function Gn(e,t){for(let r=0;r<e.length;r++)e[r]^=t[r];return e}function Vn(e,t){return Gn(e.slice(),t)}const $n=new Uint8Array(16),Zn=new Uint8Array([1]);async function Yn(e,t){let r,i,n,a=0;function s(e,t,i,s){const o=t.length/16|0;!function(e,t){const r=ce.nbits(Math.max(e.length,t.length)/16|0)-1;for(let e=a+1;e<=r;e++)n[e]=ce.double(n[e-1]);a=r}(t,s);const c=ce.concatUint8Array([$n.subarray(0,15-i.length),Zn,i]),u=63&c[15];c[15]&=192;const h=r(c),f=ce.concatUint8Array([h,Vn(h.subarray(0,8),h.subarray(1,9))]),d=ce.shiftRight(f.subarray(0+(u>>3),17+(u>>3)),8-(7&u)).subarray(1),l=new Uint8Array(16),p=new Uint8Array(t.length+16);let y,b=0;for(y=0;y<o;y++)Gn(d,n[Hn(y+1)]),p.set(Gn(e(Vn(d,t)),d),b),Gn(l,e===r?t:p.subarray(b)),t=t.subarray(16),b+=16;if(t.length){Gn(d,n.x);const i=r(d);p.set(Vn(t,i),b);const a=new Uint8Array(16);a.set(e===r?t:p.subarray(b,-16),0),a[t.length]=128,Gn(l,a),b+=t.length}const m=Gn(r(Gn(Gn(l,d),n.$)),function(e){if(!e.length)return $n;const t=e.length/16|0,i=new Uint8Array(16),a=new Uint8Array(16);for(let s=0;s<t;s++)Gn(i,n[Hn(s+1)]),Gn(a,r(Vn(i,e))),e=e.subarray(16);if(e.length){Gn(i,n.x);const t=new Uint8Array(16);t.set(e,0),t[e.length]=128,Gn(t,i),Gn(a,r(t))}return a}(s));return p.set(m,b),p}return function(e,t){const a=me.read(me.symmetric,e),s=new nt[a](t);r=s.encrypt.bind(s),i=s.decrypt.bind(s);const o=r($n),c=ce.double(o);n=[],n[0]=ce.double(c),n.x=o,n.$=c}(e,t),{encrypt:async function(e,t,i){return s(r,e,t,i)},decrypt:async function(e,t,r){if(e.length<16)throw Error("Invalid OCB ciphertext");const n=e.subarray(-16);e=e.subarray(0,-16);const a=s(i,e,t,r);if(ce.equalsUint8Array(n,a.subarray(-16)))return a.subarray(0,-16);throw Error("Authentication tag mismatch")}}}Yn.getNonce=function(e,t){const r=e.slice();for(let e=0;e<t.length;e++)r[7+e]^=t[e];return r},Yn.blockLength=16,Yn.ivLength=15,Yn.tagLength=16;class Xn{constructor(e,t,r,i=16,n){this.tagSize=i,this.gamma0=0,this.counter=1,this.aes=n||new Oe(e,void 0,!1,"CTR");let{asm:a,heap:s}=this.aes.acquire_asm();if(a.gcm_init(),this.tagSize<4||this.tagSize>16)throw new Be("illegal tagSize value");const o=t.length||0,c=new Uint8Array(16);12!==o?(this._gcm_mac_process(t),s[0]=0,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=0,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=0,s[11]=o>>>29,s[12]=o>>>21&255,s[13]=o>>>13&255,s[14]=o>>>5&255,s[15]=o<<3&255,a.mac(Ce.MAC.GCM,Ce.HEAP_DATA,16),a.get_iv(Ce.HEAP_DATA),a.set_iv(0,0,0,0),c.set(s.subarray(0,16))):(c.set(t),c[15]=1);const u=new DataView(c.buffer);if(this.gamma0=u.getUint32(12),a.set_nonce(u.getUint32(0),u.getUint32(4),u.getUint32(8),0),a.set_mask(0,0,0,4294967295),void 0!==r){if(r.length>68719476704)throw new Be("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");a.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(e,t,r,i,n){return new Xn(t,r,i,n).encrypt(e)}static decrypt(e,t,r,i,n){return new Xn(t,r,i,n).decrypt(e)}encrypt(e){return this.AES_GCM_encrypt(e)}decrypt(e){return this.AES_GCM_decrypt(e)}AES_GCM_Encrypt_process(e){let t=0,r=e.length||0,{asm:i,heap:n}=this.aes.acquire_asm(),a=this.counter,s=this.aes.pos,o=this.aes.len,c=0,u=o+r&-16,h=0;if((a-1<<4)+o+r>68719476704)throw new RangeError("counter overflow");const f=new Uint8Array(u);for(;r>0;)h=Re(n,s+o,e,t,r),o+=h,t+=h,r-=h,h=i.cipher(Ce.ENC.CTR,Ce.HEAP_DATA+s,o),h=i.mac(Ce.MAC.GCM,Ce.HEAP_DATA+s,h),h&&f.set(n.subarray(s,s+h),c),a+=h>>>4,c+=h,h<o?(s+=h,o-=h):(s=0,o=0);return this.counter=a,this.aes.pos=s,this.aes.len=o,f}AES_GCM_Encrypt_finish(){let{asm:e,heap:t}=this.aes.acquire_asm(),r=this.counter,i=this.tagSize,n=this.adata,a=this.aes.pos,s=this.aes.len;const o=new Uint8Array(s+i);e.cipher(Ce.ENC.CTR,Ce.HEAP_DATA+a,s+15&-16),s&&o.set(t.subarray(a,a+s));let c=s;for(;15&c;c++)t[a+c]=0;e.mac(Ce.MAC.GCM,Ce.HEAP_DATA+a,c);const u=void 0!==n?n.length:0,h=(r-1<<4)+s;return t[0]=0,t[1]=0,t[2]=0,t[3]=u>>>29,t[4]=u>>>21,t[5]=u>>>13&255,t[6]=u>>>5&255,t[7]=u<<3&255,t[8]=t[9]=t[10]=0,t[11]=h>>>29,t[12]=h>>>21&255,t[13]=h>>>13&255,t[14]=h>>>5&255,t[15]=h<<3&255,e.mac(Ce.MAC.GCM,Ce.HEAP_DATA,16),e.get_iv(Ce.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(Ce.ENC.CTR,Ce.HEAP_DATA,16),o.set(t.subarray(0,i),s),this.counter=1,this.aes.pos=0,this.aes.len=0,o}AES_GCM_Decrypt_process(e){let t=0,r=e.length||0,{asm:i,heap:n}=this.aes.acquire_asm(),a=this.counter,s=this.tagSize,o=this.aes.pos,c=this.aes.len,u=0,h=c+r>s?c+r-s&-16:0,f=c+r-h,d=0;if((a-1<<4)+c+r>68719476704)throw new RangeError("counter overflow");const l=new Uint8Array(h);for(;r>f;)d=Re(n,o+c,e,t,r-f),c+=d,t+=d,r-=d,d=i.mac(Ce.MAC.GCM,Ce.HEAP_DATA+o,d),d=i.cipher(Ce.DEC.CTR,Ce.HEAP_DATA+o,d),d&&l.set(n.subarray(o,o+d),u),a+=d>>>4,u+=d,o=0,c=0;return r>0&&(c+=Re(n,0,e,t,r)),this.counter=a,this.aes.pos=o,this.aes.len=c,l}AES_GCM_Decrypt_finish(){let{asm:e,heap:t}=this.aes.acquire_asm(),r=this.tagSize,i=this.adata,n=this.counter,a=this.aes.pos,s=this.aes.len,o=s-r;if(s<r)throw new Ie("authentication tag not found");const c=new Uint8Array(o),u=new Uint8Array(t.subarray(a+o,a+s));let h=o;for(;15&h;h++)t[a+h]=0;e.mac(Ce.MAC.GCM,Ce.HEAP_DATA+a,h),e.cipher(Ce.DEC.CTR,Ce.HEAP_DATA+a,h),o&&c.set(t.subarray(a,a+o));const f=void 0!==i?i.length:0,d=(n-1<<4)+s-r;t[0]=0,t[1]=0,t[2]=0,t[3]=f>>>29,t[4]=f>>>21,t[5]=f>>>13&255,t[6]=f>>>5&255,t[7]=f<<3&255,t[8]=t[9]=t[10]=0,t[11]=d>>>29,t[12]=d>>>21&255,t[13]=d>>>13&255,t[14]=d>>>5&255,t[15]=d<<3&255,e.mac(Ce.MAC.GCM,Ce.HEAP_DATA,16),e.get_iv(Ce.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(Ce.ENC.CTR,Ce.HEAP_DATA,16);let l=0;for(let e=0;e<r;++e)l|=u[e]^t[e];if(l)throw new Te("data integrity check failed");return this.counter=1,this.aes.pos=0,this.aes.len=0,c}AES_GCM_decrypt(e){const t=this.AES_GCM_Decrypt_process(e),r=this.AES_GCM_Decrypt_finish(),i=new Uint8Array(t.length+r.length);return t.length&&i.set(t),r.length&&i.set(r,t.length),i}AES_GCM_encrypt(e){const t=this.AES_GCM_Encrypt_process(e),r=this.AES_GCM_Encrypt_finish(),i=new Uint8Array(t.length+r.length);return t.length&&i.set(t),r.length&&i.set(r,t.length),i}_gcm_mac_process(e){let{asm:t,heap:r}=this.aes.acquire_asm(),i=0,n=e.length||0,a=0;for(;n>0;){for(a=Re(r,0,e,i,n),i+=a,n-=a;15&a;)r[a++]=0;t.mac(Ce.MAC.GCM,Ce.HEAP_DATA,a)}}}const Qn=ce.getWebCrypto(),Jn=ce.getNodeCrypto(),ea=ce.getNodeBuffer();async function ta(e,t){if(e!==me.symmetric.aes128&&e!==me.symmetric.aes192&&e!==me.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(ce.getWebCrypto()&&24!==t.length){const e=await Qn.importKey("raw",t,{name:"AES-GCM"},!1,["encrypt","decrypt"]);return{encrypt:async function(r,i,n=new Uint8Array){if(!r.length)return Xn.encrypt(r,t,i,n);const a=await Qn.encrypt({name:"AES-GCM",iv:i,additionalData:n,tagLength:128},e,r);return new Uint8Array(a)},decrypt:async function(r,i,n=new Uint8Array){if(16===r.length)return Xn.decrypt(r,t,i,n);const a=await Qn.decrypt({name:"AES-GCM",iv:i,additionalData:n,tagLength:128},e,r);return new Uint8Array(a)}}}return ce.getNodeCrypto()?{encrypt:async function(e,r,i=new Uint8Array){const n=new Jn.createCipheriv("aes-"+8*t.length+"-gcm",t,r);n.setAAD(i);const a=ea.concat([n.update(e),n.final(),n.getAuthTag()]);return new Uint8Array(a)},decrypt:async function(e,r,i=new Uint8Array){const n=new Jn.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);n.setAAD(i),n.setAuthTag(e.slice(e.length-16,e.length));const a=ea.concat([n.update(e.slice(0,e.length-16)),n.final()]);return new Uint8Array(a)}}:{encrypt:async function(e,r,i){return Xn.encrypt(e,t,r,i)},decrypt:async function(e,r,i){return Xn.decrypt(e,t,r,i)}}}ta.getNonce=function(e,t){const r=e.slice();for(let e=0;e<t.length;e++)r[4+e]^=t[e];return r},ta.blockLength=16,ta.ivLength=12,ta.tagLength=16;var ra={cfb:Mn,gcm:ta,experimentalGCM:ta,eax:Wn,ocb:Yn};var ia=/*#__PURE__*/Object.freeze({__proto__:null,parseSignatureParams:function(e,t){let r=0;switch(e){case me.publicKey.rsaEncryptSign:case me.publicKey.rsaEncrypt:case me.publicKey.rsaSign:return{s:ce.readMPI(t.subarray(r))};case me.publicKey.dsa:case me.publicKey.ecdsa:{const e=ce.readMPI(t.subarray(r));r+=e.length+2;return{r:e,s:ce.readMPI(t.subarray(r))}}case me.publicKey.eddsa:{let e=ce.readMPI(t.subarray(r));r+=e.length+2,e=ce.leftPad(e,32);let i=ce.readMPI(t.subarray(r));return i=ce.leftPad(i,32),{r:e,s:i}}default:throw new Ri("Unknown signature algorithm.")}},verify:async function(e,t,r,i,n,a){switch(e){case me.publicKey.rsaEncryptSign:case me.publicKey.rsaEncrypt:case me.publicKey.rsaSign:{const{n:e,e:s}=i,o=ce.leftPad(r.s,e.length);return gn.rsa.verify(t,n,o,e,s,a)}case me.publicKey.dsa:{const{g:e,p:n,q:s,y:o}=i,{r:c,s:u}=r;return gn.dsa.verify(t,c,u,a,e,n,s,o)}case me.publicKey.ecdsa:{const{oid:e,Q:s}=i,o=new gn.elliptic.Curve(e).payloadSize,c=ce.leftPad(r.r,o),u=ce.leftPad(r.s,o);return gn.elliptic.ecdsa.verify(e,t,{r:c,s:u},n,s,a)}case me.publicKey.eddsa:{const{oid:e,Q:s}=i;return gn.elliptic.eddsa.verify(e,t,r,n,s,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,r,i,n,a){if(!r||!i)throw Error("Missing key parameters");switch(e){case me.publicKey.rsaEncryptSign:case me.publicKey.rsaEncrypt:case me.publicKey.rsaSign:{const{n:e,e:s}=r,{d:o,p:c,q:u,u:h}=i;return{s:await gn.rsa.sign(t,n,e,s,o,c,u,h,a)}}case me.publicKey.dsa:{const{g:e,p:n,q:s}=r,{x:o}=i;return gn.dsa.sign(t,a,e,n,s,o)}case me.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case me.publicKey.ecdsa:{const{oid:e,Q:s}=r,{d:o}=i;return gn.elliptic.ecdsa.sign(e,t,n,s,o,a)}case me.publicKey.eddsa:{const{oid:e,Q:s}=r,{seed:o}=i;return gn.elliptic.eddsa.sign(e,t,n,s,o,a)}default:throw Error("Unknown signature algorithm.")}}});const na={cipher:nt,hash:Qr,mode:ra,publicKey:gn,signature:ia,random:ai,pkcs1:li,pkcs5:hn,aesKW:on};Object.assign(na,An);var aa="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function sa(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}const oa={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+i),n);else for(let a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){let t,r,i,n,a;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;const s=new Uint8Array(i);for(n=0,t=0,r=e.length;t<r;t++)a=e[t],s.set(a,n),n+=a.length;return s}},ca={arraySet:function(e,t,r,i,n){for(let a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};let ua=aa?Uint8Array:Array,ha=aa?Uint16Array:Array,fa=aa?Int32Array:Array,da=aa?oa.flattenChunks:ca.flattenChunks,la=aa?oa.arraySet:ca.arraySet;function pa(e){let t=e.length;for(;--t>=0;)e[t]=0}const ya=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ba=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ma=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ga=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],wa=Array(576);pa(wa);const va=Array(60);pa(va);const _a=Array(512);pa(_a);const ka=Array(256);pa(ka);const Aa=Array(29);pa(Aa);const Sa=Array(30);function Ea(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}let Pa,xa,Ma;function Ca(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Ka(e){return e<256?_a[e]:_a[256+(e>>>7)]}function Da(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Ra(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,Da(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function Ua(e,t,r){Ra(e,r[2*t],r[2*t+1])}function Ia(e,t){let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function Ba(e,t,r){const i=Array(16);let n,a,s=0;for(n=1;n<=15;n++)i[n]=s=s+r[n-1]<<1;for(a=0;a<=t;a++){const t=e[2*a+1];0!==t&&(e[2*a]=Ia(i[t]++,t))}}function Ta(e){let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function za(e){e.bi_valid>8?Da(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function qa(e,t,r,i){const n=2*t,a=2*r;return e[n]<e[a]||e[n]===e[a]&&i[t]<=i[r]}function Oa(e,t,r){const i=e.heap[r];let n=r<<1;for(;n<=e.heap_len&&(n<e.heap_len&&qa(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!qa(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i}function Fa(e,t,r){let i,n,a,s,o=0;if(0!==e.last_lit)do{i=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],n=e.pending_buf[e.l_buf+o],o++,0===i?Ua(e,n,t):(a=ka[n],Ua(e,a+256+1,t),s=ya[a],0!==s&&(n-=Aa[a],Ra(e,n,s)),i--,a=Ka(i),Ua(e,a,r),s=ba[a],0!==s&&(i-=Sa[a],Ra(e,i,s)))}while(o<e.last_lit);Ua(e,256,t)}function Na(e,t){const r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems;let s,o,c,u=-1;for(e.heap_len=0,e.heap_max=573,s=0;s<a;s++)0!==r[2*s]?(e.heap[++e.heap_len]=u=s,e.depth[s]=0):r[2*s+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=u<2?++u:0,r[2*c]=1,e.depth[c]=0,e.opt_len--,n&&(e.static_len-=i[2*c+1]);for(t.max_code=u,s=e.heap_len>>1;s>=1;s--)Oa(e,r,s);c=a;do{s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Oa(e,r,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,r[2*c]=r[2*s]+r[2*o],e.depth[c]=(e.depth[s]>=e.depth[o]?e.depth[s]:e.depth[o])+1,r[2*s+1]=r[2*o+1]=c,e.heap[1]=c++,Oa(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){const r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,h,f,d,l,p,y=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(r[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)h=e.heap[u],d=r[2*r[2*h+1]+1]+1,d>c&&(d=c,y++),r[2*h+1]=d,h>i||(e.bl_count[d]++,l=0,h>=o&&(l=s[h-o]),p=r[2*h],e.opt_len+=p*(d+l),a&&(e.static_len+=p*(n[2*h+1]+l)));if(0!==y){do{for(d=c-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[c]--,y-=2}while(y>0);for(d=c;0!==d;d--)for(h=e.bl_count[d];0!==h;)f=e.heap[--u],f>i||(r[2*f+1]!==d&&(e.opt_len+=(d-r[2*f+1])*r[2*f],r[2*f+1]=d),h--)}}(e,t),Ba(r,u,e.bl_count)}function ja(e,t,r){let i,n,a=-1,s=t[1],o=0,c=7,u=4;for(0===s&&(c=138,u=3),t[2*(r+1)+1]=65535,i=0;i<=r;i++)n=s,s=t[2*(i+1)+1],++o<c&&n===s||(o<u?e.bl_tree[2*n]+=o:0!==n?(n!==a&&e.bl_tree[2*n]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=0,a=n,0===s?(c=138,u=3):n===s?(c=6,u=3):(c=7,u=4))}function La(e,t,r){let i,n,a=-1,s=t[1],o=0,c=7,u=4;for(0===s&&(c=138,u=3),i=0;i<=r;i++)if(n=s,s=t[2*(i+1)+1],!(++o<c&&n===s)){if(o<u)do{Ua(e,n,e.bl_tree)}while(0!=--o);else 0!==n?(n!==a&&(Ua(e,n,e.bl_tree),o--),Ua(e,16,e.bl_tree),Ra(e,o-3,2)):o<=10?(Ua(e,17,e.bl_tree),Ra(e,o-3,3)):(Ua(e,18,e.bl_tree),Ra(e,o-11,7));o=0,a=n,0===s?(c=138,u=3):n===s?(c=6,u=3):(c=7,u=4)}}pa(Sa);let Wa=!1;function Ha(e){Wa||(!function(){let e,t,r,i,n;const a=Array(16);for(r=0,i=0;i<28;i++)for(Aa[i]=r,e=0;e<1<<ya[i];e++)ka[r++]=i;for(ka[r-1]=i,n=0,i=0;i<16;i++)for(Sa[i]=n,e=0;e<1<<ba[i];e++)_a[n++]=i;for(n>>=7;i<30;i++)for(Sa[i]=n<<7,e=0;e<1<<ba[i]-7;e++)_a[256+n++]=i;for(t=0;t<=15;t++)a[t]=0;for(e=0;e<=143;)wa[2*e+1]=8,e++,a[8]++;for(;e<=255;)wa[2*e+1]=9,e++,a[9]++;for(;e<=279;)wa[2*e+1]=7,e++,a[7]++;for(;e<=287;)wa[2*e+1]=8,e++,a[8]++;for(Ba(wa,287,a),e=0;e<30;e++)va[2*e+1]=5,va[2*e]=Ia(e,5);Pa=new Ea(wa,ya,257,286,15),xa=new Ea(va,ba,0,30,15),Ma=new Ea([],ma,0,19,7)}(),Wa=!0),e.l_desc=new Ca(e.dyn_ltree,Pa),e.d_desc=new Ca(e.dyn_dtree,xa),e.bl_desc=new Ca(e.bl_tree,Ma),e.bi_buf=0,e.bi_valid=0,Ta(e)}function Ga(e,t,r,i){Ra(e,0+(i?1:0),3),function(e,t,r,i){za(e),i&&(Da(e,r),Da(e,~r)),la(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}function Va(e){Ra(e,2,3),Ua(e,256,wa),function(e){16===e.bi_valid?(Da(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}function $a(e,t,r,i){let n,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),Na(e,e.l_desc),Na(e,e.d_desc),s=function(e){let t;for(ja(e,e.dyn_ltree,e.l_desc.max_code),ja(e,e.dyn_dtree,e.d_desc.max_code),Na(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*ga[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&-1!==t?Ga(e,t,r,i):4===e.strategy||a===n?(Ra(e,2+(i?1:0),3),Fa(e,wa,va)):(Ra(e,4+(i?1:0),3),function(e,t,r,i){let n;for(Ra(e,t-257,5),Ra(e,r-1,5),Ra(e,i-4,4),n=0;n<i;n++)Ra(e,e.bl_tree[2*ga[n]+1],3);La(e,e.dyn_ltree,t-1),La(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),Fa(e,e.dyn_ltree,e.dyn_dtree)),Ta(e),i&&za(e)}function Za(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(ka[r]+256+1)]++,e.dyn_dtree[2*Ka(t)]++),e.last_lit===e.lit_bufsize-1}function Ya(e,t,r,i){let n=65535&e|0,a=e>>>16&65535|0,s=0;for(;0!==r;){s=r>2e3?2e3:r,r-=s;do{n=n+t[i++]|0,a=a+n|0}while(--s);n%=65521,a%=65521}return n|a<<16|0}const Xa=function(){let e;const t=[];for(let r=0;r<256;r++){e=r;for(let t=0;t<8;t++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();function Qa(e,t,r,i){const n=Xa,a=i+r;e^=-1;for(let r=i;r<a;r++)e=e>>>8^n[255&(e^t[r])];return-1^e}var Ja={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function es(e,t){return e.msg=Ja[t],t}function ts(e){return(e<<1)-(e>4?9:0)}function rs(e){let t=e.length;for(;--t>=0;)e[t]=0}function is(e){const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(la(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function ns(e,t){$a(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,is(e.strm)}function as(e,t){e.pending_buf[e.pending++]=t}function ss(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function os(e,t,r,i){let n=e.avail_in;return n>i&&(n=i),0===n?0:(e.avail_in-=n,la(t,e.input,e.next_in,n,r),1===e.state.wrap?e.adler=Ya(e.adler,t,n,r):2===e.state.wrap&&(e.adler=Qa(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function cs(e,t){let r,i,n=e.max_chain_length,a=e.strstart,s=e.prev_length,o=e.nice_match;const c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,h=e.w_mask,f=e.prev,d=e.strstart+258;let l=u[a+s-1],p=u[a+s];e.prev_length>=e.good_match&&(n>>=2),o>e.lookahead&&(o=e.lookahead);do{if(r=t,u[r+s]===p&&u[r+s-1]===l&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do{}while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&a<d);if(i=258-(d-a),a=d-258,i>s){if(e.match_start=t,s=i,i>=o)break;l=u[a+s-1],p=u[a+s]}}}while((t=f[t&h])>c&&0!=--n);return s<=e.lookahead?s:e.lookahead}function us(e){const t=e.w_size;let r,i,n,a,s;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){la(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do{n=e.head[--r],e.head[r]=n>=t?n-t:0}while(--i);i=t,r=i;do{n=e.prev[--r],e.prev[r]=n>=t?n-t:0}while(--i);a+=t}if(0===e.strm.avail_in)break;if(i=os(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=3)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+3-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function hs(e,t){let r,i;for(;;){if(e.lookahead<262){if(us(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-262&&(e.match_length=cs(e,r)),e.match_length>=3)if(i=Za(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=Za(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(ns(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(ns(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(ns(e,!1),0===e.strm.avail_out)?1:2}function fs(e,t){let r,i,n;for(;;){if(e.lookahead<262){if(us(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-262&&(e.match_length=cs(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-3,i=Za(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(ns(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=Za(e,0,e.window[e.strstart-1]),i&&ns(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=Za(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(ns(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(ns(e,!1),0===e.strm.avail_out)?1:2}class ds{constructor(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n}}const ls=[new ds(0,0,0,0,(function(e,t){let r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(us(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const i=e.block_start+r;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,ns(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(ns(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(ns(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(ns(e,!1),e.strm.avail_out),1)})),new ds(4,4,8,4,hs),new ds(4,5,16,8,hs),new ds(4,6,32,32,hs),new ds(4,4,16,16,fs),new ds(8,16,32,32,fs),new ds(8,16,128,128,fs),new ds(8,32,128,256,fs),new ds(32,128,258,1024,fs),new ds(32,258,258,4096,fs)];class ps{constructor(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ha(1146),this.dyn_dtree=new ha(122),this.bl_tree=new ha(78),rs(this.dyn_ltree),rs(this.dyn_dtree),rs(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ha(16),this.heap=new ha(573),rs(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ha(573),rs(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}}function ys(e){const t=function(e){let t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,Ha(t),0):es(e,-2)}(e);return 0===t&&function(e){e.window_size=2*e.w_size,rs(e.head),e.max_lazy_match=ls[e.level].max_lazy,e.good_match=ls[e.level].good_length,e.nice_match=ls[e.level].nice_length,e.max_chain_length=ls[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function bs(e,t){let r,i,n,a;if(!e||!e.state||t>5||t<0)return e?es(e,-2):-2;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return es(e,0===e.avail_out?-5:-2);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,as(i,31),as(i,139),as(i,8),i.gzhead?(as(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),as(i,255&i.gzhead.time),as(i,i.gzhead.time>>8&255),as(i,i.gzhead.time>>16&255),as(i,i.gzhead.time>>24&255),as(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),as(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(as(i,255&i.gzhead.extra.length),as(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Qa(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(as(i,0),as(i,0),as(i,0),as(i,0),as(i,0),as(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),as(i,3),i.status=113);else{let t=8+(i.w_bits-8<<4)<<8,r=-1;r=i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=r<<6,0!==i.strstart&&(t|=32),t+=31-t%31,i.status=113,ss(i,t),0!==i.strstart&&(ss(i,e.adler>>>16),ss(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(e.adler=Qa(e.adler,i.pending_buf,i.pending-n,n)),is(e),n=i.pending,i.pending!==i.pending_buf_size));)as(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=Qa(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Qa(e.adler,i.pending_buf,i.pending-n,n)),is(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}a=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,as(i,a)}while(0!==a);i.gzhead.hcrc&&i.pending>n&&(e.adler=Qa(e.adler,i.pending_buf,i.pending-n,n)),0===a&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Qa(e.adler,i.pending_buf,i.pending-n,n)),is(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}a=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,as(i,a)}while(0!==a);i.gzhead.hcrc&&i.pending>n&&(e.adler=Qa(e.adler,i.pending_buf,i.pending-n,n)),0===a&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&is(e),i.pending+2<=i.pending_buf_size&&(as(i,255&e.adler),as(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(is(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&ts(t)<=ts(r)&&4!==t)return es(e,-5);if(666===i.status&&0!==e.avail_in)return es(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var s=2===i.strategy?function(e,t){let r;for(;;){if(0===e.lookahead&&(us(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=Za(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ns(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(ns(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(ns(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){let r,i,n,a;const s=e.window;for(;;){if(e.lookahead<=258){if(us(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=e.strstart-1,i=s[n],i===s[++n]&&i===s[++n]&&i===s[++n])){a=e.strstart+258;do{}while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&n<a);e.match_length=258-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=Za(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Za(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ns(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(ns(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(ns(e,!1),0===e.strm.avail_out)?1:2}(i,t):ls[i.level].func(i,t);if(3!==s&&4!==s||(i.status=666),1===s||3===s)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===s&&(1===t?Va(i):5!==t&&(Ga(i,0,0,!1),3===t&&(rs(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),is(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(as(i,255&e.adler),as(i,e.adler>>8&255),as(i,e.adler>>16&255),as(i,e.adler>>24&255),as(i,255&e.total_in),as(i,e.total_in>>8&255),as(i,e.total_in>>16&255),as(i,e.total_in>>24&255)):(ss(i,e.adler>>>16),ss(i,65535&e.adler)),is(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)}try{String.fromCharCode.call(null,0)}catch(e){}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){}const ms=new ua(256);for(let e=0;e<256;e++)ms[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;function gs(e){let t,r,i,n,a=0;const s=e.length;for(i=0;i<s;i++)t=e.charCodeAt(i),55296==(64512&t)&&i+1<s&&(r=e.charCodeAt(i+1),56320==(64512&r)&&(t=65536+(t-55296<<10)+(r-56320),i++)),a+=t<128?1:t<2048?2:t<65536?3:4;const o=new ua(a);for(n=0,i=0;n<a;i++)t=e.charCodeAt(i),55296==(64512&t)&&i+1<s&&(r=e.charCodeAt(i+1),56320==(64512&r)&&(t=65536+(t-55296<<10)+(r-56320),i++)),t<128?o[n++]=t:t<2048?(o[n++]=192|t>>>6,o[n++]=128|63&t):t<65536?(o[n++]=224|t>>>12,o[n++]=128|t>>>6&63,o[n++]=128|63&t):(o[n++]=240|t>>>18,o[n++]=128|t>>>12&63,o[n++]=128|t>>>6&63,o[n++]=128|63&t);return o}ms[254]=ms[254]=1;class ws{constructor(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}class vs{constructor(e){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,...e||{}};const t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ws,this.strm.avail_out=0;var r,i,n=function(e,t,r,i,n,a){if(!e)return-2;let s=1;if(-1===t&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),n<1||n>9||8!==r||i<8||i>15||t<0||t>9||a<0||a>4)return es(e,-2);8===i&&(i=9);const o=new ps;return e.state=o,o.strm=e,o.wrap=s,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new ua(2*o.w_size),o.head=new ha(o.hash_size),o.prev=new ha(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new ua(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=a,o.method=r,ys(e)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(Ja[n]);if(t.header&&(r=this.strm,i=t.header,r&&r.state&&(2!==r.state.wrap||(r.state.gzhead=i))),t.dictionary){let e;if(e="string"==typeof t.dictionary?gs(t.dictionary):t.dictionary instanceof ArrayBuffer?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(e,t){let r,i,n,a,s,o,c,u,h=t.length;if(!e||!e.state)return-2;if(r=e.state,a=r.wrap,2===a||1===a&&42!==r.status||r.lookahead)return-2;for(1===a&&(e.adler=Ya(e.adler,t,h,0)),r.wrap=0,h>=r.w_size&&(0===a&&(rs(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new ua(r.w_size),la(u,t,h-r.w_size,r.w_size,0),t=u,h=r.w_size),s=e.avail_in,o=e.next_in,c=e.input,e.avail_in=h,e.next_in=0,e.input=t,us(r);r.lookahead>=3;){i=r.strstart,n=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+3-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++}while(--n);r.strstart=i,r.lookahead=2,us(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=o,e.input=c,e.avail_in=s,r.wrap=a,0}(this.strm,e)))throw Error(Ja[n]);this._dict_set=!0}}push(e,t){const{strm:r,options:{chunkSize:i}}=this;var n,a;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?r.input=gs(e):e instanceof ArrayBuffer?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new ua(i),r.next_out=0,r.avail_out=i),1!==(n=bs(r,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==r.avail_out&&(0!==r.avail_in||4!==a&&2!==a)||this.onData(sa(r.output,r.next_out))}while((r.avail_in>0||0===r.avail_out)&&1!==n);return 4===a?(n=function(e){let t;return e&&e.state?(t=e.state.status,42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?es(e,-2):(e.state=null,113===t?es(e,-3):0)):-2}(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),r.avail_out=0,!0)}onData(e){this.chunks.push(e)}onEnd(e){0===e&&(this.result=da(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}}function _s(e,t){let r,i,n,a,s,o,c,u,h,f;const d=e.state;r=e.next_in;const l=e.input,p=r+(e.avail_in-5);i=e.next_out;const y=e.output,b=i-(t-e.avail_out),m=i+(e.avail_out-257),g=d.dmax,w=d.wsize,v=d.whave,_=d.wnext,k=d.window;n=d.hold,a=d.bits;const A=d.lencode,S=d.distcode,E=(1<<d.lenbits)-1,P=(1<<d.distbits)-1;e:do{a<15&&(n+=l[r++]<<a,a+=8,n+=l[r++]<<a,a+=8),s=A[n&E];t:for(;;){if(o=s>>>24,n>>>=o,a-=o,o=s>>>16&255,0===o)y[i++]=65535&s;else{if(!(16&o)){if(0==(64&o)){s=A[(65535&s)+(n&(1<<o)-1)];continue t}if(32&o){d.mode=12;break e}e.msg="invalid literal/length code",d.mode=30;break e}c=65535&s,o&=15,o&&(a<o&&(n+=l[r++]<<a,a+=8),c+=n&(1<<o)-1,n>>>=o,a-=o),a<15&&(n+=l[r++]<<a,a+=8,n+=l[r++]<<a,a+=8),s=S[n&P];r:for(;;){if(o=s>>>24,n>>>=o,a-=o,o=s>>>16&255,!(16&o)){if(0==(64&o)){s=S[(65535&s)+(n&(1<<o)-1)];continue r}e.msg="invalid distance code",d.mode=30;break e}if(u=65535&s,o&=15,a<o&&(n+=l[r++]<<a,a+=8,a<o&&(n+=l[r++]<<a,a+=8)),u+=n&(1<<o)-1,u>g){e.msg="invalid distance too far back",d.mode=30;break e}if(n>>>=o,a-=o,o=i-b,u>o){if(o=u-o,o>v&&d.sane){e.msg="invalid distance too far back",d.mode=30;break e}if(h=0,f=k,0===_){if(h+=w-o,o<c){c-=o;do{y[i++]=k[h++]}while(--o);h=i-u,f=y}}else if(_<o){if(h+=w+_-o,o-=_,o<c){c-=o;do{y[i++]=k[h++]}while(--o);if(h=0,_<c){o=_,c-=o;do{y[i++]=k[h++]}while(--o);h=i-u,f=y}}}else if(h+=_-o,o<c){c-=o;do{y[i++]=k[h++]}while(--o);h=i-u,f=y}for(;c>2;)y[i++]=f[h++],y[i++]=f[h++],y[i++]=f[h++],c-=3;c&&(y[i++]=f[h++],c>1&&(y[i++]=f[h++]))}else{h=i-u;do{y[i++]=y[h++],y[i++]=y[h++],y[i++]=y[h++],c-=3}while(c>2);c&&(y[i++]=y[h++],c>1&&(y[i++]=y[h++]))}break}}break}}while(r<p&&i<m);c=a>>3,r-=c,a-=c<<3,n&=(1<<a)-1,e.next_in=r,e.next_out=i,e.avail_in=r<p?p-r+5:5-(r-p),e.avail_out=i<m?m-i+257:257-(i-m),d.hold=n,d.bits=a}const ks=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],As=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Ss=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Es=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function Ps(e,t,r,i,n,a,s,o){const c=o.bits;let u,h,f,d,l,p=0,y=0,b=0,m=0,g=0,w=0,v=0,_=0,k=0,A=0,S=null,E=0;const P=new ha(16),x=new ha(16);let M,C,K,D=null,R=0;for(p=0;p<=15;p++)P[p]=0;for(y=0;y<i;y++)P[t[r+y]]++;for(g=c,m=15;m>=1&&0===P[m];m--);if(g>m&&(g=m),0===m)return n[a++]=20971520,n[a++]=20971520,o.bits=1,0;for(b=1;b<m&&0===P[b];b++);for(g<b&&(g=b),_=1,p=1;p<=15;p++)if(_<<=1,_-=P[p],_<0)return-1;if(_>0&&(0===e||1!==m))return-1;for(x[1]=0,p=1;p<15;p++)x[p+1]=x[p]+P[p];for(y=0;y<i;y++)0!==t[r+y]&&(s[x[t[r+y]]++]=y);0===e?(S=D=s,l=19):1===e?(S=ks,E-=257,D=As,R-=257,l=256):(S=Ss,D=Es,l=-1),A=0,y=0,p=b,d=a,w=g,v=0,f=-1,k=1<<g;const U=k-1;if(1===e&&k>852||2===e&&k>592)return 1;for(;;){M=p-v,s[y]<l?(C=0,K=s[y]):s[y]>l?(C=D[R+s[y]],K=S[E+s[y]]):(C=96,K=0),u=1<<p-v,h=1<<w,b=h;do{h-=u,n[d+(A>>v)+h]=M<<24|C<<16|K|0}while(0!==h);for(u=1<<p-1;A&u;)u>>=1;if(0!==u?(A&=u-1,A+=u):A=0,y++,0==--P[p]){if(p===m)break;p=t[r+s[y]]}if(p>g&&(A&U)!==f){for(0===v&&(v=g),d+=b,w=p-v,_=1<<w;w+v<m&&(_-=P[w+v],!(_<=0));)w++,_<<=1;if(k+=1<<w,1===e&&k>852||2===e&&k>592)return 1;f=A&U,n[f]=g<<24|w<<16|d-a|0}}return 0!==A&&(n[d+A]=p-v<<24|64<<16|0),o.bits=g,0}function xs(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}class Ms{constructor(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new ha(320),this.work=new ha(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function Cs(e){let t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,function(e){let t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new fa(852),t.distcode=t.distdyn=new fa(592),t.sane=1,t.back=-1,0):-2}(e)):-2}function Ks(e,t){let r,i;return e?(i=new Ms,e.state=i,i.window=null,r=function(e,t){let r,i;return e&&e.state?(i=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,Cs(e))):-2}(e,t),0!==r&&(e.state=null),r):-2}let Ds,Rs,Us=!0;function Is(e){if(Us){let t;for(Ds=new fa(512),Rs=new fa(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Ps(1,e.lens,0,288,Ds,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ps(2,e.lens,0,32,Rs,0,e.work,{bits:5}),Us=!1}e.lencode=Ds,e.lenbits=9,e.distcode=Rs,e.distbits=5}function Bs(e,t,r,i){let n;const a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new ua(a.wsize)),i>=a.wsize?(la(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),la(a.window,t,r-i,n,a.wnext),(i-=n)?(la(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function Ts(e,t){let r,i,n,a,s,o,c,u,h,f,d,l,p,y,b,m,g,w,v,_,k,A,S,E,P=0,x=new ua(4);const M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;r=e.state,12===r.mode&&(r.mode=13),s=e.next_out,n=e.output,c=e.avail_out,a=e.next_in,i=e.input,o=e.avail_in,u=r.hold,h=r.bits,f=o,d=c,A=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;h<16;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if(2&r.wrap&&35615===u){r.check=0,x[0]=255&u,x[1]=u>>>8&255,r.check=Qa(r.check,x,2,0),u=0,h=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(u>>>=4,h-=4,k=8+(15&u),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=512&u?10:12,u=0,h=0;break;case 2:for(;h<16;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if(r.flags=u,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(x[0]=255&u,x[1]=u>>>8&255,r.check=Qa(r.check,x,2,0)),u=0,h=0,r.mode=3;case 3:for(;h<32;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}r.head&&(r.head.time=u),512&r.flags&&(x[0]=255&u,x[1]=u>>>8&255,x[2]=u>>>16&255,x[3]=u>>>24&255,r.check=Qa(r.check,x,4,0)),u=0,h=0,r.mode=4;case 4:for(;h<16;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(x[0]=255&u,x[1]=u>>>8&255,r.check=Qa(r.check,x,2,0)),u=0,h=0,r.mode=5;case 5:if(1024&r.flags){for(;h<16;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(x[0]=255&u,x[1]=u>>>8&255,r.check=Qa(r.check,x,2,0)),u=0,h=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(l=r.length,l>o&&(l=o),l&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=Array(r.head.extra_len)),la(r.head.extra,i,a,l,k)),512&r.flags&&(r.check=Qa(r.check,i,l,a)),o-=l,a+=l,r.length-=l),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;l=0;do{k=i[a+l++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&l<o);if(512&r.flags&&(r.check=Qa(r.check,i,l,a)),o-=l,a+=l,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===o)break e;l=0;do{k=i[a+l++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k))}while(k&&l<o);if(512&r.flags&&(r.check=Qa(r.check,i,l,a)),o-=l,a+=l,k)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;h<16;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if(u!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}u=0,h=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;h<32;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}e.adler=r.check=xs(u),u=0,h=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,r.hold=u,r.bits=h,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){u>>>=7&h,h-=7&h,r.mode=27;break}for(;h<3;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}switch(r.last=1&u,u>>>=1,h-=1,3&u){case 0:r.mode=14;break;case 1:if(Is(r),r.mode=20,6===t){u>>>=2,h-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}u>>>=2,h-=2;break;case 14:for(u>>>=7&h,h-=7&h;h<32;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,u=0,h=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(l=r.length,l){if(l>o&&(l=o),l>c&&(l=c),0===l)break e;la(n,i,a,l,s),o-=l,a+=l,c-=l,s+=l,r.length-=l;break}r.mode=12;break;case 17:for(;h<14;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if(r.nlen=257+(31&u),u>>>=5,h-=5,r.ndist=1+(31&u),u>>>=5,h-=5,r.ncode=4+(15&u),u>>>=4,h-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;h<3;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}r.lens[M[r.have++]]=7&u,u>>>=3,h-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},A=Ps(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,A){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;P=r.lencode[u&(1<<r.lenbits)-1],b=P>>>24,m=P>>>16&255,g=65535&P,!(b<=h);){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if(g<16)u>>>=b,h-=b,r.lens[r.have++]=g;else{if(16===g){for(E=b+2;h<E;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if(u>>>=b,h-=b,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],l=3+(3&u),u>>>=2,h-=2}else if(17===g){for(E=b+3;h<E;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}u>>>=b,h-=b,k=0,l=3+(7&u),u>>>=3,h-=3}else{for(E=b+7;h<E;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}u>>>=b,h-=b,k=0,l=11+(127&u),u>>>=7,h-=7}if(r.have+l>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;l--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},A=Ps(1,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,A){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},A=Ps(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,A){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(o>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,r.hold=u,r.bits=h,_s(e,d),s=e.next_out,n=e.output,c=e.avail_out,a=e.next_in,i=e.input,o=e.avail_in,u=r.hold,h=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;P=r.lencode[u&(1<<r.lenbits)-1],b=P>>>24,m=P>>>16&255,g=65535&P,!(b<=h);){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if(m&&0==(240&m)){for(w=b,v=m,_=g;P=r.lencode[_+((u&(1<<w+v)-1)>>w)],b=P>>>24,m=P>>>16&255,g=65535&P,!(w+b<=h);){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}u>>>=w,h-=w,r.back+=w}if(u>>>=b,h-=b,r.back+=b,r.length=g,0===m){r.mode=26;break}if(32&m){r.back=-1,r.mode=12;break}if(64&m){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&m,r.mode=22;case 22:if(r.extra){for(E=r.extra;h<E;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;P=r.distcode[u&(1<<r.distbits)-1],b=P>>>24,m=P>>>16&255,g=65535&P,!(b<=h);){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if(0==(240&m)){for(w=b,v=m,_=g;P=r.distcode[_+((u&(1<<w+v)-1)>>w)],b=P>>>24,m=P>>>16&255,g=65535&P,!(w+b<=h);){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}u>>>=w,h-=w,r.back+=w}if(u>>>=b,h-=b,r.back+=b,64&m){e.msg="invalid distance code",r.mode=30;break}r.offset=g,r.extra=15&m,r.mode=24;case 24:if(r.extra){for(E=r.extra;h<E;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===c)break e;if(l=d-c,r.offset>l){if(l=r.offset-l,l>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}l>r.wnext?(l-=r.wnext,p=r.wsize-l):p=r.wnext-l,l>r.length&&(l=r.length),y=r.window}else y=n,p=s-r.offset,l=r.length;l>c&&(l=c),c-=l,r.length-=l;do{n[s++]=y[p++]}while(--l);0===r.length&&(r.mode=21);break;case 26:if(0===c)break e;n[s++]=r.length,c--,r.mode=21;break;case 27:if(r.wrap){for(;h<32;){if(0===o)break e;o--,u|=i[a++]<<h,h+=8}if(d-=c,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?Qa(r.check,n,d,s-d):Ya(r.check,n,d,s-d)),d=c,(r.flags?u:xs(u))!==r.check){e.msg="incorrect data check",r.mode=30;break}u=0,h=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;h<32;){if(0===o)break e;o--,u+=i[a++]<<h,h+=8}if(u!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}u=0,h=0}r.mode=29;case 29:A=1;break e;case 30:A=-3;break e;case 32:default:return-2}return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,r.hold=u,r.bits=h,(r.wsize||d!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&Bs(e,e.output,e.next_out,d-e.avail_out),f-=e.avail_in,d-=e.avail_out,e.total_in+=f,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?Qa(r.check,n,d,e.next_out-d):Ya(r.check,n,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===f&&0===d||4===t)&&0===A&&(A=-5),A}function zs(e,t){const r=t.length;let i,n;return e&&e.state?(i=e.state,0!==i.wrap&&11!==i.mode?-2:11===i.mode&&(n=1,n=Ya(n,t,r,0),n!==i.check)?-3:(Bs(e,t,r,r),i.havedict=1,0)):-2}class qs{constructor(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}}class Os{constructor(e){this.options={chunkSize:16384,windowBits:0,...e||{}};const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ws,this.strm.avail_out=0;let r=Ks(this.strm,t.windowBits);if(0!==r)throw Error(Ja[r]);if(this.header=new qs,function(e,t){let r;e&&e.state&&(r=e.state,0==(2&r.wrap)||(r.head=t,t.done=!1))}(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=gs(t.dictionary):t.dictionary instanceof ArrayBuffer&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=zs(this.strm,t.dictionary),0!==r)))throw Error(Ja[r])}push(e,t){const{strm:r,options:{chunkSize:i,dictionary:n}}=this;let a,s,o=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?r.input=function(e){const t=new ua(e.length);for(let r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t}(e):e instanceof ArrayBuffer?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new ua(i),r.next_out=0,r.avail_out=i),a=Ts(r,0),2===a&&n&&(a=zs(this.strm,n)),-5===a&&!0===o&&(a=0,o=!1),1!==a&&0!==a)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(0!==r.avail_out&&1!==a&&(0!==r.avail_in||4!==s&&2!==s)||this.onData(sa(r.output,r.next_out))),0===r.avail_in&&0===r.avail_out&&(o=!0)}while((r.avail_in>0||0===r.avail_out)&&1!==a);return 1===a&&(s=4),4===s?(a=function(e){if(!e||!e.state)return-2;const t=e.state;return t.window&&(t.window=null),e.state=null,0}(this.strm),this.onEnd(a),this.ended=!0,0===a):2!==s||(this.onEnd(0),r.avail_out=0,!0)}onData(e){this.chunks.push(e)}onEnd(e){0===e&&(this.result=da(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}}var Fs=[0,1,3,7,15,31,63,127,255],Ns=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};Ns.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},Ns.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=Fs[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var i=r-e;t|=(this.curByte&Fs[e]<<i)>>i,this.bitOffset+=e,e=0}}return t},Ns.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1},Ns.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e<t.length;e++)t[e]=this.read(8);return function(e){return Array.prototype.map.call(e,(e=>("00"+e.toString(16)).slice(-2))).join("")}(t)};var js=Ns,Ls=function(){};Ls.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Ls.prototype.read=function(e,t,r){for(var i=0;i<r;){var n=this.readByte();if(n<0)return 0===i?-1:i;e[t++]=n,i++}return i},Ls.prototype.seek=function(e){throw Error("abstract method seek() not implemented")},Ls.prototype.writeByte=function(e){throw Error("abstract method readByte() not implemented")},Ls.prototype.write=function(e,t,r){var i;for(i=0;i<r;i++)this.writeByte(e[t++]);return r},Ls.prototype.flush=function(){};var Ws,Hs=Ls,Gs=(Ws=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]),function(){var e=4294967295;this.getCRC=function(){return~e>>>0},this.updateCRC=function(t){e=e<<8^Ws[255&(e>>>24^t)]},this.updateCRCRun=function(t,r){for(;r-- >0;)e=e<<8^Ws[255&(e>>>24^t)]}}),Vs=function(e,t){var r,i=e[t];for(r=t;r>0;r--)e[r]=e[r-1];return e[0]=i,i},$s={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},Zs={};Zs[$s.LAST_BLOCK]="Bad file checksum",Zs[$s.NOT_BZIP_DATA]="Not bzip data",Zs[$s.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",Zs[$s.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",Zs[$s.DATA_ERROR]="Data error",Zs[$s.OUT_OF_MEMORY]="Out of memory",Zs[$s.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var Ys=function(e,t){var r=Zs[e]||"unknown error";t&&(r+=": "+t);var i=new TypeError(r);throw i.errorCode=e,i},Xs=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};Xs.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new Gs,!0):(this.writeCount=-1,!1)},Xs.prototype._start_bunzip=function(e,t){var r=new Uint8Array(4);4===e.read(r,0,4)&&"BZh"===String.fromCharCode(r[0],r[1],r[2])||Ys($s.NOT_BZIP_DATA,"bad magic");var i=r[3]-48;(i<1||i>9)&&Ys($s.NOT_BZIP_DATA,"level out of range"),this.reader=new js(e),this.dbufSize=1e5*i,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},Xs.prototype._get_next_block=function(){var e,t,r,i=this.reader,n=i.pi();if("177245385090"===n)return!1;"314159265359"!==n&&Ys($s.NOT_BZIP_DATA),this.targetBlockCRC=i.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,i.read(1)&&Ys($s.OBSOLETE_INPUT);var a=i.read(24);a>this.dbufSize&&Ys($s.DATA_ERROR,"initial position out of bounds");var s=i.read(16),o=new Uint8Array(256),c=0;for(e=0;e<16;e++)if(s&1<<15-e){var u=16*e;for(r=i.read(16),t=0;t<16;t++)r&1<<15-t&&(o[c++]=u+t)}var h=i.read(3);(h<2||h>6)&&Ys($s.DATA_ERROR);var f=i.read(15);0===f&&Ys($s.DATA_ERROR);var d=new Uint8Array(256);for(e=0;e<h;e++)d[e]=e;var l=new Uint8Array(f);for(e=0;e<f;e++){for(t=0;i.read(1);t++)t>=h&&Ys($s.DATA_ERROR);l[e]=Vs(d,t)}var p,y=c+2,b=[];for(t=0;t<h;t++){var m,g,w=new Uint8Array(y),v=new Uint16Array(21);for(s=i.read(5),e=0;e<y;e++){for(;(s<1||s>20)&&Ys($s.DATA_ERROR),i.read(1);)i.read(1)?s--:s++;w[e]=s}for(m=g=w[0],e=1;e<y;e++)w[e]>g?g=w[e]:w[e]<m&&(m=w[e]);p={},b.push(p),p.permute=new Uint16Array(258),p.limit=new Uint32Array(22),p.base=new Uint32Array(21),p.minLen=m,p.maxLen=g;var _=0;for(e=m;e<=g;e++)for(v[e]=p.limit[e]=0,s=0;s<y;s++)w[s]===e&&(p.permute[_++]=s);for(e=0;e<y;e++)v[w[e]]++;for(_=s=0,e=m;e<g;e++)_+=v[e],p.limit[e]=_-1,_<<=1,s+=v[e],p.base[e+1]=_-s;p.limit[g+1]=Number.MAX_VALUE,p.limit[g]=_+v[g]-1,p.base[m]=0}var k=new Uint32Array(256);for(e=0;e<256;e++)d[e]=e;var A,S=0,E=0,P=0,x=this.dbuf=new Uint32Array(this.dbufSize);for(y=0;;){for(y--||(y=49,P>=f&&Ys($s.DATA_ERROR),p=b[l[P++]]),e=p.minLen,t=i.read(e);e>p.maxLen&&Ys($s.DATA_ERROR),!(t<=p.limit[e]);e++)t=t<<1|i.read(1);((t-=p.base[e])<0||t>=258)&&Ys($s.DATA_ERROR);var M=p.permute[t];if(0!==M&&1!==M){if(S)for(S=0,E+s>this.dbufSize&&Ys($s.DATA_ERROR),k[A=o[d[0]]]+=s;s--;)x[E++]=A;if(M>c)break;E>=this.dbufSize&&Ys($s.DATA_ERROR),k[A=o[A=Vs(d,e=M-1)]]++,x[E++]=A}else S||(S=1,s=0),s+=0===M?S:2*S,S<<=1}for((a<0||a>=E)&&Ys($s.DATA_ERROR),t=0,e=0;e<256;e++)r=t+k[e],k[e]=t,t=r;for(e=0;e<E;e++)x[k[A=255&x[e]]]|=e<<8,k[A]++;var C=0,K=0,D=0;return E&&(K=255&(C=x[a]),C>>=8,D=-1),this.writePos=C,this.writeCurrent=K,this.writeCount=E,this.writeRun=D,!0},Xs.prototype._read_bunzip=function(e,t){var r,i,n;if(this.writeCount<0)return 0;var a=this.dbuf,s=this.writePos,o=this.writeCurrent,c=this.writeCount;this.outputsize;for(var u=this.writeRun;c;){for(c--,i=o,o=255&(s=a[s]),s>>=8,3==u++?(r=o,n=i,o=-1):(r=1,n=o),this.blockCRC.updateCRCRun(n,r);r--;)this.outputStream.writeByte(n),this.nextoutput++;o!=i&&(u=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&Ys($s.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var Qs=function(e){if("readByte"in e)return e;var t=new Hs;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(e){this.pos=e},t.eof=function(){return this.pos>=e.length},t},Js=function(e){var t=new Hs,r=!0;if(e)if("number"==typeof e)t.buffer=new Uint8Array(e),r=!1;else{if("writeByte"in e)return e;t.buffer=e,r=!1}else t.buffer=new Uint8Array(16384);return t.pos=0,t.writeByte=function(e){if(r&&this.pos>=this.buffer.length){var t=new Uint8Array(2*this.buffer.length);t.set(this.buffer),this.buffer=t}this.buffer[this.pos++]=e},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!r)throw new TypeError("outputsize does not match decoded input");var e=new Uint8Array(this.pos);e.set(this.buffer.subarray(0,this.pos)),this.buffer=e}return this.buffer},t._coerced=!0,t};var eo=function(e,t,r){for(var i=Qs(e),n=Js(t),a=new Xs(i,n);!("eof"in i)||!i.eof();)if(a._init_block())a._read_bunzip();else{var s=a.reader.read(32)>>>0;if(s!==a.streamCRC&&Ys($s.DATA_ERROR,"Bad stream CRC (got "+a.streamCRC.toString(16)+" expected "+s.toString(16)+")"),!r||!("eof"in i)||i.eof())break;a._start_bunzip(i,n)}if("getBuffer"in n)return n.getBuffer()};class to{static get tag(){return me.packet.literalData}constructor(e=new Date){this.format=me.literal.utf8,this.date=ce.normalizeDate(e),this.text=null,this.data=null,this.filename=""}setText(e,t=me.literal.utf8){this.format=t,this.text=e,this.data=null}getText(e=!1){return(null===this.text||ce.isStream(this.text))&&(this.text=ce.decodeUTF8(ce.nativeEOL(this.getBytes(e)))),this.text}setBytes(e,t){this.format=t,this.data=e,this.text=null}getBytes(e=!1){return null===this.data&&(this.data=ce.canonicalizeEOL(ce.encodeUTF8(this.text))),e?ee(this.data):this.data}setFilename(e){this.filename=e}getFilename(){return this.filename}async read(e){await Q(e,(async e=>{const t=await e.readByte(),r=await e.readByte();this.filename=ce.decodeUTF8(await e.readBytes(r)),this.date=ce.readDate(await e.readBytes(4));let i=e.remainder();_(i)&&(i=await ie(i)),this.setBytes(i,t)}))}writeHeader(){const e=ce.encodeUTF8(this.filename),t=new Uint8Array([e.length]),r=new Uint8Array([this.format]),i=ce.writeDate(this.date);return ce.concatUint8Array([r,t,e,i])}write(){const e=this.writeHeader(),t=this.getBytes();return ce.concat([e,t])}}const ro=Symbol("verified"),io=new Set([me.signatureSubpacket.issuer,me.signatureSubpacket.issuerFingerprint,me.signatureSubpacket.embeddedSignature]);class no{static get tag(){return me.packet.signature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=null,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyID=new Me,this.rawNotations=[],this.notations={},this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserID=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.issuerKeyVersion=null,this.issuerFingerprint=null,this.preferredAEADAlgorithms=null,this.revoked=null,this[ro]=null}read(e){let t=0;if(this.version=e[t++],4!==this.version&&5!==this.version)throw new Ri(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=e[t++],this.publicKeyAlgorithm=e[t++],this.hashAlgorithm=e[t++],t+=this.readSubPackets(e.subarray(t,e.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=e.subarray(0,t),t+=this.readSubPackets(e.subarray(t,e.length),!1),this.signedHashValue=e.subarray(t,t+2),t+=2,this.params=na.signature.parseSignatureParams(this.publicKeyAlgorithm,e.subarray(t,e.length))}writeParams(){return this.params instanceof Promise?ae((async()=>na.serializeParams(this.publicKeyAlgorithm,await this.params))):na.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const e=[];return e.push(this.signatureData),e.push(this.writeUnhashedSubPackets()),e.push(this.signedHashValue),e.push(this.writeParams()),ce.concat(e)}async sign(e,t,r=new Date,i=!1){5===e.version?this.version=5:this.version=4;const n=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=ce.normalizeDate(r),this.issuerKeyVersion=e.version,this.issuerFingerprint=e.getFingerprintBytes(),this.issuerKeyID=e.getKeyID(),n.push(this.writeHashedSubPackets()),this.signatureData=ce.concat(n);const a=this.toHash(this.signatureType,t,i),s=await this.hash(this.signatureType,t,a,i);this.signedHashValue=re(J(s),0,2);const o=async()=>na.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,e.publicParams,e.privateParams,a,await ie(s));ce.isStream(s)?this.params=o():(this.params=await o(),this[ro]=!0)}writeHashedSubPackets(){const e=me.signatureSubpacket,t=[];let r;if(null===this.created)throw Error("Missing signature creation time");t.push(ao(e.signatureCreationTime,ce.writeDate(this.created))),null!==this.signatureExpirationTime&&t.push(ao(e.signatureExpirationTime,ce.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&t.push(ao(e.exportableCertification,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),t.push(ao(e.trustSignature,r))),null!==this.regularExpression&&t.push(ao(e.regularExpression,this.regularExpression)),null!==this.revocable&&t.push(ao(e.revocable,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&t.push(ao(e.keyExpirationTime,ce.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(r=ce.stringToUint8Array(ce.uint8ArrayToString(this.preferredSymmetricAlgorithms)),t.push(ao(e.preferredSymmetricAlgorithms,r))),null!==this.revocationKeyClass&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=ce.concat([r,this.revocationKeyFingerprint]),t.push(ao(e.revocationKey,r))),this.rawNotations.forEach((([{name:i,value:n,humanReadable:a}])=>{r=[new Uint8Array([a?128:0,0,0,0])],r.push(ce.writeNumber(i.length,2)),r.push(ce.writeNumber(n.length,2)),r.push(ce.stringToUint8Array(i)),r.push(n),r=ce.concat(r),t.push(ao(e.notationData,r))})),null!==this.preferredHashAlgorithms&&(r=ce.stringToUint8Array(ce.uint8ArrayToString(this.preferredHashAlgorithms)),t.push(ao(e.preferredHashAlgorithms,r))),null!==this.preferredCompressionAlgorithms&&(r=ce.stringToUint8Array(ce.uint8ArrayToString(this.preferredCompressionAlgorithms)),t.push(ao(e.preferredCompressionAlgorithms,r))),null!==this.keyServerPreferences&&(r=ce.stringToUint8Array(ce.uint8ArrayToString(this.keyServerPreferences)),t.push(ao(e.keyServerPreferences,r))),null!==this.preferredKeyServer&&t.push(ao(e.preferredKeyServer,ce.stringToUint8Array(this.preferredKeyServer))),null!==this.isPrimaryUserID&&t.push(ao(e.primaryUserID,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&t.push(ao(e.policyURI,ce.stringToUint8Array(this.policyURI))),null!==this.keyFlags&&(r=ce.stringToUint8Array(ce.uint8ArrayToString(this.keyFlags)),t.push(ao(e.keyFlags,r))),null!==this.signersUserID&&t.push(ao(e.signersUserID,ce.stringToUint8Array(this.signersUserID))),null!==this.reasonForRevocationFlag&&(r=ce.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),t.push(ao(e.reasonForRevocation,r))),null!==this.features&&(r=ce.stringToUint8Array(ce.uint8ArrayToString(this.features)),t.push(ao(e.features,r))),null!==this.signatureTargetPublicKeyAlgorithm&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push(ce.stringToUint8Array(this.signatureTargetHash)),r=ce.concat(r),t.push(ao(e.signatureTarget,r))),null!==this.preferredAEADAlgorithms&&(r=ce.stringToUint8Array(ce.uint8ArrayToString(this.preferredAEADAlgorithms)),t.push(ao(e.preferredAEADAlgorithms,r)));const i=ce.concat(t),n=ce.writeNumber(i.length,2);return ce.concat([n,i])}writeUnhashedSubPackets(){const e=me.signatureSubpacket,t=[];let r;this.issuerKeyID.isNull()||5===this.issuerKeyVersion||t.push(ao(e.issuer,this.issuerKeyID.write())),null!==this.embeddedSignature&&t.push(ao(e.embeddedSignature,this.embeddedSignature.write())),null!==this.issuerFingerprint&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=ce.concat(r),t.push(ao(e.issuerFingerprint,r))),this.unhashedSubpackets.forEach((e=>{t.push(Pi(e.length)),t.push(e)}));const i=ce.concat(t),n=ce.writeNumber(i.length,2);return ce.concat([n,i])}readSubPacket(e,t=!0){let r=0;const i=128&e[r],n=127&e[r];if(t||io.has(n))switch(r++,n){case me.signatureSubpacket.signatureCreationTime:this.created=ce.readDate(e.subarray(r,e.length));break;case me.signatureSubpacket.signatureExpirationTime:{const t=ce.readNumber(e.subarray(r,e.length));this.signatureNeverExpires=0===t,this.signatureExpirationTime=t;break}case me.signatureSubpacket.exportableCertification:this.exportable=1===e[r++];break;case me.signatureSubpacket.trustSignature:this.trustLevel=e[r++],this.trustAmount=e[r++];break;case me.signatureSubpacket.regularExpression:this.regularExpression=e[r];break;case me.signatureSubpacket.revocable:this.revocable=1===e[r++];break;case me.signatureSubpacket.keyExpirationTime:{const t=ce.readNumber(e.subarray(r,e.length));this.keyExpirationTime=t,this.keyNeverExpires=0===t;break}case me.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...e.subarray(r,e.length)];break;case me.signatureSubpacket.revocationKey:this.revocationKeyClass=e[r++],this.revocationKeyAlgorithm=e[r++],this.revocationKeyFingerprint=e.subarray(r,r+20);break;case me.signatureSubpacket.issuer:this.issuerKeyID.read(e.subarray(r,e.length));break;case me.signatureSubpacket.notationData:{const t=!!(128&e[r]);r+=4;const n=ce.readNumber(e.subarray(r,r+2));r+=2;const a=ce.readNumber(e.subarray(r,r+2));r+=2;const s=ce.uint8ArrayToString(e.subarray(r,r+n)),o=e.subarray(r+n,r+n+a);this.rawNotations.push({name:s,humanReadable:t,value:o,critical:i}),t&&(this.notations[s]=ce.uint8ArrayToString(o));break}case me.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...e.subarray(r,e.length)];break;case me.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...e.subarray(r,e.length)];break;case me.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...e.subarray(r,e.length)];break;case me.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=ce.uint8ArrayToString(e.subarray(r,e.length));break;case me.signatureSubpacket.primaryUserID:this.isPrimaryUserID=0!==e[r++];break;case me.signatureSubpacket.policyURI:this.policyURI=ce.uint8ArrayToString(e.subarray(r,e.length));break;case me.signatureSubpacket.keyFlags:this.keyFlags=[...e.subarray(r,e.length)];break;case me.signatureSubpacket.signersUserID:this.signersUserID=ce.uint8ArrayToString(e.subarray(r,e.length));break;case me.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=e[r++],this.reasonForRevocationString=ce.uint8ArrayToString(e.subarray(r,e.length));break;case me.signatureSubpacket.features:this.features=[...e.subarray(r,e.length)];break;case me.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=e[r++],this.signatureTargetHashAlgorithm=e[r++];const t=na.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=ce.uint8ArrayToString(e.subarray(r,r+t));break}case me.signatureSubpacket.embeddedSignature:this.embeddedSignature=new no,this.embeddedSignature.read(e.subarray(r,e.length));break;case me.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=e[r++],this.issuerFingerprint=e.subarray(r,e.length),5===this.issuerKeyVersion?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case me.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...e.subarray(r,e.length)];break;default:{const e=Error("Unknown signature subpacket type "+n);if(i)throw e;ce.printDebug(e)}}else this.unhashedSubpackets.push(e.subarray(r,e.length))}readSubPackets(e,t=!0,r){const i=ce.readNumber(e.subarray(0,2));let n=2;for(;n<2+i;){const i=Ei(e.subarray(n,e.length));n+=i.offset,this.readSubPacket(e.subarray(n,n+i.len),t,r),n+=i.len}return n}toSign(e,t){const r=me.signature;switch(e){case r.binary:return null!==t.text?ce.encodeUTF8(t.getText(!0)):t.getBytes(!0);case r.text:{const e=t.getBytes(!0);return ce.canonicalizeEOL(e)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let e,i;if(t.userID)i=180,e=t.userID;else{if(!t.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");i=209,e=t.userAttribute}const n=e.write();return ce.concat([this.toSign(r.key,t),new Uint8Array([i]),ce.writeNumber(n.length,4),n])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return ce.concat([this.toSign(r.key,t),this.toSign(r.key,{key:t.bind})]);case r.key:if(void 0===t.key)throw Error("Key packet is required for this signature.");return t.key.writeForHash(this.version);case r.keyRevocation:return this.toSign(r.key,t);case r.timestamp:return new Uint8Array(0);case r.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(e,t){let r=0;return Y(J(this.signatureData),(e=>{r+=e.length}),(()=>{const i=[];return 5!==this.version||this.signatureType!==me.signature.binary&&this.signatureType!==me.signature.text||(t?i.push(new Uint8Array(6)):i.push(e.writeHeader())),i.push(new Uint8Array([this.version,255])),5===this.version&&i.push(new Uint8Array(4)),i.push(ce.writeNumber(r,4)),ce.concat(i)}))}toHash(e,t,r=!1){const i=this.toSign(e,t);return ce.concat([i,this.signatureData,this.calculateTrailer(t,r)])}async hash(e,t,r,i=!1){return r||(r=this.toHash(e,t,i)),na.hash.digest(this.hashAlgorithm,r)}async verify(e,t,r,i=new Date,n=!1,a=ge){if(!this.issuerKeyID.equals(e.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==e.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const s=t===me.signature.binary||t===me.signature.text;if(!(this[ro]&&!s)){let i,a;if(this.hashed?a=await this.hashed:(i=this.toHash(t,r,n),a=await this.hash(t,r,i)),a=await ie(a),this.signedHashValue[0]!==a[0]||this.signedHashValue[1]!==a[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[ro]=await na.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,e.publicParams,i,a),!this[ro])throw Error("Signature verification failed")}const o=ce.normalizeDate(i);if(o&&this.created>o)throw Error("Signature creation time is in the future");if(o&&o>=this.getExpirationTime())throw Error("Signature is expired");if(a.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+me.read(me.hash,this.hashAlgorithm).toUpperCase());if(a.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[me.signature.binary,me.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+me.read(me.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach((({name:e,critical:t})=>{if(t&&a.knownNotations.indexOf(e)<0)throw Error("Unknown critical notation: "+e)})),null!==this.revocationKeyClass)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(e=new Date){const t=ce.normalizeDate(e);return null!==t&&!(this.created<=t&&t<this.getExpirationTime())}getExpirationTime(){return this.signatureNeverExpires?1/0:new Date(this.created.getTime()+1e3*this.signatureExpirationTime)}}function ao(e,t){const r=[];return r.push(Pi(t.length+1)),r.push(new Uint8Array([e])),r.push(t),ce.concat(r)}class so{static get tag(){return me.packet.onePassSignature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.issuerKeyID=null,this.flags=null}read(e){let t=0;if(this.version=e[t++],3!==this.version)throw new Ri(`Version ${this.version} of the one-pass signature packet is unsupported.`);return this.signatureType=e[t++],this.hashAlgorithm=e[t++],this.publicKeyAlgorithm=e[t++],this.issuerKeyID=new Me,this.issuerKeyID.read(e.subarray(t,t+8)),t+=8,this.flags=e[t++],this}write(){const e=new Uint8Array([3,this.signatureType,this.hashAlgorithm,this.publicKeyAlgorithm]),t=new Uint8Array([this.flags]);return ce.concatUint8Array([e,this.issuerKeyID.write(),t])}calculateTrailer(...e){return ae((async()=>no.prototype.calculateTrailer.apply(await this.correspondingSig,e)))}async verify(){const e=await this.correspondingSig;if(!e||e.constructor.tag!==me.packet.signature)throw Error("Corresponding signature packet missing");if(e.signatureType!==this.signatureType||e.hashAlgorithm!==this.hashAlgorithm||e.publicKeyAlgorithm!==this.publicKeyAlgorithm||!e.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return e.hashed=this.hashed,e.verify.apply(e,arguments)}}function oo(e,t){if(!t[e]){let t;try{t=me.read(me.packet,e)}catch(t){throw new Ri("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+t)}return new t[e]}so.prototype.hash=no.prototype.hash,so.prototype.toHash=no.prototype.toHash,so.prototype.toSign=no.prototype.toSign;class co extends Array{static async fromBinary(e,t,r=ge){const i=new co;return await i.read(e,t,r),i}async read(e,t,r=ge){this.stream=X(e,(async(e,i)=>{const n=G(i);try{for(;;){await n.ready;if(await Di(e,(async e=>{try{if(e.tag===me.packet.marker||e.tag===me.packet.trust)return;const i=oo(e.tag,t);i.packets=new co,i.fromStream=ce.isStream(e.packet),await i.read(e.packet,r),await n.write(i)}catch(t){const i=!r.ignoreUnsupportedPackets&&t instanceof Ri,a=!(r.ignoreMalformedPackets||t instanceof Ri);if(i||a||Ki(e.tag))await n.abort(t);else{const t=new Ui(e.tag,e.packet);await n.write(t)}ce.printDebugError(t)}})))return await n.ready,void await n.close()}}catch(e){await n.abort(e)}}));const i=H(this.stream);for(;;){const{done:e,value:t}=await i.read();if(e?this.stream=null:this.push(t),e||Ki(t.constructor.tag))break}i.releaseLock()}write(){const e=[];for(let t=0;t<this.length;t++){const r=this[t]instanceof Ui?this[t].tag:this[t].constructor.tag,i=this[t].write();if(ce.isStream(i)&&Ki(this[t].constructor.tag)){let t=[],n=0;const a=512;e.push(Mi(r)),e.push(Y(i,(e=>{if(t.push(e),n+=e.length,n>=a){const e=Math.min(Math.log(n)/Math.LN2|0,30),r=2**e,i=ce.concat([xi(e)].concat(t));return t=[i.subarray(1+r)],n=t[0].length,i.subarray(0,1+r)}}),(()=>ce.concat([Pi(n)].concat(t)))))}else{if(ce.isStream(i)){let t=0;e.push(Y(J(i),(e=>{t+=e.length}),(()=>Ci(r,t))))}else e.push(Ci(r,i.length));e.push(i)}}return ce.concat(e)}filterByTag(...e){const t=new co,r=e=>t=>e===t;for(let i=0;i<this.length;i++)e.some(r(this[i].constructor.tag))&&t.push(this[i]);return t}findPacket(e){return this.find((t=>t.constructor.tag===e))}indexOfTag(...e){const t=[],r=this,i=e=>t=>e===t;for(let n=0;n<this.length;n++)e.some(i(r[n].constructor.tag))&&t.push(n);return t}}const uo=/*#__PURE__*/ce.constructAllowedPackets([to,so,no]);class ho{static get tag(){return me.packet.compressedData}constructor(e=ge){this.packets=null,this.algorithm=e.preferredCompressionAlgorithm,this.compressed=null,this.deflateLevel=e.deflateLevel}async read(e,t=ge){await Q(e,(async e=>{this.algorithm=await e.readByte(),this.compressed=e.remainder(),await this.decompress(t)}))}write(){return null===this.compressed&&this.compress(),ce.concat([new Uint8Array([this.algorithm]),this.compressed])}async decompress(e=ge){const t=me.read(me.compression,this.algorithm),r=go[t];if(!r)throw Error(t+" decompression not supported");this.packets=await co.fromBinary(r(this.compressed),uo,e)}compress(){const e=me.read(me.compression,this.algorithm),t=mo[e];if(!t)throw Error(e+" compression not supported");this.compressed=t(this.packets.write(),this.deflateLevel)}}const fo=ce.getNodeZlib();function lo(e){return e}function po(e,t,r={}){return function(i){return!ce.isStream(i)||_(i)?ae((()=>ie(i).then((t=>new Promise(((i,n)=>{e(t,r,((e,t)=>{if(e)return n(e);i(t)}))})))))):K(D(i).pipe(t(r)))}}function yo(e,t={}){return function(r){const i=new e(t);return Y(r,(e=>{if(e.length)return i.push(e,2),i.result}),(()=>{if(e===vs)return i.push([],4),i.result}))}}function bo(e){return function(t){return ae((async()=>e(await ie(t))))}}const mo=fo?{zip:/*#__PURE__*/(e,t)=>po(fo.deflateRaw,fo.createDeflateRaw,{level:t})(e),zlib:/*#__PURE__*/(e,t)=>po(fo.deflate,fo.createDeflate,{level:t})(e)}:{zip:/*#__PURE__*/(e,t)=>yo(vs,{raw:!0,level:t})(e),zlib:/*#__PURE__*/(e,t)=>yo(vs,{level:t})(e)},go=fo?{uncompressed:lo,zip:/*#__PURE__*/po(fo.inflateRaw,fo.createInflateRaw),zlib:/*#__PURE__*/po(fo.inflate,fo.createInflate),bzip2:/*#__PURE__*/bo(eo)}:{uncompressed:lo,zip:/*#__PURE__*/yo(Os,{raw:!0}),zlib:/*#__PURE__*/yo(Os),bzip2:/*#__PURE__*/bo(eo)},wo=/*#__PURE__*/ce.constructAllowedPackets([to,ho,so,no]);class vo{static get tag(){return me.packet.symEncryptedIntegrityProtectedData}constructor(){this.version=1,this.encrypted=null,this.packets=null}async read(e){await Q(e,(async e=>{const t=await e.readByte();if(1!==t)throw new Ri(`Version ${t} of the SEIP packet is unsupported.`);this.encrypted=e.remainder()}))}write(){return ce.concat([new Uint8Array([1]),this.encrypted])}async encrypt(e,t,r=ge){const{blockSize:i}=na.getCipher(e);let n=this.packets.write();_(n)&&(n=await ie(n));const a=await na.getPrefixRandom(e),s=new Uint8Array([211,20]),o=ce.concat([a,n,s]),c=await na.hash.sha1(ee(o)),u=ce.concat([o,c]);return this.encrypted=await na.mode.cfb.encrypt(e,t,u,new Uint8Array(i),r),!0}async decrypt(e,t,r=ge){const{blockSize:i}=na.getCipher(e);let n=J(this.encrypted);_(n)&&(n=await ie(n));const a=await na.mode.cfb.decrypt(e,t,n,new Uint8Array(i)),s=re(ee(a),-20),o=re(a,0,-20),c=Promise.all([ie(await na.hash.sha1(ee(o))),ie(s)]).then((([e,t])=>{if(!ce.equalsUint8Array(e,t))throw Error("Modification detected.");return new Uint8Array})),u=re(o,i+2);let h=re(u,0,-2);return h=W([h,ae((()=>c))]),ce.isStream(n)&&r.allowUnauthenticatedStream||(h=await ie(h)),this.packets=await co.fromBinary(h,wo,r),!0}}const _o=/*#__PURE__*/ce.constructAllowedPackets([to,ho,so,no]);class ko{static get tag(){return me.packet.aeadEncryptedData}constructor(){this.version=1,this.cipherAlgorithm=null,this.aeadAlgorithm=me.aead.eax,this.chunkSizeByte=null,this.iv=null,this.encrypted=null,this.packets=null}async read(e){await Q(e,(async e=>{const t=await e.readByte();if(1!==t)throw new Ri(`Version ${t} of the AEAD-encrypted data packet is not supported.`);this.cipherAlgorithm=await e.readByte(),this.aeadAlgorithm=await e.readByte(),this.chunkSizeByte=await e.readByte();const r=na.getAEADMode(this.aeadAlgorithm);this.iv=await e.readBytes(r.ivLength),this.encrypted=e.remainder()}))}write(){return ce.concat([new Uint8Array([this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte]),this.iv,this.encrypted])}async decrypt(e,t,r=ge){this.packets=await co.fromBinary(await this.crypt("decrypt",t,J(this.encrypted)),_o,r)}async encrypt(e,t,r=ge){this.cipherAlgorithm=e;const{ivLength:i}=na.getAEADMode(this.aeadAlgorithm);this.iv=await na.random.getRandomBytes(i),this.chunkSizeByte=r.aeadChunkSizeByte;const n=this.packets.write();this.encrypted=await this.crypt("encrypt",t,n)}async crypt(e,t,r){const i=na.getAEADMode(this.aeadAlgorithm),n=await i(this.cipherAlgorithm,t),a="decrypt"===e?i.tagLength:0,s="encrypt"===e?i.tagLength:0,o=2**(this.chunkSizeByte+6)+a,c=new ArrayBuffer(21),u=new Uint8Array(c,0,13),h=new Uint8Array(c),f=new DataView(c),d=new Uint8Array(c,5,8);u.set([192|ko.tag,this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte],0);let l=0,p=Promise.resolve(),y=0,b=0;const m=this.iv;return X(r,(async(t,r)=>{if("array"!==ce.isStream(t)){const e=new O({},{highWaterMark:ce.getHardwareConcurrency()*2**(this.chunkSizeByte+6),size:e=>e.length});V(e.readable,r),r=e.writable}const c=H(t),g=G(r);try{for(;;){let t=await c.readBytes(o+a)||new Uint8Array;const r=t.subarray(t.length-a);let w,v;if(t=t.subarray(0,t.length-a),!l||t.length?(c.unshift(r),w=n[e](t,i.getNonce(m,d),u),b+=t.length-a+s):(f.setInt32(17,y),w=n[e](r,i.getNonce(m,d),h),b+=s,v=!0),y+=t.length-a,p=p.then((()=>w)).then((async e=>{await g.ready,await g.write(e),b-=e.length})).catch((e=>g.abort(e))),(v||b>g.desiredSize)&&await p,v){await g.close();break}f.setInt32(9,++l)}}catch(e){await g.abort(e)}}))}}class Ao{static get tag(){return me.packet.publicKeyEncryptedSessionKey}constructor(){this.version=3,this.publicKeyID=new Me,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted={}}read(e){if(this.version=e[0],3!==this.version)throw new Ri(`Version ${this.version} of the PKESK packet is unsupported.`);this.publicKeyID.read(e.subarray(1,e.length)),this.publicKeyAlgorithm=e[9],this.encrypted=na.parseEncSessionKeyParams(this.publicKeyAlgorithm,e.subarray(10))}write(){const e=[new Uint8Array([this.version]),this.publicKeyID.write(),new Uint8Array([this.publicKeyAlgorithm]),na.serializeParams(this.publicKeyAlgorithm,this.encrypted)];return ce.concatUint8Array(e)}async encrypt(e){const t=ce.concatUint8Array([new Uint8Array([me.write(me.symmetric,this.sessionKeyAlgorithm)]),this.sessionKey,ce.writeChecksum(this.sessionKey)]),r=me.write(me.publicKey,this.publicKeyAlgorithm);this.encrypted=await na.publicKeyEncrypt(r,e.publicParams,t,e.getFingerprintBytes())}async decrypt(e,t){if(this.publicKeyAlgorithm!==e.algorithm)throw Error("Decryption error");const r=t?ce.concatUint8Array([new Uint8Array([t.sessionKeyAlgorithm]),t.sessionKey,ce.writeChecksum(t.sessionKey)]):null,i=await na.publicKeyDecrypt(this.publicKeyAlgorithm,e.publicParams,e.privateParams,this.encrypted,e.getFingerprintBytes(),r),n=i[0],a=i.subarray(1,i.length-2),s=i.subarray(i.length-2),o=ce.writeChecksum(a),c=o[0]===s[0]&o[1]===s[1];if(t){const e=c&n===t.sessionKeyAlgorithm&a.length===t.sessionKey.length;this.sessionKeyAlgorithm=ce.selectUint8(e,n,t.sessionKeyAlgorithm),this.sessionKey=ce.selectUint8Array(e,a,t.sessionKey)}else{if(!(c&&me.read(me.symmetric,n)))throw Error("Decryption error");this.sessionKey=a,this.sessionKeyAlgorithm=n}}}class So{constructor(e=ge){this.algorithm=me.hash.sha256,this.type="iterated",this.c=e.s2kIterationCountByte,this.salt=null}getCount(){return 16+(15&this.c)<<6+(this.c>>4)}read(e){let t=0;switch(this.type=me.read(me.s2k,e[t++]),this.algorithm=e[t++],this.type){case"simple":break;case"salted":this.salt=e.subarray(t,t+8),t+=8;break;case"iterated":this.salt=e.subarray(t,t+8),t+=8,this.c=e[t++];break;case"gnu":if("GNU"!==ce.uint8ArrayToString(e.subarray(t,t+3)))throw Error("Unknown s2k type.");t+=3;if(1001!==1e3+e[t++])throw Error("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw Error("Unknown s2k type.")}return t}write(){if("gnu-dummy"===this.type)return new Uint8Array([101,0,...ce.stringToUint8Array("GNU"),1]);const e=[new Uint8Array([me.write(me.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":e.push(this.salt);break;case"iterated":e.push(this.salt),e.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return ce.concatUint8Array(e)}async produceKey(e,t){e=ce.encodeUTF8(e);const r=[];let i=0,n=0;for(;i<t;){let t;switch(this.type){case"simple":t=ce.concatUint8Array([new Uint8Array(n),e]);break;case"salted":t=ce.concatUint8Array([new Uint8Array(n),this.salt,e]);break;case"iterated":{const r=ce.concatUint8Array([this.salt,e]);let i=r.length;const a=Math.max(this.getCount(),i);t=new Uint8Array(n+a),t.set(r,n);for(let e=n+i;e<a;e+=i,i*=2)t.copyWithin(e,n,e);break}case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}const a=await na.hash.digest(this.algorithm,t);r.push(a),i+=a.length,n++}return ce.concatUint8Array(r).subarray(0,t)}}class Eo{static get tag(){return me.packet.symEncryptedSessionKey}constructor(e=ge){this.version=e.aeadProtect?5:4,this.sessionKey=null,this.sessionKeyEncryptionAlgorithm=null,this.sessionKeyAlgorithm=me.symmetric.aes256,this.aeadAlgorithm=me.write(me.aead,e.preferredAEADAlgorithm),this.encrypted=null,this.s2k=null,this.iv=null}read(e){let t=0;if(this.version=e[t++],4!==this.version&&5!==this.version)throw new Ri(`Version ${this.version} of the SKESK packet is unsupported.`);const r=e[t++];if(5===this.version&&(this.aeadAlgorithm=e[t++]),this.s2k=new So,t+=this.s2k.read(e.subarray(t,e.length)),5===this.version){const r=na.getAEADMode(this.aeadAlgorithm);this.iv=e.subarray(t,t+=r.ivLength)}5===this.version||t<e.length?(this.encrypted=e.subarray(t,e.length),this.sessionKeyEncryptionAlgorithm=r):this.sessionKeyAlgorithm=r}write(){const e=null===this.encrypted?this.sessionKeyAlgorithm:this.sessionKeyEncryptionAlgorithm;let t;return 5===this.version?t=ce.concatUint8Array([new Uint8Array([this.version,e,this.aeadAlgorithm]),this.s2k.write(),this.iv,this.encrypted]):(t=ce.concatUint8Array([new Uint8Array([this.version,e]),this.s2k.write()]),null!==this.encrypted&&(t=ce.concatUint8Array([t,this.encrypted]))),t}async decrypt(e){const t=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm,{blockSize:r,keySize:i}=na.getCipher(t),n=await this.s2k.produceKey(e,i);if(5===this.version){const e=na.getAEADMode(this.aeadAlgorithm),r=new Uint8Array([192|Eo.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),i=await e(t,n);this.sessionKey=await i.decrypt(this.encrypted,this.iv,r)}else if(null!==this.encrypted){const e=await na.mode.cfb.decrypt(t,n,this.encrypted,new Uint8Array(r));this.sessionKeyAlgorithm=me.write(me.symmetric,e[0]),this.sessionKey=e.subarray(1,e.length)}else this.sessionKey=n}async encrypt(e,t=ge){const r=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm;this.sessionKeyEncryptionAlgorithm=r,this.s2k=new So(t),this.s2k.salt=await na.random.getRandomBytes(8);const{blockSize:i,keySize:n}=na.getCipher(r),a=await this.s2k.produceKey(e,n);if(null===this.sessionKey&&(this.sessionKey=await na.generateSessionKey(this.sessionKeyAlgorithm)),5===this.version){const e=na.getAEADMode(this.aeadAlgorithm);this.iv=await na.random.getRandomBytes(e.ivLength);const t=new Uint8Array([192|Eo.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),i=await e(r,a);this.encrypted=await i.encrypt(this.sessionKey,this.iv,t)}else{const e=ce.concatUint8Array([new Uint8Array([this.sessionKeyAlgorithm]),this.sessionKey]);this.encrypted=await na.mode.cfb.encrypt(r,a,e,new Uint8Array(i),t)}}}class Po{static get tag(){return me.packet.publicKey}constructor(e=new Date,t=ge){this.version=t.v5Keys?5:4,this.created=ce.normalizeDate(e),this.algorithm=null,this.publicParams=null,this.expirationTimeV3=0,this.fingerprint=null,this.keyID=null}static fromSecretKeyPacket(e){const t=new Po,{version:r,created:i,algorithm:n,publicParams:a,keyID:s,fingerprint:o}=e;return t.version=r,t.created=i,t.algorithm=n,t.publicParams=a,t.keyID=s,t.fingerprint=o,t}async read(e){let t=0;if(this.version=e[t++],4===this.version||5===this.version){this.created=ce.readDate(e.subarray(t,t+4)),t+=4,this.algorithm=e[t++],5===this.version&&(t+=4);const{read:r,publicParams:i}=na.parsePublicKeyParams(this.algorithm,e.subarray(t));return this.publicParams=i,t+=r,await this.computeFingerprintAndKeyID(),t}throw new Ri(`Version ${this.version} of the key packet is unsupported.`)}write(){const e=[];e.push(new Uint8Array([this.version])),e.push(ce.writeDate(this.created)),e.push(new Uint8Array([this.algorithm]));const t=na.serializeParams(this.algorithm,this.publicParams);return 5===this.version&&e.push(ce.writeNumber(t.length,4)),e.push(t),ce.concatUint8Array(e)}writeForHash(e){const t=this.writePublicKey();return 5===e?ce.concatUint8Array([new Uint8Array([154]),ce.writeNumber(t.length,4),t]):ce.concatUint8Array([new Uint8Array([153]),ce.writeNumber(t.length,2),t])}isDecrypted(){return null}getCreationTime(){return this.created}getKeyID(){return this.keyID}async computeFingerprintAndKeyID(){if(await this.computeFingerprint(),this.keyID=new Me,5===this.version)this.keyID.read(this.fingerprint.subarray(0,8));else{if(4!==this.version)throw Error("Unsupported key version");this.keyID.read(this.fingerprint.subarray(12,20))}}async computeFingerprint(){const e=this.writeForHash(this.version);if(5===this.version)this.fingerprint=await na.hash.sha256(e);else{if(4!==this.version)throw Error("Unsupported key version");this.fingerprint=await na.hash.sha1(e)}}getFingerprintBytes(){return this.fingerprint}getFingerprint(){return ce.uint8ArrayToHex(this.getFingerprintBytes())}hasSameFingerprintAs(e){return this.version===e.version&&ce.equalsUint8Array(this.writePublicKey(),e.writePublicKey())}getAlgorithmInfo(){const e={};e.algorithm=me.read(me.publicKey,this.algorithm);const t=this.publicParams.n||this.publicParams.p;return t?e.bits=ce.uint8ArrayBitLength(t):e.curve=this.publicParams.oid.getName(),e}}Po.prototype.readPublicKey=Po.prototype.read,Po.prototype.writePublicKey=Po.prototype.write;const xo=/*#__PURE__*/ce.constructAllowedPackets([to,ho,so,no]);class Mo{static get tag(){return me.packet.symmetricallyEncryptedData}constructor(){this.encrypted=null,this.packets=null}read(e){this.encrypted=e}write(){return this.encrypted}async decrypt(e,t,r=ge){if(!r.allowUnauthenticatedMessages)throw Error("Message is not authenticated.");const{blockSize:i}=na.getCipher(e),n=await ie(J(this.encrypted)),a=await na.mode.cfb.decrypt(e,t,n.subarray(i+2),n.subarray(2,i+2));this.packets=await co.fromBinary(a,xo,r)}async encrypt(e,t,r=ge){const i=this.packets.write(),{blockSize:n}=na.getCipher(e),a=await na.getPrefixRandom(e),s=await na.mode.cfb.encrypt(e,t,a,new Uint8Array(n),r),o=await na.mode.cfb.encrypt(e,t,i,s.subarray(2),r);this.encrypted=ce.concat([s,o])}}class Co extends Po{static get tag(){return me.packet.publicSubkey}constructor(e,t){super(e,t)}static fromSecretSubkeyPacket(e){const t=new Co,{version:r,created:i,algorithm:n,publicParams:a,keyID:s,fingerprint:o}=e;return t.version=r,t.created=i,t.algorithm=n,t.publicParams=a,t.keyID=s,t.fingerprint=o,t}}class Ko{static get tag(){return me.packet.userAttribute}constructor(){this.attributes=[]}read(e){let t=0;for(;t<e.length;){const r=Ei(e.subarray(t,e.length));t+=r.offset,this.attributes.push(ce.uint8ArrayToString(e.subarray(t,t+r.len))),t+=r.len}}write(){const e=[];for(let t=0;t<this.attributes.length;t++)e.push(Pi(this.attributes[t].length)),e.push(ce.stringToUint8Array(this.attributes[t]));return ce.concatUint8Array(e)}equals(e){return!!(e&&e instanceof Ko)&&this.attributes.every((function(t,r){return t===e.attributes[r]}))}}class Do extends Po{static get tag(){return me.packet.secretKey}constructor(e=new Date,t=ge){super(e,t),this.keyMaterial=null,this.isEncrypted=null,this.s2kUsage=0,this.s2k=null,this.symmetric=null,this.aead=null,this.privateParams=null}async read(e){let t=await this.readPublicKey(e);if(this.s2kUsage=e[t++],5===this.version&&t++,255===this.s2kUsage||254===this.s2kUsage||253===this.s2kUsage){if(this.symmetric=e[t++],253===this.s2kUsage&&(this.aead=e[t++]),this.s2k=new So,t+=this.s2k.read(e.subarray(t,e.length)),"gnu-dummy"===this.s2k.type)return}else this.s2kUsage&&(this.symmetric=this.s2kUsage);if(this.s2kUsage&&(this.iv=e.subarray(t,t+na.getCipher(this.symmetric).blockSize),t+=this.iv.length),5===this.version&&(t+=4),this.keyMaterial=e.subarray(t),this.isEncrypted=!!this.s2kUsage,!this.isEncrypted){const e=this.keyMaterial.subarray(0,-2);if(!ce.equalsUint8Array(ce.writeChecksum(e),this.keyMaterial.subarray(-2)))throw Error("Key checksum mismatch");try{const{privateParams:t}=na.parsePrivateKeyParams(this.algorithm,e,this.publicParams);this.privateParams=t}catch(e){if(e instanceof Ri)throw e;throw Error("Error reading MPIs")}}}write(){const e=[this.writePublicKey()];e.push(new Uint8Array([this.s2kUsage]));const t=[];return 255!==this.s2kUsage&&254!==this.s2kUsage&&253!==this.s2kUsage||(t.push(this.symmetric),253===this.s2kUsage&&t.push(this.aead),t.push(...this.s2k.write())),this.s2kUsage&&"gnu-dummy"!==this.s2k.type&&t.push(...this.iv),5===this.version&&e.push(new Uint8Array([t.length])),e.push(new Uint8Array(t)),this.isDummy()||(this.s2kUsage||(this.keyMaterial=na.serializeParams(this.algorithm,this.privateParams)),5===this.version&&e.push(ce.writeNumber(this.keyMaterial.length,4)),e.push(this.keyMaterial),this.s2kUsage||e.push(ce.writeChecksum(this.keyMaterial))),ce.concatUint8Array(e)}isDecrypted(){return!1===this.isEncrypted}isDummy(){return!(!this.s2k||"gnu-dummy"!==this.s2k.type)}makeDummy(e=ge){this.isDummy()||(this.isDecrypted()&&this.clearPrivateParams(),this.isEncrypted=null,this.keyMaterial=null,this.s2k=new So(e),this.s2k.algorithm=0,this.s2k.c=0,this.s2k.type="gnu-dummy",this.s2kUsage=254,this.symmetric=me.symmetric.aes256)}async encrypt(e,t=ge){if(this.isDummy())return;if(!this.isDecrypted())throw Error("Key packet is already encrypted");if(!e)throw Error("A non-empty passphrase is required for key encryption.");this.s2k=new So(t),this.s2k.salt=await na.random.getRandomBytes(8);const r=na.serializeParams(this.algorithm,this.privateParams);this.symmetric=me.symmetric.aes256;const i=await Ro(this.s2k,e,this.symmetric),{blockSize:n}=na.getCipher(this.symmetric);if(this.iv=await na.random.getRandomBytes(n),t.aeadProtect){this.s2kUsage=253,this.aead=me.aead.eax;const e=na.getAEADMode(this.aead),t=await e(this.symmetric,i);this.keyMaterial=await t.encrypt(r,this.iv.subarray(0,e.ivLength),new Uint8Array)}else this.s2kUsage=254,this.keyMaterial=await na.mode.cfb.encrypt(this.symmetric,i,ce.concatUint8Array([r,await na.hash.sha1(r,t)]),this.iv,t)}async decrypt(e){if(this.isDummy())return!1;if(this.isDecrypted())throw Error("Key packet is already decrypted.");let t,r;if(254!==this.s2kUsage&&253!==this.s2kUsage)throw 255===this.s2kUsage?Error("Encrypted private key is authenticated using an insecure two-byte hash"):Error("Private key is encrypted using an insecure S2K function: unsalted MD5");if(t=await Ro(this.s2k,e,this.symmetric),253===this.s2kUsage){const e=na.getAEADMode(this.aead),i=await e(this.symmetric,t);try{r=await i.decrypt(this.keyMaterial,this.iv.subarray(0,e.ivLength),new Uint8Array)}catch(e){if("Authentication tag mismatch"===e.message)throw Error("Incorrect key passphrase: "+e.message);throw e}}else{const e=await na.mode.cfb.decrypt(this.symmetric,t,this.keyMaterial,this.iv);r=e.subarray(0,-20);const i=await na.hash.sha1(r);if(!ce.equalsUint8Array(i,e.subarray(-20)))throw Error("Incorrect key passphrase")}try{const{privateParams:e}=na.parsePrivateKeyParams(this.algorithm,r,this.publicParams);this.privateParams=e}catch(e){throw Error("Error reading MPIs")}this.isEncrypted=!1,this.keyMaterial=null,this.s2kUsage=0}async validate(){if(this.isDummy())return;if(!this.isDecrypted())throw Error("Key is not decrypted");let e;try{e=await na.validateParams(this.algorithm,this.publicParams,this.privateParams)}catch(t){e=!1}if(!e)throw Error("Key is invalid")}async generate(e,t){const{privateParams:r,publicParams:i}=await na.generateParams(this.algorithm,e,t);this.privateParams=r,this.publicParams=i,this.isEncrypted=!1}clearPrivateParams(){this.isDummy()||(Object.keys(this.privateParams).forEach((e=>{this.privateParams[e].fill(0),delete this.privateParams[e]})),this.privateParams=null,this.isEncrypted=!0)}}async function Ro(e,t,r){const{keySize:i}=na.getCipher(r);return e.produceKey(t,i)}var Uo=bt((function(e){!function(t){function r(e){function t(){return Ae<Se}function r(){return Ae}function n(e){Ae=e}function a(){Ae=0,Se=ke.length}function s(e,t){return{name:e,tokens:t||"",semantic:t||"",children:[]}}function o(e,t){var r;return null===t?null:((r=s(e)).tokens=t.tokens,r.semantic=t.semantic,r.children.push(t),r)}function c(e,t){return null!==t&&(e.tokens+=t.tokens,e.semantic+=t.semantic),e.children.push(t),e}function u(e){var r;return t()&&e(r=ke[Ae])?(Ae+=1,s("token",r)):null}function h(e){return function(){return o("literal",u((function(t){return t===e})))}}function f(){var e=arguments;return function(){var t,i,a,o;for(o=r(),i=s("and"),t=0;t<e.length;t+=1){if(null===(a=e[t]()))return n(o),null;c(i,a)}return i}}function d(){var e=arguments;return function(){var t,i,a;for(a=r(),t=0;t<e.length;t+=1){if(null!==(i=e[t]()))return i;n(a)}return null}}function l(e){return function(){var t,i;return i=r(),null!==(t=e())?t:(n(i),s("opt"))}}function p(e){return function(){var t=e();return null!==t&&(t.semantic=""),t}}function y(e){return function(){var t=e();return null!==t&&t.semantic.length>0&&(t.semantic=" "),t}}function b(e,t){return function(){var i,a,o,u,h;for(u=r(),i=s("star"),o=0,h=void 0===t?0:t;null!==(a=e());)o+=1,c(i,a);return o>=h?i:(n(u),null)}}function m(e){return e.charCodeAt(0)>=128}function g(){return o("cr",h("\r")())}function w(){return o("crlf",f(g,k)())}function v(){return o("dquote",h('"')())}function _(){return o("htab",h("\t")())}function k(){return o("lf",h("\n")())}function A(){return o("sp",h(" ")())}function S(){return o("vchar",u((function(t){var r=t.charCodeAt(0),i=33<=r&&r<=126;return e.rfc6532&&(i=i||m(t)),i})))}function E(){return o("wsp",d(A,_)())}function P(){var e=o("quoted-pair",d(f(h("\\"),d(S,E)),ie)());return null===e?null:(e.semantic=e.semantic[1],e)}function x(){return o("fws",d(ae,f(l(f(b(E),p(w))),b(E,1)))())}function M(){return o("ctext",d((function(){return u((function(t){var r=t.charCodeAt(0),i=33<=r&&r<=39||42<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(i=i||m(t)),i}))}),te)())}function C(){return o("ccontent",d(M,P,K)())}function K(){return o("comment",f(h("("),b(f(l(x),C)),l(x),h(")"))())}function D(){return o("cfws",d(f(b(f(l(x),K),1),l(x)),x)())}function R(){return o("atext",u((function(t){var r="a"<=t&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(t)>=0;return e.rfc6532&&(r=r||m(t)),r})))}function U(){return o("atom",f(y(l(D)),b(R,1),y(l(D)))())}function I(){var e,t;return null===(e=o("dot-atom-text",b(R,1)()))||null!==(t=b(f(h("."),b(R,1)))())&&c(e,t),e}function B(){return o("dot-atom",f(p(l(D)),I,p(l(D)))())}function T(){return o("qtext",d((function(){return u((function(t){var r=t.charCodeAt(0),i=33===r||35<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(i=i||m(t)),i}))}),re)())}function z(){return o("qcontent",d(T,P)())}function q(){return o("quoted-string",f(p(l(D)),p(v),b(f(l(y(x)),z)),l(p(x)),p(v),p(l(D)))())}function O(){return o("word",d(U,q)())}function F(){return o("address",d(N,W)())}function N(){return o("mailbox",d(j,J)())}function j(){return o("name-addr",f(l(H),L)())}function L(){return o("angle-addr",d(f(p(l(D)),h("<"),J,h(">"),p(l(D))),se)())}function W(){return o("group",f(H,h(":"),l($),h(";"),p(l(D)))())}function H(){return o("display-name",(null!==(e=o("phrase",d(ne,b(O,1))()))&&(e.semantic=function(e){return e.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(e.semantic)),e));var e}function G(){return o("mailbox-list",d(f(N,b(f(h(","),N))),ue)())}function V(){return o("address-list",d(f(F,b(f(h(","),F))),he)())}function $(){return o("group-list",d(G,p(D),fe)())}function Z(){return o("local-part",d(de,B,q)())}function Y(){return o("dtext",d((function(){return u((function(t){var r=t.charCodeAt(0),i=33<=r&&r<=90||94<=r&&r<=126;return e.rfc6532&&(i=i||m(t)),i}))}),pe)())}function X(){return o("domain-literal",f(p(l(D)),h("["),b(f(l(x),Y)),l(x),h("]"),p(l(D)))())}function Q(){return o("domain",(t=d(le,B,X)(),e.rejectTLD&&t&&t.semantic&&t.semantic.indexOf(".")<0?null:(t&&(t.semantic=t.semantic.replace(/\s+/g,"")),t)));var t}function J(){return o("addr-spec",f(Z,h("@"),Q)())}function ee(){return e.strict?null:o("obs-NO-WS-CTL",u((function(e){var t=e.charCodeAt(0);return 1<=t&&t<=8||11===t||12===t||14<=t&&t<=31||127===t})))}function te(){return e.strict?null:o("obs-ctext",ee())}function re(){return e.strict?null:o("obs-qtext",ee())}function ie(){return e.strict?null:o("obs-qp",f(h("\\"),d(h("\0"),ee,k,g))())}function ne(){return e.strict?null:e.atInDisplayName?o("obs-phrase",f(O,b(d(O,h("."),h("@"),y(D))))()):o("obs-phrase",f(O,b(d(O,h("."),y(D))))())}function ae(){return e.strict?null:o("obs-FWS",b(f(p(l(w)),E),1)())}function se(){return e.strict?null:o("obs-angle-addr",f(p(l(D)),h("<"),oe,J,h(">"),p(l(D)))())}function oe(){return e.strict?null:o("obs-route",f(ce,h(":"))())}function ce(){return e.strict?null:o("obs-domain-list",f(b(d(p(D),h(","))),h("@"),Q,b(f(h(","),p(l(D)),l(f(h("@"),Q)))))())}function ue(){return e.strict?null:o("obs-mbox-list",f(b(f(p(l(D)),h(","))),N,b(f(h(","),l(f(N,p(D))))))())}function he(){return e.strict?null:o("obs-addr-list",f(b(f(p(l(D)),h(","))),F,b(f(h(","),l(f(F,p(D))))))())}function fe(){return e.strict?null:o("obs-group-list",f(b(f(p(l(D)),h(",")),1),p(l(D)))())}function de(){return e.strict?null:o("obs-local-part",f(O,b(f(h("."),O)))())}function le(){return e.strict?null:o("obs-domain",f(U,b(f(h("."),U)))())}function pe(){return e.strict?null:o("obs-dtext",d(ee,P)())}function ye(e,t){var r,i,n;if(null==t)return null;for(i=[t];i.length>0;){if((n=i.pop()).name===e)return n;for(r=n.children.length-1;r>=0;r-=1)i.push(n.children[r])}return null}function be(e,t){var r,i,n,a,s;if(null==t)return null;for(i=[t],a=[],s={},r=0;r<e.length;r+=1)s[e[r]]=!0;for(;i.length>0;)if((n=i.pop()).name in s)a.push(n);else for(r=n.children.length-1;r>=0;r-=1)i.push(n.children[r]);return a}function me(t){var r,i,n,a,s;if(null===t)return null;for(r=[],i=be(["group","mailbox"],t),n=0;n<i.length;n+=1)"group"===(a=i[n]).name?r.push(ge(a)):"mailbox"===a.name&&r.push(we(a));return s={ast:t,addresses:r},e.simple&&(s=function(e){var t;if(e&&e.addresses)for(t=0;t<e.addresses.length;t+=1)delete e.addresses[t].node;return e}(s)),e.oneResult?function(t){if(!t)return null;if(!e.partial&&t.addresses.length>1)return null;return t.addresses&&t.addresses[0]}(s):e.simple?s&&s.addresses:s}function ge(e){var t,r=ye("display-name",e),i=[],n=be(["mailbox"],e);for(t=0;t<n.length;t+=1)i.push(we(n[t]));return{node:e,parts:{name:r},type:e.name,name:ve(r),addresses:i}}function we(e){var t=ye("display-name",e),r=ye("addr-spec",e),i=function(e,t){var r,i,n,a;if(null==t)return null;for(i=[t],a=[];i.length>0;)for((n=i.pop()).name===e&&a.push(n),r=n.children.length-1;r>=0;r-=1)i.push(n.children[r]);return a}("cfws",e),n=be(["comment"],e),a=ye("local-part",r),s=ye("domain",r);return{node:e,parts:{name:t,address:r,local:a,domain:s,comments:i},type:e.name,name:ve(t),address:ve(r),local:ve(a),domain:ve(s),comments:_e(n),groupName:ve(e.groupName)}}function ve(e){return null!=e?e.semantic:null}function _e(e){var t="";if(e)for(var r=0;r<e.length;r+=1)t+=ve(e[r]);return t}var ke,Ae,Se,Ee,Pe;if(null===(e=i(e,{})))return null;if(ke=e.input,Pe={address:F,"address-list":V,"angle-addr":L,from:function(){return o("from",d(G,V)())},group:W,mailbox:N,"mailbox-list":G,"reply-to":function(){return o("reply-to",V())},sender:function(){return o("sender",d(N,F)())}}[e.startAt]||V,!e.strict){if(a(),e.strict=!0,Ee=Pe(ke),e.partial||!t())return me(Ee);e.strict=!1}return a(),Ee=Pe(ke),!e.partial&&t()?null:me(Ee)}function i(e,t){function r(e){return"[object String]"===Object.prototype.toString.call(e)}function i(e){return null==e}var n,a;if(r(e))e={input:e};else if(!function(e){return e===Object(e)}(e))return null;if(!r(e.input))return null;if(!t)return null;for(a in n={oneResult:!1,partial:!1,rejectTLD:!1,rfc6532:!1,simple:!1,startAt:"address-list",strict:!1,atInDisplayName:!1})i(e[a])&&(e[a]=i(t[a])?n[a]:t[a]);return e}r.parseOneAddress=function(e){return r(i(e,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseAddressList=function(e){return r(i(e,{rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseFrom=function(e){return r(i(e,{rfc6532:!0,simple:!0,startAt:"from"}))},r.parseSender=function(e){return r(i(e,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"sender"}))},r.parseReplyTo=function(e){return r(i(e,{rfc6532:!0,simple:!0,startAt:"reply-to"}))},e.exports=r}()}));class Io{static get tag(){return me.packet.userID}constructor(){this.userID="",this.name="",this.email="",this.comment=""}static fromObject(e){if(ce.isString(e)||e.name&&!ce.isString(e.name)||e.email&&!ce.isEmailAddress(e.email)||e.comment&&!ce.isString(e.comment))throw Error("Invalid user ID format");const t=new Io;Object.assign(t,e);const r=[];return t.name&&r.push(t.name),t.comment&&r.push(`(${t.comment})`),t.email&&r.push(`<${t.email}>`),t.userID=r.join(" "),t}read(e,t=ge){const r=ce.decodeUTF8(e);if(r.length>t.maxUserIDLength)throw Error("User ID string is too long");try{const{name:e,address:t,comments:i}=Uo.parseOneAddress({input:r,atInDisplayName:!0});this.comment=i.replace(/^\(|\)$/g,""),this.name=e,this.email=t}catch(e){}this.userID=r}write(){return ce.encodeUTF8(this.userID)}equals(e){return e&&e.userID===this.userID}}class Bo extends Do{static get tag(){return me.packet.secretSubkey}constructor(e=new Date,t=ge){super(e,t)}}const To=/*#__PURE__*/ce.constructAllowedPackets([no]);class zo{constructor(e){this.packets=e||new co}write(){return this.packets.write()}armor(e=ge){return xe(me.armor.signature,this.write(),void 0,void 0,void 0,e)}getSigningKeyIDs(){return this.packets.map((e=>e.issuerKeyID))}}async function qo(e,t){const r=new Bo(e.date,t);return r.packets=null,r.algorithm=me.write(me.publicKey,e.algorithm),await r.generate(e.rsaBits,e.curve),await r.computeFingerprintAndKeyID(),r}async function Oo(e,t){const r=new Do(e.date,t);return r.packets=null,r.algorithm=me.write(me.publicKey,e.algorithm),await r.generate(e.rsaBits,e.curve,e.config),await r.computeFingerprintAndKeyID(),r}async function Fo(e,t,r,i,n=new Date,a){let s,o;for(let c=e.length-1;c>=0;c--)try{(!s||e[c].created>=s.created)&&(await e[c].verify(t,r,i,n,void 0,a),s=e[c])}catch(e){o=e}if(!s)throw ce.wrapError(`Could not find valid ${me.read(me.signature,r)} signature in key ${t.getKeyID().toHex()}`.replace("certGeneric ","self-").replace(/([a-z])([A-Z])/g,((e,t,r)=>t+" "+r.toLowerCase())),o);return s}function No(e,t,r=new Date){const i=ce.normalizeDate(r);if(null!==i){const r=$o(e,t);return!(e.created<=i&&i<r)}return!1}async function jo(e,t,r,i){const n={};n.key=t,n.bind=e;const a=new no;return a.signatureType=me.signature.subkeyBinding,a.publicKeyAlgorithm=t.algorithm,a.hashAlgorithm=await Lo(null,e,void 0,void 0,i),r.sign?(a.keyFlags=[me.keyFlags.signData],a.embeddedSignature=await Ho(n,null,e,{signatureType:me.signature.keyBinding},r.date,void 0,void 0,i)):a.keyFlags=[me.keyFlags.encryptCommunication|me.keyFlags.encryptStorage],r.keyExpirationTime>0&&(a.keyExpirationTime=r.keyExpirationTime,a.keyNeverExpires=!1),await a.sign(t,n,r.date),a}async function Lo(e,t,r=new Date,i={},n){let a=n.preferredHashAlgorithm,s=a;if(e){const t=await e.getPrimaryUser(r,i,n);t.selfCertification.preferredHashAlgorithms&&([s]=t.selfCertification.preferredHashAlgorithms,a=na.hash.getHashByteLength(a)<=na.hash.getHashByteLength(s)?s:a)}switch(Object.getPrototypeOf(t)){case Do.prototype:case Po.prototype:case Bo.prototype:case Co.prototype:switch(t.algorithm){case me.publicKey.ecdh:case me.publicKey.ecdsa:case me.publicKey.eddsa:s=na.publicKey.elliptic.getPreferredHashAlgo(t.publicParams.oid)}}return na.hash.getHashByteLength(a)<=na.hash.getHashByteLength(s)?s:a}async function Wo(e,t=[],r=new Date,i=[],n=ge){const a={symmetric:me.symmetric.aes128,aead:me.aead.eax,compression:me.compression.uncompressed}[e],s={symmetric:n.preferredSymmetricAlgorithm,aead:n.preferredAEADAlgorithm,compression:n.preferredCompressionAlgorithm}[e],o={symmetric:"preferredSymmetricAlgorithms",aead:"preferredAEADAlgorithms",compression:"preferredCompressionAlgorithms"}[e];return(await Promise.all(t.map((async function(e,t){const a=(await e.getPrimaryUser(r,i[t],n)).selfCertification[o];return!!a&&a.indexOf(s)>=0})))).every(Boolean)?s:a}async function Ho(e,t,r,i,n,a,s=!1,o){if(r.isDummy())throw Error("Cannot sign with a gnu-dummy key.");if(!r.isDecrypted())throw Error("Signing key is not decrypted.");const c=new no;return Object.assign(c,i),c.publicKeyAlgorithm=r.algorithm,c.hashAlgorithm=await Lo(t,r,n,a,o),await c.sign(r,e,n,s),c}async function Go(e,t,r,i=new Date,n){(e=e[r])&&(t[r].length?await Promise.all(e.map((async function(e){e.isExpired(i)||n&&!await n(e)||t[r].some((function(t){return ce.equalsUint8Array(t.writeParams(),e.writeParams())}))||t[r].push(e)}))):t[r]=e)}async function Vo(e,t,r,i,n,a,s=new Date,o){a=a||e;const c=[];return await Promise.all(i.map((async function(e){try{n&&!e.issuerKeyID.equals(n.issuerKeyID)||(await e.verify(a,t,r,o.revocationsExpire?s:null,!1,o),c.push(e.issuerKeyID))}catch(e){}}))),n?(n.revoked=!!c.some((e=>e.equals(n.issuerKeyID)))||(n.revoked||!1),n.revoked):c.length>0}function $o(e,t){let r;return!1===t.keyNeverExpires&&(r=e.created.getTime()+1e3*t.keyExpirationTime),r?new Date(r):1/0}function Zo(e,t={}){switch(e.type=e.type||t.type,e.curve=e.curve||t.curve,e.rsaBits=e.rsaBits||t.rsaBits,e.keyExpirationTime=void 0!==e.keyExpirationTime?e.keyExpirationTime:t.keyExpirationTime,e.passphrase=ce.isString(e.passphrase)?e.passphrase:t.passphrase,e.date=e.date||t.date,e.sign=e.sign||!1,e.type){case"ecc":try{e.curve=me.write(me.curve,e.curve)}catch(e){throw Error("Unknown curve")}e.curve!==me.curve.ed25519&&e.curve!==me.curve.curve25519||(e.curve=e.sign?me.curve.ed25519:me.curve.curve25519),e.sign?e.algorithm=e.curve===me.curve.ed25519?me.publicKey.eddsa:me.publicKey.ecdsa:e.algorithm=me.publicKey.ecdh;break;case"rsa":e.algorithm=me.publicKey.rsaEncryptSign;break;default:throw Error("Unsupported key type "+e.type)}return e}function Yo(e,t){const r=e.algorithm;return r!==me.publicKey.rsaEncrypt&&r!==me.publicKey.elgamal&&r!==me.publicKey.ecdh&&(!t.keyFlags||0!=(t.keyFlags[0]&me.keyFlags.signData))}function Xo(e,t){const r=e.algorithm;return r!==me.publicKey.dsa&&r!==me.publicKey.rsaSign&&r!==me.publicKey.ecdsa&&r!==me.publicKey.eddsa&&(!t.keyFlags||0!=(t.keyFlags[0]&me.keyFlags.encryptCommunication)||0!=(t.keyFlags[0]&me.keyFlags.encryptStorage))}function Qo(e,t){return!!t.allowInsecureDecryptionWithSigningKeys||(!e.keyFlags||0!=(e.keyFlags[0]&me.keyFlags.encryptCommunication)||0!=(e.keyFlags[0]&me.keyFlags.encryptStorage))}function Jo(e,t){const r=me.write(me.publicKey,e.algorithm),i=e.getAlgorithmInfo();if(t.rejectPublicKeyAlgorithms.has(r))throw Error(i.algorithm+" keys are considered too weak.");switch(r){case me.publicKey.rsaEncryptSign:case me.publicKey.rsaSign:case me.publicKey.rsaEncrypt:if(i.bits<t.minRSABits)throw Error(`RSA keys shorter than ${t.minRSABits} bits are considered too weak.`);break;case me.publicKey.ecdsa:case me.publicKey.eddsa:case me.publicKey.ecdh:if(t.rejectCurves.has(i.curve))throw Error(`Support for ${i.algorithm} keys using curve ${i.curve} is disabled.`)}}class ec{constructor(e,t){this.userID=e.constructor.tag===me.packet.userID?e:null,this.userAttribute=e.constructor.tag===me.packet.userAttribute?e:null,this.selfCertifications=[],this.otherCertifications=[],this.revocationSignatures=[],this.mainKey=t}toPacketList(){const e=new co;return e.push(this.userID||this.userAttribute),e.push(...this.revocationSignatures),e.push(...this.selfCertifications),e.push(...this.otherCertifications),e}clone(){const e=new ec(this.userID||this.userAttribute,this.mainKey);return e.selfCertifications=[...this.selfCertifications],e.otherCertifications=[...this.otherCertifications],e.revocationSignatures=[...this.revocationSignatures],e}async certify(e,t,r){const i=this.mainKey.keyPacket,n={userID:this.userID,userAttribute:this.userAttribute,key:i},a=new ec(n.userID||n.userAttribute,this.mainKey);return a.otherCertifications=await Promise.all(e.map((async function(e){if(!e.isPrivate())throw Error("Need private key for signing");if(e.hasSameFingerprintAs(i))throw Error("The user's own key can only be used for self-certifications");const a=await e.getSigningKey(void 0,t,void 0,r);return Ho(n,e,a.keyPacket,{signatureType:me.signature.certGeneric,keyFlags:[me.keyFlags.certifyKeys|me.keyFlags.signData]},t,void 0,void 0,r)}))),await a.update(this,t,r),a}async isRevoked(e,t,r=new Date,i){const n=this.mainKey.keyPacket;return Vo(n,me.signature.certRevocation,{key:n,userID:this.userID,userAttribute:this.userAttribute},this.revocationSignatures,e,t,r,i)}async verifyCertificate(e,t,r=new Date,i){const n=this,a=this.mainKey.keyPacket,s={userID:this.userID,userAttribute:this.userAttribute,key:a},{issuerKeyID:o}=e,c=t.filter((e=>e.getKeys(o).length>0));return 0===c.length?null:(await Promise.all(c.map((async t=>{const a=await t.getSigningKey(o,e.created,void 0,i);if(e.revoked||await n.isRevoked(e,a.keyPacket,r,i))throw Error("User certificate is revoked");try{await e.verify(a.keyPacket,me.signature.certGeneric,s,r,void 0,i)}catch(e){throw ce.wrapError("User certificate is invalid",e)}}))),!0)}async verifyAllCertifications(e,t=new Date,r){const i=this,n=this.selfCertifications.concat(this.otherCertifications);return Promise.all(n.map((async n=>({keyID:n.issuerKeyID,valid:await i.verifyCertificate(n,e,t,r).catch((()=>!1))}))))}async verify(e=new Date,t){if(!this.selfCertifications.length)throw Error("No self-certifications found");const r=this,i=this.mainKey.keyPacket,n={userID:this.userID,userAttribute:this.userAttribute,key:i};let a;for(let s=this.selfCertifications.length-1;s>=0;s--)try{const a=this.selfCertifications[s];if(a.revoked||await r.isRevoked(a,void 0,e,t))throw Error("Self-certification is revoked");try{await a.verify(i,me.signature.certGeneric,n,e,void 0,t)}catch(e){throw ce.wrapError("Self-certification is invalid",e)}return!0}catch(e){a=e}throw a}async update(e,t,r){const i=this.mainKey.keyPacket,n={userID:this.userID,userAttribute:this.userAttribute,key:i};await Go(e,this,"selfCertifications",t,(async function(e){try{return await e.verify(i,me.signature.certGeneric,n,t,!1,r),!0}catch(e){return!1}})),await Go(e,this,"otherCertifications",t),await Go(e,this,"revocationSignatures",t,(function(e){return Vo(i,me.signature.certRevocation,n,[e],void 0,void 0,t,r)}))}}class tc{constructor(e,t){this.keyPacket=e,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=t}toPacketList(){const e=new co;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.bindingSignatures),e}clone(){const e=new tc(this.keyPacket,this.mainKey);return e.bindingSignatures=[...this.bindingSignatures],e.revocationSignatures=[...this.revocationSignatures],e}async isRevoked(e,t,r=new Date,i=ge){const n=this.mainKey.keyPacket;return Vo(n,me.signature.subkeyRevocation,{key:n,bind:this.keyPacket},this.revocationSignatures,e,t,r,i)}async verify(e=new Date,t=ge){const r=this.mainKey.keyPacket,i={key:r,bind:this.keyPacket},n=await Fo(this.bindingSignatures,r,me.signature.subkeyBinding,i,e,t);if(n.revoked||await this.isRevoked(n,null,e,t))throw Error("Subkey is revoked");if(No(this.keyPacket,n,e))throw Error("Subkey is expired");return n}async getExpirationTime(e=new Date,t=ge){const r=this.mainKey.keyPacket,i={key:r,bind:this.keyPacket};let n;try{n=await Fo(this.bindingSignatures,r,me.signature.subkeyBinding,i,e,t)}catch(e){return null}const a=$o(this.keyPacket,n),s=n.getExpirationTime();return a<s?a:s}async update(e,t=new Date,r=ge){const i=this.mainKey.keyPacket;if(!this.hasSameFingerprintAs(e))throw Error("Subkey update method: fingerprints of subkeys not equal");this.keyPacket.constructor.tag===me.packet.publicSubkey&&e.keyPacket.constructor.tag===me.packet.secretSubkey&&(this.keyPacket=e.keyPacket);const n=this,a={key:i,bind:n.keyPacket};await Go(e,this,"bindingSignatures",t,(async function(e){for(let t=0;t<n.bindingSignatures.length;t++)if(n.bindingSignatures[t].issuerKeyID.equals(e.issuerKeyID))return e.created>n.bindingSignatures[t].created&&(n.bindingSignatures[t]=e),!1;try{return await e.verify(i,me.signature.subkeyBinding,a,t,void 0,r),!0}catch(e){return!1}})),await Go(e,this,"revocationSignatures",t,(function(e){return Vo(i,me.signature.subkeyRevocation,a,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=me.reasonForRevocation.noReason,string:r=""}={},i=new Date,n=ge){const a={key:e,bind:this.keyPacket},s=new tc(this.keyPacket,this.mainKey);return s.revocationSignatures.push(await Ho(a,null,e,{signatureType:me.signature.subkeyRevocation,reasonForRevocationFlag:me.write(me.reasonForRevocation,t),reasonForRevocationString:r},i,void 0,!1,n)),await s.update(this),s}hasSameFingerprintAs(e){return this.keyPacket.hasSameFingerprintAs(e.keyPacket||e)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach((e=>{tc.prototype[e]=function(){return this.keyPacket[e]()}}));const rc=/*#__PURE__*/ce.constructAllowedPackets([no]),ic=new Set([me.packet.publicKey,me.packet.privateKey]),nc=new Set([me.packet.publicKey,me.packet.privateKey,me.packet.publicSubkey,me.packet.privateSubkey]);class ac{packetListToStructure(e,t=new Set){let r,i,n,a;for(const s of e){if(s instanceof Ui){nc.has(s.tag)&&!a&&(a=ic.has(s.tag)?ic:nc);continue}const e=s.constructor.tag;if(a){if(!a.has(e))continue;a=null}if(t.has(e))throw Error("Unexpected packet type: "+e);switch(e){case me.packet.publicKey:case me.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=s,i=this.getKeyID(),!i)throw Error("Missing Key ID");break;case me.packet.userID:case me.packet.userAttribute:r=new ec(s,this),this.users.push(r);break;case me.packet.publicSubkey:case me.packet.secretSubkey:r=null,n=new tc(s,this),this.subkeys.push(n);break;case me.packet.signature:switch(s.signatureType){case me.signature.certGeneric:case me.signature.certPersona:case me.signature.certCasual:case me.signature.certPositive:if(!r){ce.printDebug("Dropping certification signatures without preceding user packet");continue}s.issuerKeyID.equals(i)?r.selfCertifications.push(s):r.otherCertifications.push(s);break;case me.signature.certRevocation:r?r.revocationSignatures.push(s):this.directSignatures.push(s);break;case me.signature.key:this.directSignatures.push(s);break;case me.signature.subkeyBinding:if(!n){ce.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}n.bindingSignatures.push(s);break;case me.signature.keyRevocation:this.revocationSignatures.push(s);break;case me.signature.subkeyRevocation:if(!n){ce.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}n.revocationSignatures.push(s)}}}}toPacketList(){const e=new co;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.directSignatures),this.users.map((t=>e.push(...t.toPacketList()))),this.subkeys.map((t=>e.push(...t.toPacketList()))),e}clone(e=!1){const t=new this.constructor(this.toPacketList());return e&&t.getKeys().forEach((e=>{if(e.keyPacket=Object.create(Object.getPrototypeOf(e.keyPacket),Object.getOwnPropertyDescriptors(e.keyPacket)),!e.keyPacket.isDecrypted())return;const t={};Object.keys(e.keyPacket.privateParams).forEach((r=>{t[r]=new Uint8Array(e.keyPacket.privateParams[r])})),e.keyPacket.privateParams=t})),t}getSubkeys(e=null){return this.subkeys.filter((t=>!e||t.getKeyID().equals(e,!0)))}getKeys(e=null){const t=[];return e&&!this.getKeyID().equals(e,!0)||t.push(this),t.concat(this.getSubkeys(e))}getKeyIDs(){return this.getKeys().map((e=>e.getKeyID()))}getUserIDs(){return this.users.map((e=>e.userID?e.userID.userID:null)).filter((e=>null!==e))}write(){return this.toPacketList().write()}async getSigningKey(e=null,t=new Date,r={},i=ge){await this.verifyPrimaryKey(t,r,i);const n=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let s;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,i);const e={key:n,bind:r.keyPacket},a=await Fo(r.bindingSignatures,n,me.signature.subkeyBinding,e,t,i);if(!Yo(r.keyPacket,a))continue;if(!a.embeddedSignature)throw Error("Missing embedded signature");return await Fo([a.embeddedSignature],r.keyPacket,me.signature.keyBinding,e,t,i),Jo(r.keyPacket,i),r}catch(e){s=e}try{const a=await this.getPrimaryUser(t,r,i);if((!e||n.getKeyID().equals(e))&&Yo(n,a.selfCertification))return Jo(n,i),this}catch(e){s=e}throw ce.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),s)}async getEncryptionKey(e,t=new Date,r={},i=ge){await this.verifyPrimaryKey(t,r,i);const n=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let s;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,i);const e={key:n,bind:r.keyPacket},a=await Fo(r.bindingSignatures,n,me.signature.subkeyBinding,e,t,i);if(Xo(r.keyPacket,a))return Jo(r.keyPacket,i),r}catch(e){s=e}try{const a=await this.getPrimaryUser(t,r,i);if((!e||n.getKeyID().equals(e))&&Xo(n,a.selfCertification))return Jo(n,i),this}catch(e){s=e}throw ce.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),s)}async isRevoked(e,t,r=new Date,i=ge){return Vo(this.keyPacket,me.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,e,t,r,i)}async verifyPrimaryKey(e=new Date,t={},r=ge){const i=this.keyPacket;if(await this.isRevoked(null,null,e,r))throw Error("Primary key is revoked");const{selfCertification:n}=await this.getPrimaryUser(e,t,r);if(No(i,n,e))throw Error("Primary key is expired");const a=await Fo(this.directSignatures,i,me.signature.key,{key:i},e,r).catch((()=>{}));if(a&&No(i,a,e))throw Error("Primary key is expired")}async getExpirationTime(e,t=ge){let r;try{const{selfCertification:i}=await this.getPrimaryUser(null,e,t),n=$o(this.keyPacket,i),a=i.getExpirationTime(),s=await Fo(this.directSignatures,this.keyPacket,me.signature.key,{key:this.keyPacket},null,t).catch((()=>{}));if(s){const e=$o(this.keyPacket,s);r=Math.min(n,a,e)}else r=n<a?n:a}catch(e){r=null}return ce.normalizeDate(r)}async getPrimaryUser(e=new Date,t={},r=ge){const i=this.keyPacket,n=[];let a;for(let s=0;s<this.users.length;s++)try{const a=this.users[s];if(!a.userID)continue;if(void 0!==t.name&&a.userID.name!==t.name||void 0!==t.email&&a.userID.email!==t.email||void 0!==t.comment&&a.userID.comment!==t.comment)throw Error("Could not find user that matches that user ID");const o={userID:a.userID,key:i},c=await Fo(a.selfCertifications,i,me.signature.certGeneric,o,e,r);n.push({index:s,user:a,selfCertification:c})}catch(e){a=e}if(!n.length)throw a||Error("Could not find primary user");await Promise.all(n.map((async function(t){return t.user.revoked||t.user.isRevoked(t.selfCertification,null,e,r)})));const s=n.sort((function(e,t){const r=e.selfCertification,i=t.selfCertification;return i.revoked-r.revoked||r.isPrimaryUserID-i.isPrimaryUserID||r.created-i.created})).pop(),{user:o,selfCertification:c}=s;if(c.revoked||await o.isRevoked(c,null,e,r))throw Error("Primary user is revoked");return s}async update(e,t=new Date,r=ge){if(!this.hasSameFingerprintAs(e))throw Error("Primary key fingerprints must be equal to update the key");if(!this.isPrivate()&&e.isPrivate()){if(!(this.subkeys.length===e.subkeys.length&&this.subkeys.every((t=>e.subkeys.some((e=>t.hasSameFingerprintAs(e)))))))throw Error("Cannot update public key with private key if subkeys mismatch");return e.update(this,r)}const i=this.clone();return await Go(e,i,"revocationSignatures",t,(n=>Vo(i.keyPacket,me.signature.keyRevocation,i,[n],null,e.keyPacket,t,r))),await Go(e,i,"directSignatures",t),await Promise.all(e.users.map((async e=>{const n=i.users.filter((t=>e.userID&&e.userID.equals(t.userID)||e.userAttribute&&e.userAttribute.equals(t.userAttribute)));if(n.length>0)await Promise.all(n.map((i=>i.update(e,t,r))));else{const t=e.clone();t.mainKey=i,i.users.push(t)}}))),await Promise.all(e.subkeys.map((async e=>{const n=i.subkeys.filter((t=>t.hasSameFingerprintAs(e)));if(n.length>0)await Promise.all(n.map((i=>i.update(e,t,r))));else{const t=e.clone();t.mainKey=i,i.subkeys.push(t)}}))),i}async getRevocationCertificate(e=new Date,t=ge){const r={key:this.keyPacket},i=await Fo(this.revocationSignatures,this.keyPacket,me.signature.keyRevocation,r,e,t),n=new co;return n.push(i),xe(me.armor.publicKey,n.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(e,t=new Date,r=ge){const i=await Pe(e,r),n=(await co.fromBinary(i.data,rc,r)).findPacket(me.packet.signature);if(!n||n.signatureType!==me.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!n.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await n.verify(this.keyPacket,me.signature.keyRevocation,{key:this.keyPacket},t,void 0,r)}catch(e){throw ce.wrapError("Could not verify revocation signature",e)}const a=this.clone();return a.revocationSignatures.push(n),a}async signPrimaryUser(e,t,r,i=ge){const{index:n,user:a}=await this.getPrimaryUser(t,r,i),s=await a.certify(e,t,i),o=this.clone();return o.users[n]=s,o}async signAllUsers(e,t=new Date,r=ge){const i=this.clone();return i.users=await Promise.all(this.users.map((function(i){return i.certify(e,t,r)}))),i}async verifyPrimaryUser(e,t=new Date,r,i=ge){const n=this.keyPacket,{user:a}=await this.getPrimaryUser(t,r,i);return e?await a.verifyAllCertifications(e,t,i):[{keyID:n.getKeyID(),valid:await a.verify(t,i).catch((()=>!1))}]}async verifyAllUsers(e,t=new Date,r=ge){const i=this.keyPacket,n=[];return await Promise.all(this.users.map((async a=>{const s=e?await a.verifyAllCertifications(e,t,r):[{keyID:i.getKeyID(),valid:await a.verify(t,r).catch((()=>!1))}];n.push(...s.map((e=>({userID:a.userID.userID,keyID:e.keyID,valid:e.valid}))))}))),n}}function sc(e){for(const t of e)switch(t.constructor.tag){case me.packet.secretKey:return new cc(e);case me.packet.publicKey:return new oc(e)}throw Error("No key packet found")}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach((e=>{ac.prototype[e]=tc.prototype[e]}));class oc extends ac{constructor(e){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],e&&(this.packetListToStructure(e,new Set([me.packet.secretKey,me.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(e=ge){return xe(me.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,e)}}class cc extends oc{constructor(e){if(super(),this.packetListToStructure(e,new Set([me.packet.publicKey,me.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const e=new co,t=this.toPacketList();for(const r of t)switch(r.constructor.tag){case me.packet.secretKey:{const t=Po.fromSecretKeyPacket(r);e.push(t);break}case me.packet.secretSubkey:{const t=Co.fromSecretSubkeyPacket(r);e.push(t);break}default:e.push(r)}return new oc(e)}armor(e=ge){return xe(me.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,e)}async getDecryptionKeys(e,t=new Date,r={},i=ge){const n=this.keyPacket,a=[];for(let r=0;r<this.subkeys.length;r++)if(!e||this.subkeys[r].getKeyID().equals(e,!0))try{const e={key:n,bind:this.subkeys[r].keyPacket};Qo(await Fo(this.subkeys[r].bindingSignatures,n,me.signature.subkeyBinding,e,t,i),i)&&a.push(this.subkeys[r])}catch(e){}const s=await this.getPrimaryUser(t,r,i);return e&&!n.getKeyID().equals(e,!0)||!Qo(s.selfCertification,i)||a.push(this),a}isDecrypted(){return this.getKeys().some((({keyPacket:e})=>e.isDecrypted()))}async validate(e=ge){if(!this.isPrivate())throw Error("Cannot validate a public key");let t;if(this.keyPacket.isDummy()){const r=await this.getSigningKey(null,null,void 0,{...e,rejectPublicKeyAlgorithms:new Set,minRSABits:0});r&&!r.keyPacket.isDummy()&&(t=r.keyPacket)}else t=this.keyPacket;if(t)return t.validate();{const e=this.getKeys();if(e.map((e=>e.keyPacket.isDummy())).every(Boolean))throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(e.map((async e=>e.keyPacket.validate())))}}clearPrivateParams(){this.getKeys().forEach((({keyPacket:e})=>{e.isDecrypted()&&e.clearPrivateParams()}))}async revoke({flag:e=me.reasonForRevocation.noReason,string:t=""}={},r=new Date,i=ge){if(!this.isPrivate())throw Error("Need private key for revoking");const n={key:this.keyPacket},a=this.clone();return a.revocationSignatures.push(await Ho(n,null,this.keyPacket,{signatureType:me.signature.keyRevocation,reasonForRevocationFlag:me.write(me.reasonForRevocation,e),reasonForRevocationString:t},r,void 0,void 0,i)),a}async addSubkey(e={}){const t={...ge,...e.config};if(e.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(e.rsaBits<t.minRSABits)throw Error(`rsaBits should be at least ${t.minRSABits}, got: ${e.rsaBits}`);const r=this.keyPacket;if(r.isDummy())throw Error("Cannot add subkey to gnu-dummy primary key");if(!r.isDecrypted())throw Error("Key is not decrypted");const i=r.getAlgorithmInfo();i.type=i.curve?"ecc":"rsa",i.rsaBits=i.bits||4096,i.curve=i.curve||"curve25519",e=Zo(e,i);const n=await qo(e);Jo(n,t);const a=await jo(n,r,e,t),s=this.toPacketList();return s.push(n,a),new cc(s)}}const uc=/*#__PURE__*/ce.constructAllowedPackets([Po,Co,Do,Bo,Io,Ko,no]);async function hc(e,t,r,i){r.passphrase&&await e.encrypt(r.passphrase,i),await Promise.all(t.map((async function(e,t){const n=r.subkeys[t].passphrase;n&&await e.encrypt(n,i)})));const n=new co;n.push(e),await Promise.all(r.userIDs.map((async function(t,n){function a(e,t){return[t,...e.filter((e=>e!==t))]}const s=Io.fromObject(t),o={};o.userID=s,o.key=e;const c=new no;return c.signatureType=me.signature.certGeneric,c.publicKeyAlgorithm=e.algorithm,c.hashAlgorithm=await Lo(null,e,void 0,void 0,i),c.keyFlags=[me.keyFlags.certifyKeys|me.keyFlags.signData],c.preferredSymmetricAlgorithms=a([me.symmetric.aes256,me.symmetric.aes128,me.symmetric.aes192],i.preferredSymmetricAlgorithm),i.aeadProtect&&(c.preferredAEADAlgorithms=a([me.aead.eax,me.aead.ocb],i.preferredAEADAlgorithm)),c.preferredHashAlgorithms=a([me.hash.sha256,me.hash.sha512],i.preferredHashAlgorithm),c.preferredCompressionAlgorithms=a([me.compression.zlib,me.compression.zip,me.compression.uncompressed],i.preferredCompressionAlgorithm),0===n&&(c.isPrimaryUserID=!0),c.features=[0],c.features[0]|=me.features.modificationDetection,i.aeadProtect&&(c.features[0]|=me.features.aead),i.v5Keys&&(c.features[0]|=me.features.v5Keys),r.keyExpirationTime>0&&(c.keyExpirationTime=r.keyExpirationTime,c.keyNeverExpires=!1),await c.sign(e,o,r.date),{userIDPacket:s,signaturePacket:c}}))).then((e=>{e.forEach((({userIDPacket:e,signaturePacket:t})=>{n.push(e),n.push(t)}))})),await Promise.all(t.map((async function(t,n){const a=r.subkeys[n];return{secretSubkeyPacket:t,subkeySignaturePacket:await jo(t,e,a,i)}}))).then((e=>{e.forEach((({secretSubkeyPacket:e,subkeySignaturePacket:t})=>{n.push(e),n.push(t)}))}));const a={key:e};return n.push(await Ho(a,null,e,{signatureType:me.signature.keyRevocation,reasonForRevocationFlag:me.reasonForRevocation.noReason,reasonForRevocationString:""},r.date,void 0,void 0,i)),r.passphrase&&e.clearPrivateParams(),await Promise.all(t.map((async function(e,t){r.subkeys[t].passphrase&&e.clearPrivateParams()}))),new cc(n)}const fc=/*#__PURE__*/ce.constructAllowedPackets([to,ho,ko,vo,Mo,Ao,Eo,so,no]),dc=/*#__PURE__*/ce.constructAllowedPackets([Eo]),lc=/*#__PURE__*/ce.constructAllowedPackets([no]);class pc{constructor(e){this.packets=e||new co}getEncryptionKeyIDs(){const e=[];return this.packets.filterByTag(me.packet.publicKeyEncryptedSessionKey).forEach((function(t){e.push(t.publicKeyID)})),e}getSigningKeyIDs(){const e=this.unwrapCompressed(),t=e.packets.filterByTag(me.packet.onePassSignature);if(t.length>0)return t.map((e=>e.issuerKeyID));return e.packets.filterByTag(me.packet.signature).map((e=>e.issuerKeyID))}async decrypt(e,t,r,i=new Date,n=ge){const a=r||await this.decryptSessionKeys(e,t,i,n),s=this.packets.filterByTag(me.packet.symmetricallyEncryptedData,me.packet.symEncryptedIntegrityProtectedData,me.packet.aeadEncryptedData);if(0===s.length)throw Error("No encrypted data found");const o=s[0];let c=null;const u=Promise.all(a.map((async({algorithm:e,data:t})=>{if(!ce.isUint8Array(t)||!ce.isString(e))throw Error("Invalid session key for decryption.");try{const r=me.write(me.symmetric,e);await o.decrypt(r,t,n)}catch(e){ce.printDebugError(e),c=e}})));if(ne(o.encrypted),o.encrypted=null,await u,!o.packets||!o.packets.length)throw c||Error("Decryption failed.");const h=new pc(o.packets);return o.packets=new co,h}async decryptSessionKeys(e,t,r=new Date,i=ge){let n,a=[];if(t){const e=this.packets.filterByTag(me.packet.symEncryptedSessionKey);if(0===e.length)throw Error("No symmetrically encrypted session key packet found.");await Promise.all(t.map((async function(t,r){let n;n=r?await co.fromBinary(e.write(),dc,i):e,await Promise.all(n.map((async function(e){try{await e.decrypt(t),a.push(e)}catch(e){ce.printDebugError(e)}})))})))}else{if(!e)throw Error("No key or password specified.");{const t=this.packets.filterByTag(me.packet.publicKeyEncryptedSessionKey);if(0===t.length)throw Error("No public key encrypted session key packet found.");await Promise.all(t.map((async function(t){await Promise.all(e.map((async function(e){let s=[me.symmetric.aes256,me.symmetric.aes128,me.symmetric.tripledes,me.symmetric.cast5];try{const t=await e.getPrimaryUser(r,void 0,i);t.selfCertification.preferredSymmetricAlgorithms&&(s=s.concat(t.selfCertification.preferredSymmetricAlgorithms))}catch(e){}const o=(await e.getDecryptionKeys(t.publicKeyID,null,void 0,i)).map((e=>e.keyPacket));await Promise.all(o.map((async function(e){if(!e||e.isDummy())return;if(!e.isDecrypted())throw Error("Decryption key is not decrypted.");if(i.constantTimePKCS1Decryption&&(t.publicKeyAlgorithm===me.publicKey.rsaEncrypt||t.publicKeyAlgorithm===me.publicKey.rsaEncryptSign||t.publicKeyAlgorithm===me.publicKey.rsaSign||t.publicKeyAlgorithm===me.publicKey.elgamal)){const r=t.write();await Promise.all(Array.from(i.constantTimePKCS1DecryptionSupportedSymmetricAlgorithms).map((async t=>{const i=new Ao;i.read(r);const s={sessionKeyAlgorithm:t,sessionKey:await na.generateSessionKey(t)};try{await i.decrypt(e,s),a.push(i)}catch(e){ce.printDebugError(e),n=e}})))}else try{if(await t.decrypt(e),!s.includes(me.write(me.symmetric,t.sessionKeyAlgorithm)))throw Error("A non-preferred symmetric algorithm was used.");a.push(t)}catch(e){ce.printDebugError(e),n=e}})))}))),ne(t.encrypted),t.encrypted=null})))}}if(a.length>0){if(a.length>1){const e=new Set;a=a.filter((t=>{const r=t.sessionKeyAlgorithm+ce.uint8ArrayToString(t.sessionKey);return!e.has(r)&&(e.add(r),!0)}))}return a.map((e=>({data:e.sessionKey,algorithm:me.read(me.symmetric,e.sessionKeyAlgorithm)})))}throw n||Error("Session key decryption failed.")}getLiteralData(){const e=this.unwrapCompressed().packets.findPacket(me.packet.literalData);return e&&e.getBytes()||null}getFilename(){const e=this.unwrapCompressed().packets.findPacket(me.packet.literalData);return e&&e.getFilename()||null}getText(){const e=this.unwrapCompressed().packets.findPacket(me.packet.literalData);return e?e.getText():null}static async generateSessionKey(e=[],t=new Date,r=[],i=ge){const n=await Wo("symmetric",e,t,r,i),a=me.read(me.symmetric,n),s=i.aeadProtect&&await async function(e,t=new Date,r=[],i=ge){let n=!0;return await Promise.all(e.map((async function(e,a){const s=await e.getPrimaryUser(t,r[a],i);s.selfCertification.features&&s.selfCertification.features[0]&me.features.aead||(n=!1)}))),n}(e,t,r,i)?me.read(me.aead,await Wo("aead",e,t,r,i)):void 0;return{data:await na.generateSessionKey(n),algorithm:a,aeadAlgorithm:s}}async encrypt(e,t,r,i=!1,n=[],a=new Date,s=[],o=ge){if(r){if(!ce.isUint8Array(r.data)||!ce.isString(r.algorithm))throw Error("Invalid session key for encryption.")}else if(e&&e.length)r=await pc.generateSessionKey(e,a,s,o);else{if(!t||!t.length)throw Error("No keys, passwords, or session key provided.");r=await pc.generateSessionKey(void 0,void 0,void 0,o)}const{data:c,algorithm:u,aeadAlgorithm:h}=r,f=await pc.encryptSessionKey(c,u,h,e,t,i,n,a,s,o);let d;h?(d=new ko,d.aeadAlgorithm=me.write(me.aead,h)):d=new vo,d.packets=this.packets;const l=me.write(me.symmetric,u);return await d.encrypt(l,c,o),f.packets.push(d),d.packets=new co,f}static async encryptSessionKey(e,t,r,i,n,a=!1,s=[],o=new Date,c=[],u=ge){const h=new co,f=me.write(me.symmetric,t),d=r&&me.write(me.aead,r);if(i){const t=await Promise.all(i.map((async function(t,r){const i=await t.getEncryptionKey(s[r],o,c,u),n=new Ao;return n.publicKeyID=a?Me.wildcard():i.getKeyID(),n.publicKeyAlgorithm=i.keyPacket.algorithm,n.sessionKey=e,n.sessionKeyAlgorithm=f,await n.encrypt(i.keyPacket),delete n.sessionKey,n})));h.push(...t)}if(n){const t=async function(e,t){try{return await e.decrypt(t),1}catch(e){return 0}},r=(e,t)=>e+t,i=async function(e,a,s,o){const c=new Eo(u);if(c.sessionKey=e,c.sessionKeyAlgorithm=a,s&&(c.aeadAlgorithm=s),await c.encrypt(o,u),u.passwordCollisionCheck){if(1!==(await Promise.all(n.map((e=>t(c,e))))).reduce(r))return i(e,a,o)}return delete c.sessionKey,c},a=await Promise.all(n.map((t=>i(e,f,d,t))));h.push(...a)}return new pc(h)}async sign(e=[],t=null,r=[],i=new Date,n=[],a=ge){const s=new co,o=this.packets.findPacket(me.packet.literalData);if(!o)throw Error("No literal data packet to sign.");let c,u;const h=null===o.text?me.signature.binary:me.signature.text;if(t)for(u=t.packets.filterByTag(me.packet.signature),c=u.length-1;c>=0;c--){const t=u[c],r=new so;r.signatureType=t.signatureType,r.hashAlgorithm=t.hashAlgorithm,r.publicKeyAlgorithm=t.publicKeyAlgorithm,r.issuerKeyID=t.issuerKeyID,e.length||0!==c||(r.flags=1),s.push(r)}return await Promise.all(Array.from(e).reverse().map((async function(t,s){if(!t.isPrivate())throw Error("Need private key for signing");const o=r[e.length-1-s],c=await t.getSigningKey(o,i,n,a),u=new so;return u.signatureType=h,u.hashAlgorithm=await Lo(t,c.keyPacket,i,n,a),u.publicKeyAlgorithm=c.keyPacket.algorithm,u.issuerKeyID=c.getKeyID(),s===e.length-1&&(u.flags=1),u}))).then((e=>{e.forEach((e=>s.push(e)))})),s.push(o),s.push(...await yc(o,e,t,r,i,n,!1,a)),new pc(s)}compress(e,t=ge){if(e===me.compression.uncompressed)return this;const r=new ho(t);r.algorithm=e,r.packets=this.packets;const i=new co;return i.push(r),new pc(i)}async signDetached(e=[],t=null,r=[],i=new Date,n=[],a=ge){const s=this.packets.findPacket(me.packet.literalData);if(!s)throw Error("No literal data packet to sign.");return new zo(await yc(s,e,t,r,i,n,!0,a))}async verify(e,t=new Date,r=ge){const i=this.unwrapCompressed(),n=i.packets.filterByTag(me.packet.literalData);if(1!==n.length)throw Error("Can only verify message with one literal data packet.");_(i.packets.stream)&&i.packets.push(...await ie(i.packets.stream,(e=>e||[])));const a=i.packets.filterByTag(me.packet.onePassSignature).reverse(),s=i.packets.filterByTag(me.packet.signature);return a.length&&!s.length&&ce.isStream(i.packets.stream)&&!_(i.packets.stream)?(await Promise.all(a.map((async e=>{e.correspondingSig=new Promise(((t,r)=>{e.correspondingSigResolve=t,e.correspondingSigReject=r})),e.signatureData=ae((async()=>(await e.correspondingSig).signatureData)),e.hashed=ie(await e.hash(e.signatureType,n[0],void 0,!1)),e.hashed.catch((()=>{}))}))),i.packets.stream=X(i.packets.stream,(async(e,t)=>{const r=H(e),i=G(t);try{for(let e=0;e<a.length;e++){const{value:t}=await r.read();a[e].correspondingSigResolve(t)}await r.readToEnd(),await i.ready,await i.close()}catch(e){a.forEach((t=>{t.correspondingSigReject(e)})),await i.abort(e)}})),bc(a,n,e,t,!1,r)):bc(s,n,e,t,!1,r)}verifyDetached(e,t,r=new Date,i=ge){const n=this.unwrapCompressed().packets.filterByTag(me.packet.literalData);if(1!==n.length)throw Error("Can only verify message with one literal data packet.");return bc(e.packets,n,t,r,!0,i)}unwrapCompressed(){const e=this.packets.filterByTag(me.packet.compressedData);return e.length?new pc(e[0].packets):this}async appendSignature(e,t=ge){await this.packets.read(ce.isUint8Array(e)?e:(await Pe(e)).data,lc,t)}write(){return this.packets.write()}armor(e=ge){return xe(me.armor.message,this.write(),null,null,null,e)}}async function yc(e,t,r=null,i=[],n=new Date,a=[],s=!1,o=ge){const c=new co,u=null===e.text?me.signature.binary:me.signature.text;if(await Promise.all(t.map((async(t,r)=>{const c=a[r];if(!t.isPrivate())throw Error("Need private key for signing");const h=await t.getSigningKey(i[r],n,c,o);return Ho(e,t,h.keyPacket,{signatureType:u},n,c,s,o)}))).then((e=>{c.push(...e)})),r){const e=r.packets.filterByTag(me.packet.signature);c.push(...e)}return c}async function bc(e,t,r,i=new Date,n=!1,a=ge){return Promise.all(e.filter((function(e){return["text","binary"].includes(me.read(me.signature,e.signatureType))})).map((async function(e){return async function(e,t,r,i=new Date,n=!1,a=ge){let s,o;for(const t of r){const r=t.getKeys(e.issuerKeyID);if(r.length>0){s=t,o=r[0];break}}const c=e instanceof so?e.correspondingSig:e,u={keyID:e.issuerKeyID,verified:(async()=>{if(!o)throw Error("Could not find signing key with key ID "+e.issuerKeyID.toHex());await e.verify(o.keyPacket,e.signatureType,t[0],i,n,a);const r=await c;if(o.getCreationTime()>r.created)throw Error("Key is newer than the signature");try{await s.getSigningKey(o.getKeyID(),r.created,void 0,a)}catch(e){if(!a.allowInsecureVerificationWithReformattedKeys||!e.message.match(/Signature creation time is in the future/))throw e;await s.getSigningKey(o.getKeyID(),i,void 0,a)}return!0})(),signature:(async()=>{const e=await c,t=new co;return e&&t.push(e),new zo(t)})()};return u.signature.catch((()=>{})),u.verified.catch((()=>{})),u}(e,t,r,i,n,a)})))}const mc=/*#__PURE__*/ce.constructAllowedPackets([no]);class gc{constructor(e,t){if(this.text=ce.removeTrailingSpaces(e).replace(/\r?\n/g,"\r\n"),t&&!(t instanceof zo))throw Error("Invalid signature input");this.signature=t||new zo(new co)}getSigningKeyIDs(){const e=[];return this.signature.packets.forEach((function(t){e.push(t.issuerKeyID)})),e}async sign(e,t=null,r=[],i=new Date,n=[],a=ge){const s=new to;s.setText(this.text);const o=new zo(await yc(s,e,t,r,i,n,!0,a));return new gc(this.text,o)}verify(e,t=new Date,r=ge){const i=this.signature.packets,n=new to;return n.setText(this.text),bc(i,[n],e,t,!0,r)}getText(){return this.text.replace(/\r\n/g,"\n")}armor(e=ge){let t=this.signature.packets.map((function(e){return me.read(me.hash,e.hashAlgorithm).toUpperCase()}));t=t.filter((function(e,t,r){return r.indexOf(e)===t}));const r={hash:t.join(),text:this.text,data:this.signature.packets.write()};return xe(me.armor.signed,r,void 0,void 0,void 0,e)}}function wc(e){if(!(e instanceof pc))throw Error("Parameter [message] needs to be of type Message")}function vc(e){if(!(e instanceof gc||e instanceof pc))throw Error("Parameter [message] needs to be of type Message or CleartextMessage")}function _c(e){if("armored"!==e&&"binary"!==e&&"object"!==e)throw Error("Unsupported format "+e)}const kc=Object.keys(ge).length;function Ac(e){const t=Object.keys(e);if(t.length!==kc)for(const e of t)if(void 0===ge[e])throw Error("Unknown config property: "+e)}function Sc(e){return e&&!ce.isArray(e)&&(e=[e]),e}async function Ec(e,t,r="utf8"){const i=ce.isStream(e);return"array"===i?ie(e):"node"===t?(e=D(e),"binary"!==r&&e.setEncoding(r),e):"web"===t&&"ponyfill"===i?T(e):e}function Pc(e,t){e.data=X(t.packets.stream,(async(t,r)=>{await V(e.data,r,{preventClose:!0});const i=G(r);try{await ie(t,(e=>e)),await i.close()}catch(e){await i.abort(e)}}))}function xc(e,t,r){switch(t){case"object":return e;case"armored":return e.armor(r);case"binary":return e.write();default:throw Error("Unsupported format "+t)}}const Mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:e=>`Symbol(${e})`;function Cc(){}const Kc="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function Dc(e){return"object"==typeof e&&null!==e||"function"==typeof e}const Rc=Cc,Uc=Promise,Ic=Promise.prototype.then,Bc=Promise.resolve.bind(Uc),Tc=Promise.reject.bind(Uc);function zc(e){return new Uc(e)}function qc(e){return Bc(e)}function Oc(e){return Tc(e)}function Fc(e,t,r){return Ic.call(e,t,r)}function Nc(e,t,r){Fc(Fc(e,t,r),void 0,Rc)}function jc(e,t){Nc(e,t)}function Lc(e,t){Nc(e,void 0,t)}function Wc(e,t,r){return Fc(e,t,r)}function Hc(e){Fc(e,void 0,Rc)}const Gc=(()=>{const e=Kc&&Kc.queueMicrotask;if("function"==typeof e)return e;const t=qc(void 0);return e=>Fc(t,e)})();function Vc(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function $c(e,t,r){try{return qc(Vc(e,t,r))}catch(e){return Oc(e)}}class Zc{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size}shift(){const e=this._front;let t=e;const r=this._cursor;let i=r+1;const n=e._elements,a=n[r];return 16384===i&&(t=e._next,i=0),--this._size,this._cursor=i,e!==t&&(this._front=t),n[r]=void 0,a}forEach(e){let t=this._cursor,r=this._front,i=r._elements;for(;!(t===i.length&&void 0===r._next||t===i.length&&(r=r._next,i=r._elements,t=0,0===i.length));)e(i[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}function Yc(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?eu(e):"closed"===t._state?function(e){eu(e),iu(e)}(e):tu(e,t._storedError)}function Xc(e,t){return Bf(e._ownerReadableStream,t)}function Qc(e){"readable"===e._ownerReadableStream._state?ru(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){tu(e,t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function Jc(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function eu(e){e._closedPromise=zc(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function tu(e,t){eu(e),ru(e,t)}function ru(e,t){void 0!==e._closedPromise_reject&&(Hc(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function iu(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const nu=Mc("[[AbortSteps]]"),au=Mc("[[ErrorSteps]]"),su=Mc("[[CancelSteps]]"),ou=Mc("[[PullSteps]]"),cu=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},uu=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function hu(e,t){if(void 0!==e&&("object"!=typeof(r=e)&&"function"!=typeof r))throw new TypeError(t+" is not an object.");var r}function fu(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function.")}function du(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(t+" is not an object.")}function lu(e,t,r){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function pu(e,t,r){if(void 0===e)throw new TypeError(`${t} is required in '${r}'.`)}function yu(e){return Number(e)}function bu(e){return 0===e?0:e}function mu(e,t){const r=Number.MAX_SAFE_INTEGER;let i=Number(e);if(i=bu(i),!cu(i))throw new TypeError(t+" is not a finite number");if(i=function(e){return bu(uu(e))}(i),i<0||i>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return cu(i)&&0!==i?i:0}function gu(e,t){if(!Uf(e))throw new TypeError(t+" is not a ReadableStream.")}function wu(e){return new Su(e)}function vu(e,t){e._reader._readRequests.push(t)}function _u(e,t,r){const i=e._reader._readRequests.shift();r?i._closeSteps():i._chunkSteps(t)}function ku(e){return e._reader._readRequests.length}function Au(e){const t=e._reader;return void 0!==t&&!!Eu(t)}class Su{constructor(e){if(lu(e,1,"ReadableStreamDefaultReader"),gu(e,"First parameter"),If(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Yc(this,e),this._readRequests=new Zc}get closed(){return Eu(this)?this._closedPromise:Oc(xu("closed"))}cancel(e){return Eu(this)?void 0===this._ownerReadableStream?Oc(Jc("cancel")):Xc(this,e):Oc(xu("cancel"))}read(){if(!Eu(this))return Oc(xu("read"));if(void 0===this._ownerReadableStream)return Oc(Jc("read from"));let e,t;const r=zc(((r,i)=>{e=r,t=i}));return Pu(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),r}releaseLock(){if(!Eu(this))throw xu("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Qc(this)}}}function Eu(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function Pu(e,t){const r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[ou](t)}function xu(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}let Mu;Object.defineProperties(Su.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(Su.prototype,Mc.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof Mc.asyncIterator&&(Mu={[Mc.asyncIterator](){return this}},Object.defineProperty(Mu,Mc.asyncIterator,{enumerable:!1}));class Cu{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?Wc(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise?Wc(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;if(void 0===e._ownerReadableStream)return Oc(Jc("iterate"));let t,r;const i=zc(((e,i)=>{t=e,r=i}));return Pu(e,{_chunkSteps:e=>{this._ongoingPromise=void 0,Gc((()=>t({value:e,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,Qc(e),t({value:void 0,done:!0})},_errorSteps:t=>{this._ongoingPromise=void 0,this._isFinished=!0,Qc(e),r(t)}}),i}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(void 0===t._ownerReadableStream)return Oc(Jc("finish iterating"));if(!this._preventCancel){const r=Xc(t,e);return Qc(t),Wc(r,(()=>({value:e,done:!0})))}return Qc(t),qc({value:e,done:!0})}}const Ku={next(){return Du(this)?this._asyncIteratorImpl.next():Oc(Ru("next"))},return(e){return Du(this)?this._asyncIteratorImpl.return(e):Oc(Ru("return"))}};function Du(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl")}function Ru(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}void 0!==Mu&&Object.setPrototypeOf(Ku,Mu);const Uu=Number.isNaN||function(e){return e!=e};function Iu(e){return!!function(e){if("number"!=typeof e)return!1;if(Uu(e))return!1;if(e<0)return!1;return!0}(e)&&e!==1/0}function Bu(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Tu(e,t,r){if(!Iu(r=Number(r)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function zu(e){e._queue=new Zc,e._queueTotalSize=0}function qu(e){return e.slice()}class Ou{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!ju(this))throw nh("view");return this._view}respond(e){if(!ju(this))throw nh("respond");if(lu(e,1,"respond"),e=mu(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){if(!Iu(t=Number(t)))throw new RangeError("bytesWritten must be a finite");Qu(e,t)}(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!ju(this))throw nh("respondWithNewView");if(lu(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(e,t){const r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,Qu(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}}Object.defineProperties(Ou.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(Ou.prototype,Mc.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Fu{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Nu(this))throw ah("byobRequest");if(null===this._byobRequest&&this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(Ou.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(r,this,t),this._byobRequest=r}return this._byobRequest}get desiredSize(){if(!Nu(this))throw ah("desiredSize");return rh(this)}close(){if(!Nu(this))throw ah("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);!function(e){const t=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==t._state)return;if(e._queueTotalSize>0)return void(e._closeRequested=!0);if(e._pendingPullIntos.length>0){if(e._pendingPullIntos.peek().bytesFilled>0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw th(e,t),t}}eh(e),Tf(t)}(this)}enqueue(e){if(!Nu(this))throw ah("enqueue");if(lu(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);!function(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;const i=t.buffer,n=t.byteOffset,a=t.byteLength,s=i;if(Au(r))if(0===ku(r))Gu(e,s,n,a);else{_u(r,new Uint8Array(s,n,a),!1)}else ch(r)?(Gu(e,s,n,a),Xu(e)):Gu(e,s,n,a);Lu(e)}(this,e)}error(e){if(!Nu(this))throw ah("error");th(this,e)}[su](e){if(this._pendingPullIntos.length>0){this._pendingPullIntos.peek().bytesFilled=0}zu(this);const t=this._cancelAlgorithm(e);return eh(this),t}[ou](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0){const t=this._queue.shift();this._queueTotalSize-=t.byteLength,Zu(this);const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return void e._chunkSteps(r)}const r=this._autoAllocateChunkSize;if(void 0!==r){let t;try{t=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}const i={buffer:t,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}vu(t,e),Lu(this)}}function Nu(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function ju(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Lu(e){if(!function(e){const t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(Au(t)&&ku(t)>0)return!0;if(ch(t)&&oh(t)>0)return!0;if(rh(e)>0)return!0;return!1}(e))return;if(e._pulling)return void(e._pullAgain=!0);e._pulling=!0;Nc(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Lu(e))}),(t=>{th(e,t)}))}function Wu(e,t){let r=!1;"closed"===e._state&&(r=!0);const i=Hu(t);"default"===t.readerType?_u(e,i,r):function(e,t,r){const i=e._reader._readIntoRequests.shift();r?i._closeSteps(t):i._chunkSteps(t)}(e,i,r)}function Hu(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Gu(e,t,r,i){e._queue.push({buffer:t,byteOffset:r,byteLength:i}),e._queueTotalSize+=i}function Vu(e,t){const r=t.elementSize,i=t.bytesFilled-t.bytesFilled%r,n=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+n,s=a-a%r;let o=n,c=!1;s>i&&(o=s-t.bytesFilled,c=!0);const u=e._queue;for(;o>0;){const r=u.peek(),i=Math.min(o,r.byteLength),n=t.byteOffset+t.bytesFilled;h=t.buffer,f=n,d=r.buffer,l=r.byteOffset,p=i,new Uint8Array(h).set(new Uint8Array(d,l,p),f),r.byteLength===i?u.shift():(r.byteOffset+=i,r.byteLength-=i),e._queueTotalSize-=i,$u(e,i,t),o-=i}var h,f,d,l,p;return c}function $u(e,t,r){Yu(e),r.bytesFilled+=t}function Zu(e){0===e._queueTotalSize&&e._closeRequested?(eh(e),Tf(e._controlledReadableByteStream)):Lu(e)}function Yu(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Xu(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;const t=e._pendingPullIntos.peek();Vu(e,t)&&(Ju(e),Wu(e._controlledReadableByteStream,t))}}function Qu(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=t.buffer;const r=e._controlledReadableByteStream;if(ch(r))for(;oh(r)>0;)Wu(r,Ju(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if($u(e,t,r),r.bytesFilled<r.elementSize)return;Ju(e);const i=r.bytesFilled%r.elementSize;if(i>0){const t=r.byteOffset+r.bytesFilled,n=r.buffer.slice(t-i,t);Gu(e,n,0,n.byteLength)}r.buffer=r.buffer,r.bytesFilled-=i,Wu(e._controlledReadableByteStream,r),Xu(e)}(e,t,r);Lu(e)}function Ju(e){const t=e._pendingPullIntos.shift();return Yu(e),t}function eh(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function th(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(!function(e){Yu(e),e._pendingPullIntos=new Zc}(e),zu(e),eh(e),zf(r,t))}function rh(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function ih(e,t,r){const i=Object.create(Fu.prototype);let n=()=>{},a=()=>qc(void 0),s=()=>qc(void 0);void 0!==t.start&&(n=()=>t.start(i)),void 0!==t.pull&&(a=()=>t.pull(i)),void 0!==t.cancel&&(s=e=>t.cancel(e));const o=t.autoAllocateChunkSize;if(0===o)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(e,t,r,i,n,a,s){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,zu(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=i,t._cancelAlgorithm=n,t._autoAllocateChunkSize=s,t._pendingPullIntos=new Zc,e._readableStreamController=t,Nc(qc(r()),(()=>{t._started=!0,Lu(t)}),(e=>{th(t,e)}))}(e,i,n,a,s,r,o)}function nh(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function ah(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function sh(e,t){e._reader._readIntoRequests.push(t)}function oh(e){return e._reader._readIntoRequests.length}function ch(e){const t=e._reader;return void 0!==t&&!!hh(t)}Object.defineProperties(Fu.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(Fu.prototype,Mc.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class uh{constructor(e){if(lu(e,1,"ReadableStreamBYOBReader"),gu(e,"First parameter"),If(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Nu(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Yc(this,e),this._readIntoRequests=new Zc}get closed(){return hh(this)?this._closedPromise:Oc(fh("closed"))}cancel(e){return hh(this)?void 0===this._ownerReadableStream?Oc(Jc("cancel")):Xc(this,e):Oc(fh("cancel"))}read(e){if(!hh(this))return Oc(fh("read"));if(!ArrayBuffer.isView(e))return Oc(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return Oc(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return Oc(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return Oc(Jc("read from"));let t,r;const i=zc(((e,i)=>{t=e,r=i}));return function(e,t,r){const i=e._ownerReadableStream;i._disturbed=!0,"errored"===i._state?r._errorSteps(i._storedError):function(e,t,r){const i=e._controlledReadableByteStream;let n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);const a=t.constructor,s={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,viewConstructor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(s),void sh(i,r);if("closed"!==i._state){if(e._queueTotalSize>0){if(Vu(e,s)){const t=Hu(s);return Zu(e),void r._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return th(e,t),void r._errorSteps(t)}}e._pendingPullIntos.push(s),sh(i,r),Lu(e)}else{const e=new a(s.buffer,s.byteOffset,0);r._closeSteps(e)}}(i._readableStreamController,t,r)}(this,e,{_chunkSteps:e=>t({value:e,done:!1}),_closeSteps:e=>t({value:e,done:!0}),_errorSteps:e=>r(e)}),i}releaseLock(){if(!hh(this))throw fh("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Qc(this)}}}function hh(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function fh(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function dh(e,t){const{highWaterMark:r}=e;if(void 0===r)return t;if(Uu(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function lh(e){const{size:t}=e;return t||(()=>1)}function ph(e,t){hu(e,t);const r=null==e?void 0:e.highWaterMark,i=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:yu(r),size:void 0===i?void 0:yh(i,t+" has member 'size' that")}}function yh(e,t){return fu(e,t),t=>yu(e(t))}function bh(e,t,r){return fu(e,r),r=>$c(e,t,[r])}function mh(e,t,r){return fu(e,r),()=>$c(e,t,[])}function gh(e,t,r){return fu(e,r),r=>Vc(e,t,[r])}function wh(e,t,r){return fu(e,r),(r,i)=>$c(e,t,[r,i])}function vh(e,t){if(!Sh(e))throw new TypeError(t+" is not a WritableStream.")}Object.defineProperties(uh.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(uh.prototype,Mc.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class _h{constructor(e={},t={}){void 0===e?e=null:du(e,"First parameter");const r=ph(t,"Second parameter"),i=function(e,t){hu(e,t);const r=null==e?void 0:e.abort,i=null==e?void 0:e.close,n=null==e?void 0:e.start,a=null==e?void 0:e.type,s=null==e?void 0:e.write;return{abort:void 0===r?void 0:bh(r,e,t+" has member 'abort' that"),close:void 0===i?void 0:mh(i,e,t+" has member 'close' that"),start:void 0===n?void 0:gh(n,e,t+" has member 'start' that"),write:void 0===s?void 0:wh(s,e,t+" has member 'write' that"),type:a}}(e,"First parameter");Ah(this);if(void 0!==i.type)throw new RangeError("Invalid type is specified");const n=lh(r);!function(e,t,r,i){const n=Object.create(jh.prototype);let a=()=>{},s=()=>qc(void 0),o=()=>qc(void 0),c=()=>qc(void 0);void 0!==t.start&&(a=()=>t.start(n));void 0!==t.write&&(s=e=>t.write(e,n));void 0!==t.close&&(o=()=>t.close());void 0!==t.abort&&(c=e=>t.abort(e));Lh(e,n,a,s,o,c,r,i)}(this,i,dh(r,1),n)}get locked(){if(!Sh(this))throw Yh("locked");return Eh(this)}abort(e){return Sh(this)?Eh(this)?Oc(new TypeError("Cannot abort a stream that already has a writer")):Ph(this,e):Oc(Yh("abort"))}close(){return Sh(this)?Eh(this)?Oc(new TypeError("Cannot close a stream that already has a writer")):Dh(this)?Oc(new TypeError("Cannot close an already-closing stream")):xh(this):Oc(Yh("close"))}getWriter(){if(!Sh(this))throw Yh("getWriter");return kh(this)}}function kh(e){return new Ih(e)}function Ah(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new Zc,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Sh(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function Eh(e){return void 0!==e._writer}function Ph(e,t){const r=e._state;if("closed"===r||"errored"===r)return qc(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let i=!1;"erroring"===r&&(i=!0,t=void 0);const n=zc(((r,n)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}));return e._pendingAbortRequest._promise=n,i||Ch(e,t),n}function xh(e){const t=e._state;if("closed"===t||"errored"===t)return Oc(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=zc(((t,r)=>{const i={_resolve:t,_reject:r};e._closeRequest=i})),i=e._writer;var n;return void 0!==i&&e._backpressure&&"writable"===t&&cf(i),Tu(n=e._writableStreamController,Nh,0),Gh(n),r}function Mh(e,t){"writable"!==e._state?Kh(e):Ch(e,t)}function Ch(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const i=e._writer;void 0!==i&&qh(i,t),!function(e){if(void 0===e._inFlightWriteRequest&&void 0===e._inFlightCloseRequest)return!1;return!0}(e)&&r._started&&Kh(e)}function Kh(e){e._state="errored",e._writableStreamController[au]();const t=e._storedError;if(e._writeRequests.forEach((e=>{e._reject(t)})),e._writeRequests=new Zc,void 0===e._pendingAbortRequest)return void Rh(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void Rh(e);Nc(e._writableStreamController[nu](r._reason),(()=>{r._resolve(),Rh(e)}),(t=>{r._reject(t),Rh(e)}))}function Dh(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Rh(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&tf(t,e._storedError)}function Uh(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){nf(e)}(r):cf(r)),e._backpressure=t}Object.defineProperties(_h.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(_h.prototype,Mc.toStringTag,{value:"WritableStream",configurable:!0});class Ih{constructor(e){if(lu(e,1,"WritableStreamDefaultWriter"),vh(e,"First parameter"),Eh(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!Dh(e)&&e._backpressure?nf(this):sf(this),Jh(this);else if("erroring"===t)af(this,e._storedError),Jh(this);else if("closed"===t)sf(this),Jh(r=this),rf(r);else{const t=e._storedError;af(this,t),ef(this,t)}var r}get closed(){return Bh(this)?this._closedPromise:Oc(Xh("closed"))}get desiredSize(){if(!Bh(this))throw Xh("desiredSize");if(void 0===this._ownerWritableStream)throw Qh("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;if("errored"===r||"erroring"===r)return null;if("closed"===r)return 0;return Hh(t._writableStreamController)}(this)}get ready(){return Bh(this)?this._readyPromise:Oc(Xh("ready"))}abort(e){return Bh(this)?void 0===this._ownerWritableStream?Oc(Qh("abort")):function(e,t){return Ph(e._ownerWritableStream,t)}(this,e):Oc(Xh("abort"))}close(){if(!Bh(this))return Oc(Xh("close"));const e=this._ownerWritableStream;return void 0===e?Oc(Qh("close")):Dh(e)?Oc(new TypeError("Cannot close an already-closing stream")):Th(this)}releaseLock(){if(!Bh(this))throw Xh("releaseLock");void 0!==this._ownerWritableStream&&Oh(this)}write(e){return Bh(this)?void 0===this._ownerWritableStream?Oc(Qh("write to")):Fh(this,e):Oc(Xh("write"))}}function Bh(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function Th(e){return xh(e._ownerWritableStream)}function zh(e,t){"pending"===e._closedPromiseState?tf(e,t):function(e,t){ef(e,t)}(e,t)}function qh(e,t){"pending"===e._readyPromiseState?of(e,t):function(e,t){af(e,t)}(e,t)}function Oh(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");qh(e,r),zh(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Fh(e,t){const r=e._ownerWritableStream,i=r._writableStreamController,n=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return Vh(e,t),1}}(i,t);if(r!==e._ownerWritableStream)return Oc(Qh("write to"));const a=r._state;if("errored"===a)return Oc(r._storedError);if(Dh(r)||"closed"===a)return Oc(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Oc(r._storedError);const s=function(e){return zc(((t,r)=>{const i={_resolve:t,_reject:r};e._writeRequests.push(i)}))}(r);return function(e,t,r){try{Tu(e,t,r)}catch(t){return void Vh(e,t)}const i=e._controlledWritableStream;if(!Dh(i)&&"writable"===i._state){Uh(i,$h(e))}Gh(e)}(i,t,n),s}Object.defineProperties(Ih.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(Ih.prototype,Mc.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const Nh={};class jh{constructor(){throw new TypeError("Illegal constructor")}error(e){if(!function(e){if(!Dc(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream"))return!1;return!0}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&Zh(this,e)}[nu](e){const t=this._abortAlgorithm(e);return Wh(this),t}[au](){zu(this)}}function Lh(e,t,r,i,n,a,s,o){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,zu(t),t._started=!1,t._strategySizeAlgorithm=o,t._strategyHWM=s,t._writeAlgorithm=i,t._closeAlgorithm=n,t._abortAlgorithm=a;const c=$h(t);Uh(e,c);Nc(qc(r()),(()=>{t._started=!0,Gh(t)}),(r=>{t._started=!0,Mh(e,r)}))}function Wh(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Hh(e){return e._strategyHWM-e._queueTotalSize}function Gh(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void Kh(t);if(0===e._queue.length)return;const r=e._queue.peek().value;r===Nh?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),Bu(e);const r=e._closeAlgorithm();Wh(e),Nc(r,(()=>{!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&rf(t)}(t)}),(e=>{!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Mh(e,t)}(t,e)}))}(e):function(e,t){const r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r);Nc(e._writeAlgorithm(t),(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(Bu(e),!Dh(r)&&"writable"===t){const t=$h(e);Uh(r,t)}Gh(e)}),(t=>{"writable"===r._state&&Wh(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Mh(e,t)}(r,t)}))}(e,r)}function Vh(e,t){"writable"===e._controlledWritableStream._state&&Zh(e,t)}function $h(e){return Hh(e)<=0}function Zh(e,t){const r=e._controlledWritableStream;Wh(e),Ch(r,t)}function Yh(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Xh(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Qh(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Jh(e){e._closedPromise=zc(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function ef(e,t){Jh(e),tf(e,t)}function tf(e,t){void 0!==e._closedPromise_reject&&(Hc(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function rf(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function nf(e){e._readyPromise=zc(((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function af(e,t){nf(e),of(e,t)}function sf(e){nf(e),cf(e)}function of(e,t){void 0!==e._readyPromise_reject&&(Hc(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function cf(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(jh.prototype,{error:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(jh.prototype,Mc.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const uf="undefined"!=typeof DOMException?DOMException:void 0;const hf=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){return!1}}(uf)?uf:function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return Object.defineProperty(e.prototype=Object.create(Error.prototype),"constructor",{value:e,writable:!0,configurable:!0}),e}();function ff(e,t,r,i,n,a){const s=wu(e),o=kh(t);e._disturbed=!0;let c=!1,u=qc(void 0);return zc(((h,f)=>{let d;if(void 0!==a){if(d=()=>{const r=new hf("Aborted","AbortError"),a=[];i||a.push((()=>"writable"===t._state?Ph(t,r):qc(void 0))),n||a.push((()=>"readable"===e._state?Bf(e,r):qc(void 0))),y((()=>Promise.all(a.map((e=>e())))),!0,r)},a.aborted)return void d();a.addEventListener("abort",d)}if(p(e,s._closedPromise,(e=>{i?b(!0,e):y((()=>Ph(t,e)),!0,e)})),p(t,o._closedPromise,(t=>{n?b(!0,t):y((()=>Bf(e,t)),!0,t)})),function(e,t,r){"closed"===e._state?r():jc(t,r)}(e,s._closedPromise,(()=>{r?b():y((()=>function(e){const t=e._ownerWritableStream,r=t._state;return Dh(t)||"closed"===r?qc(void 0):"errored"===r?Oc(t._storedError):Th(e)}(o)))})),Dh(t)||"closed"===t._state){const t=new TypeError("the destination writable stream closed before all data could be piped to it");n?b(!0,t):y((()=>Bf(e,t)),!0,t)}function l(){const e=u;return Fc(u,(()=>e!==u?l():void 0))}function p(e,t,r){"errored"===e._state?r(e._storedError):Lc(t,r)}function y(e,r,i){function n(){Nc(e(),(()=>m(r,i)),(e=>m(!0,e)))}c||(c=!0,"writable"!==t._state||Dh(t)?n():jc(l(),n))}function b(e,r){c||(c=!0,"writable"!==t._state||Dh(t)?m(e,r):jc(l(),(()=>m(e,r))))}function m(e,t){Oh(o),Qc(s),void 0!==a&&a.removeEventListener("abort",d),e?f(t):h(void 0)}Hc(zc(((e,t)=>{!function r(i){i?e():Fc(c?qc(!0):Fc(o._readyPromise,(()=>zc(((e,t)=>{Pu(s,{_chunkSteps:t=>{u=Fc(Fh(o,t),void 0,Cc),e(!1)},_closeSteps:()=>e(!0),_errorSteps:t})})))),r,t)}(!1)})))}))}class df{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!lf(this))throw Af("desiredSize");return vf(this)}close(){if(!lf(this))throw Af("close");if(!_f(this))throw new TypeError("The stream is not in a state that permits close");mf(this)}enqueue(e){if(!lf(this))throw Af("enqueue");if(!_f(this))throw new TypeError("The stream is not in a state that permits enqueue");return gf(this,e)}error(e){if(!lf(this))throw Af("error");wf(this,e)}[su](e){zu(this);const t=this._cancelAlgorithm(e);return bf(this),t}[ou](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=Bu(this);this._closeRequested&&0===this._queue.length?(bf(this),Tf(t)):pf(this),e._chunkSteps(r)}else vu(t,e),pf(this)}}function lf(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function pf(e){if(!yf(e))return;if(e._pulling)return void(e._pullAgain=!0);e._pulling=!0;Nc(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,pf(e))}),(t=>{wf(e,t)}))}function yf(e){const t=e._controlledReadableStream;if(!_f(e))return!1;if(!e._started)return!1;if(If(t)&&ku(t)>0)return!0;return vf(e)>0}function bf(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function mf(e){if(!_f(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(bf(e),Tf(t))}function gf(e,t){if(!_f(e))return;const r=e._controlledReadableStream;if(If(r)&&ku(r)>0)_u(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(t){throw wf(e,t),t}try{Tu(e,t,r)}catch(t){throw wf(e,t),t}}pf(e)}function wf(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(zu(e),bf(e),zf(r,t))}function vf(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function _f(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function kf(e,t,r,i,n,a,s){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,zu(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._pullAlgorithm=i,t._cancelAlgorithm=n,e._readableStreamController=t;Nc(qc(r()),(()=>{t._started=!0,pf(t)}),(e=>{wf(t,e)}))}function Af(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function Sf(e,t,r){return fu(e,r),r=>$c(e,t,[r])}function Ef(e,t,r){return fu(e,r),r=>$c(e,t,[r])}function Pf(e,t,r){return fu(e,r),r=>Vc(e,t,[r])}function xf(e,t){if("bytes"!==(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function Mf(e,t){if("byob"!==(e=""+e))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function Cf(e,t){hu(e,t);const r=null==e?void 0:e.preventAbort,i=null==e?void 0:e.preventCancel,n=null==e?void 0:e.preventClose,a=null==e?void 0:e.signal;return void 0!==a&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(t+" is not an AbortSignal.")}(a,t+" has member 'signal' that"),{preventAbort:!!r,preventCancel:!!i,preventClose:!!n,signal:a}}Object.defineProperties(df.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(df.prototype,Mc.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class Kf{constructor(e={},t={}){void 0===e?e=null:du(e,"First parameter");const r=ph(t,"Second parameter"),i=function(e,t){hu(e,t);const r=e,i=null==r?void 0:r.autoAllocateChunkSize,n=null==r?void 0:r.cancel,a=null==r?void 0:r.pull,s=null==r?void 0:r.start,o=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===i?void 0:mu(i,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===n?void 0:Sf(n,r,t+" has member 'cancel' that"),pull:void 0===a?void 0:Ef(a,r,t+" has member 'pull' that"),start:void 0===s?void 0:Pf(s,r,t+" has member 'start' that"),type:void 0===o?void 0:xf(o,t+" has member 'type' that")}}(e,"First parameter");if(Rf(this),"bytes"===i.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");ih(this,i,dh(r,0))}else{const e=lh(r);!function(e,t,r,i){const n=Object.create(df.prototype);let a=()=>{},s=()=>qc(void 0),o=()=>qc(void 0);void 0!==t.start&&(a=()=>t.start(n)),void 0!==t.pull&&(s=()=>t.pull(n)),void 0!==t.cancel&&(o=e=>t.cancel(e)),kf(e,n,a,s,o,r,i)}(this,i,dh(r,1),e)}}get locked(){if(!Uf(this))throw qf("locked");return If(this)}cancel(e){return Uf(this)?If(this)?Oc(new TypeError("Cannot cancel a stream that already has a reader")):Bf(this,e):Oc(qf("cancel"))}getReader(e){if(!Uf(this))throw qf("getReader");return void 0===function(e,t){hu(e,t);const r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:Mf(r,t+" has member 'mode' that")}}(e,"First parameter").mode?wu(this):function(e){return new uh(e)}(this)}pipeThrough(e,t={}){if(!Uf(this))throw qf("pipeThrough");lu(e,1,"pipeThrough");const r=function(e,t){hu(e,t);const r=null==e?void 0:e.readable;pu(r,"readable","ReadableWritablePair"),gu(r,t+" has member 'readable' that");const i=null==e?void 0:e.writable;return pu(i,"writable","ReadableWritablePair"),vh(i,t+" has member 'writable' that"),{readable:r,writable:i}}(e,"First parameter"),i=Cf(t,"Second parameter");if(If(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Eh(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Hc(ff(this,r.writable,i.preventClose,i.preventAbort,i.preventCancel,i.signal)),r.readable}pipeTo(e,t={}){if(!Uf(this))return Oc(qf("pipeTo"));if(void 0===e)return Oc("Parameter 1 is required in 'pipeTo'.");if(!Sh(e))return Oc(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=Cf(t,"Second parameter")}catch(e){return Oc(e)}return If(this)?Oc(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Eh(e)?Oc(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ff(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!Uf(this))throw qf("tee");const e=function(e,t){const r=wu(e);let i,n,a,s,o,c=!1,u=!1,h=!1;const f=zc((e=>{o=e}));function d(){return c||(c=!0,Pu(r,{_chunkSteps:e=>{Gc((()=>{c=!1;const t=e,r=e;u||gf(a._readableStreamController,t),h||gf(s._readableStreamController,r)}))},_closeSteps:()=>{c=!1,u||mf(a._readableStreamController),h||mf(s._readableStreamController),u&&h||o(void 0)},_errorSteps:()=>{c=!1}})),qc(void 0)}function l(){}return a=Df(l,d,(function(t){if(u=!0,i=t,h){const t=qu([i,n]),r=Bf(e,t);o(r)}return f})),s=Df(l,d,(function(t){if(h=!0,n=t,u){const t=qu([i,n]),r=Bf(e,t);o(r)}return f})),Lc(r._closedPromise,(e=>{wf(a._readableStreamController,e),wf(s._readableStreamController,e),u&&h||o(void 0)})),[a,s]}(this);return qu(e)}values(e){if(!Uf(this))throw qf("values");return function(e,t){const r=wu(e),i=new Cu(r,t),n=Object.create(Ku);return n._asyncIteratorImpl=i,n}(this,function(e,t){return hu(e,t),{preventCancel:!!(null==e?void 0:e.preventCancel)}}(e,"First parameter").preventCancel)}}function Df(e,t,r,i=1,n=(()=>1)){const a=Object.create(Kf.prototype);Rf(a);return kf(a,Object.create(df.prototype),e,t,r,i,n),a}function Rf(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Uf(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function If(e){return void 0!==e._reader}function Bf(e,t){if(e._disturbed=!0,"closed"===e._state)return qc(void 0);if("errored"===e._state)return Oc(e._storedError);Tf(e);return Wc(e._readableStreamController[su](t),Cc)}function Tf(e){e._state="closed";const t=e._reader;void 0!==t&&(iu(t),Eu(t)&&(t._readRequests.forEach((e=>{e._closeSteps()})),t._readRequests=new Zc))}function zf(e,t){e._state="errored",e._storedError=t;const r=e._reader;void 0!==r&&(ru(r,t),Eu(r)?(r._readRequests.forEach((e=>{e._errorSteps(t)})),r._readRequests=new Zc):(r._readIntoRequests.forEach((e=>{e._errorSteps(t)})),r._readIntoRequests=new Zc))}function qf(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Of(e,t){hu(e,t);const r=null==e?void 0:e.highWaterMark;return pu(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:yu(r)}}Object.defineProperties(Kf.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(Kf.prototype,Mc.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof Mc.asyncIterator&&Object.defineProperty(Kf.prototype,Mc.asyncIterator,{value:Kf.prototype.values,writable:!0,configurable:!0});const Ff=function(e){return e.byteLength};class Nf{constructor(e){lu(e,1,"ByteLengthQueuingStrategy"),e=Of(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Lf(this))throw jf("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Lf(this))throw jf("size");return Ff}}function jf(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Lf(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(Nf.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(Nf.prototype,Mc.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const Wf=function(){return 1};class Hf{constructor(e){lu(e,1,"CountQueuingStrategy"),e=Of(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Vf(this))throw Gf("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Vf(this))throw Gf("size");return Wf}}function Gf(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Vf(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")}function $f(e,t,r){return fu(e,r),r=>$c(e,t,[r])}function Zf(e,t,r){return fu(e,r),r=>Vc(e,t,[r])}function Yf(e,t,r){return fu(e,r),(r,i)=>$c(e,t,[r,i])}Object.defineProperties(Hf.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(Hf.prototype,Mc.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class Xf{constructor(e={},t={},r={}){void 0===e&&(e=null);const i=ph(t,"Second parameter"),n=ph(r,"Third parameter"),a=function(e,t){hu(e,t);const r=null==e?void 0:e.flush,i=null==e?void 0:e.readableType,n=null==e?void 0:e.start,a=null==e?void 0:e.transform,s=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:$f(r,e,t+" has member 'flush' that"),readableType:i,start:void 0===n?void 0:Zf(n,e,t+" has member 'start' that"),transform:void 0===a?void 0:Yf(a,e,t+" has member 'transform' that"),writableType:s}}(e,"First parameter");if(void 0!==a.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==a.writableType)throw new RangeError("Invalid writableType specified");const s=dh(n,0),o=lh(n),c=dh(i,1),u=lh(i);let h;!function(e,t,r,i,n,a){function s(){return t}function o(t){return function(e,t){const r=e._transformStreamController;if(e._backpressure){return Wc(e._backpressureChangePromise,(()=>{const i=e._writable;if("erroring"===i._state)throw i._storedError;return sd(r,t)}))}return sd(r,t)}(e,t)}function c(t){return function(e,t){return Jf(e,t),qc(void 0)}(e,t)}function u(){return function(e){const t=e._readable,r=e._transformStreamController,i=r._flushAlgorithm();return nd(r),Wc(i,(()=>{if("errored"===t._state)throw t._storedError;mf(t._readableStreamController)}),(r=>{throw Jf(e,r),t._storedError}))}(e)}function h(){return function(e){return td(e,!1),e._backpressureChangePromise}(e)}function f(t){return ed(e,t),qc(void 0)}e._writable=function(e,t,r,i,n=1,a=(()=>1)){const s=Object.create(_h.prototype);return Ah(s),Lh(s,Object.create(jh.prototype),e,t,r,i,n,a),s}(s,o,u,c,r,i),e._readable=Df(s,h,f,n,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,td(e,!0),e._transformStreamController=void 0}(this,zc((e=>{h=e})),c,u,s,o),function(e,t){const r=Object.create(rd.prototype);let i=e=>{try{return ad(r,e),qc(void 0)}catch(e){return Oc(e)}},n=()=>qc(void 0);void 0!==t.transform&&(i=e=>t.transform(e,r));void 0!==t.flush&&(n=()=>t.flush(r));!function(e,t,r,i){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=i}(e,r,i,n)}(this,a),void 0!==a.start?h(a.start(this._transformStreamController)):h(void 0)}get readable(){if(!Qf(this))throw cd("readable");return this._readable}get writable(){if(!Qf(this))throw cd("writable");return this._writable}}function Qf(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Jf(e,t){wf(e._readable._readableStreamController,t),ed(e,t)}function ed(e,t){nd(e._transformStreamController),Vh(e._writable._writableStreamController,t),e._backpressure&&td(e,!1)}function td(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=zc((t=>{e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Xf.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(Xf.prototype,Mc.toStringTag,{value:"TransformStream",configurable:!0});class rd{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!id(this))throw od("desiredSize");return vf(this._controlledTransformStream._readable._readableStreamController)}enqueue(e){if(!id(this))throw od("enqueue");ad(this,e)}error(e){if(!id(this))throw od("error");var t;t=e,Jf(this._controlledTransformStream,t)}terminate(){if(!id(this))throw od("terminate");!function(e){const t=e._controlledTransformStream;mf(t._readable._readableStreamController);ed(t,new TypeError("TransformStream terminated"))}(this)}}function id(e){return!!Dc(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function nd(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function ad(e,t){const r=e._controlledTransformStream,i=r._readable._readableStreamController;if(!_f(i))throw new TypeError("Readable side is not in a state that permits enqueue");try{gf(i,t)}catch(e){throw ed(r,e),r._readable._storedError}(function(e){return!yf(e)})(i)!==r._backpressure&&td(r,!0)}function sd(e,t){return Wc(e._transformAlgorithm(t),void 0,(t=>{throw Jf(e._controlledTransformStream,t),t}))}function od(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function cd(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}Object.defineProperties(rd.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Mc.toStringTag&&Object.defineProperty(rd.prototype,Mc.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});var ud=/*#__PURE__*/Object.freeze({__proto__:null,ByteLengthQueuingStrategy:Nf,CountQueuingStrategy:Hf,ReadableByteStreamController:Fu,ReadableStream:Kf,ReadableStreamBYOBReader:uh,ReadableStreamBYOBRequest:Ou,ReadableStreamDefaultController:df,ReadableStreamDefaultReader:Su,TransformStream:Xf,TransformStreamDefaultController:rd,WritableStream:_h,WritableStreamDefaultController:jh,WritableStreamDefaultWriter:Ih}),hd=function(e,t){return(hd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};
|
||
/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */function fd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+t+" is not a constructor or null");function r(){this.constructor=e}hd(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function dd(e){if(!e)throw new TypeError("Assertion failed")}function ld(){}function pd(e){return"object"==typeof e&&null!==e||"function"==typeof e}function yd(e){if("function"!=typeof e)return!1;var t=!1;try{new e({start:function(){t=!0}})}catch(e){}return t}function bd(e){return!!pd(e)&&"function"==typeof e.getReader}function md(e){return!!pd(e)&&"function"==typeof e.getWriter}function gd(e){return!!pd(e)&&(!!bd(e.readable)&&!!md(e.writable))}function wd(e){try{return e.getReader({mode:"byob"}).releaseLock(),!0}catch(e){return!1}}function vd(e,t){var r=(void 0===t?{}:t).type;return dd(bd(e)),dd(!1===e.locked),"bytes"===(r=_d(r))?new Ed(e):new Ad(e)}function _d(e){var t=e+"";if("bytes"===t)return t;if(void 0===e)return e;throw new RangeError("Invalid type is specified")}var kd=function(){function e(e){this._underlyingReader=void 0,this._readerMode=void 0,this._readableStreamController=void 0,this._pendingRead=void 0,this._underlyingStream=e,this._attachDefaultReader()}return e.prototype.start=function(e){this._readableStreamController=e},e.prototype.cancel=function(e){return dd(void 0!==this._underlyingReader),this._underlyingReader.cancel(e)},e.prototype._attachDefaultReader=function(){if("default"!==this._readerMode){this._detachReader();var e=this._underlyingStream.getReader();this._readerMode="default",this._attachReader(e)}},e.prototype._attachReader=function(e){var t=this;dd(void 0===this._underlyingReader),this._underlyingReader=e;var r=this._underlyingReader.closed;r&&r.then((function(){return t._finishPendingRead()})).then((function(){e===t._underlyingReader&&t._readableStreamController.close()}),(function(r){e===t._underlyingReader&&t._readableStreamController.error(r)})).catch(ld)},e.prototype._detachReader=function(){void 0!==this._underlyingReader&&(this._underlyingReader.releaseLock(),this._underlyingReader=void 0,this._readerMode=void 0)},e.prototype._pullWithDefaultReader=function(){var e=this;this._attachDefaultReader();var t=this._underlyingReader.read().then((function(t){var r=e._readableStreamController;t.done?e._tryClose():r.enqueue(t.value)}));return this._setPendingRead(t),t},e.prototype._tryClose=function(){try{this._readableStreamController.close()}catch(e){}},e.prototype._setPendingRead=function(e){var t,r=this,i=function(){r._pendingRead===t&&(r._pendingRead=void 0)};this._pendingRead=t=e.then(i,i)},e.prototype._finishPendingRead=function(){var e=this;if(this._pendingRead){var t=function(){return e._finishPendingRead()};return this._pendingRead.then(t,t)}},e}(),Ad=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fd(t,e),t.prototype.pull=function(){return this._pullWithDefaultReader()},t}(kd);function Sd(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var Ed=function(e){function t(t){var r=this,i=wd(t);return(r=e.call(this,t)||this)._supportsByob=i,r}return fd(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return"bytes"},enumerable:!1,configurable:!0}),t.prototype._attachByobReader=function(){if("byob"!==this._readerMode){dd(this._supportsByob),this._detachReader();var e=this._underlyingStream.getReader({mode:"byob"});this._readerMode="byob",this._attachReader(e)}},t.prototype.pull=function(){if(this._supportsByob){var e=this._readableStreamController.byobRequest;if(e)return this._pullWithByobRequest(e)}return this._pullWithDefaultReader()},t.prototype._pullWithByobRequest=function(e){var t=this;this._attachByobReader();var r=new Uint8Array(e.view.byteLength),i=this._underlyingReader.read(r).then((function(r){var i,n,a;t._readableStreamController,r.done?(t._tryClose(),e.respond(0)):(i=r.value,n=e.view,a=Sd(i),Sd(n).set(a,0),e.respond(r.value.byteLength))}));return this._setPendingRead(i),i},t}(kd);function Pd(e){dd(md(e)),dd(!1===e.locked);var t=e.getWriter();return new xd(t)}var xd=function(){function e(e){var t=this;this._writableStreamController=void 0,this._pendingWrite=void 0,this._state="writable",this._storedError=void 0,this._underlyingWriter=e,this._errorPromise=new Promise((function(e,r){t._errorPromiseReject=r})),this._errorPromise.catch(ld)}return e.prototype.start=function(e){var t=this;this._writableStreamController=e,this._underlyingWriter.closed.then((function(){t._state="closed"})).catch((function(e){return t._finishErroring(e)}))},e.prototype.write=function(e){var t=this,r=this._underlyingWriter;if(null===r.desiredSize)return r.ready;var i=r.write(e);i.catch((function(e){return t._finishErroring(e)})),r.ready.catch((function(e){return t._startErroring(e)}));var n=Promise.race([i,this._errorPromise]);return this._setPendingWrite(n),n},e.prototype.close=function(){var e=this;return void 0===this._pendingWrite?this._underlyingWriter.close():this._finishPendingWrite().then((function(){return e.close()}))},e.prototype.abort=function(e){if("errored"!==this._state)return this._underlyingWriter.abort(e)},e.prototype._setPendingWrite=function(e){var t,r=this,i=function(){r._pendingWrite===t&&(r._pendingWrite=void 0)};this._pendingWrite=t=e.then(i,i)},e.prototype._finishPendingWrite=function(){var e=this;if(void 0===this._pendingWrite)return Promise.resolve();var t=function(){return e._finishPendingWrite()};return this._pendingWrite.then(t,t)},e.prototype._startErroring=function(e){var t=this;if("writable"===this._state){this._state="erroring",this._storedError=e;var r=function(){return t._finishErroring(e)};void 0===this._pendingWrite?r():this._finishPendingWrite().then(r,r),this._writableStreamController.error(e)}},e.prototype._finishErroring=function(e){"writable"===this._state&&this._startErroring(e),"erroring"===this._state&&(this._state="errored",this._errorPromiseReject(this._storedError))},e}();function Md(e){dd(gd(e));var t=e.readable,r=e.writable;dd(!1===t.locked),dd(!1===r.locked);var i,n=t.getReader();try{i=r.getWriter()}catch(e){throw n.releaseLock(),e}return new Cd(n,i)}var Cd=function(){function e(e,t){var r=this;this._transformStreamController=void 0,this._onRead=function(e){if(!e.done)return r._transformStreamController.enqueue(e.value),r._reader.read().then(r._onRead)},this._onError=function(e){r._flushReject(e),r._transformStreamController.error(e),r._reader.cancel(e).catch(ld),r._writer.abort(e).catch(ld)},this._onTerminate=function(){r._flushResolve(),r._transformStreamController.terminate();var e=new TypeError("TransformStream terminated");r._writer.abort(e).catch(ld)},this._reader=e,this._writer=t,this._flushPromise=new Promise((function(e,t){r._flushResolve=e,r._flushReject=t}))}return e.prototype.start=function(e){this._transformStreamController=e,this._reader.read().then(this._onRead).then(this._onTerminate,this._onError);var t=this._reader.closed;t&&t.then(this._onTerminate,this._onError)},e.prototype.transform=function(e){return this._writer.write(e)},e.prototype.flush=function(){var e=this;return this._writer.close().then((function(){return e._flushPromise}))},e}(),Kd=/*#__PURE__*/Object.freeze({__proto__:null,createReadableStreamWrapper:function(e){dd(function(e){return!!yd(e)&&!!bd(new e)}(e));var t=function(e){try{return new e({type:"bytes"}),!0}catch(e){return!1}}(e);return function(r,i){var n=(void 0===i?{}:i).type;if("bytes"!==(n=_d(n))||t||(n=void 0),r.constructor===e&&("bytes"!==n||wd(r)))return r;if("bytes"===n){var a=vd(r,{type:n});return new e(a)}a=vd(r);return new e(a)}},createTransformStreamWrapper:function(e){return dd(function(e){return!!yd(e)&&!!gd(new e)}(e)),function(t){if(t.constructor===e)return t;var r=Md(t);return new e(r)}},createWrappingReadableSource:vd,createWrappingTransformer:Md,createWrappingWritableSink:Pd,createWritableStreamWrapper:function(e){return dd(function(e){return!!yd(e)&&!!md(new e)}(e)),function(t){if(t.constructor===e)return t;var r=Pd(t);return new e(r)}}}),Dd=bt((function(e){!function(e,t){function r(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{a=u.default.Buffer}catch(e){}function s(e,t,r){for(var i=0,n=Math.min(e.length,r),a=t;a<n;a++){var s=e.charCodeAt(a)-48;i<<=4,i|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return i}function o(e,t,r,i){for(var n=0,a=Math.min(e.length,r),s=t;s<a;s++){var o=e.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===i)for(n=e.length-1,a=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===i)for(n=0,a=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},n.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,n,a=0;for(r=e.length-6,i=0;r>=t;r-=6)n=s(e,r,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303,(a+=24)>=26&&(a-=26,i++);r+6!==t&&(n=s(e,t,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303),this.strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var a=e.length-r,s=a%i,c=Math.min(a,a-s)+r,u=0,h=r;h<c;h+=i)u=o(e,h,h+i,t),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=o(e,h,e.length,t),h=0;h<s;h++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},n.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,c=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var h=c>>>26,f=67108863&c,d=Math.min(u,t.length-1),l=Math.max(0,u-e.length+1);l<=d;l++){var p=u-l|0;h+=(s=(n=0|e.words[p])*(a=0|t.words[l])+f)/67108864|0,f=67108863&s}r.words[u]=0|f,c=0|h}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<n|a)).toString(16);i=0!==(a=o>>>24-n&16777215)||s!==this.length-1?c[6-u.length]+u+i:u+i,(n+=2)>=26&&(n-=26,s--)}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var d=h[e],l=f[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var y=p.modn(l).toString(e);i=(p=p.idivn(l)).isZero()?y+i:c[d-y.length]+y+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return r(void 0!==a),this.toArrayLike(a,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,c="le"===t,u=new e(a),h=this.clone();if(c){for(o=0;!h.isZero();o++)s=h.andln(255),h.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!h.isZero();o++)s=h.andln(255),h.iushrn(8),u[a-o-1]=s}return u},n.prototype._countBits=Math.clz32?function(e){return 32-Math.clz32(e)}:function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,a=0;a<i.length;a++)t=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&t,n=t>>>26;for(;0!==n&&a<r.length;a++)t=(0|r.words[a])+n,this.words[a]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var a=0,s=0;s<i.length;s++)a=(t=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<r.length;s++)a=(t=(0|r.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var l=function(e,t,r){var i,n,a,s=e.words,o=t.words,c=r.words,u=0,h=0|s[0],f=8191&h,d=h>>>13,l=0|s[1],p=8191&l,y=l>>>13,b=0|s[2],m=8191&b,g=b>>>13,w=0|s[3],v=8191&w,_=w>>>13,k=0|s[4],A=8191&k,S=k>>>13,E=0|s[5],P=8191&E,x=E>>>13,M=0|s[6],C=8191&M,K=M>>>13,D=0|s[7],R=8191&D,U=D>>>13,I=0|s[8],B=8191&I,T=I>>>13,z=0|s[9],q=8191&z,O=z>>>13,F=0|o[0],N=8191&F,j=F>>>13,L=0|o[1],W=8191&L,H=L>>>13,G=0|o[2],V=8191&G,$=G>>>13,Z=0|o[3],Y=8191&Z,X=Z>>>13,Q=0|o[4],J=8191&Q,ee=Q>>>13,te=0|o[5],re=8191&te,ie=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,he=0|o[8],fe=8191&he,de=he>>>13,le=0|o[9],pe=8191&le,ye=le>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(u+(i=Math.imul(f,N))|0)+((8191&(n=(n=Math.imul(f,j))+Math.imul(d,N)|0))<<13)|0;u=((a=Math.imul(d,j))+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(p,N),n=(n=Math.imul(p,j))+Math.imul(y,N)|0,a=Math.imul(y,j);var me=(u+(i=i+Math.imul(f,W)|0)|0)+((8191&(n=(n=n+Math.imul(f,H)|0)+Math.imul(d,W)|0))<<13)|0;u=((a=a+Math.imul(d,H)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(m,N),n=(n=Math.imul(m,j))+Math.imul(g,N)|0,a=Math.imul(g,j),i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,H)|0;var ge=(u+(i=i+Math.imul(f,V)|0)|0)+((8191&(n=(n=n+Math.imul(f,$)|0)+Math.imul(d,V)|0))<<13)|0;u=((a=a+Math.imul(d,$)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(v,N),n=(n=Math.imul(v,j))+Math.imul(_,N)|0,a=Math.imul(_,j),i=i+Math.imul(m,W)|0,n=(n=n+Math.imul(m,H)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,H)|0,i=i+Math.imul(p,V)|0,n=(n=n+Math.imul(p,$)|0)+Math.imul(y,V)|0,a=a+Math.imul(y,$)|0;var we=(u+(i=i+Math.imul(f,Y)|0)|0)+((8191&(n=(n=n+Math.imul(f,X)|0)+Math.imul(d,Y)|0))<<13)|0;u=((a=a+Math.imul(d,X)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(A,N),n=(n=Math.imul(A,j))+Math.imul(S,N)|0,a=Math.imul(S,j),i=i+Math.imul(v,W)|0,n=(n=n+Math.imul(v,H)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,H)|0,i=i+Math.imul(m,V)|0,n=(n=n+Math.imul(m,$)|0)+Math.imul(g,V)|0,a=a+Math.imul(g,$)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(y,Y)|0,a=a+Math.imul(y,X)|0;var ve=(u+(i=i+Math.imul(f,J)|0)|0)+((8191&(n=(n=n+Math.imul(f,ee)|0)+Math.imul(d,J)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(P,N),n=(n=Math.imul(P,j))+Math.imul(x,N)|0,a=Math.imul(x,j),i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,H)|0,i=i+Math.imul(v,V)|0,n=(n=n+Math.imul(v,$)|0)+Math.imul(_,V)|0,a=a+Math.imul(_,$)|0,i=i+Math.imul(m,Y)|0,n=(n=n+Math.imul(m,X)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,X)|0,i=i+Math.imul(p,J)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,ee)|0;var _e=(u+(i=i+Math.imul(f,re)|0)|0)+((8191&(n=(n=n+Math.imul(f,ie)|0)+Math.imul(d,re)|0))<<13)|0;u=((a=a+Math.imul(d,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(C,N),n=(n=Math.imul(C,j))+Math.imul(K,N)|0,a=Math.imul(K,j),i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,H)|0,i=i+Math.imul(A,V)|0,n=(n=n+Math.imul(A,$)|0)+Math.imul(S,V)|0,a=a+Math.imul(S,$)|0,i=i+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,X)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,X)|0,i=i+Math.imul(m,J)|0,n=(n=n+Math.imul(m,ee)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(y,re)|0,a=a+Math.imul(y,ie)|0;var ke=(u+(i=i+Math.imul(f,ae)|0)|0)+((8191&(n=(n=n+Math.imul(f,se)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,se)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(R,N),n=(n=Math.imul(R,j))+Math.imul(U,N)|0,a=Math.imul(U,j),i=i+Math.imul(C,W)|0,n=(n=n+Math.imul(C,H)|0)+Math.imul(K,W)|0,a=a+Math.imul(K,H)|0,i=i+Math.imul(P,V)|0,n=(n=n+Math.imul(P,$)|0)+Math.imul(x,V)|0,a=a+Math.imul(x,$)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,X)|0,i=i+Math.imul(v,J)|0,n=(n=n+Math.imul(v,ee)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,ee)|0,i=i+Math.imul(m,re)|0,n=(n=n+Math.imul(m,ie)|0)+Math.imul(g,re)|0,a=a+Math.imul(g,ie)|0,i=i+Math.imul(p,ae)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(y,ae)|0,a=a+Math.imul(y,se)|0;var Ae=(u+(i=i+Math.imul(f,ce)|0)|0)+((8191&(n=(n=n+Math.imul(f,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(B,N),n=(n=Math.imul(B,j))+Math.imul(T,N)|0,a=Math.imul(T,j),i=i+Math.imul(R,W)|0,n=(n=n+Math.imul(R,H)|0)+Math.imul(U,W)|0,a=a+Math.imul(U,H)|0,i=i+Math.imul(C,V)|0,n=(n=n+Math.imul(C,$)|0)+Math.imul(K,V)|0,a=a+Math.imul(K,$)|0,i=i+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,X)|0)+Math.imul(x,Y)|0,a=a+Math.imul(x,X)|0,i=i+Math.imul(A,J)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,ee)|0,i=i+Math.imul(v,re)|0,n=(n=n+Math.imul(v,ie)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ie)|0,i=i+Math.imul(m,ae)|0,n=(n=n+Math.imul(m,se)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,se)|0,i=i+Math.imul(p,ce)|0,n=(n=n+Math.imul(p,ue)|0)+Math.imul(y,ce)|0,a=a+Math.imul(y,ue)|0;var Se=(u+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(q,N),n=(n=Math.imul(q,j))+Math.imul(O,N)|0,a=Math.imul(O,j),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(R,V)|0,n=(n=n+Math.imul(R,$)|0)+Math.imul(U,V)|0,a=a+Math.imul(U,$)|0,i=i+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,X)|0)+Math.imul(K,Y)|0,a=a+Math.imul(K,X)|0,i=i+Math.imul(P,J)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,ee)|0,i=i+Math.imul(A,re)|0,n=(n=n+Math.imul(A,ie)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(v,ae)|0,n=(n=n+Math.imul(v,se)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,se)|0,i=i+Math.imul(m,ce)|0,n=(n=n+Math.imul(m,ue)|0)+Math.imul(g,ce)|0,a=a+Math.imul(g,ue)|0,i=i+Math.imul(p,fe)|0,n=(n=n+Math.imul(p,de)|0)+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0;var Ee=(u+(i=i+Math.imul(f,pe)|0)|0)+((8191&(n=(n=n+Math.imul(f,ye)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,ye)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(q,W),n=(n=Math.imul(q,H))+Math.imul(O,W)|0,a=Math.imul(O,H),i=i+Math.imul(B,V)|0,n=(n=n+Math.imul(B,$)|0)+Math.imul(T,V)|0,a=a+Math.imul(T,$)|0,i=i+Math.imul(R,Y)|0,n=(n=n+Math.imul(R,X)|0)+Math.imul(U,Y)|0,a=a+Math.imul(U,X)|0,i=i+Math.imul(C,J)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(K,J)|0,a=a+Math.imul(K,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ie)|0,i=i+Math.imul(A,ae)|0,n=(n=n+Math.imul(A,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,i=i+Math.imul(v,ce)|0,n=(n=n+Math.imul(v,ue)|0)+Math.imul(_,ce)|0,a=a+Math.imul(_,ue)|0,i=i+Math.imul(m,fe)|0,n=(n=n+Math.imul(m,de)|0)+Math.imul(g,fe)|0,a=a+Math.imul(g,de)|0;var Pe=(u+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;u=((a=a+Math.imul(y,ye)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul(q,V),n=(n=Math.imul(q,$))+Math.imul(O,V)|0,a=Math.imul(O,$),i=i+Math.imul(B,Y)|0,n=(n=n+Math.imul(B,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(R,J)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(U,J)|0,a=a+Math.imul(U,ee)|0,i=i+Math.imul(C,re)|0,n=(n=n+Math.imul(C,ie)|0)+Math.imul(K,re)|0,a=a+Math.imul(K,ie)|0,i=i+Math.imul(P,ae)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,se)|0,i=i+Math.imul(A,ce)|0,n=(n=n+Math.imul(A,ue)|0)+Math.imul(S,ce)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(v,fe)|0,n=(n=n+Math.imul(v,de)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,de)|0;var xe=(u+(i=i+Math.imul(m,pe)|0)|0)+((8191&(n=(n=n+Math.imul(m,ye)|0)+Math.imul(g,pe)|0))<<13)|0;u=((a=a+Math.imul(g,ye)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(q,Y),n=(n=Math.imul(q,X))+Math.imul(O,Y)|0,a=Math.imul(O,X),i=i+Math.imul(B,J)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,ee)|0,i=i+Math.imul(R,re)|0,n=(n=n+Math.imul(R,ie)|0)+Math.imul(U,re)|0,a=a+Math.imul(U,ie)|0,i=i+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(K,ae)|0,a=a+Math.imul(K,se)|0,i=i+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,ue)|0)+Math.imul(x,ce)|0,a=a+Math.imul(x,ue)|0,i=i+Math.imul(A,fe)|0,n=(n=n+Math.imul(A,de)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,de)|0;var Me=(u+(i=i+Math.imul(v,pe)|0)|0)+((8191&(n=(n=n+Math.imul(v,ye)|0)+Math.imul(_,pe)|0))<<13)|0;u=((a=a+Math.imul(_,ye)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(q,J),n=(n=Math.imul(q,ee))+Math.imul(O,J)|0,a=Math.imul(O,ee),i=i+Math.imul(B,re)|0,n=(n=n+Math.imul(B,ie)|0)+Math.imul(T,re)|0,a=a+Math.imul(T,ie)|0,i=i+Math.imul(R,ae)|0,n=(n=n+Math.imul(R,se)|0)+Math.imul(U,ae)|0,a=a+Math.imul(U,se)|0,i=i+Math.imul(C,ce)|0,n=(n=n+Math.imul(C,ue)|0)+Math.imul(K,ce)|0,a=a+Math.imul(K,ue)|0,i=i+Math.imul(P,fe)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,de)|0;var Ce=(u+(i=i+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,ye)|0)+Math.imul(S,pe)|0))<<13)|0;u=((a=a+Math.imul(S,ye)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(q,re),n=(n=Math.imul(q,ie))+Math.imul(O,re)|0,a=Math.imul(O,ie),i=i+Math.imul(B,ae)|0,n=(n=n+Math.imul(B,se)|0)+Math.imul(T,ae)|0,a=a+Math.imul(T,se)|0,i=i+Math.imul(R,ce)|0,n=(n=n+Math.imul(R,ue)|0)+Math.imul(U,ce)|0,a=a+Math.imul(U,ue)|0,i=i+Math.imul(C,fe)|0,n=(n=n+Math.imul(C,de)|0)+Math.imul(K,fe)|0,a=a+Math.imul(K,de)|0;var Ke=(u+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,ye)|0)+Math.imul(x,pe)|0))<<13)|0;u=((a=a+Math.imul(x,ye)|0)+(n>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,i=Math.imul(q,ae),n=(n=Math.imul(q,se))+Math.imul(O,ae)|0,a=Math.imul(O,se),i=i+Math.imul(B,ce)|0,n=(n=n+Math.imul(B,ue)|0)+Math.imul(T,ce)|0,a=a+Math.imul(T,ue)|0,i=i+Math.imul(R,fe)|0,n=(n=n+Math.imul(R,de)|0)+Math.imul(U,fe)|0,a=a+Math.imul(U,de)|0;var De=(u+(i=i+Math.imul(C,pe)|0)|0)+((8191&(n=(n=n+Math.imul(C,ye)|0)+Math.imul(K,pe)|0))<<13)|0;u=((a=a+Math.imul(K,ye)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(q,ce),n=(n=Math.imul(q,ue))+Math.imul(O,ce)|0,a=Math.imul(O,ue),i=i+Math.imul(B,fe)|0,n=(n=n+Math.imul(B,de)|0)+Math.imul(T,fe)|0,a=a+Math.imul(T,de)|0;var Re=(u+(i=i+Math.imul(R,pe)|0)|0)+((8191&(n=(n=n+Math.imul(R,ye)|0)+Math.imul(U,pe)|0))<<13)|0;u=((a=a+Math.imul(U,ye)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul(q,fe),n=(n=Math.imul(q,de))+Math.imul(O,fe)|0,a=Math.imul(O,de);var Ue=(u+(i=i+Math.imul(B,pe)|0)|0)+((8191&(n=(n=n+Math.imul(B,ye)|0)+Math.imul(T,pe)|0))<<13)|0;u=((a=a+Math.imul(T,ye)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863;var Ie=(u+(i=Math.imul(q,pe))|0)+((8191&(n=(n=Math.imul(q,ye))+Math.imul(O,pe)|0))<<13)|0;return u=((a=Math.imul(O,ye))+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c[0]=be,c[1]=me,c[2]=ge,c[3]=we,c[4]=ve,c[5]=_e,c[6]=ke,c[7]=Ae,c[8]=Se,c[9]=Ee,c[10]=Pe,c[11]=xe,c[12]=Me,c[13]=Ce,c[14]=Ke,c[15]=De,c[16]=Re,c[17]=Ue,c[18]=Ie,0!==u&&(c[19]=u,r.length++),r};function p(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(l=d),n.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?l(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,c=Math.min(a,t.length-1),u=Math.max(0,a-e.length+1);u<=c;u++){var h=a-u,f=(0|e.words[h])*(0|t.words[u]),d=67108863&f;o=67108863&(d=d+o|0),n+=(s=(s=s+(f/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,e,t):p(this,e,t)},y.prototype.makeRBT=function(e){for(var t=Array(e),r=n.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},y.prototype.permute=function(e,t,r,i,n,a){for(var s=0;s<a;s++)i[s]=t[e[s]],n[s]=r[e[s]]},y.prototype.transform=function(e,t,r,i,n,a){this.permute(a,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,c=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),h=0;h<n;h+=o)for(var f=c,d=u,l=0;l<s;l++){var p=r[h+l],y=i[h+l],b=r[h+l+s],m=i[h+l+s],g=f*b-d*m;m=f*m+d*b,b=g,r[h+l]=p+b,i[h+l]=y+m,r[h+l+s]=p-b,i[h+l+s]=y-m,l!==o&&(g=c*f-u*d,d=c*d+u*f,f=g)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},y.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},y.prototype.convert13b=function(e,t,i,n){for(var a=0,s=0;s<t;s++)a+=0|e[s],i[2*s]=8191&a,a>>>=13,i[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<n;++s)i[s]=0;r(0===a),r(0==(-8192&a))},y.prototype.stub=function(e){for(var t=Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),a=this.stub(i),s=Array(i),o=Array(i),c=Array(i),u=Array(i),h=Array(i),f=Array(i),d=r.words;d.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,u,i),this.transform(s,a,o,c,i,n),this.transform(u,a,h,f,i,n);for(var l=0;l<i;l++){var p=o[l]*h[l]-c[l]*f[l];c[l]=o[l]*f[l]+c[l]*h[l],o[l]=p}return this.conjugate(o,c,i),this.transform(o,c,d,a,i,n),this.conjugate(d,a,i),this.normalize13b(d,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,a=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=a>>>26,this.words[i]=67108863&a}return 0!==t&&(this.words[i]=t,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var a=r.sqr();i<t.length;i++,a=a.sqr())0!==t[i]&&(r=r.mul(a));return r},n.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,c=(0|this.words[t])-o<<i;this.words[t]=c|s,s=o>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,c=i;if(n=Math.max(0,n-=s),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var h=0;for(u=this.length-1;u>=0&&(0!==h||u>=n);u--){var f=0|this.words[u];this.words[u]=h<<26-a|f>>>a,h=f&o}return c&&0!==h&&(c.words[c.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i)&&!!(this.words[i]&n)},n.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,i){var n,a,s=e.length+i;this._expand(s);var o=0;for(n=0;n<e.length;n++){a=(0|this.words[n+i])+o;var c=(0|e.words[n])*t;o=((a-=67108863&c)>>26)-(c/67108864|0),this.words[n+i]=67108863&a}for(;n<this.length-i;n++)o=(a=(0|this.words[n+i])+o)>>26,this.words[n+i]=67108863&a;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),a=e,s=0|a.words[a.length-1];0!==(r=26-this._countBits(s))&&(a=a.ushln(r),i.iushln(r),s=0|a.words[a.length-1]);var o,c=i.length-a.length;if("mod"!==t){(o=new n(null)).length=c+1,o.words=Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var h=i.clone()._ishlnsubmul(a,1,c);0===h.negative&&(i=h,o&&(o.words[c]=1));for(var f=c-1;f>=0;f--){var d=67108864*(0|i.words[a.length+f])+(0|i.words[a.length+f-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(a,d,f);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(a,1,f),i.isZero()||(i.negative^=1);o&&(o.words[f]=d)}return o&&o.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},n.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:a,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,s,o},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},n.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new n(1),s=new n(0),o=new n(0),c=new n(1),u=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++u;for(var h=i.clone(),f=t.clone();!t.isZero();){for(var d=0,l=1;0==(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(h),s.isub(f)),a.iushrn(1),s.iushrn(1);for(var p=0,y=1;0==(i.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(h),c.isub(f)),o.iushrn(1),c.iushrn(1);t.cmp(i)>=0?(t.isub(i),a.isub(o),s.isub(c)):(i.isub(t),o.isub(a),c.isub(s))}return{a:o,b:c,gcd:i.iushln(u)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,s=new n(1),o=new n(0),c=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,h=1;0==(t.words[0]&h)&&u<26;++u,h<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var f=0,d=1;0==(i.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(i.iushrn(f);f-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s))}return(a=0===t.cmpn(1)?s:o).cmpn(0)<0&&a.iadd(e),a},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var a=t;t=r,r=a}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var a=n,s=i;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new k(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new n(null);return e.words=Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(g,m),g.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,e.words[n-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,m),i(v,m),i(_,m),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new w;else if("p192"===e)t=new v;else{if("p25519"!==e)throw Error("Unknown prime "+e);t=new _}return b[e]=t,t},k.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new n(1)).iushrn(2);return this.pow(e,i)}for(var a=this.m.subn(1),s=0;!a.isZero()&&0===a.andln(1);)s++,a.iushrn(1);r(!a.isZero());var o=new n(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new n(2*h*h).toRed(this);0!==this.pow(h,u).cmp(c);)h.redIAdd(c);for(var f=this.pow(h,a),d=this.pow(e,a.addn(1).iushrn(1)),l=this.pow(e,a),p=s;0!==l.cmp(o);){for(var y=l,b=0;0!==y.cmp(o);b++)y=y.redSqr();r(b<p);var m=this.pow(f,new n(1).iushln(p-b-1));d=d.redMul(m),f=m.redSqr(),l=l.redMul(f),p=b}return d},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var a=r[0],s=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var u=t.words[i],h=c-1;h>=0;h--){var f=u>>h&1;a!==r[0]&&(a=this.sqr(a)),0!==f||0!==s?(s<<=1,s|=f,(4===++o||0===i&&0===h)&&(a=this.mul(a,r[s]),o=0,s=0)):o=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new A(e)},i(A,k),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(i).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,yt)})),Rd=/*#__PURE__*/Object.freeze({__proto__:null,default:Dd,__moduleExports:Dd});class Ud{constructor(e){if(void 0===e)throw Error("Invalid BigInteger input");this.value=new Dd(e)}clone(){const e=new Ud(null);return this.value.copy(e.value),e}iinc(){return this.value.iadd(new Dd(1)),this}inc(){return this.clone().iinc()}idec(){return this.value.isub(new Dd(1)),this}dec(){return this.clone().idec()}iadd(e){return this.value.iadd(e.value),this}add(e){return this.clone().iadd(e)}isub(e){return this.value.isub(e.value),this}sub(e){return this.clone().isub(e)}imul(e){return this.value.imul(e.value),this}mul(e){return this.clone().imul(e)}imod(e){return this.value=this.value.umod(e.value),this}mod(e){return this.clone().imod(e)}modExp(e,t){const r=t.isEven()?Dd.red(t.value):Dd.mont(t.value),i=this.clone();return i.value=i.value.toRed(r).redPow(e.value).fromRed(),i}modInv(e){if(!this.gcd(e).isOne())throw Error("Inverse does not exist");return new Ud(this.value.invm(e.value))}gcd(e){return new Ud(this.value.gcd(e.value))}ileftShift(e){return this.value.ishln(e.value.toNumber()),this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value.ishrn(e.value.toNumber()),this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value.eq(e.value)}lt(e){return this.value.lt(e.value)}lte(e){return this.value.lte(e.value)}gt(e){return this.value.gt(e.value)}gte(e){return this.value.gte(e.value)}isZero(){return this.value.isZero()}isOne(){return this.value.eq(new Dd(1))}isNegative(){return this.value.isNeg()}isEven(){return this.value.isEven()}abs(){const e=this.clone();return e.value=e.value.abs(),e}toString(){return this.value.toString()}toNumber(){return this.value.toNumber()}getBit(e){return this.value.testn(e)?1:0}bitLength(){return this.value.bitLength()}byteLength(){return this.value.byteLength()}toUint8Array(e="be",t){return this.value.toArrayLike(Uint8Array,e,t)}}var Id,Bd=/*#__PURE__*/Object.freeze({__proto__:null,default:Ud}),Td=bt((function(e,t){var r=t;function i(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(i=0;i<e.length;i++){var n=e.charCodeAt(i),a=n>>8,s=255&n;a?r.push(a,s):r.push(s)}return r},r.zero2=i,r.toHex=n,r.encode=function(e,t){return"hex"===t?n(e):e}})),zd=bt((function(e,t){var r=t;r.assert=lt,r.toArray=Td.toArray,r.zero2=Td.zero2,r.toHex=Td.toHex,r.encode=Td.encode,r.getNAF=function(e,t){for(var r=[],i=1<<t+1,n=e.clone();n.cmpn(1)>=0;){var a;if(n.isOdd()){var s=n.andln(i-1);a=s>(i>>1)-1?(i>>1)-s:s,n.isubn(a)}else a=0;r.push(a);for(var o=0!==n.cmpn(0)&&0===n.andln(i-1)?t+1:1,c=1;c<o;c++)r.push(0);n.iushrn(o)}return r},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i=0,n=0;e.cmpn(-i)>0||t.cmpn(-n)>0;){var a,s,o,c=e.andln(3)+i&3,u=t.andln(3)+n&3;if(3===c&&(c=-1),3===u&&(u=-1),0==(1&c))a=0;else a=3!==(o=e.andln(7)+i&7)&&5!==o||2!==u?c:-c;if(r[0].push(a),0==(1&u))s=0;else s=3!==(o=t.andln(7)+n&7)&&5!==o||2!==c?u:-u;r[1].push(s),2*i===a+1&&(i=1-i),2*n===s+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new Dd(e,"hex","le")}})),qd=function(e){return Id||(Id=new Od(null)),Id.generate(e)};function Od(e){this.rand=e}var Fd=Od;if(Od.prototype.generate=function(e){return this._rand(e)},Od.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?Od.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?Od.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(Od.prototype._rand=function(){throw Error("Not implemented yet")});else try{var Nd=f.default;if("function"!=typeof Nd.randomBytes)throw Error("Not supported");Od.prototype._rand=function(e){return Nd.randomBytes(e)}}catch(e){}qd.Rand=Fd;var jd=zd.getNAF,Ld=zd.getJSF,Wd=zd.assert;function Hd(e,t){this.type=e,this.p=new Dd(t.p,16),this.red=t.prime?Dd.red(t.prime):Dd.mont(this.p),this.zero=new Dd(0).toRed(this.red),this.one=new Dd(1).toRed(this.red),this.two=new Dd(2).toRed(this.red),this.n=t.n&&new Dd(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,];var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Gd=Hd;function Vd(e,t){this.curve=e,this.type=t,this.precomputed=null}Hd.prototype.point=function(){throw Error("Not implemented")},Hd.prototype.validate=function(){throw Error("Not implemented")},Hd.prototype._fixedNafMul=function(e,t){Wd(e.precomputed);var r=e._getDoubles(),i=jd(t,1),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;for(var a=[],s=0;s<i.length;s+=r.step){var o=0;for(t=s+r.step-1;t>=s;t--)o=(o<<1)+i[t];a.push(o)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),h=n;h>0;h--){for(s=0;s<a.length;s++){(o=a[s])===h?u=u.mixedAdd(r.points[s]):o===-h&&(u=u.mixedAdd(r.points[s].neg()))}c=c.add(u)}return c.toP()},Hd.prototype._wnafMul=function(e,t){var r=4,i=e._getNAFPoints(r);r=i.wnd;for(var n=i.points,a=jd(t,r),s=this.jpoint(null,null,null),o=a.length-1;o>=0;o--){for(t=0;o>=0&&0===a[o];o--)t++;if(o>=0&&t++,s=s.dblp(t),o<0)break;var c=a[o];Wd(0!==c),s="affine"===e.type?c>0?s.mixedAdd(n[c-1>>1]):s.mixedAdd(n[-c-1>>1].neg()):c>0?s.add(n[c-1>>1]):s.add(n[-c-1>>1].neg())}return"affine"===e.type?s.toP():s},Hd.prototype._wnafMulAdd=function(e,t,r,i,n){for(var a=this._wnafT1,s=this._wnafT2,o=this._wnafT3,c=0,u=0;u<i;u++){var h=(A=t[u])._getNAFPoints(e);a[u]=h.wnd,s[u]=h.points}for(u=i-1;u>=1;u-=2){var f=u-1,d=u;if(1===a[f]&&1===a[d]){var l=[t[f],null,null,t[d]];0===t[f].y.cmp(t[d].y)?(l[1]=t[f].add(t[d]),l[2]=t[f].toJ().mixedAdd(t[d].neg())):0===t[f].y.cmp(t[d].y.redNeg())?(l[1]=t[f].toJ().mixedAdd(t[d]),l[2]=t[f].add(t[d].neg())):(l[1]=t[f].toJ().mixedAdd(t[d]),l[2]=t[f].toJ().mixedAdd(t[d].neg()));var p=[-3,-1,-5,-7,0,7,5,1,3],y=Ld(r[f],r[d]);c=Math.max(y[0].length,c),o[f]=Array(c),o[d]=Array(c);for(var b=0;b<c;b++){var m=0|y[0][b],g=0|y[1][b];o[f][b]=p[3*(m+1)+(g+1)],o[d][b]=0,s[f]=l}}else o[f]=jd(r[f],a[f]),o[d]=jd(r[d],a[d]),c=Math.max(o[f].length,c),c=Math.max(o[d].length,c)}var w=this.jpoint(null,null,null),v=this._wnafT4;for(u=c;u>=0;u--){for(var _=0;u>=0;){var k=!0;for(b=0;b<i;b++)v[b]=0|o[b][u],0!==v[b]&&(k=!1);if(!k)break;_++,u--}if(u>=0&&_++,w=w.dblp(_),u<0)break;for(b=0;b<i;b++){var A,S=v[b];0!==S&&(S>0?A=s[b][S-1>>1]:S<0&&(A=s[b][-S-1>>1].neg()),w="affine"===A.type?w.mixedAdd(A):w.add(A))}}for(u=0;u<i;u++)s[u]=null;return n?w:w.toP()},Hd.BasePoint=Vd,Vd.prototype.eq=function(){throw Error("Not implemented")},Vd.prototype.validate=function(){return this.curve.validate(this)},Hd.prototype.decodePoint=function(e,t){e=zd.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?Wd(e[e.length-1]%2==0):7===e[0]&&Wd(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw Error("Unknown point format")},Vd.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Vd.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},Vd.prototype.encode=function(e,t){return zd.encode(this._encode(t),e)},Vd.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Vd.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Vd.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<t;n+=e){for(var a=0;a<e;a++)i=i.dbl();r.push(i)}return{step:e,points:r}},Vd.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}},Vd.prototype._getBeta=function(){return null},Vd.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var $d=zd.assert;function Zd(e){Gd.call(this,"short",e),this.a=new Dd(e.a,16).toRed(this.red),this.b=new Dd(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}gt(Zd,Gd);var Yd=Zd;function Xd(e,t,r,i){Gd.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new Dd(t,16),this.y=new Dd(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Qd(e,t,r,i){Gd.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Dd(0)):(this.x=new Dd(t,16),this.y=new Dd(r,16),this.z=new Dd(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}function Jd(e){Gd.call(this,"mont",e),this.a=new Dd(e.a,16).toRed(this.red),this.b=new Dd(e.b,16).toRed(this.red),this.i4=new Dd(4).toRed(this.red).redInvm(),this.two=new Dd(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Zd.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new Dd(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)r=new Dd(e.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))?r=n[0]:(r=n[1],$d(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new Dd(e.a,16),b:new Dd(e.b,16)}})):this._getEndoBasis(r)}}},Zd.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:Dd.mont(e),r=new Dd(2).toRed(t).redInvm(),i=r.redNeg(),n=new Dd(3).toRed(t).redNeg().redSqrt().redMul(r);return[i.redAdd(n).fromRed(),i.redSub(n).fromRed()]},Zd.prototype._getEndoBasis=function(e){for(var t,r,i,n,a,s,o,c,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,d=this.n.clone(),l=new Dd(1),p=new Dd(0),y=new Dd(0),b=new Dd(1),m=0;0!==f.cmpn(0);){var g=d.div(f);c=d.sub(g.mul(f)),u=y.sub(g.mul(l));var w=b.sub(g.mul(p));if(!i&&c.cmp(h)<0)t=o.neg(),r=l,i=c.neg(),n=u;else if(i&&2==++m)break;o=c,d=f,f=c,y=l,l=u,b=p,p=w}a=c.neg(),s=u;var v=i.sqr().add(n.sqr());return a.sqr().add(s.sqr()).cmp(v)>=0&&(a=t,s=r),i.negative&&(i=i.neg(),n=n.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:i,b:n},{a,b:s}]},Zd.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),s=n.mul(r.a),o=a.mul(i.a),c=n.mul(r.b),u=a.mul(i.b);return{k1:e.sub(s).sub(o),k2:c.add(u).neg()}},Zd.prototype.pointFromX=function(e,t){(e=new Dd(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw Error("invalid point");var n=i.fromRed().isOdd();return(t&&!n||!t&&n)&&(i=i.redNeg()),this.point(e,i)},Zd.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},Zd.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,a=0;a<e.length;a++){var s=this._endoSplit(t[a]),o=e[a],c=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),i[2*a]=o,i[2*a+1]=c,n[2*a]=s.k1,n[2*a+1]=s.k2}for(var u=this._wnafMulAdd(1,i,n,2*a,r),h=0;h<2*a;h++)i[h]=null,n[h]=null;return u},gt(Xd,Gd.BasePoint),Zd.prototype.point=function(e,t,r){return new Xd(this,e,t,r)},Zd.prototype.pointFromJSON=function(e,t){return Xd.fromJSON(this,e,t)},Xd.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t}},Xd.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Xd.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var i=e.point(t[0],t[1],r);if(!t[2])return i;function n(t){return e.point(t[0],t[1],r)}var a=t[2];return i.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[i].concat(a.doubles.points.map(n))},naf:a.naf&&{wnd:a.naf.wnd,points:[i].concat(a.naf.points.map(n))}},i},Xd.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Xd.prototype.isInfinity=function(){return this.inf},Xd.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},Xd.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},Xd.prototype.getX=function(){return this.x.fromRed()},Xd.prototype.getY=function(){return this.y.fromRed()},Xd.prototype.mul=function(e){return e=new Dd(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Xd.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},Xd.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},Xd.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Xd.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},Xd.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},gt(Qd,Gd.BasePoint),Zd.prototype.jpoint=function(e,t,r){return new Qd(this,e,t,r)},Qd.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},Qd.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Qd.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),o=i.redSub(n),c=a.redSub(s);if(0===o.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),h=u.redMul(o),f=i.redMul(u),d=c.redSqr().redIAdd(h).redISub(f).redISub(f),l=c.redMul(f.redISub(d)).redISub(a.redMul(h)),p=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(d,l,p)},Qd.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),s=r.redSub(i),o=n.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),h=r.redMul(c),f=o.redSqr().redIAdd(u).redISub(h).redISub(h),d=o.redMul(h.redISub(f)).redISub(n.redMul(u)),l=this.z.redMul(s);return this.curve.jpoint(f,d,l)},Qd.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}var i=this.curve.a,n=this.curve.tinv,a=this.x,s=this.y,o=this.z,c=o.redSqr().redSqr(),u=s.redAdd(s);for(r=0;r<e;r++){var h=a.redSqr(),f=u.redSqr(),d=f.redSqr(),l=h.redAdd(h).redIAdd(h).redIAdd(i.redMul(c)),p=a.redMul(f),y=l.redSqr().redISub(p.redAdd(p)),b=p.redISub(y),m=l.redMul(b);m=m.redIAdd(m).redISub(d);var g=u.redMul(o);r+1<e&&(c=c.redMul(d)),a=y,o=g,u=m}return this.curve.jpoint(a,u.redMul(n),o)},Qd.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Qd.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var o=i.redAdd(i).redIAdd(i),c=o.redSqr().redISub(s).redISub(s),u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=o.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),f=this.y.redSqr(),d=f.redSqr(),l=this.x.redAdd(f).redSqr().redISub(h).redISub(d);l=l.redIAdd(l);var p=h.redAdd(h).redIAdd(h),y=p.redSqr(),b=d.redIAdd(d);b=(b=b.redIAdd(b)).redIAdd(b),e=y.redISub(l).redISub(l),t=p.redMul(l.redISub(e)).redISub(b),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},Qd.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var o=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),c=o.redSqr().redISub(s).redISub(s);e=c;var u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),t=o.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),f=this.y.redSqr(),d=this.x.redMul(f),l=this.x.redSub(h).redMul(this.x.redAdd(h));l=l.redAdd(l).redIAdd(l);var p=d.redIAdd(d),y=(p=p.redIAdd(p)).redAdd(p);e=l.redSqr().redISub(y),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(h);var b=f.redSqr();b=(b=(b=b.redIAdd(b)).redIAdd(b)).redIAdd(b),t=l.redMul(p.redISub(e)).redISub(b)}return this.curve.jpoint(e,t,r)},Qd.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),a=t.redSqr(),s=r.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(n)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(s),h=o.redSqr().redISub(u.redAdd(u)),f=u.redISub(h),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=o.redMul(f).redISub(d),p=r.redAdd(r).redMul(i);return this.curve.jpoint(h,l,p)},Qd.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),n=e.redAdd(e).redIAdd(e),a=n.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(i),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),c=i.redIAdd(i);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=n.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(c),h=t.redMul(u);h=(h=h.redIAdd(h)).redIAdd(h);var f=this.x.redMul(o).redISub(h);f=(f=f.redIAdd(f)).redIAdd(f);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(o)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=this.z.redAdd(s).redSqr().redISub(r).redISub(o);return this.curve.jpoint(f,d,l)},Qd.prototype.mul=function(e,t){return e=new Dd(e,t),this.curve._wnafMul(this,e)},Qd.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var i=t.redMul(this.z),n=r.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)},Qd.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},Qd.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Qd.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},gt(Jd,Gd);var el=Jd;function tl(e,t,r){Gd.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Dd(t,16),this.z=new Dd(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Jd.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},gt(tl,Gd.BasePoint),Jd.prototype.decodePoint=function(e,t){if(33===(e=zd.toArray(e,t)).length&&64===e[0]&&(e=e.slice(1,33).reverse()),32!==e.length)throw Error("Unknown point compression format");return this.point(e,1)},Jd.prototype.point=function(e,t){return new tl(this,e,t)},Jd.prototype.pointFromJSON=function(e){return tl.fromJSON(this,e)},tl.prototype.precompute=function(){},tl.prototype._encode=function(e){var t=this.curve.p.byteLength();return e?[64].concat(this.getX().toArray("le",t)):this.getX().toArray("be",t)},tl.fromJSON=function(e,t){return new tl(e,t[0],t[1]||e.one)},tl.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},tl.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},tl.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),i=e.redMul(t),n=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},tl.prototype.add=function(){throw Error("Not supported on Montgomery curve")},tl.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),s=n.redMul(i),o=t.z.redMul(a.redAdd(s).redSqr()),c=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,c)},tl.prototype.mul=function(e){for(var t=(e=new Dd(e,16)).clone(),r=this,i=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},tl.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},tl.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},tl.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},tl.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},tl.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var rl=zd.assert;function il(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,Gd.call(this,"edwards",e),this.a=new Dd(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Dd(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Dd(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),rl(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}gt(il,Gd);var nl=il;function al(e,t,r,i,n){Gd.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Dd(t,16),this.y=new Dd(r,16),this.z=i?new Dd(i,16):this.curve.one,this.t=n&&new Dd(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}il.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},il.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},il.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},il.prototype.pointFromX=function(e,t){(e=new Dd(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),n=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(n.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw Error("invalid point");var o=s.fromRed().isOdd();return(t&&!o||!t&&o)&&(s=s.redNeg()),this.point(e,s)},il.prototype.pointFromY=function(e,t){(e=new Dd(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),n=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(n.redInvm());if(0===a.cmp(this.zero)){if(t)throw Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},il.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),i=t.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===i.cmp(n)},gt(al,Gd.BasePoint),il.prototype.pointFromJSON=function(e){return al.fromJSON(this,e)},il.prototype.point=function(e,t,r,i){return new al(this,e,t,r,i)},al.fromJSON=function(e,t){return new al(e,t[0],t[1],t[2])},al.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},al.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},al.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=i.redAdd(t),s=a.redSub(r),o=i.redSub(t),c=n.redMul(s),u=a.redMul(o),h=n.redMul(o),f=s.redMul(a);return this.curve.point(c,u,f,h)},al.prototype._projDbl=function(){var e,t,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var s=(u=this.curve._mulA(n)).redAdd(a);if(this.zOne)e=i.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(u.redSub(a)),r=s.redSqr().redSub(s).redSub(s);else{var o=this.z.redSqr(),c=s.redSub(o).redISub(o);e=i.redSub(n).redISub(a).redMul(c),t=s.redMul(u.redSub(a)),r=s.redMul(c)}}else{var u=n.redAdd(a);o=this.curve._mulC(this.z).redSqr(),c=u.redSub(o).redSub(o);e=this.curve._mulC(i.redISub(u)).redMul(c),t=this.curve._mulC(u).redMul(n.redISub(a)),r=u.redMul(c)}return this.curve.point(e,t,r)},al.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},al.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),s=n.redSub(i),o=n.redAdd(i),c=r.redAdd(t),u=a.redMul(s),h=o.redMul(c),f=a.redMul(c),d=s.redMul(o);return this.curve.point(u,h,d,f)},al.prototype._projAdd=function(e){var t,r,i=this.z.redMul(e.z),n=i.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),c=n.redSub(o),u=n.redAdd(o),h=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),f=i.redMul(c).redMul(h);return this.curve.twisted?(t=i.redMul(u).redMul(s.redSub(this.curve._mulA(a))),r=c.redMul(u)):(t=i.redMul(u).redMul(s.redSub(a)),r=this.curve._mulC(c).redMul(u)),this.curve.point(f,t,r)},al.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},al.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},al.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},al.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},al.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},al.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},al.prototype.getX=function(){return this.normalize(),this.x.fromRed()},al.prototype.getY=function(){return this.normalize(),this.y.fromRed()},al.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},al.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},al.prototype.toP=al.prototype.normalize,al.prototype.mixedAdd=al.prototype.add;var sl=bt((function(e,t){var r=t;r.base=Gd,r.short=Yd,r.mont=el,r.edwards=nl})),ol=kt.rotl32,cl=kt.sum32,ul=kt.sum32_5,hl=Kt.ft_1,fl=Et.BlockHash,dl=[1518500249,1859775393,2400959708,3395469782];function ll(){if(!(this instanceof ll))return new ll;fl.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}kt.inherits(ll,fl);var pl=ll;ll.blockSize=512,ll.outSize=160,ll.hmacStrength=80,ll.padLength=64,ll.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=ol(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],a=this.h[1],s=this.h[2],o=this.h[3],c=this.h[4];for(i=0;i<r.length;i++){var u=~~(i/20),h=ul(ol(n,5),hl(u,a,s,o),c,r[i],dl[u]);c=o,o=s,s=ol(a,30),a=n,n=h}this.h[0]=cl(this.h[0],n),this.h[1]=cl(this.h[1],a),this.h[2]=cl(this.h[2],s),this.h[3]=cl(this.h[3],o),this.h[4]=cl(this.h[4],c)},ll.prototype._digest=function(e){return"hex"===e?kt.toHex32(this.h,"big"):kt.split32(this.h,"big")};var yl={sha1:pl,sha224:Ht,sha256:Lt,sha384:vr,sha512:sr};function bl(e,t,r){if(!(this instanceof bl))return new bl(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(kt.toArray(t,r))}var ml=bl;bl.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),lt(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},bl.prototype.update=function(e,t){return this.inner.update(e,t),this},bl.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};var gl=bt((function(e,t){var r=t;r.utils=kt,r.common=Et,r.sha=yl,r.ripemd=Br,r.hmac=ml,r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160})),wl={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}},vl=bt((function(e,t){var r,i=t,n=zd.assert;function a(e){if("short"===e.type)this.curve=new sl.short(e);else if("edwards"===e.type)this.curve=new sl.edwards(e);else{if("mont"!==e.type)throw Error("Unknown curve type.");this.curve=new sl.mont(e)}this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, n*G != O")}function s(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=a,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:gl.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:gl.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:gl.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:gl.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:gl.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",cofactor:"8",hash:gl.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",cofactor:"8",hash:gl.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]}),s("brainpoolP256r1",{type:"short",prime:null,p:"A9FB57DB A1EEA9BC 3E660A90 9D838D72 6E3BF623 D5262028 2013481D 1F6E5377",a:"7D5A0975 FC2C3057 EEF67530 417AFFE7 FB8055C1 26DC5C6C E94A4B44 F330B5D9",b:"26DC5C6C E94A4B44 F330B5D9 BBD77CBF 95841629 5CF7E1CE 6BCCDC18 FF8C07B6",n:"A9FB57DB A1EEA9BC 3E660A90 9D838D71 8C397AA3 B561A6F7 901E0E82 974856A7",hash:gl.sha256,gRed:!1,g:["8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262","547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997"]}),s("brainpoolP384r1",{type:"short",prime:null,p:"8CB91E82 A3386D28 0F5D6F7E 50E641DF 152F7109 ED5456B4 12B1DA19 7FB71123ACD3A729 901D1A71 87470013 3107EC53",a:"7BC382C6 3D8C150C 3C72080A CE05AFA0 C2BEA28E 4FB22787 139165EF BA91F90F8AA5814A 503AD4EB 04A8C7DD 22CE2826",b:"04A8C7DD 22CE2826 8B39B554 16F0447C 2FB77DE1 07DCD2A6 2E880EA5 3EEB62D57CB43902 95DBC994 3AB78696 FA504C11",n:"8CB91E82 A3386D28 0F5D6F7E 50E641DF 152F7109 ED5456B3 1F166E6C AC0425A7CF3AB6AF 6B7FC310 3B883202 E9046565",hash:gl.sha384,gRed:!1,g:["1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E","8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315"]}),s("brainpoolP512r1",{type:"short",prime:null,p:"AADD9DB8 DBE9C48B 3FD4E6AE 33C9FC07 CB308DB3 B3C9D20E D6639CCA 703308717D4D9B00 9BC66842 AECDA12A E6A380E6 2881FF2F 2D82C685 28AA6056 583A48F3",a:"7830A331 8B603B89 E2327145 AC234CC5 94CBDD8D 3DF91610 A83441CA EA9863BC2DED5D5A A8253AA1 0A2EF1C9 8B9AC8B5 7F1117A7 2BF2C7B9 E7C1AC4D 77FC94CA",b:"3DF91610 A83441CA EA9863BC 2DED5D5A A8253AA1 0A2EF1C9 8B9AC8B5 7F1117A72BF2C7B9 E7C1AC4D 77FC94CA DC083E67 984050B7 5EBAE5DD 2809BD63 8016F723",n:"AADD9DB8 DBE9C48B 3FD4E6AE 33C9FC07 CB308DB3 B3C9D20E D6639CCA 70330870553E5C41 4CA92619 41866119 7FAC1047 1DB1D381 085DDADD B5879682 9CA90069",hash:gl.sha512,gRed:!1,g:["81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822","7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892"]});try{r=wl}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:gl.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function _l(e){if(!(this instanceof _l))return new _l(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Td.toArray(e.entropy,e.entropyEnc||"hex"),r=Td.toArray(e.nonce,e.nonceEnc||"hex"),i=Td.toArray(e.pers,e.persEnc||"hex");lt(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}var kl=_l;_l.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},_l.prototype._hmac=function(){return new gl.hmac(this.hash,this.K)},_l.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},_l.prototype.reseed=function(e,t,r,i){"string"!=typeof t&&(i=r,r=t,t=null),e=Td.toArray(e,t),r=Td.toArray(r,i),lt(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},_l.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=Td.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var a=n.slice(0,e);return this._update(r),this._reseed++,Td.encode(a,t)};var Al=zd.assert;function Sl(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var El=Sl;Sl.fromPublic=function(e,t,r){return t instanceof Sl?t:new Sl(e,{pub:t,pubEnc:r})},Sl.fromPrivate=function(e,t,r){return t instanceof Sl?t:new Sl(e,{priv:t,privEnc:r})},Sl.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Sl.prototype.getPublic=function(e,t){return this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},Sl.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},Sl.prototype._importPrivate=function(e,t){if(this.priv=new Dd(e,t||16),"mont"===this.ec.curve.type){var r=this.ec.curve.one,i=r.ushln(252).sub(r).ushln(3);this.priv=this.priv.or(r.ushln(254)),this.priv=this.priv.and(i)}else this.priv=this.priv.umod(this.ec.curve.n)},Sl.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?Al(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Al(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},Sl.prototype.derive=function(e){return e.mul(this.priv).getX()},Sl.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},Sl.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},Sl.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Pl=zd.assert;function xl(e,t){if(e instanceof xl)return e;this._importDER(e,t)||(Pl(e.r&&e.s,"Signature without r or s"),this.r=new Dd(e.r,16),this.s=new Dd(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Ml=xl;function Cl(){this.place=0}function Kl(e,t){var r=e[t.place++];if(!(128&r))return r;for(var i=15&r,n=0,a=0,s=t.place;a<i;a++,s++)n<<=8,n|=e[s];return t.place=s,n}function Dl(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function Rl(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}xl.prototype._importDER=function(e,t){e=zd.toArray(e,t);var r=new Cl;if(48!==e[r.place++])return!1;if(Kl(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=Kl(e,r),n=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=Kl(e,r);if(e.length!==a+r.place)return!1;var s=e.slice(r.place,a+r.place);return 0===n[0]&&128&n[1]&&(n=n.slice(1)),0===s[0]&&128&s[1]&&(s=s.slice(1)),this.r=new Dd(n),this.s=new Dd(s),this.recoveryParam=null,!0},xl.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=Dl(t),r=Dl(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];Rl(i,t.length),(i=i.concat(t)).push(2),Rl(i,r.length);var n=i.concat(r),a=[48];return Rl(a,n.length),a=a.concat(n),zd.encode(a,e)};var Ul=zd.assert;function Il(e){if(!(this instanceof Il))return new Il(e);"string"==typeof e&&(Ul(vl.hasOwnProperty(e),"Unknown curve "+e),e=vl[e]),e instanceof vl.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Bl=Il;Il.prototype.keyPair=function(e){return new El(this,e)},Il.prototype.keyFromPrivate=function(e,t){return El.fromPrivate(this,e,t)},Il.prototype.keyFromPublic=function(e,t){return El.fromPublic(this,e,t)},Il.prototype.genKeyPair=function(e){e||(e={});var t=new kl({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||qd(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()});if("mont"===this.curve.type){var r=new Dd(t.generate(32));return this.keyFromPrivate(r)}for(var i=this.n.byteLength(),n=this.n.sub(new Dd(2));;){if(!((r=new Dd(t.generate(i))).cmp(n)>0))return r.iaddn(1),this.keyFromPrivate(r)}},Il.prototype._truncateToN=function(e,t,r){var i=(r=r||8*e.byteLength())-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Il.prototype.truncateMsg=function(e){var t;return e instanceof Uint8Array?(t=8*e.byteLength,e=this._truncateToN(new Dd(e,16),!1,t)):"string"==typeof e?(t=4*e.length,e=this._truncateToN(new Dd(e,16),!1,t)):e=this._truncateToN(new Dd(e,16)),e},Il.prototype.sign=function(e,t,r,i){"object"==typeof r&&(i=r,r=null),i||(i={}),t=this.keyFromPrivate(t,r),e=this.truncateMsg(e);for(var n=this.n.byteLength(),a=t.getPrivate().toArray("be",n),s=e.toArray("be",n),o=new kl({hash:this.hash,entropy:a,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new Dd(1)),u=0;;u++){var h=i.k?i.k(u):new Dd(o.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(c)>=0)){var f=this.g.mul(h);if(!f.isInfinity()){var d=f.getX(),l=d.umod(this.n);if(0!==l.cmpn(0)){var p=h.invm(this.n).mul(l.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var y=(f.getY().isOdd()?1:0)|(0!==d.cmp(l)?2:0);return i.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),y^=1),new Ml({r:l,s:p,recoveryParam:y})}}}}}},Il.prototype.verify=function(e,t,r,i){return r=this.keyFromPublic(r,i),t=new Ml(t,"hex"),this._verify(this.truncateMsg(e),t,r)||this._verify(this._truncateToN(new Dd(e,16)),t,r)},Il.prototype._verify=function(e,t,r){var i=t.r,n=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(n.cmpn(1)<0||n.cmp(this.n)>=0)return!1;var a,s=n.invm(this.n),o=s.mul(e).umod(this.n),c=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(o,r.getPublic(),c)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(o,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},Il.prototype.recoverPubKey=function(e,t,r,i){Ul((3&r)===r,"The recovery param is more than two bits"),t=new Ml(t,i);var n=this.n,a=new Dd(e),s=t.r,o=t.s,c=1&r,u=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw Error("Unable to find sencond key candinate");s=u?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var h=t.r.invm(n),f=n.sub(a).mul(h).umod(n),d=o.mul(h).umod(n);return this.g.mulAdd(f,s,d)},Il.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new Ml(t,i)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch(e){continue}if(a.eq(r))return n}throw Error("Unable to find valid recovery factor")};var Tl=zd.assert,zl=zd.parseBytes,ql=zd.cachedProperty;function Ol(e,t){if(this.eddsa=e,t.hasOwnProperty("secret")&&(this._secret=zl(t.secret)),e.isPoint(t.pub))this._pub=t.pub;else if(this._pubBytes=zl(t.pub),this._pubBytes&&33===this._pubBytes.length&&64===this._pubBytes[0]&&(this._pubBytes=this._pubBytes.slice(1,33)),this._pubBytes&&32!==this._pubBytes.length)throw Error("Unknown point compression format")}Ol.fromPublic=function(e,t){return t instanceof Ol?t:new Ol(e,{pub:t})},Ol.fromSecret=function(e,t){return t instanceof Ol?t:new Ol(e,{secret:t})},Ol.prototype.secret=function(){return this._secret},ql(Ol,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),ql(Ol,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),ql(Ol,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i})),ql(Ol,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),ql(Ol,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),ql(Ol,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Ol.prototype.sign=function(e){return Tl(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},Ol.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},Ol.prototype.getSecret=function(e){return Tl(this._secret,"KeyPair is public only"),zd.encode(this.secret(),e)},Ol.prototype.getPublic=function(e,t){return zd.encode((t?[64]:[]).concat(this.pubBytes()),e)};var Fl=Ol,Nl=zd.assert,jl=zd.cachedProperty,Ll=zd.parseBytes;function Wl(e,t){this.eddsa=e,"object"!=typeof t&&(t=Ll(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),Nl(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof Dd&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}jl(Wl,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),jl(Wl,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),jl(Wl,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),jl(Wl,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Wl.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Wl.prototype.toHex=function(){return zd.encode(this.toBytes(),"hex").toUpperCase()};var Hl=Wl,Gl=zd.assert,Vl=zd.parseBytes;function $l(e){if(Gl("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof $l))return new $l(e);e=vl[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=gl.sha512}var Zl=$l;$l.prototype.sign=function(e,t){e=Vl(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),n=this.g.mul(i),a=this.encodePoint(n),s=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),o=i.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:o,Rencoded:a})},$l.prototype.verify=function(e,t,r){e=Vl(e),t=this.makeSignature(t);var i=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),i.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(i.pub().mul(n)).eq(a)},$l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return zd.intFromLE(e.digest()).umod(this.curve.n)},$l.prototype.keyPair=function(e){return new Fl(this,e)},$l.prototype.keyFromPublic=function(e){return Fl.fromPublic(this,e)},$l.prototype.keyFromSecret=function(e){return Fl.fromSecret(this,e)},$l.prototype.genKeyPair=function(e){e||(e={});var t=new kl({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||qd(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.curve.n.toArray()});return this.keyFromSecret(t.generate(32))},$l.prototype.makeSignature=function(e){return e instanceof Hl?e:new Hl(this,e)},$l.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},$l.prototype.decodePoint=function(e){var t=(e=zd.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),i=0!=(128&e[t]),n=zd.intFromLE(r);return this.curve.pointFromY(n,i)},$l.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},$l.prototype.decodeInt=function(e){return zd.intFromLE(e)},$l.prototype.isPoint=function(e){return e instanceof this.pointClass};var Yl=bt((function(e,t){var r=t;r.utils=zd,r.rand=qd,r.curve=sl,r.curves=vl,r.ec=Bl,r.eddsa=Zl})),Xl=/*#__PURE__*/Object.freeze({__proto__:null,default:Yl,__moduleExports:Yl});__webpack_unused_export__=ko,__webpack_unused_export__=gc,__webpack_unused_export__=ho,__webpack_unused_export__=to,__webpack_unused_export__=class{static get tag(){return me.packet.marker}read(e){return 80===e[0]&&71===e[1]&&80===e[2]}write(){return new Uint8Array([80,71,80])}},__webpack_unused_export__=pc,__webpack_unused_export__=so,__webpack_unused_export__=co,__webpack_unused_export__=cc,__webpack_unused_export__=oc,__webpack_unused_export__=Ao,__webpack_unused_export__=Po,__webpack_unused_export__=Co,__webpack_unused_export__=Do,__webpack_unused_export__=Bo,__webpack_unused_export__=zo,__webpack_unused_export__=no,__webpack_unused_export__=tc,__webpack_unused_export__=vo,__webpack_unused_export__=Eo,__webpack_unused_export__=Mo,__webpack_unused_export__=class{static get tag(){return me.packet.trust}read(){throw new Ri("Trust packets are not supported")}write(){throw new Ri("Trust packets are not supported")}},__webpack_unused_export__=Ui,__webpack_unused_export__=Ko,__webpack_unused_export__=Io,__webpack_unused_export__=xe,__webpack_unused_export__=ge,__webpack_unused_export__=async function({text:e,...t}){if(!e)throw Error("createCleartextMessage: must pass options object containing `text`");if(!ce.isString(e))throw Error("createCleartextMessage: options.text must be a string");const r=Object.keys(t);if(r.length>0)throw Error("Unknown option: "+r.join(", "));return new gc(e)},exports.tn=async function({text:e,binary:t,filename:r,date:i=new Date,format:n=(void 0!==e?"utf8":"binary"),...a}){let s=void 0!==e?e:t;if(void 0===s)throw Error("createMessage: must pass options object containing `text` or `binary`");if(e&&!ce.isString(e)&&!ce.isStream(e))throw Error("createMessage: options.text must be a string or stream");if(t&&!ce.isUint8Array(t)&&!ce.isStream(t))throw Error("createMessage: options.binary must be a Uint8Array or stream");const o=Object.keys(a);if(o.length>0)throw Error("Unknown option: "+o.join(", "));const c=ce.isStream(s);c&&(await F(),s=j(s));const u=new to(i);void 0!==e?u.setText(s,me.write(me.literal,n)):u.setBytes(s,me.write(me.literal,n)),void 0!==r&&u.setFilename(r);const h=new co;h.push(u);const f=new pc(h);return f.fromStream=c,f},__webpack_unused_export__=async function({message:e,decryptionKeys:t,passwords:r,sessionKeys:i,verificationKeys:n,expectSigned:a=!1,format:s="utf8",signature:o=null,date:c=new Date,config:u,...h}){if(Ac(u={...ge,...u}),wc(e),n=Sc(n),t=Sc(t),r=Sc(r),i=Sc(i),h.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.decrypt, pass `decryptionKeys` instead");if(h.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.decrypt, pass `verificationKeys` instead");const f=Object.keys(h);if(f.length>0)throw Error("Unknown option: "+f.join(", "));try{const h=await e.decrypt(t,r,i,c,u);n||(n=[]);const f={};if(f.signatures=o?await h.verifyDetached(o,n,c,u):await h.verify(n,c,u),f.data="binary"===s?h.getLiteralData():h.getText(),f.filename=h.getFilename(),Pc(f,e),a){if(0===n.length)throw Error("Verification keys are required to verify message signatures");if(0===f.signatures.length)throw Error("Message is not signed");f.data=W([f.data,ae((async()=>{await ce.anyPromise(f.signatures.map((e=>e.verified)))}))])}return f.data=await Ec(f.data,e.fromStream,s),f}catch(e){throw ce.wrapError("Error decrypting message",e)}},__webpack_unused_export__=async function({privateKey:e,passphrase:t,config:r,...i}){Ac(r={...ge,...r});const n=Object.keys(i);if(n.length>0)throw Error("Unknown option: "+n.join(", "));if(!e.isPrivate())throw Error("Cannot decrypt a public key");const a=e.clone(!0),s=ce.isArray(t)?t:[t];try{return await Promise.all(a.getKeys().map((e=>ce.anyPromise(s.map((t=>e.keyPacket.decrypt(t))))))),await a.validate(r),a}catch(e){throw a.clearPrivateParams(),ce.wrapError("Error decrypting private key",e)}},__webpack_unused_export__=async function({message:e,decryptionKeys:t,passwords:r,date:i=new Date,config:n,...a}){if(Ac(n={...ge,...n}),wc(e),t=Sc(t),r=Sc(r),a.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.decryptSessionKeys, pass `decryptionKeys` instead");const s=Object.keys(a);if(s.length>0)throw Error("Unknown option: "+s.join(", "));try{return await e.decryptSessionKeys(t,r,i,n)}catch(e){throw ce.wrapError("Error decrypting session keys",e)}},__webpack_unused_export__=async function({message:e,encryptionKeys:t,signingKeys:r,passwords:i,sessionKey:n,format:a="armored",signature:s=null,wildcard:o=!1,signingKeyIDs:c=[],encryptionKeyIDs:u=[],date:h=new Date,signingUserIDs:f=[],encryptionUserIDs:d=[],config:l,...p}){if(Ac(l={...ge,...l}),wc(e),_c(a),t=Sc(t),r=Sc(r),i=Sc(i),c=Sc(c),u=Sc(u),f=Sc(f),d=Sc(d),p.detached)throw Error("The `detached` option has been removed from openpgp.encrypt, separately call openpgp.sign instead. Don't forget to remove the `privateKeys` option as well.");if(p.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.encrypt, pass `encryptionKeys` instead");if(p.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.encrypt, pass `signingKeys` instead");if(void 0!==p.armor)throw Error("The `armor` option has been removed from openpgp.encrypt, pass `format` instead.");const y=Object.keys(p);if(y.length>0)throw Error("Unknown option: "+y.join(", "));r||(r=[]);const b=e.fromStream;try{if((r.length||s)&&(e=await e.sign(r,s,c,h,f,l)),e=e.compress(await Wo("compression",t,h,d,l),l),e=await e.encrypt(t,i,n,o,u,h,d,l),"object"===a)return e;const p="armored"===a;return Ec(p?e.armor(l):e.write(),b,p?"utf8":"binary")}catch(e){throw ce.wrapError("Error encrypting message",e)}},__webpack_unused_export__=async function({privateKey:e,passphrase:t,config:r,...i}){Ac(r={...ge,...r});const n=Object.keys(i);if(n.length>0)throw Error("Unknown option: "+n.join(", "));if(!e.isPrivate())throw Error("Cannot encrypt a public key");const a=e.clone(!0),s=a.getKeys(),o=ce.isArray(t)?t:Array(s.length).fill(t);if(o.length!==s.length)throw Error("Invalid number of passphrases given for key encryption");try{return await Promise.all(s.map((async(e,t)=>{const{keyPacket:i}=e;await i.encrypt(o[t],r),i.clearPrivateParams()}))),a}catch(e){throw a.clearPrivateParams(),ce.wrapError("Error encrypting private key",e)}},__webpack_unused_export__=async function({data:e,algorithm:t,aeadAlgorithm:r,encryptionKeys:i,passwords:n,format:a="armored",wildcard:s=!1,encryptionKeyIDs:o=[],date:c=new Date,encryptionUserIDs:u=[],config:h,...f}){if(Ac(h={...ge,...h}),function(e,t){if(!ce.isUint8Array(e))throw Error("Parameter ["+(t||"data")+"] must be of type Uint8Array")}(e),function(e,t){if(!ce.isString(e))throw Error("Parameter ["+(t||"data")+"] must be of type String")}(t,"algorithm"),_c(a),i=Sc(i),n=Sc(n),o=Sc(o),u=Sc(u),f.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.encryptSessionKey, pass `encryptionKeys` instead");const d=Object.keys(f);if(d.length>0)throw Error("Unknown option: "+d.join(", "));try{return xc(await pc.encryptSessionKey(e,t,r,i,n,s,o,c,u,h),a,h)}catch(e){throw ce.wrapError("Error encrypting session key",e)}},__webpack_unused_export__=me,__webpack_unused_export__=async function({userIDs:e=[],passphrase:t,type:r="ecc",rsaBits:i=4096,curve:n="curve25519",keyExpirationTime:a=0,date:s=new Date,subkeys:o=[{}],format:c="armored",config:u,...h}){Ac(u={...ge,...u}),e=Sc(e);const f=Object.keys(h);if(f.length>0)throw Error("Unknown option: "+f.join(", "));if(0===e.length)throw Error("UserIDs are required for key generation");if("rsa"===r&&i<u.minRSABits)throw Error(`rsaBits should be at least ${u.minRSABits}, got: ${i}`);const d={userIDs:e,passphrase:t,type:r,rsaBits:i,curve:n,keyExpirationTime:a,date:s,subkeys:o};try{const{key:e,revocationCertificate:t}=await async function(e,t){e.sign=!0,(e=Zo(e)).subkeys=e.subkeys.map(((t,r)=>Zo(e.subkeys[r],e)));let r=[Oo(e,t)];r=r.concat(e.subkeys.map((e=>qo(e,t))));const i=await Promise.all(r),n=await hc(i[0],i.slice(1),e,t),a=await n.getRevocationCertificate(e.date,t);return n.revocationSignatures=[],{key:n,revocationCertificate:a}}(d,u);return e.getKeys().forEach((({keyPacket:e})=>Jo(e,u))),{privateKey:xc(e,c,u),publicKey:xc(e.toPublic(),c,u),revocationCertificate:t}}catch(e){throw ce.wrapError("Error generating keypair",e)}},__webpack_unused_export__=async function({encryptionKeys:e,date:t=new Date,encryptionUserIDs:r=[],config:i,...n}){if(Ac(i={...ge,...i}),e=Sc(e),r=Sc(r),n.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.generateSessionKey, pass `encryptionKeys` instead");const a=Object.keys(n);if(a.length>0)throw Error("Unknown option: "+a.join(", "));try{return await pc.generateSessionKey(e,t,r,i)}catch(e){throw ce.wrapError("Error generating session key",e)}},__webpack_unused_export__=async function({cleartextMessage:e,config:t,...r}){if(t={...ge,...t},!e)throw Error("readCleartextMessage: must pass options object containing `cleartextMessage`");if(!ce.isString(e))throw Error("readCleartextMessage: options.cleartextMessage must be a string");const i=Object.keys(r);if(i.length>0)throw Error("Unknown option: "+i.join(", "));const n=await Pe(e);if(n.type!==me.armor.signed)throw Error("No cleartext signed message.");const a=await co.fromBinary(n.data,mc,t);!function(e,t){const r=function(e){const r=e=>t=>e.hashAlgorithm===t;for(let i=0;i<t.length;i++)if(t[i].constructor.tag===me.packet.signature&&!e.some(r(t[i])))return!1;return!0};let i=null,n=[];if(e.forEach((function(e){if(i=e.match(/Hash: (.+)/),!i)throw Error('Only "Hash" header allowed in cleartext signed message');i=i[1].replace(/\s/g,""),i=i.split(","),i=i.map((function(e){e=e.toLowerCase();try{return me.write(me.hash,e)}catch(t){throw Error("Unknown hash algorithm in armor header: "+e)}})),n=n.concat(i)})),!n.length&&!r([me.hash.md5]))throw Error('If no "Hash" header in cleartext signed message, then only MD5 signatures allowed');if(n.length&&!r(n))throw Error("Hash algorithm mismatch in armor header and signature")}(n.headers,a);const s=new zo(a);return new gc(n.text,s)},__webpack_unused_export__=async function({armoredKey:e,binaryKey:t,config:r,...i}){if(r={...ge,...r},!e&&!t)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!ce.isString(e))throw Error("readKey: options.armoredKey must be a string");if(t&&!ce.isUint8Array(t))throw Error("readKey: options.binaryKey must be a Uint8Array");const n=Object.keys(i);if(n.length>0)throw Error("Unknown option: "+n.join(", "));let a;if(e){const{type:t,data:i}=await Pe(e,r);if(t!==me.armor.publicKey&&t!==me.armor.privateKey)throw Error("Armored text not of type key");a=i}else a=t;return sc(await co.fromBinary(a,uc,r))},exports.Mq=async function({armoredKeys:e,binaryKeys:t,config:r,...i}){r={...ge,...r};let n=e||t;if(!n)throw Error("readKeys: must pass options object containing `armoredKeys` or `binaryKeys`");if(e&&!ce.isString(e))throw Error("readKeys: options.armoredKeys must be a string");if(t&&!ce.isUint8Array(t))throw Error("readKeys: options.binaryKeys must be a Uint8Array");const a=Object.keys(i);if(a.length>0)throw Error("Unknown option: "+a.join(", "));if(e){const{type:t,data:i}=await Pe(e,r);if(t!==me.armor.publicKey&&t!==me.armor.privateKey)throw Error("Armored text not of type key");n=i}const s=[],o=await co.fromBinary(n,uc,r),c=o.indexOfTag(me.packet.publicKey,me.packet.secretKey);if(0===c.length)throw Error("No key packet found");for(let e=0;e<c.length;e++){const t=sc(o.slice(c[e],c[e+1]));s.push(t)}return s},__webpack_unused_export__=async function({armoredMessage:e,binaryMessage:t,config:r,...i}){r={...ge,...r};let n=e||t;if(!n)throw Error("readMessage: must pass options object containing `armoredMessage` or `binaryMessage`");if(e&&!ce.isString(e)&&!ce.isStream(e))throw Error("readMessage: options.armoredMessage must be a string or stream");if(t&&!ce.isUint8Array(t)&&!ce.isStream(t))throw Error("readMessage: options.binaryMessage must be a Uint8Array or stream");const a=Object.keys(i);if(a.length>0)throw Error("Unknown option: "+a.join(", "));const s=ce.isStream(n);if(s&&(await F(),n=j(n)),e){const{type:e,data:t}=await Pe(n,r);if(e!==me.armor.message)throw Error("Armored text not of type message");n=t}const o=await co.fromBinary(n,fc,r),c=new pc(o);return c.fromStream=s,c},__webpack_unused_export__=async function({armoredKey:e,binaryKey:t,config:r,...i}){if(r={...ge,...r},!e&&!t)throw Error("readPrivateKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!ce.isString(e))throw Error("readPrivateKey: options.armoredKey must be a string");if(t&&!ce.isUint8Array(t))throw Error("readPrivateKey: options.binaryKey must be a Uint8Array");const n=Object.keys(i);if(n.length>0)throw Error("Unknown option: "+n.join(", "));let a;if(e){const{type:t,data:i}=await Pe(e,r);if(t!==me.armor.privateKey)throw Error("Armored text not of type private key");a=i}else a=t;const s=await co.fromBinary(a,uc,r);return new cc(s)},__webpack_unused_export__=async function({armoredKeys:e,binaryKeys:t,config:r}){r={...ge,...r};let i=e||t;if(!i)throw Error("readPrivateKeys: must pass options object containing `armoredKeys` or `binaryKeys`");if(e&&!ce.isString(e))throw Error("readPrivateKeys: options.armoredKeys must be a string");if(t&&!ce.isUint8Array(t))throw Error("readPrivateKeys: options.binaryKeys must be a Uint8Array");if(e){const{type:t,data:n}=await Pe(e,r);if(t!==me.armor.privateKey)throw Error("Armored text not of type private key");i=n}const n=[],a=await co.fromBinary(i,uc,r),s=a.indexOfTag(me.packet.secretKey);if(0===s.length)throw Error("No secret key packet found");for(let e=0;e<s.length;e++){const t=a.slice(s[e],s[e+1]),r=new cc(t);n.push(r)}return n},exports.Gi=async function({armoredSignature:e,binarySignature:t,config:r,...i}){r={...ge,...r};let n=e||t;if(!n)throw Error("readSignature: must pass options object containing `armoredSignature` or `binarySignature`");if(e&&!ce.isString(e))throw Error("readSignature: options.armoredSignature must be a string");if(t&&!ce.isUint8Array(t))throw Error("readSignature: options.binarySignature must be a Uint8Array");const a=Object.keys(i);if(a.length>0)throw Error("Unknown option: "+a.join(", "));if(e){const{type:e,data:t}=await Pe(n,r);if(e!==me.armor.signature)throw Error("Armored text not of type signature");n=t}const s=await co.fromBinary(n,To,r);return new zo(s)},__webpack_unused_export__=async function({privateKey:e,userIDs:t=[],passphrase:r,keyExpirationTime:i=0,date:n,format:a="armored",config:s,...o}){Ac(s={...ge,...s}),t=Sc(t);const c=Object.keys(o);if(c.length>0)throw Error("Unknown option: "+c.join(", "));if(0===t.length)throw Error("UserIDs are required for key reformat");const u={privateKey:e,userIDs:t,passphrase:r,keyExpirationTime:i,date:n};try{const{key:e,revocationCertificate:t}=await async function(e,t){e=o(e);const{privateKey:r}=e;if(!r.isPrivate())throw Error("Cannot reformat a public key");if(r.keyPacket.isDummy())throw Error("Cannot reformat a gnu-dummy primary key");if(!r.getKeys().every((({keyPacket:e})=>e.isDecrypted())))throw Error("Key is not decrypted");const i=r.keyPacket;e.subkeys||(e.subkeys=await Promise.all(r.subkeys.map((async e=>{const r=e.keyPacket,n={key:i,bind:r},a=await Fo(e.bindingSignatures,i,me.signature.subkeyBinding,n,null,t).catch((()=>({})));return{sign:a.keyFlags&&a.keyFlags[0]&me.keyFlags.signData}}))));const n=r.subkeys.map((e=>e.keyPacket));if(e.subkeys.length!==n.length)throw Error("Number of subkey options does not match number of subkeys");e.subkeys=e.subkeys.map((t=>o(t,e)));const a=await hc(i,n,e,t),s=await a.getRevocationCertificate(e.date,t);return a.revocationSignatures=[],{key:a,revocationCertificate:s};function o(e,t={}){return e.keyExpirationTime=e.keyExpirationTime||t.keyExpirationTime,e.passphrase=ce.isString(e.passphrase)?e.passphrase:t.passphrase,e.date=e.date||t.date,e}}(u,s);return{privateKey:xc(e,a,s),publicKey:xc(e.toPublic(),a,s),revocationCertificate:t}}catch(e){throw ce.wrapError("Error reformatting keypair",e)}},__webpack_unused_export__=async function({key:e,revocationCertificate:t,reasonForRevocation:r,date:i=new Date,format:n="armored",config:a,...s}){Ac(a={...ge,...a});const o=Object.keys(s);if(o.length>0)throw Error("Unknown option: "+o.join(", "));try{const s=t?await e.applyRevocationCertificate(t,i,a):await e.revoke(r,i,a);return s.isPrivate()?{privateKey:xc(s,n,a),publicKey:xc(s.toPublic(),n,a)}:{privateKey:null,publicKey:xc(s,n,a)}}catch(e){throw ce.wrapError("Error revoking key",e)}},__webpack_unused_export__=async function({message:e,signingKeys:t,format:r="armored",detached:i=!1,signingKeyIDs:n=[],date:a=new Date,signingUserIDs:s=[],config:o,...c}){if(Ac(o={...ge,...o}),vc(e),_c(r),t=Sc(t),n=Sc(n),s=Sc(s),c.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.sign, pass `signingKeys` instead");if(void 0!==c.armor)throw Error("The `armor` option has been removed from openpgp.sign, pass `format` instead.");const u=Object.keys(c);if(u.length>0)throw Error("Unknown option: "+u.join(", "));if(e instanceof gc&&"binary"===r)throw Error("Cannot return signed cleartext message in binary format");if(e instanceof gc&&i)throw Error("Cannot detach-sign a cleartext message");if(!t||0===t.length)throw Error("No signing keys provided");try{let c;if(c=i?await e.signDetached(t,void 0,n,a,s,o):await e.sign(t,void 0,n,a,s,o),"object"===r)return c;const u="armored"===r;return c=u?c.armor(o):c.write(),i&&(c=X(e.packets.write(),(async(e,t)=>{await Promise.all([V(c,t),ie(e).catch((()=>{}))])}))),Ec(c,e.fromStream,u?"utf8":"binary")}catch(e){throw ce.wrapError("Error signing message",e)}},__webpack_unused_export__=Pe,exports.T=async function({message:e,verificationKeys:t,expectSigned:r=!1,format:i="utf8",signature:n=null,date:a=new Date,config:s,...o}){if(Ac(s={...ge,...s}),vc(e),t=Sc(t),o.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.verify, pass `verificationKeys` instead");const c=Object.keys(o);if(c.length>0)throw Error("Unknown option: "+c.join(", "));if(e instanceof gc&&"binary"===i)throw Error("Can't return cleartext message data as binary");if(e instanceof gc&&n)throw Error("Can't verify detached cleartext signature");try{const o={};if(o.signatures=n?await e.verifyDetached(n,t,a,s):await e.verify(t,a,s),o.data="binary"===i?e.getLiteralData():e.getText(),e.fromStream&&Pc(o,e),r){if(0===o.signatures.length)throw Error("Message is not signed");o.data=W([o.data,ae((async()=>{await ce.anyPromise(o.signatures.map((e=>e.verified)))}))])}return o.data=await Ec(o.data,e.fromStream,i),o}catch(e){throw ce.wrapError("Error verifying signed message",e)}};
|
||
//# sourceMappingURL=openpgp.min.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5118:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
/* eslint-disable node/no-deprecated-api */
|
||
|
||
|
||
|
||
var buffer = __nccwpck_require__(4300)
|
||
var Buffer = buffer.Buffer
|
||
|
||
var safer = {}
|
||
|
||
var key
|
||
|
||
for (key in buffer) {
|
||
if (!buffer.hasOwnProperty(key)) continue
|
||
if (key === 'SlowBuffer' || key === 'Buffer') continue
|
||
safer[key] = buffer[key]
|
||
}
|
||
|
||
var Safer = safer.Buffer = {}
|
||
for (key in Buffer) {
|
||
if (!Buffer.hasOwnProperty(key)) continue
|
||
if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue
|
||
Safer[key] = Buffer[key]
|
||
}
|
||
|
||
safer.Buffer.prototype = Buffer.prototype
|
||
|
||
if (!Safer.from || Safer.from === Uint8Array.from) {
|
||
Safer.from = function (value, encodingOrOffset, length) {
|
||
if (typeof value === 'number') {
|
||
throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value)
|
||
}
|
||
if (value && typeof value.length === 'undefined') {
|
||
throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)
|
||
}
|
||
return Buffer(value, encodingOrOffset, length)
|
||
}
|
||
}
|
||
|
||
if (!Safer.alloc) {
|
||
Safer.alloc = function (size, fill, encoding) {
|
||
if (typeof size !== 'number') {
|
||
throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
|
||
}
|
||
if (size < 0 || size >= 2 * (1 << 30)) {
|
||
throw new RangeError('The value "' + size + '" is invalid for option "size"')
|
||
}
|
||
var buf = Buffer(size)
|
||
if (!fill || fill.length === 0) {
|
||
buf.fill(0)
|
||
} else if (typeof encoding === 'string') {
|
||
buf.fill(fill, encoding)
|
||
} else {
|
||
buf.fill(fill)
|
||
}
|
||
return buf
|
||
}
|
||
}
|
||
|
||
if (!safer.kStringMaxLength) {
|
||
try {
|
||
safer.kStringMaxLength = process.binding('buffer').kStringMaxLength
|
||
} catch (e) {
|
||
// we can't determine kStringMaxLength in environments where process.binding
|
||
// is unsupported, so let's not set it
|
||
}
|
||
}
|
||
|
||
if (!safer.constants) {
|
||
safer.constants = {
|
||
MAX_LENGTH: safer.kMaxLength
|
||
}
|
||
if (safer.kStringMaxLength) {
|
||
safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength
|
||
}
|
||
}
|
||
|
||
module.exports = safer
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4294:
|
||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
module.exports = __nccwpck_require__(4219);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4219:
|
||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
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
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5030:
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||
|
||
function getUserAgent() {
|
||
if (typeof navigator === "object" && "userAgent" in navigator) {
|
||
return navigator.userAgent;
|
||
}
|
||
|
||
if (typeof process === "object" && "version" in process) {
|
||
return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
|
||
}
|
||
|
||
return "<environment undetectable>";
|
||
}
|
||
|
||
exports.getUserAgent = getUserAgent;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1452:
|
||
/***/ (function(__unused_webpack_module, exports) {
|
||
|
||
/**
|
||
* web-streams-polyfill v3.2.0
|
||
*/
|
||
(function (global, factory) {
|
||
true ? factory(exports) :
|
||
0;
|
||
}(this, (function (exports) { 'use strict';
|
||
|
||
/// <reference lib="es2015.symbol" />
|
||
const SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ?
|
||
Symbol :
|
||
description => `Symbol(${description})`;
|
||
|
||
/// <reference lib="dom" />
|
||
function noop() {
|
||
return undefined;
|
||
}
|
||
function getGlobals() {
|
||
if (typeof self !== 'undefined') {
|
||
return self;
|
||
}
|
||
else if (typeof window !== 'undefined') {
|
||
return window;
|
||
}
|
||
else if (typeof global !== 'undefined') {
|
||
return global;
|
||
}
|
||
return undefined;
|
||
}
|
||
const globals = getGlobals();
|
||
|
||
function typeIsObject(x) {
|
||
return (typeof x === 'object' && x !== null) || typeof x === 'function';
|
||
}
|
||
const rethrowAssertionErrorRejection = noop;
|
||
|
||
const originalPromise = Promise;
|
||
const originalPromiseThen = Promise.prototype.then;
|
||
const originalPromiseResolve = Promise.resolve.bind(originalPromise);
|
||
const originalPromiseReject = Promise.reject.bind(originalPromise);
|
||
function newPromise(executor) {
|
||
return new originalPromise(executor);
|
||
}
|
||
function promiseResolvedWith(value) {
|
||
return originalPromiseResolve(value);
|
||
}
|
||
function promiseRejectedWith(reason) {
|
||
return originalPromiseReject(reason);
|
||
}
|
||
function PerformPromiseThen(promise, onFulfilled, onRejected) {
|
||
// There doesn't appear to be any way to correctly emulate the behaviour from JavaScript, so this is just an
|
||
// approximation.
|
||
return originalPromiseThen.call(promise, onFulfilled, onRejected);
|
||
}
|
||
function uponPromise(promise, onFulfilled, onRejected) {
|
||
PerformPromiseThen(PerformPromiseThen(promise, onFulfilled, onRejected), undefined, rethrowAssertionErrorRejection);
|
||
}
|
||
function uponFulfillment(promise, onFulfilled) {
|
||
uponPromise(promise, onFulfilled);
|
||
}
|
||
function uponRejection(promise, onRejected) {
|
||
uponPromise(promise, undefined, onRejected);
|
||
}
|
||
function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) {
|
||
return PerformPromiseThen(promise, fulfillmentHandler, rejectionHandler);
|
||
}
|
||
function setPromiseIsHandledToTrue(promise) {
|
||
PerformPromiseThen(promise, undefined, rethrowAssertionErrorRejection);
|
||
}
|
||
const queueMicrotask = (() => {
|
||
const globalQueueMicrotask = globals && globals.queueMicrotask;
|
||
if (typeof globalQueueMicrotask === 'function') {
|
||
return globalQueueMicrotask;
|
||
}
|
||
const resolvedPromise = promiseResolvedWith(undefined);
|
||
return (fn) => PerformPromiseThen(resolvedPromise, fn);
|
||
})();
|
||
function reflectCall(F, V, args) {
|
||
if (typeof F !== 'function') {
|
||
throw new TypeError('Argument is not a function');
|
||
}
|
||
return Function.prototype.apply.call(F, V, args);
|
||
}
|
||
function promiseCall(F, V, args) {
|
||
try {
|
||
return promiseResolvedWith(reflectCall(F, V, args));
|
||
}
|
||
catch (value) {
|
||
return promiseRejectedWith(value);
|
||
}
|
||
}
|
||
|
||
// Original from Chromium
|
||
// https://chromium.googlesource.com/chromium/src/+/0aee4434a4dba42a42abaea9bfbc0cd196a63bc1/third_party/blink/renderer/core/streams/SimpleQueue.js
|
||
const QUEUE_MAX_ARRAY_SIZE = 16384;
|
||
/**
|
||
* Simple queue structure.
|
||
*
|
||
* Avoids scalability issues with using a packed array directly by using
|
||
* multiple arrays in a linked list and keeping the array size bounded.
|
||
*/
|
||
class SimpleQueue {
|
||
constructor() {
|
||
this._cursor = 0;
|
||
this._size = 0;
|
||
// _front and _back are always defined.
|
||
this._front = {
|
||
_elements: [],
|
||
_next: undefined
|
||
};
|
||
this._back = this._front;
|
||
// The cursor is used to avoid calling Array.shift().
|
||
// It contains the index of the front element of the array inside the
|
||
// front-most node. It is always in the range [0, QUEUE_MAX_ARRAY_SIZE).
|
||
this._cursor = 0;
|
||
// When there is only one node, size === elements.length - cursor.
|
||
this._size = 0;
|
||
}
|
||
get length() {
|
||
return this._size;
|
||
}
|
||
// For exception safety, this method is structured in order:
|
||
// 1. Read state
|
||
// 2. Calculate required state mutations
|
||
// 3. Perform state mutations
|
||
push(element) {
|
||
const oldBack = this._back;
|
||
let newBack = oldBack;
|
||
if (oldBack._elements.length === QUEUE_MAX_ARRAY_SIZE - 1) {
|
||
newBack = {
|
||
_elements: [],
|
||
_next: undefined
|
||
};
|
||
}
|
||
// push() is the mutation most likely to throw an exception, so it
|
||
// goes first.
|
||
oldBack._elements.push(element);
|
||
if (newBack !== oldBack) {
|
||
this._back = newBack;
|
||
oldBack._next = newBack;
|
||
}
|
||
++this._size;
|
||
}
|
||
// Like push(), shift() follows the read -> calculate -> mutate pattern for
|
||
// exception safety.
|
||
shift() { // must not be called on an empty queue
|
||
const oldFront = this._front;
|
||
let newFront = oldFront;
|
||
const oldCursor = this._cursor;
|
||
let newCursor = oldCursor + 1;
|
||
const elements = oldFront._elements;
|
||
const element = elements[oldCursor];
|
||
if (newCursor === QUEUE_MAX_ARRAY_SIZE) {
|
||
newFront = oldFront._next;
|
||
newCursor = 0;
|
||
}
|
||
// No mutations before this point.
|
||
--this._size;
|
||
this._cursor = newCursor;
|
||
if (oldFront !== newFront) {
|
||
this._front = newFront;
|
||
}
|
||
// Permit shifted element to be garbage collected.
|
||
elements[oldCursor] = undefined;
|
||
return element;
|
||
}
|
||
// The tricky thing about forEach() is that it can be called
|
||
// re-entrantly. The queue may be mutated inside the callback. It is easy to
|
||
// see that push() within the callback has no negative effects since the end
|
||
// of the queue is checked for on every iteration. If shift() is called
|
||
// repeatedly within the callback then the next iteration may return an
|
||
// element that has been removed. In this case the callback will be called
|
||
// with undefined values until we either "catch up" with elements that still
|
||
// exist or reach the back of the queue.
|
||
forEach(callback) {
|
||
let i = this._cursor;
|
||
let node = this._front;
|
||
let elements = node._elements;
|
||
while (i !== elements.length || node._next !== undefined) {
|
||
if (i === elements.length) {
|
||
node = node._next;
|
||
elements = node._elements;
|
||
i = 0;
|
||
if (elements.length === 0) {
|
||
break;
|
||
}
|
||
}
|
||
callback(elements[i]);
|
||
++i;
|
||
}
|
||
}
|
||
// Return the element that would be returned if shift() was called now,
|
||
// without modifying the queue.
|
||
peek() { // must not be called on an empty queue
|
||
const front = this._front;
|
||
const cursor = this._cursor;
|
||
return front._elements[cursor];
|
||
}
|
||
}
|
||
|
||
function ReadableStreamReaderGenericInitialize(reader, stream) {
|
||
reader._ownerReadableStream = stream;
|
||
stream._reader = reader;
|
||
if (stream._state === 'readable') {
|
||
defaultReaderClosedPromiseInitialize(reader);
|
||
}
|
||
else if (stream._state === 'closed') {
|
||
defaultReaderClosedPromiseInitializeAsResolved(reader);
|
||
}
|
||
else {
|
||
defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError);
|
||
}
|
||
}
|
||
// A client of ReadableStreamDefaultReader and ReadableStreamBYOBReader may use these functions directly to bypass state
|
||
// check.
|
||
function ReadableStreamReaderGenericCancel(reader, reason) {
|
||
const stream = reader._ownerReadableStream;
|
||
return ReadableStreamCancel(stream, reason);
|
||
}
|
||
function ReadableStreamReaderGenericRelease(reader) {
|
||
if (reader._ownerReadableStream._state === 'readable') {
|
||
defaultReaderClosedPromiseReject(reader, new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`));
|
||
}
|
||
else {
|
||
defaultReaderClosedPromiseResetToRejected(reader, new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`));
|
||
}
|
||
reader._ownerReadableStream._reader = undefined;
|
||
reader._ownerReadableStream = undefined;
|
||
}
|
||
// Helper functions for the readers.
|
||
function readerLockException(name) {
|
||
return new TypeError('Cannot ' + name + ' a stream using a released reader');
|
||
}
|
||
// Helper functions for the ReadableStreamDefaultReader.
|
||
function defaultReaderClosedPromiseInitialize(reader) {
|
||
reader._closedPromise = newPromise((resolve, reject) => {
|
||
reader._closedPromise_resolve = resolve;
|
||
reader._closedPromise_reject = reject;
|
||
});
|
||
}
|
||
function defaultReaderClosedPromiseInitializeAsRejected(reader, reason) {
|
||
defaultReaderClosedPromiseInitialize(reader);
|
||
defaultReaderClosedPromiseReject(reader, reason);
|
||
}
|
||
function defaultReaderClosedPromiseInitializeAsResolved(reader) {
|
||
defaultReaderClosedPromiseInitialize(reader);
|
||
defaultReaderClosedPromiseResolve(reader);
|
||
}
|
||
function defaultReaderClosedPromiseReject(reader, reason) {
|
||
if (reader._closedPromise_reject === undefined) {
|
||
return;
|
||
}
|
||
setPromiseIsHandledToTrue(reader._closedPromise);
|
||
reader._closedPromise_reject(reason);
|
||
reader._closedPromise_resolve = undefined;
|
||
reader._closedPromise_reject = undefined;
|
||
}
|
||
function defaultReaderClosedPromiseResetToRejected(reader, reason) {
|
||
defaultReaderClosedPromiseInitializeAsRejected(reader, reason);
|
||
}
|
||
function defaultReaderClosedPromiseResolve(reader) {
|
||
if (reader._closedPromise_resolve === undefined) {
|
||
return;
|
||
}
|
||
reader._closedPromise_resolve(undefined);
|
||
reader._closedPromise_resolve = undefined;
|
||
reader._closedPromise_reject = undefined;
|
||
}
|
||
|
||
const AbortSteps = SymbolPolyfill('[[AbortSteps]]');
|
||
const ErrorSteps = SymbolPolyfill('[[ErrorSteps]]');
|
||
const CancelSteps = SymbolPolyfill('[[CancelSteps]]');
|
||
const PullSteps = SymbolPolyfill('[[PullSteps]]');
|
||
|
||
/// <reference lib="es2015.core" />
|
||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite#Polyfill
|
||
const NumberIsFinite = Number.isFinite || function (x) {
|
||
return typeof x === 'number' && isFinite(x);
|
||
};
|
||
|
||
/// <reference lib="es2015.core" />
|
||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc#Polyfill
|
||
const MathTrunc = Math.trunc || function (v) {
|
||
return v < 0 ? Math.ceil(v) : Math.floor(v);
|
||
};
|
||
|
||
// https://heycam.github.io/webidl/#idl-dictionaries
|
||
function isDictionary(x) {
|
||
return typeof x === 'object' || typeof x === 'function';
|
||
}
|
||
function assertDictionary(obj, context) {
|
||
if (obj !== undefined && !isDictionary(obj)) {
|
||
throw new TypeError(`${context} is not an object.`);
|
||
}
|
||
}
|
||
// https://heycam.github.io/webidl/#idl-callback-functions
|
||
function assertFunction(x, context) {
|
||
if (typeof x !== 'function') {
|
||
throw new TypeError(`${context} is not a function.`);
|
||
}
|
||
}
|
||
// https://heycam.github.io/webidl/#idl-object
|
||
function isObject(x) {
|
||
return (typeof x === 'object' && x !== null) || typeof x === 'function';
|
||
}
|
||
function assertObject(x, context) {
|
||
if (!isObject(x)) {
|
||
throw new TypeError(`${context} is not an object.`);
|
||
}
|
||
}
|
||
function assertRequiredArgument(x, position, context) {
|
||
if (x === undefined) {
|
||
throw new TypeError(`Parameter ${position} is required in '${context}'.`);
|
||
}
|
||
}
|
||
function assertRequiredField(x, field, context) {
|
||
if (x === undefined) {
|
||
throw new TypeError(`${field} is required in '${context}'.`);
|
||
}
|
||
}
|
||
// https://heycam.github.io/webidl/#idl-unrestricted-double
|
||
function convertUnrestrictedDouble(value) {
|
||
return Number(value);
|
||
}
|
||
function censorNegativeZero(x) {
|
||
return x === 0 ? 0 : x;
|
||
}
|
||
function integerPart(x) {
|
||
return censorNegativeZero(MathTrunc(x));
|
||
}
|
||
// https://heycam.github.io/webidl/#idl-unsigned-long-long
|
||
function convertUnsignedLongLongWithEnforceRange(value, context) {
|
||
const lowerBound = 0;
|
||
const upperBound = Number.MAX_SAFE_INTEGER;
|
||
let x = Number(value);
|
||
x = censorNegativeZero(x);
|
||
if (!NumberIsFinite(x)) {
|
||
throw new TypeError(`${context} is not a finite number`);
|
||
}
|
||
x = integerPart(x);
|
||
if (x < lowerBound || x > upperBound) {
|
||
throw new TypeError(`${context} is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`);
|
||
}
|
||
if (!NumberIsFinite(x) || x === 0) {
|
||
return 0;
|
||
}
|
||
// TODO Use BigInt if supported?
|
||
// let xBigInt = BigInt(integerPart(x));
|
||
// xBigInt = BigInt.asUintN(64, xBigInt);
|
||
// return Number(xBigInt);
|
||
return x;
|
||
}
|
||
|
||
function assertReadableStream(x, context) {
|
||
if (!IsReadableStream(x)) {
|
||
throw new TypeError(`${context} is not a ReadableStream.`);
|
||
}
|
||
}
|
||
|
||
// Abstract operations for the ReadableStream.
|
||
function AcquireReadableStreamDefaultReader(stream) {
|
||
return new ReadableStreamDefaultReader(stream);
|
||
}
|
||
// ReadableStream API exposed for controllers.
|
||
function ReadableStreamAddReadRequest(stream, readRequest) {
|
||
stream._reader._readRequests.push(readRequest);
|
||
}
|
||
function ReadableStreamFulfillReadRequest(stream, chunk, done) {
|
||
const reader = stream._reader;
|
||
const readRequest = reader._readRequests.shift();
|
||
if (done) {
|
||
readRequest._closeSteps();
|
||
}
|
||
else {
|
||
readRequest._chunkSteps(chunk);
|
||
}
|
||
}
|
||
function ReadableStreamGetNumReadRequests(stream) {
|
||
return stream._reader._readRequests.length;
|
||
}
|
||
function ReadableStreamHasDefaultReader(stream) {
|
||
const reader = stream._reader;
|
||
if (reader === undefined) {
|
||
return false;
|
||
}
|
||
if (!IsReadableStreamDefaultReader(reader)) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
/**
|
||
* A default reader vended by a {@link ReadableStream}.
|
||
*
|
||
* @public
|
||
*/
|
||
class ReadableStreamDefaultReader {
|
||
constructor(stream) {
|
||
assertRequiredArgument(stream, 1, 'ReadableStreamDefaultReader');
|
||
assertReadableStream(stream, 'First parameter');
|
||
if (IsReadableStreamLocked(stream)) {
|
||
throw new TypeError('This stream has already been locked for exclusive reading by another reader');
|
||
}
|
||
ReadableStreamReaderGenericInitialize(this, stream);
|
||
this._readRequests = new SimpleQueue();
|
||
}
|
||
/**
|
||
* Returns a promise that will be fulfilled when the stream becomes closed,
|
||
* or rejected if the stream ever errors or the reader's lock is released before the stream finishes closing.
|
||
*/
|
||
get closed() {
|
||
if (!IsReadableStreamDefaultReader(this)) {
|
||
return promiseRejectedWith(defaultReaderBrandCheckException('closed'));
|
||
}
|
||
return this._closedPromise;
|
||
}
|
||
/**
|
||
* If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}.
|
||
*/
|
||
cancel(reason = undefined) {
|
||
if (!IsReadableStreamDefaultReader(this)) {
|
||
return promiseRejectedWith(defaultReaderBrandCheckException('cancel'));
|
||
}
|
||
if (this._ownerReadableStream === undefined) {
|
||
return promiseRejectedWith(readerLockException('cancel'));
|
||
}
|
||
return ReadableStreamReaderGenericCancel(this, reason);
|
||
}
|
||
/**
|
||
* Returns a promise that allows access to the next chunk from the stream's internal queue, if available.
|
||
*
|
||
* If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source.
|
||
*/
|
||
read() {
|
||
if (!IsReadableStreamDefaultReader(this)) {
|
||
return promiseRejectedWith(defaultReaderBrandCheckException('read'));
|
||
}
|
||
if (this._ownerReadableStream === undefined) {
|
||
return promiseRejectedWith(readerLockException('read from'));
|
||
}
|
||
let resolvePromise;
|
||
let rejectPromise;
|
||
const promise = newPromise((resolve, reject) => {
|
||
resolvePromise = resolve;
|
||
rejectPromise = reject;
|
||
});
|
||
const readRequest = {
|
||
_chunkSteps: chunk => resolvePromise({ value: chunk, done: false }),
|
||
_closeSteps: () => resolvePromise({ value: undefined, done: true }),
|
||
_errorSteps: e => rejectPromise(e)
|
||
};
|
||
ReadableStreamDefaultReaderRead(this, readRequest);
|
||
return promise;
|
||
}
|
||
/**
|
||
* Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active.
|
||
* If the associated stream is errored when the lock is released, the reader will appear errored in the same way
|
||
* from now on; otherwise, the reader will appear closed.
|
||
*
|
||
* A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by
|
||
* the reader's {@link ReadableStreamDefaultReader.read | read()} method has not yet been settled. Attempting to
|
||
* do so will throw a `TypeError` and leave the reader locked to the stream.
|
||
*/
|
||
releaseLock() {
|
||
if (!IsReadableStreamDefaultReader(this)) {
|
||
throw defaultReaderBrandCheckException('releaseLock');
|
||
}
|
||
if (this._ownerReadableStream === undefined) {
|
||
return;
|
||
}
|
||
if (this._readRequests.length > 0) {
|
||
throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled');
|
||
}
|
||
ReadableStreamReaderGenericRelease(this);
|
||
}
|
||
}
|
||
Object.defineProperties(ReadableStreamDefaultReader.prototype, {
|
||
cancel: { enumerable: true },
|
||
read: { enumerable: true },
|
||
releaseLock: { enumerable: true },
|
||
closed: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(ReadableStreamDefaultReader.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'ReadableStreamDefaultReader',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Abstract operations for the readers.
|
||
function IsReadableStreamDefaultReader(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_readRequests')) {
|
||
return false;
|
||
}
|
||
return x instanceof ReadableStreamDefaultReader;
|
||
}
|
||
function ReadableStreamDefaultReaderRead(reader, readRequest) {
|
||
const stream = reader._ownerReadableStream;
|
||
stream._disturbed = true;
|
||
if (stream._state === 'closed') {
|
||
readRequest._closeSteps();
|
||
}
|
||
else if (stream._state === 'errored') {
|
||
readRequest._errorSteps(stream._storedError);
|
||
}
|
||
else {
|
||
stream._readableStreamController[PullSteps](readRequest);
|
||
}
|
||
}
|
||
// Helper functions for the ReadableStreamDefaultReader.
|
||
function defaultReaderBrandCheckException(name) {
|
||
return new TypeError(`ReadableStreamDefaultReader.prototype.${name} can only be used on a ReadableStreamDefaultReader`);
|
||
}
|
||
|
||
/// <reference lib="es2018.asynciterable" />
|
||
/* eslint-disable @typescript-eslint/no-empty-function */
|
||
const AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () { }).prototype);
|
||
|
||
/// <reference lib="es2018.asynciterable" />
|
||
class ReadableStreamAsyncIteratorImpl {
|
||
constructor(reader, preventCancel) {
|
||
this._ongoingPromise = undefined;
|
||
this._isFinished = false;
|
||
this._reader = reader;
|
||
this._preventCancel = preventCancel;
|
||
}
|
||
next() {
|
||
const nextSteps = () => this._nextSteps();
|
||
this._ongoingPromise = this._ongoingPromise ?
|
||
transformPromiseWith(this._ongoingPromise, nextSteps, nextSteps) :
|
||
nextSteps();
|
||
return this._ongoingPromise;
|
||
}
|
||
return(value) {
|
||
const returnSteps = () => this._returnSteps(value);
|
||
return this._ongoingPromise ?
|
||
transformPromiseWith(this._ongoingPromise, returnSteps, returnSteps) :
|
||
returnSteps();
|
||
}
|
||
_nextSteps() {
|
||
if (this._isFinished) {
|
||
return Promise.resolve({ value: undefined, done: true });
|
||
}
|
||
const reader = this._reader;
|
||
if (reader._ownerReadableStream === undefined) {
|
||
return promiseRejectedWith(readerLockException('iterate'));
|
||
}
|
||
let resolvePromise;
|
||
let rejectPromise;
|
||
const promise = newPromise((resolve, reject) => {
|
||
resolvePromise = resolve;
|
||
rejectPromise = reject;
|
||
});
|
||
const readRequest = {
|
||
_chunkSteps: chunk => {
|
||
this._ongoingPromise = undefined;
|
||
// This needs to be delayed by one microtask, otherwise we stop pulling too early which breaks a test.
|
||
// FIXME Is this a bug in the specification, or in the test?
|
||
queueMicrotask(() => resolvePromise({ value: chunk, done: false }));
|
||
},
|
||
_closeSteps: () => {
|
||
this._ongoingPromise = undefined;
|
||
this._isFinished = true;
|
||
ReadableStreamReaderGenericRelease(reader);
|
||
resolvePromise({ value: undefined, done: true });
|
||
},
|
||
_errorSteps: reason => {
|
||
this._ongoingPromise = undefined;
|
||
this._isFinished = true;
|
||
ReadableStreamReaderGenericRelease(reader);
|
||
rejectPromise(reason);
|
||
}
|
||
};
|
||
ReadableStreamDefaultReaderRead(reader, readRequest);
|
||
return promise;
|
||
}
|
||
_returnSteps(value) {
|
||
if (this._isFinished) {
|
||
return Promise.resolve({ value, done: true });
|
||
}
|
||
this._isFinished = true;
|
||
const reader = this._reader;
|
||
if (reader._ownerReadableStream === undefined) {
|
||
return promiseRejectedWith(readerLockException('finish iterating'));
|
||
}
|
||
if (!this._preventCancel) {
|
||
const result = ReadableStreamReaderGenericCancel(reader, value);
|
||
ReadableStreamReaderGenericRelease(reader);
|
||
return transformPromiseWith(result, () => ({ value, done: true }));
|
||
}
|
||
ReadableStreamReaderGenericRelease(reader);
|
||
return promiseResolvedWith({ value, done: true });
|
||
}
|
||
}
|
||
const ReadableStreamAsyncIteratorPrototype = {
|
||
next() {
|
||
if (!IsReadableStreamAsyncIterator(this)) {
|
||
return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next'));
|
||
}
|
||
return this._asyncIteratorImpl.next();
|
||
},
|
||
return(value) {
|
||
if (!IsReadableStreamAsyncIterator(this)) {
|
||
return promiseRejectedWith(streamAsyncIteratorBrandCheckException('return'));
|
||
}
|
||
return this._asyncIteratorImpl.return(value);
|
||
}
|
||
};
|
||
if (AsyncIteratorPrototype !== undefined) {
|
||
Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype);
|
||
}
|
||
// Abstract operations for the ReadableStream.
|
||
function AcquireReadableStreamAsyncIterator(stream, preventCancel) {
|
||
const reader = AcquireReadableStreamDefaultReader(stream);
|
||
const impl = new ReadableStreamAsyncIteratorImpl(reader, preventCancel);
|
||
const iterator = Object.create(ReadableStreamAsyncIteratorPrototype);
|
||
iterator._asyncIteratorImpl = impl;
|
||
return iterator;
|
||
}
|
||
function IsReadableStreamAsyncIterator(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_asyncIteratorImpl')) {
|
||
return false;
|
||
}
|
||
try {
|
||
// noinspection SuspiciousTypeOfGuard
|
||
return x._asyncIteratorImpl instanceof
|
||
ReadableStreamAsyncIteratorImpl;
|
||
}
|
||
catch (_a) {
|
||
return false;
|
||
}
|
||
}
|
||
// Helper functions for the ReadableStream.
|
||
function streamAsyncIteratorBrandCheckException(name) {
|
||
return new TypeError(`ReadableStreamAsyncIterator.${name} can only be used on a ReadableSteamAsyncIterator`);
|
||
}
|
||
|
||
/// <reference lib="es2015.core" />
|
||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill
|
||
const NumberIsNaN = Number.isNaN || function (x) {
|
||
// eslint-disable-next-line no-self-compare
|
||
return x !== x;
|
||
};
|
||
|
||
function CreateArrayFromList(elements) {
|
||
// We use arrays to represent lists, so this is basically a no-op.
|
||
// Do a slice though just in case we happen to depend on the unique-ness.
|
||
return elements.slice();
|
||
}
|
||
function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n) {
|
||
new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset);
|
||
}
|
||
// Not implemented correctly
|
||
function TransferArrayBuffer(O) {
|
||
return O;
|
||
}
|
||
// Not implemented correctly
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||
function IsDetachedBuffer(O) {
|
||
return false;
|
||
}
|
||
function ArrayBufferSlice(buffer, begin, end) {
|
||
// ArrayBuffer.prototype.slice is not available on IE10
|
||
// https://www.caniuse.com/mdn-javascript_builtins_arraybuffer_slice
|
||
if (buffer.slice) {
|
||
return buffer.slice(begin, end);
|
||
}
|
||
const length = end - begin;
|
||
const slice = new ArrayBuffer(length);
|
||
CopyDataBlockBytes(slice, 0, buffer, begin, length);
|
||
return slice;
|
||
}
|
||
|
||
function IsNonNegativeNumber(v) {
|
||
if (typeof v !== 'number') {
|
||
return false;
|
||
}
|
||
if (NumberIsNaN(v)) {
|
||
return false;
|
||
}
|
||
if (v < 0) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function CloneAsUint8Array(O) {
|
||
const buffer = ArrayBufferSlice(O.buffer, O.byteOffset, O.byteOffset + O.byteLength);
|
||
return new Uint8Array(buffer);
|
||
}
|
||
|
||
function DequeueValue(container) {
|
||
const pair = container._queue.shift();
|
||
container._queueTotalSize -= pair.size;
|
||
if (container._queueTotalSize < 0) {
|
||
container._queueTotalSize = 0;
|
||
}
|
||
return pair.value;
|
||
}
|
||
function EnqueueValueWithSize(container, value, size) {
|
||
if (!IsNonNegativeNumber(size) || size === Infinity) {
|
||
throw new RangeError('Size must be a finite, non-NaN, non-negative number.');
|
||
}
|
||
container._queue.push({ value, size });
|
||
container._queueTotalSize += size;
|
||
}
|
||
function PeekQueueValue(container) {
|
||
const pair = container._queue.peek();
|
||
return pair.value;
|
||
}
|
||
function ResetQueue(container) {
|
||
container._queue = new SimpleQueue();
|
||
container._queueTotalSize = 0;
|
||
}
|
||
|
||
/**
|
||
* A pull-into request in a {@link ReadableByteStreamController}.
|
||
*
|
||
* @public
|
||
*/
|
||
class ReadableStreamBYOBRequest {
|
||
constructor() {
|
||
throw new TypeError('Illegal constructor');
|
||
}
|
||
/**
|
||
* Returns the view for writing in to, or `null` if the BYOB request has already been responded to.
|
||
*/
|
||
get view() {
|
||
if (!IsReadableStreamBYOBRequest(this)) {
|
||
throw byobRequestBrandCheckException('view');
|
||
}
|
||
return this._view;
|
||
}
|
||
respond(bytesWritten) {
|
||
if (!IsReadableStreamBYOBRequest(this)) {
|
||
throw byobRequestBrandCheckException('respond');
|
||
}
|
||
assertRequiredArgument(bytesWritten, 1, 'respond');
|
||
bytesWritten = convertUnsignedLongLongWithEnforceRange(bytesWritten, 'First parameter');
|
||
if (this._associatedReadableByteStreamController === undefined) {
|
||
throw new TypeError('This BYOB request has been invalidated');
|
||
}
|
||
if (IsDetachedBuffer(this._view.buffer)) ;
|
||
ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten);
|
||
}
|
||
respondWithNewView(view) {
|
||
if (!IsReadableStreamBYOBRequest(this)) {
|
||
throw byobRequestBrandCheckException('respondWithNewView');
|
||
}
|
||
assertRequiredArgument(view, 1, 'respondWithNewView');
|
||
if (!ArrayBuffer.isView(view)) {
|
||
throw new TypeError('You can only respond with array buffer views');
|
||
}
|
||
if (this._associatedReadableByteStreamController === undefined) {
|
||
throw new TypeError('This BYOB request has been invalidated');
|
||
}
|
||
if (IsDetachedBuffer(view.buffer)) ;
|
||
ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view);
|
||
}
|
||
}
|
||
Object.defineProperties(ReadableStreamBYOBRequest.prototype, {
|
||
respond: { enumerable: true },
|
||
respondWithNewView: { enumerable: true },
|
||
view: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(ReadableStreamBYOBRequest.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'ReadableStreamBYOBRequest',
|
||
configurable: true
|
||
});
|
||
}
|
||
/**
|
||
* Allows control of a {@link ReadableStream | readable byte stream}'s state and internal queue.
|
||
*
|
||
* @public
|
||
*/
|
||
class ReadableByteStreamController {
|
||
constructor() {
|
||
throw new TypeError('Illegal constructor');
|
||
}
|
||
/**
|
||
* Returns the current BYOB pull request, or `null` if there isn't one.
|
||
*/
|
||
get byobRequest() {
|
||
if (!IsReadableByteStreamController(this)) {
|
||
throw byteStreamControllerBrandCheckException('byobRequest');
|
||
}
|
||
return ReadableByteStreamControllerGetBYOBRequest(this);
|
||
}
|
||
/**
|
||
* Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is
|
||
* over-full. An underlying byte source ought to use this information to determine when and how to apply backpressure.
|
||
*/
|
||
get desiredSize() {
|
||
if (!IsReadableByteStreamController(this)) {
|
||
throw byteStreamControllerBrandCheckException('desiredSize');
|
||
}
|
||
return ReadableByteStreamControllerGetDesiredSize(this);
|
||
}
|
||
/**
|
||
* Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from
|
||
* the stream, but once those are read, the stream will become closed.
|
||
*/
|
||
close() {
|
||
if (!IsReadableByteStreamController(this)) {
|
||
throw byteStreamControllerBrandCheckException('close');
|
||
}
|
||
if (this._closeRequested) {
|
||
throw new TypeError('The stream has already been closed; do not close it again!');
|
||
}
|
||
const state = this._controlledReadableByteStream._state;
|
||
if (state !== 'readable') {
|
||
throw new TypeError(`The stream (in ${state} state) is not in the readable state and cannot be closed`);
|
||
}
|
||
ReadableByteStreamControllerClose(this);
|
||
}
|
||
enqueue(chunk) {
|
||
if (!IsReadableByteStreamController(this)) {
|
||
throw byteStreamControllerBrandCheckException('enqueue');
|
||
}
|
||
assertRequiredArgument(chunk, 1, 'enqueue');
|
||
if (!ArrayBuffer.isView(chunk)) {
|
||
throw new TypeError('chunk must be an array buffer view');
|
||
}
|
||
if (chunk.byteLength === 0) {
|
||
throw new TypeError('chunk must have non-zero byteLength');
|
||
}
|
||
if (chunk.buffer.byteLength === 0) {
|
||
throw new TypeError(`chunk's buffer must have non-zero byteLength`);
|
||
}
|
||
if (this._closeRequested) {
|
||
throw new TypeError('stream is closed or draining');
|
||
}
|
||
const state = this._controlledReadableByteStream._state;
|
||
if (state !== 'readable') {
|
||
throw new TypeError(`The stream (in ${state} state) is not in the readable state and cannot be enqueued to`);
|
||
}
|
||
ReadableByteStreamControllerEnqueue(this, chunk);
|
||
}
|
||
/**
|
||
* Errors the controlled readable stream, making all future interactions with it fail with the given error `e`.
|
||
*/
|
||
error(e = undefined) {
|
||
if (!IsReadableByteStreamController(this)) {
|
||
throw byteStreamControllerBrandCheckException('error');
|
||
}
|
||
ReadableByteStreamControllerError(this, e);
|
||
}
|
||
/** @internal */
|
||
[CancelSteps](reason) {
|
||
ReadableByteStreamControllerClearPendingPullIntos(this);
|
||
ResetQueue(this);
|
||
const result = this._cancelAlgorithm(reason);
|
||
ReadableByteStreamControllerClearAlgorithms(this);
|
||
return result;
|
||
}
|
||
/** @internal */
|
||
[PullSteps](readRequest) {
|
||
const stream = this._controlledReadableByteStream;
|
||
if (this._queueTotalSize > 0) {
|
||
const entry = this._queue.shift();
|
||
this._queueTotalSize -= entry.byteLength;
|
||
ReadableByteStreamControllerHandleQueueDrain(this);
|
||
const view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength);
|
||
readRequest._chunkSteps(view);
|
||
return;
|
||
}
|
||
const autoAllocateChunkSize = this._autoAllocateChunkSize;
|
||
if (autoAllocateChunkSize !== undefined) {
|
||
let buffer;
|
||
try {
|
||
buffer = new ArrayBuffer(autoAllocateChunkSize);
|
||
}
|
||
catch (bufferE) {
|
||
readRequest._errorSteps(bufferE);
|
||
return;
|
||
}
|
||
const pullIntoDescriptor = {
|
||
buffer,
|
||
bufferByteLength: autoAllocateChunkSize,
|
||
byteOffset: 0,
|
||
byteLength: autoAllocateChunkSize,
|
||
bytesFilled: 0,
|
||
elementSize: 1,
|
||
viewConstructor: Uint8Array,
|
||
readerType: 'default'
|
||
};
|
||
this._pendingPullIntos.push(pullIntoDescriptor);
|
||
}
|
||
ReadableStreamAddReadRequest(stream, readRequest);
|
||
ReadableByteStreamControllerCallPullIfNeeded(this);
|
||
}
|
||
}
|
||
Object.defineProperties(ReadableByteStreamController.prototype, {
|
||
close: { enumerable: true },
|
||
enqueue: { enumerable: true },
|
||
error: { enumerable: true },
|
||
byobRequest: { enumerable: true },
|
||
desiredSize: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(ReadableByteStreamController.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'ReadableByteStreamController',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Abstract operations for the ReadableByteStreamController.
|
||
function IsReadableByteStreamController(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableByteStream')) {
|
||
return false;
|
||
}
|
||
return x instanceof ReadableByteStreamController;
|
||
}
|
||
function IsReadableStreamBYOBRequest(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_associatedReadableByteStreamController')) {
|
||
return false;
|
||
}
|
||
return x instanceof ReadableStreamBYOBRequest;
|
||
}
|
||
function ReadableByteStreamControllerCallPullIfNeeded(controller) {
|
||
const shouldPull = ReadableByteStreamControllerShouldCallPull(controller);
|
||
if (!shouldPull) {
|
||
return;
|
||
}
|
||
if (controller._pulling) {
|
||
controller._pullAgain = true;
|
||
return;
|
||
}
|
||
controller._pulling = true;
|
||
// TODO: Test controller argument
|
||
const pullPromise = controller._pullAlgorithm();
|
||
uponPromise(pullPromise, () => {
|
||
controller._pulling = false;
|
||
if (controller._pullAgain) {
|
||
controller._pullAgain = false;
|
||
ReadableByteStreamControllerCallPullIfNeeded(controller);
|
||
}
|
||
}, e => {
|
||
ReadableByteStreamControllerError(controller, e);
|
||
});
|
||
}
|
||
function ReadableByteStreamControllerClearPendingPullIntos(controller) {
|
||
ReadableByteStreamControllerInvalidateBYOBRequest(controller);
|
||
controller._pendingPullIntos = new SimpleQueue();
|
||
}
|
||
function ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) {
|
||
let done = false;
|
||
if (stream._state === 'closed') {
|
||
done = true;
|
||
}
|
||
const filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);
|
||
if (pullIntoDescriptor.readerType === 'default') {
|
||
ReadableStreamFulfillReadRequest(stream, filledView, done);
|
||
}
|
||
else {
|
||
ReadableStreamFulfillReadIntoRequest(stream, filledView, done);
|
||
}
|
||
}
|
||
function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) {
|
||
const bytesFilled = pullIntoDescriptor.bytesFilled;
|
||
const elementSize = pullIntoDescriptor.elementSize;
|
||
return new pullIntoDescriptor.viewConstructor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize);
|
||
}
|
||
function ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) {
|
||
controller._queue.push({ buffer, byteOffset, byteLength });
|
||
controller._queueTotalSize += byteLength;
|
||
}
|
||
function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) {
|
||
const elementSize = pullIntoDescriptor.elementSize;
|
||
const currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize;
|
||
const maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled);
|
||
const maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy;
|
||
const maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize;
|
||
let totalBytesToCopyRemaining = maxBytesToCopy;
|
||
let ready = false;
|
||
if (maxAlignedBytes > currentAlignedBytes) {
|
||
totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled;
|
||
ready = true;
|
||
}
|
||
const queue = controller._queue;
|
||
while (totalBytesToCopyRemaining > 0) {
|
||
const headOfQueue = queue.peek();
|
||
const bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength);
|
||
const destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled;
|
||
CopyDataBlockBytes(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy);
|
||
if (headOfQueue.byteLength === bytesToCopy) {
|
||
queue.shift();
|
||
}
|
||
else {
|
||
headOfQueue.byteOffset += bytesToCopy;
|
||
headOfQueue.byteLength -= bytesToCopy;
|
||
}
|
||
controller._queueTotalSize -= bytesToCopy;
|
||
ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor);
|
||
totalBytesToCopyRemaining -= bytesToCopy;
|
||
}
|
||
return ready;
|
||
}
|
||
function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) {
|
||
pullIntoDescriptor.bytesFilled += size;
|
||
}
|
||
function ReadableByteStreamControllerHandleQueueDrain(controller) {
|
||
if (controller._queueTotalSize === 0 && controller._closeRequested) {
|
||
ReadableByteStreamControllerClearAlgorithms(controller);
|
||
ReadableStreamClose(controller._controlledReadableByteStream);
|
||
}
|
||
else {
|
||
ReadableByteStreamControllerCallPullIfNeeded(controller);
|
||
}
|
||
}
|
||
function ReadableByteStreamControllerInvalidateBYOBRequest(controller) {
|
||
if (controller._byobRequest === null) {
|
||
return;
|
||
}
|
||
controller._byobRequest._associatedReadableByteStreamController = undefined;
|
||
controller._byobRequest._view = null;
|
||
controller._byobRequest = null;
|
||
}
|
||
function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) {
|
||
while (controller._pendingPullIntos.length > 0) {
|
||
if (controller._queueTotalSize === 0) {
|
||
return;
|
||
}
|
||
const pullIntoDescriptor = controller._pendingPullIntos.peek();
|
||
if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) {
|
||
ReadableByteStreamControllerShiftPendingPullInto(controller);
|
||
ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor);
|
||
}
|
||
}
|
||
}
|
||
function ReadableByteStreamControllerPullInto(controller, view, readIntoRequest) {
|
||
const stream = controller._controlledReadableByteStream;
|
||
let elementSize = 1;
|
||
if (view.constructor !== DataView) {
|
||
elementSize = view.constructor.BYTES_PER_ELEMENT;
|
||
}
|
||
const ctor = view.constructor;
|
||
// try {
|
||
const buffer = TransferArrayBuffer(view.buffer);
|
||
// } catch (e) {
|
||
// readIntoRequest._errorSteps(e);
|
||
// return;
|
||
// }
|
||
const pullIntoDescriptor = {
|
||
buffer,
|
||
bufferByteLength: buffer.byteLength,
|
||
byteOffset: view.byteOffset,
|
||
byteLength: view.byteLength,
|
||
bytesFilled: 0,
|
||
elementSize,
|
||
viewConstructor: ctor,
|
||
readerType: 'byob'
|
||
};
|
||
if (controller._pendingPullIntos.length > 0) {
|
||
controller._pendingPullIntos.push(pullIntoDescriptor);
|
||
// No ReadableByteStreamControllerCallPullIfNeeded() call since:
|
||
// - No change happens on desiredSize
|
||
// - The source has already been notified of that there's at least 1 pending read(view)
|
||
ReadableStreamAddReadIntoRequest(stream, readIntoRequest);
|
||
return;
|
||
}
|
||
if (stream._state === 'closed') {
|
||
const emptyView = new ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0);
|
||
readIntoRequest._closeSteps(emptyView);
|
||
return;
|
||
}
|
||
if (controller._queueTotalSize > 0) {
|
||
if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) {
|
||
const filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);
|
||
ReadableByteStreamControllerHandleQueueDrain(controller);
|
||
readIntoRequest._chunkSteps(filledView);
|
||
return;
|
||
}
|
||
if (controller._closeRequested) {
|
||
const e = new TypeError('Insufficient bytes to fill elements in the given buffer');
|
||
ReadableByteStreamControllerError(controller, e);
|
||
readIntoRequest._errorSteps(e);
|
||
return;
|
||
}
|
||
}
|
||
controller._pendingPullIntos.push(pullIntoDescriptor);
|
||
ReadableStreamAddReadIntoRequest(stream, readIntoRequest);
|
||
ReadableByteStreamControllerCallPullIfNeeded(controller);
|
||
}
|
||
function ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) {
|
||
const stream = controller._controlledReadableByteStream;
|
||
if (ReadableStreamHasBYOBReader(stream)) {
|
||
while (ReadableStreamGetNumReadIntoRequests(stream) > 0) {
|
||
const pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller);
|
||
ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor);
|
||
}
|
||
}
|
||
}
|
||
function ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) {
|
||
ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor);
|
||
if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) {
|
||
return;
|
||
}
|
||
ReadableByteStreamControllerShiftPendingPullInto(controller);
|
||
const remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize;
|
||
if (remainderSize > 0) {
|
||
const end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled;
|
||
const remainder = ArrayBufferSlice(pullIntoDescriptor.buffer, end - remainderSize, end);
|
||
ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength);
|
||
}
|
||
pullIntoDescriptor.bytesFilled -= remainderSize;
|
||
ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor);
|
||
ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);
|
||
}
|
||
function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) {
|
||
const firstDescriptor = controller._pendingPullIntos.peek();
|
||
ReadableByteStreamControllerInvalidateBYOBRequest(controller);
|
||
const state = controller._controlledReadableByteStream._state;
|
||
if (state === 'closed') {
|
||
ReadableByteStreamControllerRespondInClosedState(controller);
|
||
}
|
||
else {
|
||
ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor);
|
||
}
|
||
ReadableByteStreamControllerCallPullIfNeeded(controller);
|
||
}
|
||
function ReadableByteStreamControllerShiftPendingPullInto(controller) {
|
||
const descriptor = controller._pendingPullIntos.shift();
|
||
return descriptor;
|
||
}
|
||
function ReadableByteStreamControllerShouldCallPull(controller) {
|
||
const stream = controller._controlledReadableByteStream;
|
||
if (stream._state !== 'readable') {
|
||
return false;
|
||
}
|
||
if (controller._closeRequested) {
|
||
return false;
|
||
}
|
||
if (!controller._started) {
|
||
return false;
|
||
}
|
||
if (ReadableStreamHasDefaultReader(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {
|
||
return true;
|
||
}
|
||
if (ReadableStreamHasBYOBReader(stream) && ReadableStreamGetNumReadIntoRequests(stream) > 0) {
|
||
return true;
|
||
}
|
||
const desiredSize = ReadableByteStreamControllerGetDesiredSize(controller);
|
||
if (desiredSize > 0) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
function ReadableByteStreamControllerClearAlgorithms(controller) {
|
||
controller._pullAlgorithm = undefined;
|
||
controller._cancelAlgorithm = undefined;
|
||
}
|
||
// A client of ReadableByteStreamController may use these functions directly to bypass state check.
|
||
function ReadableByteStreamControllerClose(controller) {
|
||
const stream = controller._controlledReadableByteStream;
|
||
if (controller._closeRequested || stream._state !== 'readable') {
|
||
return;
|
||
}
|
||
if (controller._queueTotalSize > 0) {
|
||
controller._closeRequested = true;
|
||
return;
|
||
}
|
||
if (controller._pendingPullIntos.length > 0) {
|
||
const firstPendingPullInto = controller._pendingPullIntos.peek();
|
||
if (firstPendingPullInto.bytesFilled > 0) {
|
||
const e = new TypeError('Insufficient bytes to fill elements in the given buffer');
|
||
ReadableByteStreamControllerError(controller, e);
|
||
throw e;
|
||
}
|
||
}
|
||
ReadableByteStreamControllerClearAlgorithms(controller);
|
||
ReadableStreamClose(stream);
|
||
}
|
||
function ReadableByteStreamControllerEnqueue(controller, chunk) {
|
||
const stream = controller._controlledReadableByteStream;
|
||
if (controller._closeRequested || stream._state !== 'readable') {
|
||
return;
|
||
}
|
||
const buffer = chunk.buffer;
|
||
const byteOffset = chunk.byteOffset;
|
||
const byteLength = chunk.byteLength;
|
||
const transferredBuffer = TransferArrayBuffer(buffer);
|
||
if (controller._pendingPullIntos.length > 0) {
|
||
const firstPendingPullInto = controller._pendingPullIntos.peek();
|
||
if (IsDetachedBuffer(firstPendingPullInto.buffer)) ;
|
||
firstPendingPullInto.buffer = TransferArrayBuffer(firstPendingPullInto.buffer);
|
||
}
|
||
ReadableByteStreamControllerInvalidateBYOBRequest(controller);
|
||
if (ReadableStreamHasDefaultReader(stream)) {
|
||
if (ReadableStreamGetNumReadRequests(stream) === 0) {
|
||
ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);
|
||
}
|
||
else {
|
||
if (controller._pendingPullIntos.length > 0) {
|
||
ReadableByteStreamControllerShiftPendingPullInto(controller);
|
||
}
|
||
const transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength);
|
||
ReadableStreamFulfillReadRequest(stream, transferredView, false);
|
||
}
|
||
}
|
||
else if (ReadableStreamHasBYOBReader(stream)) {
|
||
// TODO: Ideally in this branch detaching should happen only if the buffer is not consumed fully.
|
||
ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);
|
||
ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);
|
||
}
|
||
else {
|
||
ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);
|
||
}
|
||
ReadableByteStreamControllerCallPullIfNeeded(controller);
|
||
}
|
||
function ReadableByteStreamControllerError(controller, e) {
|
||
const stream = controller._controlledReadableByteStream;
|
||
if (stream._state !== 'readable') {
|
||
return;
|
||
}
|
||
ReadableByteStreamControllerClearPendingPullIntos(controller);
|
||
ResetQueue(controller);
|
||
ReadableByteStreamControllerClearAlgorithms(controller);
|
||
ReadableStreamError(stream, e);
|
||
}
|
||
function ReadableByteStreamControllerGetBYOBRequest(controller) {
|
||
if (controller._byobRequest === null && controller._pendingPullIntos.length > 0) {
|
||
const firstDescriptor = controller._pendingPullIntos.peek();
|
||
const view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled);
|
||
const byobRequest = Object.create(ReadableStreamBYOBRequest.prototype);
|
||
SetUpReadableStreamBYOBRequest(byobRequest, controller, view);
|
||
controller._byobRequest = byobRequest;
|
||
}
|
||
return controller._byobRequest;
|
||
}
|
||
function ReadableByteStreamControllerGetDesiredSize(controller) {
|
||
const state = controller._controlledReadableByteStream._state;
|
||
if (state === 'errored') {
|
||
return null;
|
||
}
|
||
if (state === 'closed') {
|
||
return 0;
|
||
}
|
||
return controller._strategyHWM - controller._queueTotalSize;
|
||
}
|
||
function ReadableByteStreamControllerRespond(controller, bytesWritten) {
|
||
const firstDescriptor = controller._pendingPullIntos.peek();
|
||
const state = controller._controlledReadableByteStream._state;
|
||
if (state === 'closed') {
|
||
if (bytesWritten !== 0) {
|
||
throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream');
|
||
}
|
||
}
|
||
else {
|
||
if (bytesWritten === 0) {
|
||
throw new TypeError('bytesWritten must be greater than 0 when calling respond() on a readable stream');
|
||
}
|
||
if (firstDescriptor.bytesFilled + bytesWritten > firstDescriptor.byteLength) {
|
||
throw new RangeError('bytesWritten out of range');
|
||
}
|
||
}
|
||
firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer);
|
||
ReadableByteStreamControllerRespondInternal(controller, bytesWritten);
|
||
}
|
||
function ReadableByteStreamControllerRespondWithNewView(controller, view) {
|
||
const firstDescriptor = controller._pendingPullIntos.peek();
|
||
const state = controller._controlledReadableByteStream._state;
|
||
if (state === 'closed') {
|
||
if (view.byteLength !== 0) {
|
||
throw new TypeError('The view\'s length must be 0 when calling respondWithNewView() on a closed stream');
|
||
}
|
||
}
|
||
else {
|
||
if (view.byteLength === 0) {
|
||
throw new TypeError('The view\'s length must be greater than 0 when calling respondWithNewView() on a readable stream');
|
||
}
|
||
}
|
||
if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) {
|
||
throw new RangeError('The region specified by view does not match byobRequest');
|
||
}
|
||
if (firstDescriptor.bufferByteLength !== view.buffer.byteLength) {
|
||
throw new RangeError('The buffer of view has different capacity than byobRequest');
|
||
}
|
||
if (firstDescriptor.bytesFilled + view.byteLength > firstDescriptor.byteLength) {
|
||
throw new RangeError('The region specified by view is larger than byobRequest');
|
||
}
|
||
const viewByteLength = view.byteLength;
|
||
firstDescriptor.buffer = TransferArrayBuffer(view.buffer);
|
||
ReadableByteStreamControllerRespondInternal(controller, viewByteLength);
|
||
}
|
||
function SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize) {
|
||
controller._controlledReadableByteStream = stream;
|
||
controller._pullAgain = false;
|
||
controller._pulling = false;
|
||
controller._byobRequest = null;
|
||
// Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.
|
||
controller._queue = controller._queueTotalSize = undefined;
|
||
ResetQueue(controller);
|
||
controller._closeRequested = false;
|
||
controller._started = false;
|
||
controller._strategyHWM = highWaterMark;
|
||
controller._pullAlgorithm = pullAlgorithm;
|
||
controller._cancelAlgorithm = cancelAlgorithm;
|
||
controller._autoAllocateChunkSize = autoAllocateChunkSize;
|
||
controller._pendingPullIntos = new SimpleQueue();
|
||
stream._readableStreamController = controller;
|
||
const startResult = startAlgorithm();
|
||
uponPromise(promiseResolvedWith(startResult), () => {
|
||
controller._started = true;
|
||
ReadableByteStreamControllerCallPullIfNeeded(controller);
|
||
}, r => {
|
||
ReadableByteStreamControllerError(controller, r);
|
||
});
|
||
}
|
||
function SetUpReadableByteStreamControllerFromUnderlyingSource(stream, underlyingByteSource, highWaterMark) {
|
||
const controller = Object.create(ReadableByteStreamController.prototype);
|
||
let startAlgorithm = () => undefined;
|
||
let pullAlgorithm = () => promiseResolvedWith(undefined);
|
||
let cancelAlgorithm = () => promiseResolvedWith(undefined);
|
||
if (underlyingByteSource.start !== undefined) {
|
||
startAlgorithm = () => underlyingByteSource.start(controller);
|
||
}
|
||
if (underlyingByteSource.pull !== undefined) {
|
||
pullAlgorithm = () => underlyingByteSource.pull(controller);
|
||
}
|
||
if (underlyingByteSource.cancel !== undefined) {
|
||
cancelAlgorithm = reason => underlyingByteSource.cancel(reason);
|
||
}
|
||
const autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize;
|
||
if (autoAllocateChunkSize === 0) {
|
||
throw new TypeError('autoAllocateChunkSize must be greater than 0');
|
||
}
|
||
SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize);
|
||
}
|
||
function SetUpReadableStreamBYOBRequest(request, controller, view) {
|
||
request._associatedReadableByteStreamController = controller;
|
||
request._view = view;
|
||
}
|
||
// Helper functions for the ReadableStreamBYOBRequest.
|
||
function byobRequestBrandCheckException(name) {
|
||
return new TypeError(`ReadableStreamBYOBRequest.prototype.${name} can only be used on a ReadableStreamBYOBRequest`);
|
||
}
|
||
// Helper functions for the ReadableByteStreamController.
|
||
function byteStreamControllerBrandCheckException(name) {
|
||
return new TypeError(`ReadableByteStreamController.prototype.${name} can only be used on a ReadableByteStreamController`);
|
||
}
|
||
|
||
// Abstract operations for the ReadableStream.
|
||
function AcquireReadableStreamBYOBReader(stream) {
|
||
return new ReadableStreamBYOBReader(stream);
|
||
}
|
||
// ReadableStream API exposed for controllers.
|
||
function ReadableStreamAddReadIntoRequest(stream, readIntoRequest) {
|
||
stream._reader._readIntoRequests.push(readIntoRequest);
|
||
}
|
||
function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) {
|
||
const reader = stream._reader;
|
||
const readIntoRequest = reader._readIntoRequests.shift();
|
||
if (done) {
|
||
readIntoRequest._closeSteps(chunk);
|
||
}
|
||
else {
|
||
readIntoRequest._chunkSteps(chunk);
|
||
}
|
||
}
|
||
function ReadableStreamGetNumReadIntoRequests(stream) {
|
||
return stream._reader._readIntoRequests.length;
|
||
}
|
||
function ReadableStreamHasBYOBReader(stream) {
|
||
const reader = stream._reader;
|
||
if (reader === undefined) {
|
||
return false;
|
||
}
|
||
if (!IsReadableStreamBYOBReader(reader)) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
/**
|
||
* A BYOB reader vended by a {@link ReadableStream}.
|
||
*
|
||
* @public
|
||
*/
|
||
class ReadableStreamBYOBReader {
|
||
constructor(stream) {
|
||
assertRequiredArgument(stream, 1, 'ReadableStreamBYOBReader');
|
||
assertReadableStream(stream, 'First parameter');
|
||
if (IsReadableStreamLocked(stream)) {
|
||
throw new TypeError('This stream has already been locked for exclusive reading by another reader');
|
||
}
|
||
if (!IsReadableByteStreamController(stream._readableStreamController)) {
|
||
throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte ' +
|
||
'source');
|
||
}
|
||
ReadableStreamReaderGenericInitialize(this, stream);
|
||
this._readIntoRequests = new SimpleQueue();
|
||
}
|
||
/**
|
||
* Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or
|
||
* the reader's lock is released before the stream finishes closing.
|
||
*/
|
||
get closed() {
|
||
if (!IsReadableStreamBYOBReader(this)) {
|
||
return promiseRejectedWith(byobReaderBrandCheckException('closed'));
|
||
}
|
||
return this._closedPromise;
|
||
}
|
||
/**
|
||
* If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}.
|
||
*/
|
||
cancel(reason = undefined) {
|
||
if (!IsReadableStreamBYOBReader(this)) {
|
||
return promiseRejectedWith(byobReaderBrandCheckException('cancel'));
|
||
}
|
||
if (this._ownerReadableStream === undefined) {
|
||
return promiseRejectedWith(readerLockException('cancel'));
|
||
}
|
||
return ReadableStreamReaderGenericCancel(this, reason);
|
||
}
|
||
/**
|
||
* Attempts to reads bytes into view, and returns a promise resolved with the result.
|
||
*
|
||
* If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source.
|
||
*/
|
||
read(view) {
|
||
if (!IsReadableStreamBYOBReader(this)) {
|
||
return promiseRejectedWith(byobReaderBrandCheckException('read'));
|
||
}
|
||
if (!ArrayBuffer.isView(view)) {
|
||
return promiseRejectedWith(new TypeError('view must be an array buffer view'));
|
||
}
|
||
if (view.byteLength === 0) {
|
||
return promiseRejectedWith(new TypeError('view must have non-zero byteLength'));
|
||
}
|
||
if (view.buffer.byteLength === 0) {
|
||
return promiseRejectedWith(new TypeError(`view's buffer must have non-zero byteLength`));
|
||
}
|
||
if (IsDetachedBuffer(view.buffer)) ;
|
||
if (this._ownerReadableStream === undefined) {
|
||
return promiseRejectedWith(readerLockException('read from'));
|
||
}
|
||
let resolvePromise;
|
||
let rejectPromise;
|
||
const promise = newPromise((resolve, reject) => {
|
||
resolvePromise = resolve;
|
||
rejectPromise = reject;
|
||
});
|
||
const readIntoRequest = {
|
||
_chunkSteps: chunk => resolvePromise({ value: chunk, done: false }),
|
||
_closeSteps: chunk => resolvePromise({ value: chunk, done: true }),
|
||
_errorSteps: e => rejectPromise(e)
|
||
};
|
||
ReadableStreamBYOBReaderRead(this, view, readIntoRequest);
|
||
return promise;
|
||
}
|
||
/**
|
||
* Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active.
|
||
* If the associated stream is errored when the lock is released, the reader will appear errored in the same way
|
||
* from now on; otherwise, the reader will appear closed.
|
||
*
|
||
* A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by
|
||
* the reader's {@link ReadableStreamBYOBReader.read | read()} method has not yet been settled. Attempting to
|
||
* do so will throw a `TypeError` and leave the reader locked to the stream.
|
||
*/
|
||
releaseLock() {
|
||
if (!IsReadableStreamBYOBReader(this)) {
|
||
throw byobReaderBrandCheckException('releaseLock');
|
||
}
|
||
if (this._ownerReadableStream === undefined) {
|
||
return;
|
||
}
|
||
if (this._readIntoRequests.length > 0) {
|
||
throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled');
|
||
}
|
||
ReadableStreamReaderGenericRelease(this);
|
||
}
|
||
}
|
||
Object.defineProperties(ReadableStreamBYOBReader.prototype, {
|
||
cancel: { enumerable: true },
|
||
read: { enumerable: true },
|
||
releaseLock: { enumerable: true },
|
||
closed: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(ReadableStreamBYOBReader.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'ReadableStreamBYOBReader',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Abstract operations for the readers.
|
||
function IsReadableStreamBYOBReader(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_readIntoRequests')) {
|
||
return false;
|
||
}
|
||
return x instanceof ReadableStreamBYOBReader;
|
||
}
|
||
function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest) {
|
||
const stream = reader._ownerReadableStream;
|
||
stream._disturbed = true;
|
||
if (stream._state === 'errored') {
|
||
readIntoRequest._errorSteps(stream._storedError);
|
||
}
|
||
else {
|
||
ReadableByteStreamControllerPullInto(stream._readableStreamController, view, readIntoRequest);
|
||
}
|
||
}
|
||
// Helper functions for the ReadableStreamBYOBReader.
|
||
function byobReaderBrandCheckException(name) {
|
||
return new TypeError(`ReadableStreamBYOBReader.prototype.${name} can only be used on a ReadableStreamBYOBReader`);
|
||
}
|
||
|
||
function ExtractHighWaterMark(strategy, defaultHWM) {
|
||
const { highWaterMark } = strategy;
|
||
if (highWaterMark === undefined) {
|
||
return defaultHWM;
|
||
}
|
||
if (NumberIsNaN(highWaterMark) || highWaterMark < 0) {
|
||
throw new RangeError('Invalid highWaterMark');
|
||
}
|
||
return highWaterMark;
|
||
}
|
||
function ExtractSizeAlgorithm(strategy) {
|
||
const { size } = strategy;
|
||
if (!size) {
|
||
return () => 1;
|
||
}
|
||
return size;
|
||
}
|
||
|
||
function convertQueuingStrategy(init, context) {
|
||
assertDictionary(init, context);
|
||
const highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark;
|
||
const size = init === null || init === void 0 ? void 0 : init.size;
|
||
return {
|
||
highWaterMark: highWaterMark === undefined ? undefined : convertUnrestrictedDouble(highWaterMark),
|
||
size: size === undefined ? undefined : convertQueuingStrategySize(size, `${context} has member 'size' that`)
|
||
};
|
||
}
|
||
function convertQueuingStrategySize(fn, context) {
|
||
assertFunction(fn, context);
|
||
return chunk => convertUnrestrictedDouble(fn(chunk));
|
||
}
|
||
|
||
function convertUnderlyingSink(original, context) {
|
||
assertDictionary(original, context);
|
||
const abort = original === null || original === void 0 ? void 0 : original.abort;
|
||
const close = original === null || original === void 0 ? void 0 : original.close;
|
||
const start = original === null || original === void 0 ? void 0 : original.start;
|
||
const type = original === null || original === void 0 ? void 0 : original.type;
|
||
const write = original === null || original === void 0 ? void 0 : original.write;
|
||
return {
|
||
abort: abort === undefined ?
|
||
undefined :
|
||
convertUnderlyingSinkAbortCallback(abort, original, `${context} has member 'abort' that`),
|
||
close: close === undefined ?
|
||
undefined :
|
||
convertUnderlyingSinkCloseCallback(close, original, `${context} has member 'close' that`),
|
||
start: start === undefined ?
|
||
undefined :
|
||
convertUnderlyingSinkStartCallback(start, original, `${context} has member 'start' that`),
|
||
write: write === undefined ?
|
||
undefined :
|
||
convertUnderlyingSinkWriteCallback(write, original, `${context} has member 'write' that`),
|
||
type
|
||
};
|
||
}
|
||
function convertUnderlyingSinkAbortCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return (reason) => promiseCall(fn, original, [reason]);
|
||
}
|
||
function convertUnderlyingSinkCloseCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return () => promiseCall(fn, original, []);
|
||
}
|
||
function convertUnderlyingSinkStartCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return (controller) => reflectCall(fn, original, [controller]);
|
||
}
|
||
function convertUnderlyingSinkWriteCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return (chunk, controller) => promiseCall(fn, original, [chunk, controller]);
|
||
}
|
||
|
||
function assertWritableStream(x, context) {
|
||
if (!IsWritableStream(x)) {
|
||
throw new TypeError(`${context} is not a WritableStream.`);
|
||
}
|
||
}
|
||
|
||
function isAbortSignal(value) {
|
||
if (typeof value !== 'object' || value === null) {
|
||
return false;
|
||
}
|
||
try {
|
||
return typeof value.aborted === 'boolean';
|
||
}
|
||
catch (_a) {
|
||
// AbortSignal.prototype.aborted throws if its brand check fails
|
||
return false;
|
||
}
|
||
}
|
||
const supportsAbortController = typeof AbortController === 'function';
|
||
/**
|
||
* Construct a new AbortController, if supported by the platform.
|
||
*
|
||
* @internal
|
||
*/
|
||
function createAbortController() {
|
||
if (supportsAbortController) {
|
||
return new AbortController();
|
||
}
|
||
return undefined;
|
||
}
|
||
|
||
/**
|
||
* A writable stream represents a destination for data, into which you can write.
|
||
*
|
||
* @public
|
||
*/
|
||
class WritableStream {
|
||
constructor(rawUnderlyingSink = {}, rawStrategy = {}) {
|
||
if (rawUnderlyingSink === undefined) {
|
||
rawUnderlyingSink = null;
|
||
}
|
||
else {
|
||
assertObject(rawUnderlyingSink, 'First parameter');
|
||
}
|
||
const strategy = convertQueuingStrategy(rawStrategy, 'Second parameter');
|
||
const underlyingSink = convertUnderlyingSink(rawUnderlyingSink, 'First parameter');
|
||
InitializeWritableStream(this);
|
||
const type = underlyingSink.type;
|
||
if (type !== undefined) {
|
||
throw new RangeError('Invalid type is specified');
|
||
}
|
||
const sizeAlgorithm = ExtractSizeAlgorithm(strategy);
|
||
const highWaterMark = ExtractHighWaterMark(strategy, 1);
|
||
SetUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, highWaterMark, sizeAlgorithm);
|
||
}
|
||
/**
|
||
* Returns whether or not the writable stream is locked to a writer.
|
||
*/
|
||
get locked() {
|
||
if (!IsWritableStream(this)) {
|
||
throw streamBrandCheckException$2('locked');
|
||
}
|
||
return IsWritableStreamLocked(this);
|
||
}
|
||
/**
|
||
* Aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be
|
||
* immediately moved to an errored state, with any queued-up writes discarded. This will also execute any abort
|
||
* mechanism of the underlying sink.
|
||
*
|
||
* The returned promise will fulfill if the stream shuts down successfully, or reject if the underlying sink signaled
|
||
* that there was an error doing so. Additionally, it will reject with a `TypeError` (without attempting to cancel
|
||
* the stream) if the stream is currently locked.
|
||
*/
|
||
abort(reason = undefined) {
|
||
if (!IsWritableStream(this)) {
|
||
return promiseRejectedWith(streamBrandCheckException$2('abort'));
|
||
}
|
||
if (IsWritableStreamLocked(this)) {
|
||
return promiseRejectedWith(new TypeError('Cannot abort a stream that already has a writer'));
|
||
}
|
||
return WritableStreamAbort(this, reason);
|
||
}
|
||
/**
|
||
* Closes the stream. The underlying sink will finish processing any previously-written chunks, before invoking its
|
||
* close behavior. During this time any further attempts to write will fail (without erroring the stream).
|
||
*
|
||
* The method returns a promise that will fulfill if all remaining chunks are successfully written and the stream
|
||
* successfully closes, or rejects if an error is encountered during this process. Additionally, it will reject with
|
||
* a `TypeError` (without attempting to cancel the stream) if the stream is currently locked.
|
||
*/
|
||
close() {
|
||
if (!IsWritableStream(this)) {
|
||
return promiseRejectedWith(streamBrandCheckException$2('close'));
|
||
}
|
||
if (IsWritableStreamLocked(this)) {
|
||
return promiseRejectedWith(new TypeError('Cannot close a stream that already has a writer'));
|
||
}
|
||
if (WritableStreamCloseQueuedOrInFlight(this)) {
|
||
return promiseRejectedWith(new TypeError('Cannot close an already-closing stream'));
|
||
}
|
||
return WritableStreamClose(this);
|
||
}
|
||
/**
|
||
* Creates a {@link WritableStreamDefaultWriter | writer} and locks the stream to the new writer. While the stream
|
||
* is locked, no other writer can be acquired until this one is released.
|
||
*
|
||
* This functionality is especially useful for creating abstractions that desire the ability to write to a stream
|
||
* without interruption or interleaving. By getting a writer for the stream, you can ensure nobody else can write at
|
||
* the same time, which would cause the resulting written data to be unpredictable and probably useless.
|
||
*/
|
||
getWriter() {
|
||
if (!IsWritableStream(this)) {
|
||
throw streamBrandCheckException$2('getWriter');
|
||
}
|
||
return AcquireWritableStreamDefaultWriter(this);
|
||
}
|
||
}
|
||
Object.defineProperties(WritableStream.prototype, {
|
||
abort: { enumerable: true },
|
||
close: { enumerable: true },
|
||
getWriter: { enumerable: true },
|
||
locked: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(WritableStream.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'WritableStream',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Abstract operations for the WritableStream.
|
||
function AcquireWritableStreamDefaultWriter(stream) {
|
||
return new WritableStreamDefaultWriter(stream);
|
||
}
|
||
// Throws if and only if startAlgorithm throws.
|
||
function CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1) {
|
||
const stream = Object.create(WritableStream.prototype);
|
||
InitializeWritableStream(stream);
|
||
const controller = Object.create(WritableStreamDefaultController.prototype);
|
||
SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm);
|
||
return stream;
|
||
}
|
||
function InitializeWritableStream(stream) {
|
||
stream._state = 'writable';
|
||
// The error that will be reported by new method calls once the state becomes errored. Only set when [[state]] is
|
||
// 'erroring' or 'errored'. May be set to an undefined value.
|
||
stream._storedError = undefined;
|
||
stream._writer = undefined;
|
||
// Initialize to undefined first because the constructor of the controller checks this
|
||
// variable to validate the caller.
|
||
stream._writableStreamController = undefined;
|
||
// This queue is placed here instead of the writer class in order to allow for passing a writer to the next data
|
||
// producer without waiting for the queued writes to finish.
|
||
stream._writeRequests = new SimpleQueue();
|
||
// Write requests are removed from _writeRequests when write() is called on the underlying sink. This prevents
|
||
// them from being erroneously rejected on error. If a write() call is in-flight, the request is stored here.
|
||
stream._inFlightWriteRequest = undefined;
|
||
// The promise that was returned from writer.close(). Stored here because it may be fulfilled after the writer
|
||
// has been detached.
|
||
stream._closeRequest = undefined;
|
||
// Close request is removed from _closeRequest when close() is called on the underlying sink. This prevents it
|
||
// from being erroneously rejected on error. If a close() call is in-flight, the request is stored here.
|
||
stream._inFlightCloseRequest = undefined;
|
||
// The promise that was returned from writer.abort(). This may also be fulfilled after the writer has detached.
|
||
stream._pendingAbortRequest = undefined;
|
||
// The backpressure signal set by the controller.
|
||
stream._backpressure = false;
|
||
}
|
||
function IsWritableStream(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) {
|
||
return false;
|
||
}
|
||
return x instanceof WritableStream;
|
||
}
|
||
function IsWritableStreamLocked(stream) {
|
||
if (stream._writer === undefined) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function WritableStreamAbort(stream, reason) {
|
||
var _a;
|
||
if (stream._state === 'closed' || stream._state === 'errored') {
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
stream._writableStreamController._abortReason = reason;
|
||
(_a = stream._writableStreamController._abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
||
// TypeScript narrows the type of `stream._state` down to 'writable' | 'erroring',
|
||
// but it doesn't know that signaling abort runs author code that might have changed the state.
|
||
// Widen the type again by casting to WritableStreamState.
|
||
const state = stream._state;
|
||
if (state === 'closed' || state === 'errored') {
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
if (stream._pendingAbortRequest !== undefined) {
|
||
return stream._pendingAbortRequest._promise;
|
||
}
|
||
let wasAlreadyErroring = false;
|
||
if (state === 'erroring') {
|
||
wasAlreadyErroring = true;
|
||
// reason will not be used, so don't keep a reference to it.
|
||
reason = undefined;
|
||
}
|
||
const promise = newPromise((resolve, reject) => {
|
||
stream._pendingAbortRequest = {
|
||
_promise: undefined,
|
||
_resolve: resolve,
|
||
_reject: reject,
|
||
_reason: reason,
|
||
_wasAlreadyErroring: wasAlreadyErroring
|
||
};
|
||
});
|
||
stream._pendingAbortRequest._promise = promise;
|
||
if (!wasAlreadyErroring) {
|
||
WritableStreamStartErroring(stream, reason);
|
||
}
|
||
return promise;
|
||
}
|
||
function WritableStreamClose(stream) {
|
||
const state = stream._state;
|
||
if (state === 'closed' || state === 'errored') {
|
||
return promiseRejectedWith(new TypeError(`The stream (in ${state} state) is not in the writable state and cannot be closed`));
|
||
}
|
||
const promise = newPromise((resolve, reject) => {
|
||
const closeRequest = {
|
||
_resolve: resolve,
|
||
_reject: reject
|
||
};
|
||
stream._closeRequest = closeRequest;
|
||
});
|
||
const writer = stream._writer;
|
||
if (writer !== undefined && stream._backpressure && state === 'writable') {
|
||
defaultWriterReadyPromiseResolve(writer);
|
||
}
|
||
WritableStreamDefaultControllerClose(stream._writableStreamController);
|
||
return promise;
|
||
}
|
||
// WritableStream API exposed for controllers.
|
||
function WritableStreamAddWriteRequest(stream) {
|
||
const promise = newPromise((resolve, reject) => {
|
||
const writeRequest = {
|
||
_resolve: resolve,
|
||
_reject: reject
|
||
};
|
||
stream._writeRequests.push(writeRequest);
|
||
});
|
||
return promise;
|
||
}
|
||
function WritableStreamDealWithRejection(stream, error) {
|
||
const state = stream._state;
|
||
if (state === 'writable') {
|
||
WritableStreamStartErroring(stream, error);
|
||
return;
|
||
}
|
||
WritableStreamFinishErroring(stream);
|
||
}
|
||
function WritableStreamStartErroring(stream, reason) {
|
||
const controller = stream._writableStreamController;
|
||
stream._state = 'erroring';
|
||
stream._storedError = reason;
|
||
const writer = stream._writer;
|
||
if (writer !== undefined) {
|
||
WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason);
|
||
}
|
||
if (!WritableStreamHasOperationMarkedInFlight(stream) && controller._started) {
|
||
WritableStreamFinishErroring(stream);
|
||
}
|
||
}
|
||
function WritableStreamFinishErroring(stream) {
|
||
stream._state = 'errored';
|
||
stream._writableStreamController[ErrorSteps]();
|
||
const storedError = stream._storedError;
|
||
stream._writeRequests.forEach(writeRequest => {
|
||
writeRequest._reject(storedError);
|
||
});
|
||
stream._writeRequests = new SimpleQueue();
|
||
if (stream._pendingAbortRequest === undefined) {
|
||
WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
|
||
return;
|
||
}
|
||
const abortRequest = stream._pendingAbortRequest;
|
||
stream._pendingAbortRequest = undefined;
|
||
if (abortRequest._wasAlreadyErroring) {
|
||
abortRequest._reject(storedError);
|
||
WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
|
||
return;
|
||
}
|
||
const promise = stream._writableStreamController[AbortSteps](abortRequest._reason);
|
||
uponPromise(promise, () => {
|
||
abortRequest._resolve();
|
||
WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
|
||
}, (reason) => {
|
||
abortRequest._reject(reason);
|
||
WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
|
||
});
|
||
}
|
||
function WritableStreamFinishInFlightWrite(stream) {
|
||
stream._inFlightWriteRequest._resolve(undefined);
|
||
stream._inFlightWriteRequest = undefined;
|
||
}
|
||
function WritableStreamFinishInFlightWriteWithError(stream, error) {
|
||
stream._inFlightWriteRequest._reject(error);
|
||
stream._inFlightWriteRequest = undefined;
|
||
WritableStreamDealWithRejection(stream, error);
|
||
}
|
||
function WritableStreamFinishInFlightClose(stream) {
|
||
stream._inFlightCloseRequest._resolve(undefined);
|
||
stream._inFlightCloseRequest = undefined;
|
||
const state = stream._state;
|
||
if (state === 'erroring') {
|
||
// The error was too late to do anything, so it is ignored.
|
||
stream._storedError = undefined;
|
||
if (stream._pendingAbortRequest !== undefined) {
|
||
stream._pendingAbortRequest._resolve();
|
||
stream._pendingAbortRequest = undefined;
|
||
}
|
||
}
|
||
stream._state = 'closed';
|
||
const writer = stream._writer;
|
||
if (writer !== undefined) {
|
||
defaultWriterClosedPromiseResolve(writer);
|
||
}
|
||
}
|
||
function WritableStreamFinishInFlightCloseWithError(stream, error) {
|
||
stream._inFlightCloseRequest._reject(error);
|
||
stream._inFlightCloseRequest = undefined;
|
||
// Never execute sink abort() after sink close().
|
||
if (stream._pendingAbortRequest !== undefined) {
|
||
stream._pendingAbortRequest._reject(error);
|
||
stream._pendingAbortRequest = undefined;
|
||
}
|
||
WritableStreamDealWithRejection(stream, error);
|
||
}
|
||
// TODO(ricea): Fix alphabetical order.
|
||
function WritableStreamCloseQueuedOrInFlight(stream) {
|
||
if (stream._closeRequest === undefined && stream._inFlightCloseRequest === undefined) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function WritableStreamHasOperationMarkedInFlight(stream) {
|
||
if (stream._inFlightWriteRequest === undefined && stream._inFlightCloseRequest === undefined) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function WritableStreamMarkCloseRequestInFlight(stream) {
|
||
stream._inFlightCloseRequest = stream._closeRequest;
|
||
stream._closeRequest = undefined;
|
||
}
|
||
function WritableStreamMarkFirstWriteRequestInFlight(stream) {
|
||
stream._inFlightWriteRequest = stream._writeRequests.shift();
|
||
}
|
||
function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) {
|
||
if (stream._closeRequest !== undefined) {
|
||
stream._closeRequest._reject(stream._storedError);
|
||
stream._closeRequest = undefined;
|
||
}
|
||
const writer = stream._writer;
|
||
if (writer !== undefined) {
|
||
defaultWriterClosedPromiseReject(writer, stream._storedError);
|
||
}
|
||
}
|
||
function WritableStreamUpdateBackpressure(stream, backpressure) {
|
||
const writer = stream._writer;
|
||
if (writer !== undefined && backpressure !== stream._backpressure) {
|
||
if (backpressure) {
|
||
defaultWriterReadyPromiseReset(writer);
|
||
}
|
||
else {
|
||
defaultWriterReadyPromiseResolve(writer);
|
||
}
|
||
}
|
||
stream._backpressure = backpressure;
|
||
}
|
||
/**
|
||
* A default writer vended by a {@link WritableStream}.
|
||
*
|
||
* @public
|
||
*/
|
||
class WritableStreamDefaultWriter {
|
||
constructor(stream) {
|
||
assertRequiredArgument(stream, 1, 'WritableStreamDefaultWriter');
|
||
assertWritableStream(stream, 'First parameter');
|
||
if (IsWritableStreamLocked(stream)) {
|
||
throw new TypeError('This stream has already been locked for exclusive writing by another writer');
|
||
}
|
||
this._ownerWritableStream = stream;
|
||
stream._writer = this;
|
||
const state = stream._state;
|
||
if (state === 'writable') {
|
||
if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._backpressure) {
|
||
defaultWriterReadyPromiseInitialize(this);
|
||
}
|
||
else {
|
||
defaultWriterReadyPromiseInitializeAsResolved(this);
|
||
}
|
||
defaultWriterClosedPromiseInitialize(this);
|
||
}
|
||
else if (state === 'erroring') {
|
||
defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError);
|
||
defaultWriterClosedPromiseInitialize(this);
|
||
}
|
||
else if (state === 'closed') {
|
||
defaultWriterReadyPromiseInitializeAsResolved(this);
|
||
defaultWriterClosedPromiseInitializeAsResolved(this);
|
||
}
|
||
else {
|
||
const storedError = stream._storedError;
|
||
defaultWriterReadyPromiseInitializeAsRejected(this, storedError);
|
||
defaultWriterClosedPromiseInitializeAsRejected(this, storedError);
|
||
}
|
||
}
|
||
/**
|
||
* Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or
|
||
* the writer’s lock is released before the stream finishes closing.
|
||
*/
|
||
get closed() {
|
||
if (!IsWritableStreamDefaultWriter(this)) {
|
||
return promiseRejectedWith(defaultWriterBrandCheckException('closed'));
|
||
}
|
||
return this._closedPromise;
|
||
}
|
||
/**
|
||
* Returns the desired size to fill the stream’s internal queue. It can be negative, if the queue is over-full.
|
||
* A producer can use this information to determine the right amount of data to write.
|
||
*
|
||
* It will be `null` if the stream cannot be successfully written to (due to either being errored, or having an abort
|
||
* queued up). It will return zero if the stream is closed. And the getter will throw an exception if invoked when
|
||
* the writer’s lock is released.
|
||
*/
|
||
get desiredSize() {
|
||
if (!IsWritableStreamDefaultWriter(this)) {
|
||
throw defaultWriterBrandCheckException('desiredSize');
|
||
}
|
||
if (this._ownerWritableStream === undefined) {
|
||
throw defaultWriterLockException('desiredSize');
|
||
}
|
||
return WritableStreamDefaultWriterGetDesiredSize(this);
|
||
}
|
||
/**
|
||
* Returns a promise that will be fulfilled when the desired size to fill the stream’s internal queue transitions
|
||
* from non-positive to positive, signaling that it is no longer applying backpressure. Once the desired size dips
|
||
* back to zero or below, the getter will return a new promise that stays pending until the next transition.
|
||
*
|
||
* If the stream becomes errored or aborted, or the writer’s lock is released, the returned promise will become
|
||
* rejected.
|
||
*/
|
||
get ready() {
|
||
if (!IsWritableStreamDefaultWriter(this)) {
|
||
return promiseRejectedWith(defaultWriterBrandCheckException('ready'));
|
||
}
|
||
return this._readyPromise;
|
||
}
|
||
/**
|
||
* If the reader is active, behaves the same as {@link WritableStream.abort | stream.abort(reason)}.
|
||
*/
|
||
abort(reason = undefined) {
|
||
if (!IsWritableStreamDefaultWriter(this)) {
|
||
return promiseRejectedWith(defaultWriterBrandCheckException('abort'));
|
||
}
|
||
if (this._ownerWritableStream === undefined) {
|
||
return promiseRejectedWith(defaultWriterLockException('abort'));
|
||
}
|
||
return WritableStreamDefaultWriterAbort(this, reason);
|
||
}
|
||
/**
|
||
* If the reader is active, behaves the same as {@link WritableStream.close | stream.close()}.
|
||
*/
|
||
close() {
|
||
if (!IsWritableStreamDefaultWriter(this)) {
|
||
return promiseRejectedWith(defaultWriterBrandCheckException('close'));
|
||
}
|
||
const stream = this._ownerWritableStream;
|
||
if (stream === undefined) {
|
||
return promiseRejectedWith(defaultWriterLockException('close'));
|
||
}
|
||
if (WritableStreamCloseQueuedOrInFlight(stream)) {
|
||
return promiseRejectedWith(new TypeError('Cannot close an already-closing stream'));
|
||
}
|
||
return WritableStreamDefaultWriterClose(this);
|
||
}
|
||
/**
|
||
* Releases the writer’s lock on the corresponding stream. After the lock is released, the writer is no longer active.
|
||
* If the associated stream is errored when the lock is released, the writer will appear errored in the same way from
|
||
* now on; otherwise, the writer will appear closed.
|
||
*
|
||
* Note that the lock can still be released even if some ongoing writes have not yet finished (i.e. even if the
|
||
* promises returned from previous calls to {@link WritableStreamDefaultWriter.write | write()} have not yet settled).
|
||
* It’s not necessary to hold the lock on the writer for the duration of the write; the lock instead simply prevents
|
||
* other producers from writing in an interleaved manner.
|
||
*/
|
||
releaseLock() {
|
||
if (!IsWritableStreamDefaultWriter(this)) {
|
||
throw defaultWriterBrandCheckException('releaseLock');
|
||
}
|
||
const stream = this._ownerWritableStream;
|
||
if (stream === undefined) {
|
||
return;
|
||
}
|
||
WritableStreamDefaultWriterRelease(this);
|
||
}
|
||
write(chunk = undefined) {
|
||
if (!IsWritableStreamDefaultWriter(this)) {
|
||
return promiseRejectedWith(defaultWriterBrandCheckException('write'));
|
||
}
|
||
if (this._ownerWritableStream === undefined) {
|
||
return promiseRejectedWith(defaultWriterLockException('write to'));
|
||
}
|
||
return WritableStreamDefaultWriterWrite(this, chunk);
|
||
}
|
||
}
|
||
Object.defineProperties(WritableStreamDefaultWriter.prototype, {
|
||
abort: { enumerable: true },
|
||
close: { enumerable: true },
|
||
releaseLock: { enumerable: true },
|
||
write: { enumerable: true },
|
||
closed: { enumerable: true },
|
||
desiredSize: { enumerable: true },
|
||
ready: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(WritableStreamDefaultWriter.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'WritableStreamDefaultWriter',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Abstract operations for the WritableStreamDefaultWriter.
|
||
function IsWritableStreamDefaultWriter(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_ownerWritableStream')) {
|
||
return false;
|
||
}
|
||
return x instanceof WritableStreamDefaultWriter;
|
||
}
|
||
// A client of WritableStreamDefaultWriter may use these functions directly to bypass state check.
|
||
function WritableStreamDefaultWriterAbort(writer, reason) {
|
||
const stream = writer._ownerWritableStream;
|
||
return WritableStreamAbort(stream, reason);
|
||
}
|
||
function WritableStreamDefaultWriterClose(writer) {
|
||
const stream = writer._ownerWritableStream;
|
||
return WritableStreamClose(stream);
|
||
}
|
||
function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) {
|
||
const stream = writer._ownerWritableStream;
|
||
const state = stream._state;
|
||
if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') {
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
if (state === 'errored') {
|
||
return promiseRejectedWith(stream._storedError);
|
||
}
|
||
return WritableStreamDefaultWriterClose(writer);
|
||
}
|
||
function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) {
|
||
if (writer._closedPromiseState === 'pending') {
|
||
defaultWriterClosedPromiseReject(writer, error);
|
||
}
|
||
else {
|
||
defaultWriterClosedPromiseResetToRejected(writer, error);
|
||
}
|
||
}
|
||
function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) {
|
||
if (writer._readyPromiseState === 'pending') {
|
||
defaultWriterReadyPromiseReject(writer, error);
|
||
}
|
||
else {
|
||
defaultWriterReadyPromiseResetToRejected(writer, error);
|
||
}
|
||
}
|
||
function WritableStreamDefaultWriterGetDesiredSize(writer) {
|
||
const stream = writer._ownerWritableStream;
|
||
const state = stream._state;
|
||
if (state === 'errored' || state === 'erroring') {
|
||
return null;
|
||
}
|
||
if (state === 'closed') {
|
||
return 0;
|
||
}
|
||
return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController);
|
||
}
|
||
function WritableStreamDefaultWriterRelease(writer) {
|
||
const stream = writer._ownerWritableStream;
|
||
const releasedError = new TypeError(`Writer was released and can no longer be used to monitor the stream's closedness`);
|
||
WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError);
|
||
// The state transitions to "errored" before the sink abort() method runs, but the writer.closed promise is not
|
||
// rejected until afterwards. This means that simply testing state will not work.
|
||
WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError);
|
||
stream._writer = undefined;
|
||
writer._ownerWritableStream = undefined;
|
||
}
|
||
function WritableStreamDefaultWriterWrite(writer, chunk) {
|
||
const stream = writer._ownerWritableStream;
|
||
const controller = stream._writableStreamController;
|
||
const chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk);
|
||
if (stream !== writer._ownerWritableStream) {
|
||
return promiseRejectedWith(defaultWriterLockException('write to'));
|
||
}
|
||
const state = stream._state;
|
||
if (state === 'errored') {
|
||
return promiseRejectedWith(stream._storedError);
|
||
}
|
||
if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') {
|
||
return promiseRejectedWith(new TypeError('The stream is closing or closed and cannot be written to'));
|
||
}
|
||
if (state === 'erroring') {
|
||
return promiseRejectedWith(stream._storedError);
|
||
}
|
||
const promise = WritableStreamAddWriteRequest(stream);
|
||
WritableStreamDefaultControllerWrite(controller, chunk, chunkSize);
|
||
return promise;
|
||
}
|
||
const closeSentinel = {};
|
||
/**
|
||
* Allows control of a {@link WritableStream | writable stream}'s state and internal queue.
|
||
*
|
||
* @public
|
||
*/
|
||
class WritableStreamDefaultController {
|
||
constructor() {
|
||
throw new TypeError('Illegal constructor');
|
||
}
|
||
/**
|
||
* The reason which was passed to `WritableStream.abort(reason)` when the stream was aborted.
|
||
*
|
||
* @deprecated
|
||
* This property has been removed from the specification, see https://github.com/whatwg/streams/pull/1177.
|
||
* Use {@link WritableStreamDefaultController.signal}'s `reason` instead.
|
||
*/
|
||
get abortReason() {
|
||
if (!IsWritableStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException$2('abortReason');
|
||
}
|
||
return this._abortReason;
|
||
}
|
||
/**
|
||
* An `AbortSignal` that can be used to abort the pending write or close operation when the stream is aborted.
|
||
*/
|
||
get signal() {
|
||
if (!IsWritableStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException$2('signal');
|
||
}
|
||
if (this._abortController === undefined) {
|
||
// Older browsers or older Node versions may not support `AbortController` or `AbortSignal`.
|
||
// We don't want to bundle and ship an `AbortController` polyfill together with our polyfill,
|
||
// so instead we only implement support for `signal` if we find a global `AbortController` constructor.
|
||
throw new TypeError('WritableStreamDefaultController.prototype.signal is not supported');
|
||
}
|
||
return this._abortController.signal;
|
||
}
|
||
/**
|
||
* Closes the controlled writable stream, making all future interactions with it fail with the given error `e`.
|
||
*
|
||
* This method is rarely used, since usually it suffices to return a rejected promise from one of the underlying
|
||
* sink's methods. However, it can be useful for suddenly shutting down a stream in response to an event outside the
|
||
* normal lifecycle of interactions with the underlying sink.
|
||
*/
|
||
error(e = undefined) {
|
||
if (!IsWritableStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException$2('error');
|
||
}
|
||
const state = this._controlledWritableStream._state;
|
||
if (state !== 'writable') {
|
||
// The stream is closed, errored or will be soon. The sink can't do anything useful if it gets an error here, so
|
||
// just treat it as a no-op.
|
||
return;
|
||
}
|
||
WritableStreamDefaultControllerError(this, e);
|
||
}
|
||
/** @internal */
|
||
[AbortSteps](reason) {
|
||
const result = this._abortAlgorithm(reason);
|
||
WritableStreamDefaultControllerClearAlgorithms(this);
|
||
return result;
|
||
}
|
||
/** @internal */
|
||
[ErrorSteps]() {
|
||
ResetQueue(this);
|
||
}
|
||
}
|
||
Object.defineProperties(WritableStreamDefaultController.prototype, {
|
||
abortReason: { enumerable: true },
|
||
signal: { enumerable: true },
|
||
error: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(WritableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'WritableStreamDefaultController',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Abstract operations implementing interface required by the WritableStream.
|
||
function IsWritableStreamDefaultController(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_controlledWritableStream')) {
|
||
return false;
|
||
}
|
||
return x instanceof WritableStreamDefaultController;
|
||
}
|
||
function SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) {
|
||
controller._controlledWritableStream = stream;
|
||
stream._writableStreamController = controller;
|
||
// Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.
|
||
controller._queue = undefined;
|
||
controller._queueTotalSize = undefined;
|
||
ResetQueue(controller);
|
||
controller._abortReason = undefined;
|
||
controller._abortController = createAbortController();
|
||
controller._started = false;
|
||
controller._strategySizeAlgorithm = sizeAlgorithm;
|
||
controller._strategyHWM = highWaterMark;
|
||
controller._writeAlgorithm = writeAlgorithm;
|
||
controller._closeAlgorithm = closeAlgorithm;
|
||
controller._abortAlgorithm = abortAlgorithm;
|
||
const backpressure = WritableStreamDefaultControllerGetBackpressure(controller);
|
||
WritableStreamUpdateBackpressure(stream, backpressure);
|
||
const startResult = startAlgorithm();
|
||
const startPromise = promiseResolvedWith(startResult);
|
||
uponPromise(startPromise, () => {
|
||
controller._started = true;
|
||
WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
|
||
}, r => {
|
||
controller._started = true;
|
||
WritableStreamDealWithRejection(stream, r);
|
||
});
|
||
}
|
||
function SetUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, highWaterMark, sizeAlgorithm) {
|
||
const controller = Object.create(WritableStreamDefaultController.prototype);
|
||
let startAlgorithm = () => undefined;
|
||
let writeAlgorithm = () => promiseResolvedWith(undefined);
|
||
let closeAlgorithm = () => promiseResolvedWith(undefined);
|
||
let abortAlgorithm = () => promiseResolvedWith(undefined);
|
||
if (underlyingSink.start !== undefined) {
|
||
startAlgorithm = () => underlyingSink.start(controller);
|
||
}
|
||
if (underlyingSink.write !== undefined) {
|
||
writeAlgorithm = chunk => underlyingSink.write(chunk, controller);
|
||
}
|
||
if (underlyingSink.close !== undefined) {
|
||
closeAlgorithm = () => underlyingSink.close();
|
||
}
|
||
if (underlyingSink.abort !== undefined) {
|
||
abortAlgorithm = reason => underlyingSink.abort(reason);
|
||
}
|
||
SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm);
|
||
}
|
||
// ClearAlgorithms may be called twice. Erroring the same stream in multiple ways will often result in redundant calls.
|
||
function WritableStreamDefaultControllerClearAlgorithms(controller) {
|
||
controller._writeAlgorithm = undefined;
|
||
controller._closeAlgorithm = undefined;
|
||
controller._abortAlgorithm = undefined;
|
||
controller._strategySizeAlgorithm = undefined;
|
||
}
|
||
function WritableStreamDefaultControllerClose(controller) {
|
||
EnqueueValueWithSize(controller, closeSentinel, 0);
|
||
WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
|
||
}
|
||
function WritableStreamDefaultControllerGetChunkSize(controller, chunk) {
|
||
try {
|
||
return controller._strategySizeAlgorithm(chunk);
|
||
}
|
||
catch (chunkSizeE) {
|
||
WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE);
|
||
return 1;
|
||
}
|
||
}
|
||
function WritableStreamDefaultControllerGetDesiredSize(controller) {
|
||
return controller._strategyHWM - controller._queueTotalSize;
|
||
}
|
||
function WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) {
|
||
try {
|
||
EnqueueValueWithSize(controller, chunk, chunkSize);
|
||
}
|
||
catch (enqueueE) {
|
||
WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE);
|
||
return;
|
||
}
|
||
const stream = controller._controlledWritableStream;
|
||
if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._state === 'writable') {
|
||
const backpressure = WritableStreamDefaultControllerGetBackpressure(controller);
|
||
WritableStreamUpdateBackpressure(stream, backpressure);
|
||
}
|
||
WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
|
||
}
|
||
// Abstract operations for the WritableStreamDefaultController.
|
||
function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) {
|
||
const stream = controller._controlledWritableStream;
|
||
if (!controller._started) {
|
||
return;
|
||
}
|
||
if (stream._inFlightWriteRequest !== undefined) {
|
||
return;
|
||
}
|
||
const state = stream._state;
|
||
if (state === 'erroring') {
|
||
WritableStreamFinishErroring(stream);
|
||
return;
|
||
}
|
||
if (controller._queue.length === 0) {
|
||
return;
|
||
}
|
||
const value = PeekQueueValue(controller);
|
||
if (value === closeSentinel) {
|
||
WritableStreamDefaultControllerProcessClose(controller);
|
||
}
|
||
else {
|
||
WritableStreamDefaultControllerProcessWrite(controller, value);
|
||
}
|
||
}
|
||
function WritableStreamDefaultControllerErrorIfNeeded(controller, error) {
|
||
if (controller._controlledWritableStream._state === 'writable') {
|
||
WritableStreamDefaultControllerError(controller, error);
|
||
}
|
||
}
|
||
function WritableStreamDefaultControllerProcessClose(controller) {
|
||
const stream = controller._controlledWritableStream;
|
||
WritableStreamMarkCloseRequestInFlight(stream);
|
||
DequeueValue(controller);
|
||
const sinkClosePromise = controller._closeAlgorithm();
|
||
WritableStreamDefaultControllerClearAlgorithms(controller);
|
||
uponPromise(sinkClosePromise, () => {
|
||
WritableStreamFinishInFlightClose(stream);
|
||
}, reason => {
|
||
WritableStreamFinishInFlightCloseWithError(stream, reason);
|
||
});
|
||
}
|
||
function WritableStreamDefaultControllerProcessWrite(controller, chunk) {
|
||
const stream = controller._controlledWritableStream;
|
||
WritableStreamMarkFirstWriteRequestInFlight(stream);
|
||
const sinkWritePromise = controller._writeAlgorithm(chunk);
|
||
uponPromise(sinkWritePromise, () => {
|
||
WritableStreamFinishInFlightWrite(stream);
|
||
const state = stream._state;
|
||
DequeueValue(controller);
|
||
if (!WritableStreamCloseQueuedOrInFlight(stream) && state === 'writable') {
|
||
const backpressure = WritableStreamDefaultControllerGetBackpressure(controller);
|
||
WritableStreamUpdateBackpressure(stream, backpressure);
|
||
}
|
||
WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
|
||
}, reason => {
|
||
if (stream._state === 'writable') {
|
||
WritableStreamDefaultControllerClearAlgorithms(controller);
|
||
}
|
||
WritableStreamFinishInFlightWriteWithError(stream, reason);
|
||
});
|
||
}
|
||
function WritableStreamDefaultControllerGetBackpressure(controller) {
|
||
const desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller);
|
||
return desiredSize <= 0;
|
||
}
|
||
// A client of WritableStreamDefaultController may use these functions directly to bypass state check.
|
||
function WritableStreamDefaultControllerError(controller, error) {
|
||
const stream = controller._controlledWritableStream;
|
||
WritableStreamDefaultControllerClearAlgorithms(controller);
|
||
WritableStreamStartErroring(stream, error);
|
||
}
|
||
// Helper functions for the WritableStream.
|
||
function streamBrandCheckException$2(name) {
|
||
return new TypeError(`WritableStream.prototype.${name} can only be used on a WritableStream`);
|
||
}
|
||
// Helper functions for the WritableStreamDefaultController.
|
||
function defaultControllerBrandCheckException$2(name) {
|
||
return new TypeError(`WritableStreamDefaultController.prototype.${name} can only be used on a WritableStreamDefaultController`);
|
||
}
|
||
// Helper functions for the WritableStreamDefaultWriter.
|
||
function defaultWriterBrandCheckException(name) {
|
||
return new TypeError(`WritableStreamDefaultWriter.prototype.${name} can only be used on a WritableStreamDefaultWriter`);
|
||
}
|
||
function defaultWriterLockException(name) {
|
||
return new TypeError('Cannot ' + name + ' a stream using a released writer');
|
||
}
|
||
function defaultWriterClosedPromiseInitialize(writer) {
|
||
writer._closedPromise = newPromise((resolve, reject) => {
|
||
writer._closedPromise_resolve = resolve;
|
||
writer._closedPromise_reject = reject;
|
||
writer._closedPromiseState = 'pending';
|
||
});
|
||
}
|
||
function defaultWriterClosedPromiseInitializeAsRejected(writer, reason) {
|
||
defaultWriterClosedPromiseInitialize(writer);
|
||
defaultWriterClosedPromiseReject(writer, reason);
|
||
}
|
||
function defaultWriterClosedPromiseInitializeAsResolved(writer) {
|
||
defaultWriterClosedPromiseInitialize(writer);
|
||
defaultWriterClosedPromiseResolve(writer);
|
||
}
|
||
function defaultWriterClosedPromiseReject(writer, reason) {
|
||
if (writer._closedPromise_reject === undefined) {
|
||
return;
|
||
}
|
||
setPromiseIsHandledToTrue(writer._closedPromise);
|
||
writer._closedPromise_reject(reason);
|
||
writer._closedPromise_resolve = undefined;
|
||
writer._closedPromise_reject = undefined;
|
||
writer._closedPromiseState = 'rejected';
|
||
}
|
||
function defaultWriterClosedPromiseResetToRejected(writer, reason) {
|
||
defaultWriterClosedPromiseInitializeAsRejected(writer, reason);
|
||
}
|
||
function defaultWriterClosedPromiseResolve(writer) {
|
||
if (writer._closedPromise_resolve === undefined) {
|
||
return;
|
||
}
|
||
writer._closedPromise_resolve(undefined);
|
||
writer._closedPromise_resolve = undefined;
|
||
writer._closedPromise_reject = undefined;
|
||
writer._closedPromiseState = 'resolved';
|
||
}
|
||
function defaultWriterReadyPromiseInitialize(writer) {
|
||
writer._readyPromise = newPromise((resolve, reject) => {
|
||
writer._readyPromise_resolve = resolve;
|
||
writer._readyPromise_reject = reject;
|
||
});
|
||
writer._readyPromiseState = 'pending';
|
||
}
|
||
function defaultWriterReadyPromiseInitializeAsRejected(writer, reason) {
|
||
defaultWriterReadyPromiseInitialize(writer);
|
||
defaultWriterReadyPromiseReject(writer, reason);
|
||
}
|
||
function defaultWriterReadyPromiseInitializeAsResolved(writer) {
|
||
defaultWriterReadyPromiseInitialize(writer);
|
||
defaultWriterReadyPromiseResolve(writer);
|
||
}
|
||
function defaultWriterReadyPromiseReject(writer, reason) {
|
||
if (writer._readyPromise_reject === undefined) {
|
||
return;
|
||
}
|
||
setPromiseIsHandledToTrue(writer._readyPromise);
|
||
writer._readyPromise_reject(reason);
|
||
writer._readyPromise_resolve = undefined;
|
||
writer._readyPromise_reject = undefined;
|
||
writer._readyPromiseState = 'rejected';
|
||
}
|
||
function defaultWriterReadyPromiseReset(writer) {
|
||
defaultWriterReadyPromiseInitialize(writer);
|
||
}
|
||
function defaultWriterReadyPromiseResetToRejected(writer, reason) {
|
||
defaultWriterReadyPromiseInitializeAsRejected(writer, reason);
|
||
}
|
||
function defaultWriterReadyPromiseResolve(writer) {
|
||
if (writer._readyPromise_resolve === undefined) {
|
||
return;
|
||
}
|
||
writer._readyPromise_resolve(undefined);
|
||
writer._readyPromise_resolve = undefined;
|
||
writer._readyPromise_reject = undefined;
|
||
writer._readyPromiseState = 'fulfilled';
|
||
}
|
||
|
||
/// <reference lib="dom" />
|
||
const NativeDOMException = typeof DOMException !== 'undefined' ? DOMException : undefined;
|
||
|
||
/// <reference types="node" />
|
||
function isDOMExceptionConstructor(ctor) {
|
||
if (!(typeof ctor === 'function' || typeof ctor === 'object')) {
|
||
return false;
|
||
}
|
||
try {
|
||
new ctor();
|
||
return true;
|
||
}
|
||
catch (_a) {
|
||
return false;
|
||
}
|
||
}
|
||
function createDOMExceptionPolyfill() {
|
||
// eslint-disable-next-line no-shadow
|
||
const ctor = function DOMException(message, name) {
|
||
this.message = message || '';
|
||
this.name = name || 'Error';
|
||
if (Error.captureStackTrace) {
|
||
Error.captureStackTrace(this, this.constructor);
|
||
}
|
||
};
|
||
ctor.prototype = Object.create(Error.prototype);
|
||
Object.defineProperty(ctor.prototype, 'constructor', { value: ctor, writable: true, configurable: true });
|
||
return ctor;
|
||
}
|
||
// eslint-disable-next-line no-redeclare
|
||
const DOMException$1 = isDOMExceptionConstructor(NativeDOMException) ? NativeDOMException : createDOMExceptionPolyfill();
|
||
|
||
function ReadableStreamPipeTo(source, dest, preventClose, preventAbort, preventCancel, signal) {
|
||
const reader = AcquireReadableStreamDefaultReader(source);
|
||
const writer = AcquireWritableStreamDefaultWriter(dest);
|
||
source._disturbed = true;
|
||
let shuttingDown = false;
|
||
// This is used to keep track of the spec's requirement that we wait for ongoing writes during shutdown.
|
||
let currentWrite = promiseResolvedWith(undefined);
|
||
return newPromise((resolve, reject) => {
|
||
let abortAlgorithm;
|
||
if (signal !== undefined) {
|
||
abortAlgorithm = () => {
|
||
const error = new DOMException$1('Aborted', 'AbortError');
|
||
const actions = [];
|
||
if (!preventAbort) {
|
||
actions.push(() => {
|
||
if (dest._state === 'writable') {
|
||
return WritableStreamAbort(dest, error);
|
||
}
|
||
return promiseResolvedWith(undefined);
|
||
});
|
||
}
|
||
if (!preventCancel) {
|
||
actions.push(() => {
|
||
if (source._state === 'readable') {
|
||
return ReadableStreamCancel(source, error);
|
||
}
|
||
return promiseResolvedWith(undefined);
|
||
});
|
||
}
|
||
shutdownWithAction(() => Promise.all(actions.map(action => action())), true, error);
|
||
};
|
||
if (signal.aborted) {
|
||
abortAlgorithm();
|
||
return;
|
||
}
|
||
signal.addEventListener('abort', abortAlgorithm);
|
||
}
|
||
// Using reader and writer, read all chunks from this and write them to dest
|
||
// - Backpressure must be enforced
|
||
// - Shutdown must stop all activity
|
||
function pipeLoop() {
|
||
return newPromise((resolveLoop, rejectLoop) => {
|
||
function next(done) {
|
||
if (done) {
|
||
resolveLoop();
|
||
}
|
||
else {
|
||
// Use `PerformPromiseThen` instead of `uponPromise` to avoid
|
||
// adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers
|
||
PerformPromiseThen(pipeStep(), next, rejectLoop);
|
||
}
|
||
}
|
||
next(false);
|
||
});
|
||
}
|
||
function pipeStep() {
|
||
if (shuttingDown) {
|
||
return promiseResolvedWith(true);
|
||
}
|
||
return PerformPromiseThen(writer._readyPromise, () => {
|
||
return newPromise((resolveRead, rejectRead) => {
|
||
ReadableStreamDefaultReaderRead(reader, {
|
||
_chunkSteps: chunk => {
|
||
currentWrite = PerformPromiseThen(WritableStreamDefaultWriterWrite(writer, chunk), undefined, noop);
|
||
resolveRead(false);
|
||
},
|
||
_closeSteps: () => resolveRead(true),
|
||
_errorSteps: rejectRead
|
||
});
|
||
});
|
||
});
|
||
}
|
||
// Errors must be propagated forward
|
||
isOrBecomesErrored(source, reader._closedPromise, storedError => {
|
||
if (!preventAbort) {
|
||
shutdownWithAction(() => WritableStreamAbort(dest, storedError), true, storedError);
|
||
}
|
||
else {
|
||
shutdown(true, storedError);
|
||
}
|
||
});
|
||
// Errors must be propagated backward
|
||
isOrBecomesErrored(dest, writer._closedPromise, storedError => {
|
||
if (!preventCancel) {
|
||
shutdownWithAction(() => ReadableStreamCancel(source, storedError), true, storedError);
|
||
}
|
||
else {
|
||
shutdown(true, storedError);
|
||
}
|
||
});
|
||
// Closing must be propagated forward
|
||
isOrBecomesClosed(source, reader._closedPromise, () => {
|
||
if (!preventClose) {
|
||
shutdownWithAction(() => WritableStreamDefaultWriterCloseWithErrorPropagation(writer));
|
||
}
|
||
else {
|
||
shutdown();
|
||
}
|
||
});
|
||
// Closing must be propagated backward
|
||
if (WritableStreamCloseQueuedOrInFlight(dest) || dest._state === 'closed') {
|
||
const destClosed = new TypeError('the destination writable stream closed before all data could be piped to it');
|
||
if (!preventCancel) {
|
||
shutdownWithAction(() => ReadableStreamCancel(source, destClosed), true, destClosed);
|
||
}
|
||
else {
|
||
shutdown(true, destClosed);
|
||
}
|
||
}
|
||
setPromiseIsHandledToTrue(pipeLoop());
|
||
function waitForWritesToFinish() {
|
||
// Another write may have started while we were waiting on this currentWrite, so we have to be sure to wait
|
||
// for that too.
|
||
const oldCurrentWrite = currentWrite;
|
||
return PerformPromiseThen(currentWrite, () => oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined);
|
||
}
|
||
function isOrBecomesErrored(stream, promise, action) {
|
||
if (stream._state === 'errored') {
|
||
action(stream._storedError);
|
||
}
|
||
else {
|
||
uponRejection(promise, action);
|
||
}
|
||
}
|
||
function isOrBecomesClosed(stream, promise, action) {
|
||
if (stream._state === 'closed') {
|
||
action();
|
||
}
|
||
else {
|
||
uponFulfillment(promise, action);
|
||
}
|
||
}
|
||
function shutdownWithAction(action, originalIsError, originalError) {
|
||
if (shuttingDown) {
|
||
return;
|
||
}
|
||
shuttingDown = true;
|
||
if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) {
|
||
uponFulfillment(waitForWritesToFinish(), doTheRest);
|
||
}
|
||
else {
|
||
doTheRest();
|
||
}
|
||
function doTheRest() {
|
||
uponPromise(action(), () => finalize(originalIsError, originalError), newError => finalize(true, newError));
|
||
}
|
||
}
|
||
function shutdown(isError, error) {
|
||
if (shuttingDown) {
|
||
return;
|
||
}
|
||
shuttingDown = true;
|
||
if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) {
|
||
uponFulfillment(waitForWritesToFinish(), () => finalize(isError, error));
|
||
}
|
||
else {
|
||
finalize(isError, error);
|
||
}
|
||
}
|
||
function finalize(isError, error) {
|
||
WritableStreamDefaultWriterRelease(writer);
|
||
ReadableStreamReaderGenericRelease(reader);
|
||
if (signal !== undefined) {
|
||
signal.removeEventListener('abort', abortAlgorithm);
|
||
}
|
||
if (isError) {
|
||
reject(error);
|
||
}
|
||
else {
|
||
resolve(undefined);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Allows control of a {@link ReadableStream | readable stream}'s state and internal queue.
|
||
*
|
||
* @public
|
||
*/
|
||
class ReadableStreamDefaultController {
|
||
constructor() {
|
||
throw new TypeError('Illegal constructor');
|
||
}
|
||
/**
|
||
* Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is
|
||
* over-full. An underlying source ought to use this information to determine when and how to apply backpressure.
|
||
*/
|
||
get desiredSize() {
|
||
if (!IsReadableStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException$1('desiredSize');
|
||
}
|
||
return ReadableStreamDefaultControllerGetDesiredSize(this);
|
||
}
|
||
/**
|
||
* Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from
|
||
* the stream, but once those are read, the stream will become closed.
|
||
*/
|
||
close() {
|
||
if (!IsReadableStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException$1('close');
|
||
}
|
||
if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) {
|
||
throw new TypeError('The stream is not in a state that permits close');
|
||
}
|
||
ReadableStreamDefaultControllerClose(this);
|
||
}
|
||
enqueue(chunk = undefined) {
|
||
if (!IsReadableStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException$1('enqueue');
|
||
}
|
||
if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) {
|
||
throw new TypeError('The stream is not in a state that permits enqueue');
|
||
}
|
||
return ReadableStreamDefaultControllerEnqueue(this, chunk);
|
||
}
|
||
/**
|
||
* Errors the controlled readable stream, making all future interactions with it fail with the given error `e`.
|
||
*/
|
||
error(e = undefined) {
|
||
if (!IsReadableStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException$1('error');
|
||
}
|
||
ReadableStreamDefaultControllerError(this, e);
|
||
}
|
||
/** @internal */
|
||
[CancelSteps](reason) {
|
||
ResetQueue(this);
|
||
const result = this._cancelAlgorithm(reason);
|
||
ReadableStreamDefaultControllerClearAlgorithms(this);
|
||
return result;
|
||
}
|
||
/** @internal */
|
||
[PullSteps](readRequest) {
|
||
const stream = this._controlledReadableStream;
|
||
if (this._queue.length > 0) {
|
||
const chunk = DequeueValue(this);
|
||
if (this._closeRequested && this._queue.length === 0) {
|
||
ReadableStreamDefaultControllerClearAlgorithms(this);
|
||
ReadableStreamClose(stream);
|
||
}
|
||
else {
|
||
ReadableStreamDefaultControllerCallPullIfNeeded(this);
|
||
}
|
||
readRequest._chunkSteps(chunk);
|
||
}
|
||
else {
|
||
ReadableStreamAddReadRequest(stream, readRequest);
|
||
ReadableStreamDefaultControllerCallPullIfNeeded(this);
|
||
}
|
||
}
|
||
}
|
||
Object.defineProperties(ReadableStreamDefaultController.prototype, {
|
||
close: { enumerable: true },
|
||
enqueue: { enumerable: true },
|
||
error: { enumerable: true },
|
||
desiredSize: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(ReadableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'ReadableStreamDefaultController',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Abstract operations for the ReadableStreamDefaultController.
|
||
function IsReadableStreamDefaultController(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableStream')) {
|
||
return false;
|
||
}
|
||
return x instanceof ReadableStreamDefaultController;
|
||
}
|
||
function ReadableStreamDefaultControllerCallPullIfNeeded(controller) {
|
||
const shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller);
|
||
if (!shouldPull) {
|
||
return;
|
||
}
|
||
if (controller._pulling) {
|
||
controller._pullAgain = true;
|
||
return;
|
||
}
|
||
controller._pulling = true;
|
||
const pullPromise = controller._pullAlgorithm();
|
||
uponPromise(pullPromise, () => {
|
||
controller._pulling = false;
|
||
if (controller._pullAgain) {
|
||
controller._pullAgain = false;
|
||
ReadableStreamDefaultControllerCallPullIfNeeded(controller);
|
||
}
|
||
}, e => {
|
||
ReadableStreamDefaultControllerError(controller, e);
|
||
});
|
||
}
|
||
function ReadableStreamDefaultControllerShouldCallPull(controller) {
|
||
const stream = controller._controlledReadableStream;
|
||
if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {
|
||
return false;
|
||
}
|
||
if (!controller._started) {
|
||
return false;
|
||
}
|
||
if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {
|
||
return true;
|
||
}
|
||
const desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller);
|
||
if (desiredSize > 0) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
function ReadableStreamDefaultControllerClearAlgorithms(controller) {
|
||
controller._pullAlgorithm = undefined;
|
||
controller._cancelAlgorithm = undefined;
|
||
controller._strategySizeAlgorithm = undefined;
|
||
}
|
||
// A client of ReadableStreamDefaultController may use these functions directly to bypass state check.
|
||
function ReadableStreamDefaultControllerClose(controller) {
|
||
if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {
|
||
return;
|
||
}
|
||
const stream = controller._controlledReadableStream;
|
||
controller._closeRequested = true;
|
||
if (controller._queue.length === 0) {
|
||
ReadableStreamDefaultControllerClearAlgorithms(controller);
|
||
ReadableStreamClose(stream);
|
||
}
|
||
}
|
||
function ReadableStreamDefaultControllerEnqueue(controller, chunk) {
|
||
if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {
|
||
return;
|
||
}
|
||
const stream = controller._controlledReadableStream;
|
||
if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {
|
||
ReadableStreamFulfillReadRequest(stream, chunk, false);
|
||
}
|
||
else {
|
||
let chunkSize;
|
||
try {
|
||
chunkSize = controller._strategySizeAlgorithm(chunk);
|
||
}
|
||
catch (chunkSizeE) {
|
||
ReadableStreamDefaultControllerError(controller, chunkSizeE);
|
||
throw chunkSizeE;
|
||
}
|
||
try {
|
||
EnqueueValueWithSize(controller, chunk, chunkSize);
|
||
}
|
||
catch (enqueueE) {
|
||
ReadableStreamDefaultControllerError(controller, enqueueE);
|
||
throw enqueueE;
|
||
}
|
||
}
|
||
ReadableStreamDefaultControllerCallPullIfNeeded(controller);
|
||
}
|
||
function ReadableStreamDefaultControllerError(controller, e) {
|
||
const stream = controller._controlledReadableStream;
|
||
if (stream._state !== 'readable') {
|
||
return;
|
||
}
|
||
ResetQueue(controller);
|
||
ReadableStreamDefaultControllerClearAlgorithms(controller);
|
||
ReadableStreamError(stream, e);
|
||
}
|
||
function ReadableStreamDefaultControllerGetDesiredSize(controller) {
|
||
const state = controller._controlledReadableStream._state;
|
||
if (state === 'errored') {
|
||
return null;
|
||
}
|
||
if (state === 'closed') {
|
||
return 0;
|
||
}
|
||
return controller._strategyHWM - controller._queueTotalSize;
|
||
}
|
||
// This is used in the implementation of TransformStream.
|
||
function ReadableStreamDefaultControllerHasBackpressure(controller) {
|
||
if (ReadableStreamDefaultControllerShouldCallPull(controller)) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) {
|
||
const state = controller._controlledReadableStream._state;
|
||
if (!controller._closeRequested && state === 'readable') {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
function SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) {
|
||
controller._controlledReadableStream = stream;
|
||
controller._queue = undefined;
|
||
controller._queueTotalSize = undefined;
|
||
ResetQueue(controller);
|
||
controller._started = false;
|
||
controller._closeRequested = false;
|
||
controller._pullAgain = false;
|
||
controller._pulling = false;
|
||
controller._strategySizeAlgorithm = sizeAlgorithm;
|
||
controller._strategyHWM = highWaterMark;
|
||
controller._pullAlgorithm = pullAlgorithm;
|
||
controller._cancelAlgorithm = cancelAlgorithm;
|
||
stream._readableStreamController = controller;
|
||
const startResult = startAlgorithm();
|
||
uponPromise(promiseResolvedWith(startResult), () => {
|
||
controller._started = true;
|
||
ReadableStreamDefaultControllerCallPullIfNeeded(controller);
|
||
}, r => {
|
||
ReadableStreamDefaultControllerError(controller, r);
|
||
});
|
||
}
|
||
function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream, underlyingSource, highWaterMark, sizeAlgorithm) {
|
||
const controller = Object.create(ReadableStreamDefaultController.prototype);
|
||
let startAlgorithm = () => undefined;
|
||
let pullAlgorithm = () => promiseResolvedWith(undefined);
|
||
let cancelAlgorithm = () => promiseResolvedWith(undefined);
|
||
if (underlyingSource.start !== undefined) {
|
||
startAlgorithm = () => underlyingSource.start(controller);
|
||
}
|
||
if (underlyingSource.pull !== undefined) {
|
||
pullAlgorithm = () => underlyingSource.pull(controller);
|
||
}
|
||
if (underlyingSource.cancel !== undefined) {
|
||
cancelAlgorithm = reason => underlyingSource.cancel(reason);
|
||
}
|
||
SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm);
|
||
}
|
||
// Helper functions for the ReadableStreamDefaultController.
|
||
function defaultControllerBrandCheckException$1(name) {
|
||
return new TypeError(`ReadableStreamDefaultController.prototype.${name} can only be used on a ReadableStreamDefaultController`);
|
||
}
|
||
|
||
function ReadableStreamTee(stream, cloneForBranch2) {
|
||
if (IsReadableByteStreamController(stream._readableStreamController)) {
|
||
return ReadableByteStreamTee(stream);
|
||
}
|
||
return ReadableStreamDefaultTee(stream);
|
||
}
|
||
function ReadableStreamDefaultTee(stream, cloneForBranch2) {
|
||
const reader = AcquireReadableStreamDefaultReader(stream);
|
||
let reading = false;
|
||
let readAgain = false;
|
||
let canceled1 = false;
|
||
let canceled2 = false;
|
||
let reason1;
|
||
let reason2;
|
||
let branch1;
|
||
let branch2;
|
||
let resolveCancelPromise;
|
||
const cancelPromise = newPromise(resolve => {
|
||
resolveCancelPromise = resolve;
|
||
});
|
||
function pullAlgorithm() {
|
||
if (reading) {
|
||
readAgain = true;
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
reading = true;
|
||
const readRequest = {
|
||
_chunkSteps: chunk => {
|
||
// This needs to be delayed a microtask because it takes at least a microtask to detect errors (using
|
||
// reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let
|
||
// successful synchronously-available reads get ahead of asynchronously-available errors.
|
||
queueMicrotask(() => {
|
||
readAgain = false;
|
||
const chunk1 = chunk;
|
||
const chunk2 = chunk;
|
||
// There is no way to access the cloning code right now in the reference implementation.
|
||
// If we add one then we'll need an implementation for serializable objects.
|
||
// if (!canceled2 && cloneForBranch2) {
|
||
// chunk2 = StructuredDeserialize(StructuredSerialize(chunk2));
|
||
// }
|
||
if (!canceled1) {
|
||
ReadableStreamDefaultControllerEnqueue(branch1._readableStreamController, chunk1);
|
||
}
|
||
if (!canceled2) {
|
||
ReadableStreamDefaultControllerEnqueue(branch2._readableStreamController, chunk2);
|
||
}
|
||
reading = false;
|
||
if (readAgain) {
|
||
pullAlgorithm();
|
||
}
|
||
});
|
||
},
|
||
_closeSteps: () => {
|
||
reading = false;
|
||
if (!canceled1) {
|
||
ReadableStreamDefaultControllerClose(branch1._readableStreamController);
|
||
}
|
||
if (!canceled2) {
|
||
ReadableStreamDefaultControllerClose(branch2._readableStreamController);
|
||
}
|
||
if (!canceled1 || !canceled2) {
|
||
resolveCancelPromise(undefined);
|
||
}
|
||
},
|
||
_errorSteps: () => {
|
||
reading = false;
|
||
}
|
||
};
|
||
ReadableStreamDefaultReaderRead(reader, readRequest);
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
function cancel1Algorithm(reason) {
|
||
canceled1 = true;
|
||
reason1 = reason;
|
||
if (canceled2) {
|
||
const compositeReason = CreateArrayFromList([reason1, reason2]);
|
||
const cancelResult = ReadableStreamCancel(stream, compositeReason);
|
||
resolveCancelPromise(cancelResult);
|
||
}
|
||
return cancelPromise;
|
||
}
|
||
function cancel2Algorithm(reason) {
|
||
canceled2 = true;
|
||
reason2 = reason;
|
||
if (canceled1) {
|
||
const compositeReason = CreateArrayFromList([reason1, reason2]);
|
||
const cancelResult = ReadableStreamCancel(stream, compositeReason);
|
||
resolveCancelPromise(cancelResult);
|
||
}
|
||
return cancelPromise;
|
||
}
|
||
function startAlgorithm() {
|
||
// do nothing
|
||
}
|
||
branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm);
|
||
branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm);
|
||
uponRejection(reader._closedPromise, (r) => {
|
||
ReadableStreamDefaultControllerError(branch1._readableStreamController, r);
|
||
ReadableStreamDefaultControllerError(branch2._readableStreamController, r);
|
||
if (!canceled1 || !canceled2) {
|
||
resolveCancelPromise(undefined);
|
||
}
|
||
});
|
||
return [branch1, branch2];
|
||
}
|
||
function ReadableByteStreamTee(stream) {
|
||
let reader = AcquireReadableStreamDefaultReader(stream);
|
||
let reading = false;
|
||
let readAgainForBranch1 = false;
|
||
let readAgainForBranch2 = false;
|
||
let canceled1 = false;
|
||
let canceled2 = false;
|
||
let reason1;
|
||
let reason2;
|
||
let branch1;
|
||
let branch2;
|
||
let resolveCancelPromise;
|
||
const cancelPromise = newPromise(resolve => {
|
||
resolveCancelPromise = resolve;
|
||
});
|
||
function forwardReaderError(thisReader) {
|
||
uponRejection(thisReader._closedPromise, r => {
|
||
if (thisReader !== reader) {
|
||
return;
|
||
}
|
||
ReadableByteStreamControllerError(branch1._readableStreamController, r);
|
||
ReadableByteStreamControllerError(branch2._readableStreamController, r);
|
||
if (!canceled1 || !canceled2) {
|
||
resolveCancelPromise(undefined);
|
||
}
|
||
});
|
||
}
|
||
function pullWithDefaultReader() {
|
||
if (IsReadableStreamBYOBReader(reader)) {
|
||
ReadableStreamReaderGenericRelease(reader);
|
||
reader = AcquireReadableStreamDefaultReader(stream);
|
||
forwardReaderError(reader);
|
||
}
|
||
const readRequest = {
|
||
_chunkSteps: chunk => {
|
||
// This needs to be delayed a microtask because it takes at least a microtask to detect errors (using
|
||
// reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let
|
||
// successful synchronously-available reads get ahead of asynchronously-available errors.
|
||
queueMicrotask(() => {
|
||
readAgainForBranch1 = false;
|
||
readAgainForBranch2 = false;
|
||
const chunk1 = chunk;
|
||
let chunk2 = chunk;
|
||
if (!canceled1 && !canceled2) {
|
||
try {
|
||
chunk2 = CloneAsUint8Array(chunk);
|
||
}
|
||
catch (cloneE) {
|
||
ReadableByteStreamControllerError(branch1._readableStreamController, cloneE);
|
||
ReadableByteStreamControllerError(branch2._readableStreamController, cloneE);
|
||
resolveCancelPromise(ReadableStreamCancel(stream, cloneE));
|
||
return;
|
||
}
|
||
}
|
||
if (!canceled1) {
|
||
ReadableByteStreamControllerEnqueue(branch1._readableStreamController, chunk1);
|
||
}
|
||
if (!canceled2) {
|
||
ReadableByteStreamControllerEnqueue(branch2._readableStreamController, chunk2);
|
||
}
|
||
reading = false;
|
||
if (readAgainForBranch1) {
|
||
pull1Algorithm();
|
||
}
|
||
else if (readAgainForBranch2) {
|
||
pull2Algorithm();
|
||
}
|
||
});
|
||
},
|
||
_closeSteps: () => {
|
||
reading = false;
|
||
if (!canceled1) {
|
||
ReadableByteStreamControllerClose(branch1._readableStreamController);
|
||
}
|
||
if (!canceled2) {
|
||
ReadableByteStreamControllerClose(branch2._readableStreamController);
|
||
}
|
||
if (branch1._readableStreamController._pendingPullIntos.length > 0) {
|
||
ReadableByteStreamControllerRespond(branch1._readableStreamController, 0);
|
||
}
|
||
if (branch2._readableStreamController._pendingPullIntos.length > 0) {
|
||
ReadableByteStreamControllerRespond(branch2._readableStreamController, 0);
|
||
}
|
||
if (!canceled1 || !canceled2) {
|
||
resolveCancelPromise(undefined);
|
||
}
|
||
},
|
||
_errorSteps: () => {
|
||
reading = false;
|
||
}
|
||
};
|
||
ReadableStreamDefaultReaderRead(reader, readRequest);
|
||
}
|
||
function pullWithBYOBReader(view, forBranch2) {
|
||
if (IsReadableStreamDefaultReader(reader)) {
|
||
ReadableStreamReaderGenericRelease(reader);
|
||
reader = AcquireReadableStreamBYOBReader(stream);
|
||
forwardReaderError(reader);
|
||
}
|
||
const byobBranch = forBranch2 ? branch2 : branch1;
|
||
const otherBranch = forBranch2 ? branch1 : branch2;
|
||
const readIntoRequest = {
|
||
_chunkSteps: chunk => {
|
||
// This needs to be delayed a microtask because it takes at least a microtask to detect errors (using
|
||
// reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let
|
||
// successful synchronously-available reads get ahead of asynchronously-available errors.
|
||
queueMicrotask(() => {
|
||
readAgainForBranch1 = false;
|
||
readAgainForBranch2 = false;
|
||
const byobCanceled = forBranch2 ? canceled2 : canceled1;
|
||
const otherCanceled = forBranch2 ? canceled1 : canceled2;
|
||
if (!otherCanceled) {
|
||
let clonedChunk;
|
||
try {
|
||
clonedChunk = CloneAsUint8Array(chunk);
|
||
}
|
||
catch (cloneE) {
|
||
ReadableByteStreamControllerError(byobBranch._readableStreamController, cloneE);
|
||
ReadableByteStreamControllerError(otherBranch._readableStreamController, cloneE);
|
||
resolveCancelPromise(ReadableStreamCancel(stream, cloneE));
|
||
return;
|
||
}
|
||
if (!byobCanceled) {
|
||
ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);
|
||
}
|
||
ReadableByteStreamControllerEnqueue(otherBranch._readableStreamController, clonedChunk);
|
||
}
|
||
else if (!byobCanceled) {
|
||
ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);
|
||
}
|
||
reading = false;
|
||
if (readAgainForBranch1) {
|
||
pull1Algorithm();
|
||
}
|
||
else if (readAgainForBranch2) {
|
||
pull2Algorithm();
|
||
}
|
||
});
|
||
},
|
||
_closeSteps: chunk => {
|
||
reading = false;
|
||
const byobCanceled = forBranch2 ? canceled2 : canceled1;
|
||
const otherCanceled = forBranch2 ? canceled1 : canceled2;
|
||
if (!byobCanceled) {
|
||
ReadableByteStreamControllerClose(byobBranch._readableStreamController);
|
||
}
|
||
if (!otherCanceled) {
|
||
ReadableByteStreamControllerClose(otherBranch._readableStreamController);
|
||
}
|
||
if (chunk !== undefined) {
|
||
if (!byobCanceled) {
|
||
ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);
|
||
}
|
||
if (!otherCanceled && otherBranch._readableStreamController._pendingPullIntos.length > 0) {
|
||
ReadableByteStreamControllerRespond(otherBranch._readableStreamController, 0);
|
||
}
|
||
}
|
||
if (!byobCanceled || !otherCanceled) {
|
||
resolveCancelPromise(undefined);
|
||
}
|
||
},
|
||
_errorSteps: () => {
|
||
reading = false;
|
||
}
|
||
};
|
||
ReadableStreamBYOBReaderRead(reader, view, readIntoRequest);
|
||
}
|
||
function pull1Algorithm() {
|
||
if (reading) {
|
||
readAgainForBranch1 = true;
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
reading = true;
|
||
const byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch1._readableStreamController);
|
||
if (byobRequest === null) {
|
||
pullWithDefaultReader();
|
||
}
|
||
else {
|
||
pullWithBYOBReader(byobRequest._view, false);
|
||
}
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
function pull2Algorithm() {
|
||
if (reading) {
|
||
readAgainForBranch2 = true;
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
reading = true;
|
||
const byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch2._readableStreamController);
|
||
if (byobRequest === null) {
|
||
pullWithDefaultReader();
|
||
}
|
||
else {
|
||
pullWithBYOBReader(byobRequest._view, true);
|
||
}
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
function cancel1Algorithm(reason) {
|
||
canceled1 = true;
|
||
reason1 = reason;
|
||
if (canceled2) {
|
||
const compositeReason = CreateArrayFromList([reason1, reason2]);
|
||
const cancelResult = ReadableStreamCancel(stream, compositeReason);
|
||
resolveCancelPromise(cancelResult);
|
||
}
|
||
return cancelPromise;
|
||
}
|
||
function cancel2Algorithm(reason) {
|
||
canceled2 = true;
|
||
reason2 = reason;
|
||
if (canceled1) {
|
||
const compositeReason = CreateArrayFromList([reason1, reason2]);
|
||
const cancelResult = ReadableStreamCancel(stream, compositeReason);
|
||
resolveCancelPromise(cancelResult);
|
||
}
|
||
return cancelPromise;
|
||
}
|
||
function startAlgorithm() {
|
||
return;
|
||
}
|
||
branch1 = CreateReadableByteStream(startAlgorithm, pull1Algorithm, cancel1Algorithm);
|
||
branch2 = CreateReadableByteStream(startAlgorithm, pull2Algorithm, cancel2Algorithm);
|
||
forwardReaderError(reader);
|
||
return [branch1, branch2];
|
||
}
|
||
|
||
function convertUnderlyingDefaultOrByteSource(source, context) {
|
||
assertDictionary(source, context);
|
||
const original = source;
|
||
const autoAllocateChunkSize = original === null || original === void 0 ? void 0 : original.autoAllocateChunkSize;
|
||
const cancel = original === null || original === void 0 ? void 0 : original.cancel;
|
||
const pull = original === null || original === void 0 ? void 0 : original.pull;
|
||
const start = original === null || original === void 0 ? void 0 : original.start;
|
||
const type = original === null || original === void 0 ? void 0 : original.type;
|
||
return {
|
||
autoAllocateChunkSize: autoAllocateChunkSize === undefined ?
|
||
undefined :
|
||
convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize, `${context} has member 'autoAllocateChunkSize' that`),
|
||
cancel: cancel === undefined ?
|
||
undefined :
|
||
convertUnderlyingSourceCancelCallback(cancel, original, `${context} has member 'cancel' that`),
|
||
pull: pull === undefined ?
|
||
undefined :
|
||
convertUnderlyingSourcePullCallback(pull, original, `${context} has member 'pull' that`),
|
||
start: start === undefined ?
|
||
undefined :
|
||
convertUnderlyingSourceStartCallback(start, original, `${context} has member 'start' that`),
|
||
type: type === undefined ? undefined : convertReadableStreamType(type, `${context} has member 'type' that`)
|
||
};
|
||
}
|
||
function convertUnderlyingSourceCancelCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return (reason) => promiseCall(fn, original, [reason]);
|
||
}
|
||
function convertUnderlyingSourcePullCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return (controller) => promiseCall(fn, original, [controller]);
|
||
}
|
||
function convertUnderlyingSourceStartCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return (controller) => reflectCall(fn, original, [controller]);
|
||
}
|
||
function convertReadableStreamType(type, context) {
|
||
type = `${type}`;
|
||
if (type !== 'bytes') {
|
||
throw new TypeError(`${context} '${type}' is not a valid enumeration value for ReadableStreamType`);
|
||
}
|
||
return type;
|
||
}
|
||
|
||
function convertReaderOptions(options, context) {
|
||
assertDictionary(options, context);
|
||
const mode = options === null || options === void 0 ? void 0 : options.mode;
|
||
return {
|
||
mode: mode === undefined ? undefined : convertReadableStreamReaderMode(mode, `${context} has member 'mode' that`)
|
||
};
|
||
}
|
||
function convertReadableStreamReaderMode(mode, context) {
|
||
mode = `${mode}`;
|
||
if (mode !== 'byob') {
|
||
throw new TypeError(`${context} '${mode}' is not a valid enumeration value for ReadableStreamReaderMode`);
|
||
}
|
||
return mode;
|
||
}
|
||
|
||
function convertIteratorOptions(options, context) {
|
||
assertDictionary(options, context);
|
||
const preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel;
|
||
return { preventCancel: Boolean(preventCancel) };
|
||
}
|
||
|
||
function convertPipeOptions(options, context) {
|
||
assertDictionary(options, context);
|
||
const preventAbort = options === null || options === void 0 ? void 0 : options.preventAbort;
|
||
const preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel;
|
||
const preventClose = options === null || options === void 0 ? void 0 : options.preventClose;
|
||
const signal = options === null || options === void 0 ? void 0 : options.signal;
|
||
if (signal !== undefined) {
|
||
assertAbortSignal(signal, `${context} has member 'signal' that`);
|
||
}
|
||
return {
|
||
preventAbort: Boolean(preventAbort),
|
||
preventCancel: Boolean(preventCancel),
|
||
preventClose: Boolean(preventClose),
|
||
signal
|
||
};
|
||
}
|
||
function assertAbortSignal(signal, context) {
|
||
if (!isAbortSignal(signal)) {
|
||
throw new TypeError(`${context} is not an AbortSignal.`);
|
||
}
|
||
}
|
||
|
||
function convertReadableWritablePair(pair, context) {
|
||
assertDictionary(pair, context);
|
||
const readable = pair === null || pair === void 0 ? void 0 : pair.readable;
|
||
assertRequiredField(readable, 'readable', 'ReadableWritablePair');
|
||
assertReadableStream(readable, `${context} has member 'readable' that`);
|
||
const writable = pair === null || pair === void 0 ? void 0 : pair.writable;
|
||
assertRequiredField(writable, 'writable', 'ReadableWritablePair');
|
||
assertWritableStream(writable, `${context} has member 'writable' that`);
|
||
return { readable, writable };
|
||
}
|
||
|
||
/**
|
||
* A readable stream represents a source of data, from which you can read.
|
||
*
|
||
* @public
|
||
*/
|
||
class ReadableStream {
|
||
constructor(rawUnderlyingSource = {}, rawStrategy = {}) {
|
||
if (rawUnderlyingSource === undefined) {
|
||
rawUnderlyingSource = null;
|
||
}
|
||
else {
|
||
assertObject(rawUnderlyingSource, 'First parameter');
|
||
}
|
||
const strategy = convertQueuingStrategy(rawStrategy, 'Second parameter');
|
||
const underlyingSource = convertUnderlyingDefaultOrByteSource(rawUnderlyingSource, 'First parameter');
|
||
InitializeReadableStream(this);
|
||
if (underlyingSource.type === 'bytes') {
|
||
if (strategy.size !== undefined) {
|
||
throw new RangeError('The strategy for a byte stream cannot have a size function');
|
||
}
|
||
const highWaterMark = ExtractHighWaterMark(strategy, 0);
|
||
SetUpReadableByteStreamControllerFromUnderlyingSource(this, underlyingSource, highWaterMark);
|
||
}
|
||
else {
|
||
const sizeAlgorithm = ExtractSizeAlgorithm(strategy);
|
||
const highWaterMark = ExtractHighWaterMark(strategy, 1);
|
||
SetUpReadableStreamDefaultControllerFromUnderlyingSource(this, underlyingSource, highWaterMark, sizeAlgorithm);
|
||
}
|
||
}
|
||
/**
|
||
* Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}.
|
||
*/
|
||
get locked() {
|
||
if (!IsReadableStream(this)) {
|
||
throw streamBrandCheckException$1('locked');
|
||
}
|
||
return IsReadableStreamLocked(this);
|
||
}
|
||
/**
|
||
* Cancels the stream, signaling a loss of interest in the stream by a consumer.
|
||
*
|
||
* The supplied `reason` argument will be given to the underlying source's {@link UnderlyingSource.cancel | cancel()}
|
||
* method, which might or might not use it.
|
||
*/
|
||
cancel(reason = undefined) {
|
||
if (!IsReadableStream(this)) {
|
||
return promiseRejectedWith(streamBrandCheckException$1('cancel'));
|
||
}
|
||
if (IsReadableStreamLocked(this)) {
|
||
return promiseRejectedWith(new TypeError('Cannot cancel a stream that already has a reader'));
|
||
}
|
||
return ReadableStreamCancel(this, reason);
|
||
}
|
||
getReader(rawOptions = undefined) {
|
||
if (!IsReadableStream(this)) {
|
||
throw streamBrandCheckException$1('getReader');
|
||
}
|
||
const options = convertReaderOptions(rawOptions, 'First parameter');
|
||
if (options.mode === undefined) {
|
||
return AcquireReadableStreamDefaultReader(this);
|
||
}
|
||
return AcquireReadableStreamBYOBReader(this);
|
||
}
|
||
pipeThrough(rawTransform, rawOptions = {}) {
|
||
if (!IsReadableStream(this)) {
|
||
throw streamBrandCheckException$1('pipeThrough');
|
||
}
|
||
assertRequiredArgument(rawTransform, 1, 'pipeThrough');
|
||
const transform = convertReadableWritablePair(rawTransform, 'First parameter');
|
||
const options = convertPipeOptions(rawOptions, 'Second parameter');
|
||
if (IsReadableStreamLocked(this)) {
|
||
throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream');
|
||
}
|
||
if (IsWritableStreamLocked(transform.writable)) {
|
||
throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream');
|
||
}
|
||
const promise = ReadableStreamPipeTo(this, transform.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal);
|
||
setPromiseIsHandledToTrue(promise);
|
||
return transform.readable;
|
||
}
|
||
pipeTo(destination, rawOptions = {}) {
|
||
if (!IsReadableStream(this)) {
|
||
return promiseRejectedWith(streamBrandCheckException$1('pipeTo'));
|
||
}
|
||
if (destination === undefined) {
|
||
return promiseRejectedWith(`Parameter 1 is required in 'pipeTo'.`);
|
||
}
|
||
if (!IsWritableStream(destination)) {
|
||
return promiseRejectedWith(new TypeError(`ReadableStream.prototype.pipeTo's first argument must be a WritableStream`));
|
||
}
|
||
let options;
|
||
try {
|
||
options = convertPipeOptions(rawOptions, 'Second parameter');
|
||
}
|
||
catch (e) {
|
||
return promiseRejectedWith(e);
|
||
}
|
||
if (IsReadableStreamLocked(this)) {
|
||
return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream'));
|
||
}
|
||
if (IsWritableStreamLocked(destination)) {
|
||
return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream'));
|
||
}
|
||
return ReadableStreamPipeTo(this, destination, options.preventClose, options.preventAbort, options.preventCancel, options.signal);
|
||
}
|
||
/**
|
||
* Tees this readable stream, returning a two-element array containing the two resulting branches as
|
||
* new {@link ReadableStream} instances.
|
||
*
|
||
* Teeing a stream will lock it, preventing any other consumer from acquiring a reader.
|
||
* To cancel the stream, cancel both of the resulting branches; a composite cancellation reason will then be
|
||
* propagated to the stream's underlying source.
|
||
*
|
||
* Note that the chunks seen in each branch will be the same object. If the chunks are not immutable,
|
||
* this could allow interference between the two branches.
|
||
*/
|
||
tee() {
|
||
if (!IsReadableStream(this)) {
|
||
throw streamBrandCheckException$1('tee');
|
||
}
|
||
const branches = ReadableStreamTee(this);
|
||
return CreateArrayFromList(branches);
|
||
}
|
||
values(rawOptions = undefined) {
|
||
if (!IsReadableStream(this)) {
|
||
throw streamBrandCheckException$1('values');
|
||
}
|
||
const options = convertIteratorOptions(rawOptions, 'First parameter');
|
||
return AcquireReadableStreamAsyncIterator(this, options.preventCancel);
|
||
}
|
||
}
|
||
Object.defineProperties(ReadableStream.prototype, {
|
||
cancel: { enumerable: true },
|
||
getReader: { enumerable: true },
|
||
pipeThrough: { enumerable: true },
|
||
pipeTo: { enumerable: true },
|
||
tee: { enumerable: true },
|
||
values: { enumerable: true },
|
||
locked: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'ReadableStream',
|
||
configurable: true
|
||
});
|
||
}
|
||
if (typeof SymbolPolyfill.asyncIterator === 'symbol') {
|
||
Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.asyncIterator, {
|
||
value: ReadableStream.prototype.values,
|
||
writable: true,
|
||
configurable: true
|
||
});
|
||
}
|
||
// Abstract operations for the ReadableStream.
|
||
// Throws if and only if startAlgorithm throws.
|
||
function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1) {
|
||
const stream = Object.create(ReadableStream.prototype);
|
||
InitializeReadableStream(stream);
|
||
const controller = Object.create(ReadableStreamDefaultController.prototype);
|
||
SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm);
|
||
return stream;
|
||
}
|
||
// Throws if and only if startAlgorithm throws.
|
||
function CreateReadableByteStream(startAlgorithm, pullAlgorithm, cancelAlgorithm) {
|
||
const stream = Object.create(ReadableStream.prototype);
|
||
InitializeReadableStream(stream);
|
||
const controller = Object.create(ReadableByteStreamController.prototype);
|
||
SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, 0, undefined);
|
||
return stream;
|
||
}
|
||
function InitializeReadableStream(stream) {
|
||
stream._state = 'readable';
|
||
stream._reader = undefined;
|
||
stream._storedError = undefined;
|
||
stream._disturbed = false;
|
||
}
|
||
function IsReadableStream(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_readableStreamController')) {
|
||
return false;
|
||
}
|
||
return x instanceof ReadableStream;
|
||
}
|
||
function IsReadableStreamLocked(stream) {
|
||
if (stream._reader === undefined) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
// ReadableStream API exposed for controllers.
|
||
function ReadableStreamCancel(stream, reason) {
|
||
stream._disturbed = true;
|
||
if (stream._state === 'closed') {
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
if (stream._state === 'errored') {
|
||
return promiseRejectedWith(stream._storedError);
|
||
}
|
||
ReadableStreamClose(stream);
|
||
const reader = stream._reader;
|
||
if (reader !== undefined && IsReadableStreamBYOBReader(reader)) {
|
||
reader._readIntoRequests.forEach(readIntoRequest => {
|
||
readIntoRequest._closeSteps(undefined);
|
||
});
|
||
reader._readIntoRequests = new SimpleQueue();
|
||
}
|
||
const sourceCancelPromise = stream._readableStreamController[CancelSteps](reason);
|
||
return transformPromiseWith(sourceCancelPromise, noop);
|
||
}
|
||
function ReadableStreamClose(stream) {
|
||
stream._state = 'closed';
|
||
const reader = stream._reader;
|
||
if (reader === undefined) {
|
||
return;
|
||
}
|
||
defaultReaderClosedPromiseResolve(reader);
|
||
if (IsReadableStreamDefaultReader(reader)) {
|
||
reader._readRequests.forEach(readRequest => {
|
||
readRequest._closeSteps();
|
||
});
|
||
reader._readRequests = new SimpleQueue();
|
||
}
|
||
}
|
||
function ReadableStreamError(stream, e) {
|
||
stream._state = 'errored';
|
||
stream._storedError = e;
|
||
const reader = stream._reader;
|
||
if (reader === undefined) {
|
||
return;
|
||
}
|
||
defaultReaderClosedPromiseReject(reader, e);
|
||
if (IsReadableStreamDefaultReader(reader)) {
|
||
reader._readRequests.forEach(readRequest => {
|
||
readRequest._errorSteps(e);
|
||
});
|
||
reader._readRequests = new SimpleQueue();
|
||
}
|
||
else {
|
||
reader._readIntoRequests.forEach(readIntoRequest => {
|
||
readIntoRequest._errorSteps(e);
|
||
});
|
||
reader._readIntoRequests = new SimpleQueue();
|
||
}
|
||
}
|
||
// Helper functions for the ReadableStream.
|
||
function streamBrandCheckException$1(name) {
|
||
return new TypeError(`ReadableStream.prototype.${name} can only be used on a ReadableStream`);
|
||
}
|
||
|
||
function convertQueuingStrategyInit(init, context) {
|
||
assertDictionary(init, context);
|
||
const highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark;
|
||
assertRequiredField(highWaterMark, 'highWaterMark', 'QueuingStrategyInit');
|
||
return {
|
||
highWaterMark: convertUnrestrictedDouble(highWaterMark)
|
||
};
|
||
}
|
||
|
||
// The size function must not have a prototype property nor be a constructor
|
||
const byteLengthSizeFunction = (chunk) => {
|
||
return chunk.byteLength;
|
||
};
|
||
Object.defineProperty(byteLengthSizeFunction, 'name', {
|
||
value: 'size',
|
||
configurable: true
|
||
});
|
||
/**
|
||
* A queuing strategy that counts the number of bytes in each chunk.
|
||
*
|
||
* @public
|
||
*/
|
||
class ByteLengthQueuingStrategy {
|
||
constructor(options) {
|
||
assertRequiredArgument(options, 1, 'ByteLengthQueuingStrategy');
|
||
options = convertQueuingStrategyInit(options, 'First parameter');
|
||
this._byteLengthQueuingStrategyHighWaterMark = options.highWaterMark;
|
||
}
|
||
/**
|
||
* Returns the high water mark provided to the constructor.
|
||
*/
|
||
get highWaterMark() {
|
||
if (!IsByteLengthQueuingStrategy(this)) {
|
||
throw byteLengthBrandCheckException('highWaterMark');
|
||
}
|
||
return this._byteLengthQueuingStrategyHighWaterMark;
|
||
}
|
||
/**
|
||
* Measures the size of `chunk` by returning the value of its `byteLength` property.
|
||
*/
|
||
get size() {
|
||
if (!IsByteLengthQueuingStrategy(this)) {
|
||
throw byteLengthBrandCheckException('size');
|
||
}
|
||
return byteLengthSizeFunction;
|
||
}
|
||
}
|
||
Object.defineProperties(ByteLengthQueuingStrategy.prototype, {
|
||
highWaterMark: { enumerable: true },
|
||
size: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(ByteLengthQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'ByteLengthQueuingStrategy',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Helper functions for the ByteLengthQueuingStrategy.
|
||
function byteLengthBrandCheckException(name) {
|
||
return new TypeError(`ByteLengthQueuingStrategy.prototype.${name} can only be used on a ByteLengthQueuingStrategy`);
|
||
}
|
||
function IsByteLengthQueuingStrategy(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_byteLengthQueuingStrategyHighWaterMark')) {
|
||
return false;
|
||
}
|
||
return x instanceof ByteLengthQueuingStrategy;
|
||
}
|
||
|
||
// The size function must not have a prototype property nor be a constructor
|
||
const countSizeFunction = () => {
|
||
return 1;
|
||
};
|
||
Object.defineProperty(countSizeFunction, 'name', {
|
||
value: 'size',
|
||
configurable: true
|
||
});
|
||
/**
|
||
* A queuing strategy that counts the number of chunks.
|
||
*
|
||
* @public
|
||
*/
|
||
class CountQueuingStrategy {
|
||
constructor(options) {
|
||
assertRequiredArgument(options, 1, 'CountQueuingStrategy');
|
||
options = convertQueuingStrategyInit(options, 'First parameter');
|
||
this._countQueuingStrategyHighWaterMark = options.highWaterMark;
|
||
}
|
||
/**
|
||
* Returns the high water mark provided to the constructor.
|
||
*/
|
||
get highWaterMark() {
|
||
if (!IsCountQueuingStrategy(this)) {
|
||
throw countBrandCheckException('highWaterMark');
|
||
}
|
||
return this._countQueuingStrategyHighWaterMark;
|
||
}
|
||
/**
|
||
* Measures the size of `chunk` by always returning 1.
|
||
* This ensures that the total queue size is a count of the number of chunks in the queue.
|
||
*/
|
||
get size() {
|
||
if (!IsCountQueuingStrategy(this)) {
|
||
throw countBrandCheckException('size');
|
||
}
|
||
return countSizeFunction;
|
||
}
|
||
}
|
||
Object.defineProperties(CountQueuingStrategy.prototype, {
|
||
highWaterMark: { enumerable: true },
|
||
size: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(CountQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'CountQueuingStrategy',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Helper functions for the CountQueuingStrategy.
|
||
function countBrandCheckException(name) {
|
||
return new TypeError(`CountQueuingStrategy.prototype.${name} can only be used on a CountQueuingStrategy`);
|
||
}
|
||
function IsCountQueuingStrategy(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_countQueuingStrategyHighWaterMark')) {
|
||
return false;
|
||
}
|
||
return x instanceof CountQueuingStrategy;
|
||
}
|
||
|
||
function convertTransformer(original, context) {
|
||
assertDictionary(original, context);
|
||
const flush = original === null || original === void 0 ? void 0 : original.flush;
|
||
const readableType = original === null || original === void 0 ? void 0 : original.readableType;
|
||
const start = original === null || original === void 0 ? void 0 : original.start;
|
||
const transform = original === null || original === void 0 ? void 0 : original.transform;
|
||
const writableType = original === null || original === void 0 ? void 0 : original.writableType;
|
||
return {
|
||
flush: flush === undefined ?
|
||
undefined :
|
||
convertTransformerFlushCallback(flush, original, `${context} has member 'flush' that`),
|
||
readableType,
|
||
start: start === undefined ?
|
||
undefined :
|
||
convertTransformerStartCallback(start, original, `${context} has member 'start' that`),
|
||
transform: transform === undefined ?
|
||
undefined :
|
||
convertTransformerTransformCallback(transform, original, `${context} has member 'transform' that`),
|
||
writableType
|
||
};
|
||
}
|
||
function convertTransformerFlushCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return (controller) => promiseCall(fn, original, [controller]);
|
||
}
|
||
function convertTransformerStartCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return (controller) => reflectCall(fn, original, [controller]);
|
||
}
|
||
function convertTransformerTransformCallback(fn, original, context) {
|
||
assertFunction(fn, context);
|
||
return (chunk, controller) => promiseCall(fn, original, [chunk, controller]);
|
||
}
|
||
|
||
// Class TransformStream
|
||
/**
|
||
* A transform stream consists of a pair of streams: a {@link WritableStream | writable stream},
|
||
* known as its writable side, and a {@link ReadableStream | readable stream}, known as its readable side.
|
||
* In a manner specific to the transform stream in question, writes to the writable side result in new data being
|
||
* made available for reading from the readable side.
|
||
*
|
||
* @public
|
||
*/
|
||
class TransformStream {
|
||
constructor(rawTransformer = {}, rawWritableStrategy = {}, rawReadableStrategy = {}) {
|
||
if (rawTransformer === undefined) {
|
||
rawTransformer = null;
|
||
}
|
||
const writableStrategy = convertQueuingStrategy(rawWritableStrategy, 'Second parameter');
|
||
const readableStrategy = convertQueuingStrategy(rawReadableStrategy, 'Third parameter');
|
||
const transformer = convertTransformer(rawTransformer, 'First parameter');
|
||
if (transformer.readableType !== undefined) {
|
||
throw new RangeError('Invalid readableType specified');
|
||
}
|
||
if (transformer.writableType !== undefined) {
|
||
throw new RangeError('Invalid writableType specified');
|
||
}
|
||
const readableHighWaterMark = ExtractHighWaterMark(readableStrategy, 0);
|
||
const readableSizeAlgorithm = ExtractSizeAlgorithm(readableStrategy);
|
||
const writableHighWaterMark = ExtractHighWaterMark(writableStrategy, 1);
|
||
const writableSizeAlgorithm = ExtractSizeAlgorithm(writableStrategy);
|
||
let startPromise_resolve;
|
||
const startPromise = newPromise(resolve => {
|
||
startPromise_resolve = resolve;
|
||
});
|
||
InitializeTransformStream(this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm);
|
||
SetUpTransformStreamDefaultControllerFromTransformer(this, transformer);
|
||
if (transformer.start !== undefined) {
|
||
startPromise_resolve(transformer.start(this._transformStreamController));
|
||
}
|
||
else {
|
||
startPromise_resolve(undefined);
|
||
}
|
||
}
|
||
/**
|
||
* The readable side of the transform stream.
|
||
*/
|
||
get readable() {
|
||
if (!IsTransformStream(this)) {
|
||
throw streamBrandCheckException('readable');
|
||
}
|
||
return this._readable;
|
||
}
|
||
/**
|
||
* The writable side of the transform stream.
|
||
*/
|
||
get writable() {
|
||
if (!IsTransformStream(this)) {
|
||
throw streamBrandCheckException('writable');
|
||
}
|
||
return this._writable;
|
||
}
|
||
}
|
||
Object.defineProperties(TransformStream.prototype, {
|
||
readable: { enumerable: true },
|
||
writable: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(TransformStream.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'TransformStream',
|
||
configurable: true
|
||
});
|
||
}
|
||
function InitializeTransformStream(stream, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm) {
|
||
function startAlgorithm() {
|
||
return startPromise;
|
||
}
|
||
function writeAlgorithm(chunk) {
|
||
return TransformStreamDefaultSinkWriteAlgorithm(stream, chunk);
|
||
}
|
||
function abortAlgorithm(reason) {
|
||
return TransformStreamDefaultSinkAbortAlgorithm(stream, reason);
|
||
}
|
||
function closeAlgorithm() {
|
||
return TransformStreamDefaultSinkCloseAlgorithm(stream);
|
||
}
|
||
stream._writable = CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, writableHighWaterMark, writableSizeAlgorithm);
|
||
function pullAlgorithm() {
|
||
return TransformStreamDefaultSourcePullAlgorithm(stream);
|
||
}
|
||
function cancelAlgorithm(reason) {
|
||
TransformStreamErrorWritableAndUnblockWrite(stream, reason);
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
stream._readable = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, readableHighWaterMark, readableSizeAlgorithm);
|
||
// The [[backpressure]] slot is set to undefined so that it can be initialised by TransformStreamSetBackpressure.
|
||
stream._backpressure = undefined;
|
||
stream._backpressureChangePromise = undefined;
|
||
stream._backpressureChangePromise_resolve = undefined;
|
||
TransformStreamSetBackpressure(stream, true);
|
||
stream._transformStreamController = undefined;
|
||
}
|
||
function IsTransformStream(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_transformStreamController')) {
|
||
return false;
|
||
}
|
||
return x instanceof TransformStream;
|
||
}
|
||
// This is a no-op if both sides are already errored.
|
||
function TransformStreamError(stream, e) {
|
||
ReadableStreamDefaultControllerError(stream._readable._readableStreamController, e);
|
||
TransformStreamErrorWritableAndUnblockWrite(stream, e);
|
||
}
|
||
function TransformStreamErrorWritableAndUnblockWrite(stream, e) {
|
||
TransformStreamDefaultControllerClearAlgorithms(stream._transformStreamController);
|
||
WritableStreamDefaultControllerErrorIfNeeded(stream._writable._writableStreamController, e);
|
||
if (stream._backpressure) {
|
||
// Pretend that pull() was called to permit any pending write() calls to complete. TransformStreamSetBackpressure()
|
||
// cannot be called from enqueue() or pull() once the ReadableStream is errored, so this will will be the final time
|
||
// _backpressure is set.
|
||
TransformStreamSetBackpressure(stream, false);
|
||
}
|
||
}
|
||
function TransformStreamSetBackpressure(stream, backpressure) {
|
||
// Passes also when called during construction.
|
||
if (stream._backpressureChangePromise !== undefined) {
|
||
stream._backpressureChangePromise_resolve();
|
||
}
|
||
stream._backpressureChangePromise = newPromise(resolve => {
|
||
stream._backpressureChangePromise_resolve = resolve;
|
||
});
|
||
stream._backpressure = backpressure;
|
||
}
|
||
// Class TransformStreamDefaultController
|
||
/**
|
||
* Allows control of the {@link ReadableStream} and {@link WritableStream} of the associated {@link TransformStream}.
|
||
*
|
||
* @public
|
||
*/
|
||
class TransformStreamDefaultController {
|
||
constructor() {
|
||
throw new TypeError('Illegal constructor');
|
||
}
|
||
/**
|
||
* Returns the desired size to fill the readable side’s internal queue. It can be negative, if the queue is over-full.
|
||
*/
|
||
get desiredSize() {
|
||
if (!IsTransformStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException('desiredSize');
|
||
}
|
||
const readableController = this._controlledTransformStream._readable._readableStreamController;
|
||
return ReadableStreamDefaultControllerGetDesiredSize(readableController);
|
||
}
|
||
enqueue(chunk = undefined) {
|
||
if (!IsTransformStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException('enqueue');
|
||
}
|
||
TransformStreamDefaultControllerEnqueue(this, chunk);
|
||
}
|
||
/**
|
||
* Errors both the readable side and the writable side of the controlled transform stream, making all future
|
||
* interactions with it fail with the given error `e`. Any chunks queued for transformation will be discarded.
|
||
*/
|
||
error(reason = undefined) {
|
||
if (!IsTransformStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException('error');
|
||
}
|
||
TransformStreamDefaultControllerError(this, reason);
|
||
}
|
||
/**
|
||
* Closes the readable side and errors the writable side of the controlled transform stream. This is useful when the
|
||
* transformer only needs to consume a portion of the chunks written to the writable side.
|
||
*/
|
||
terminate() {
|
||
if (!IsTransformStreamDefaultController(this)) {
|
||
throw defaultControllerBrandCheckException('terminate');
|
||
}
|
||
TransformStreamDefaultControllerTerminate(this);
|
||
}
|
||
}
|
||
Object.defineProperties(TransformStreamDefaultController.prototype, {
|
||
enqueue: { enumerable: true },
|
||
error: { enumerable: true },
|
||
terminate: { enumerable: true },
|
||
desiredSize: { enumerable: true }
|
||
});
|
||
if (typeof SymbolPolyfill.toStringTag === 'symbol') {
|
||
Object.defineProperty(TransformStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
|
||
value: 'TransformStreamDefaultController',
|
||
configurable: true
|
||
});
|
||
}
|
||
// Transform Stream Default Controller Abstract Operations
|
||
function IsTransformStreamDefaultController(x) {
|
||
if (!typeIsObject(x)) {
|
||
return false;
|
||
}
|
||
if (!Object.prototype.hasOwnProperty.call(x, '_controlledTransformStream')) {
|
||
return false;
|
||
}
|
||
return x instanceof TransformStreamDefaultController;
|
||
}
|
||
function SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm) {
|
||
controller._controlledTransformStream = stream;
|
||
stream._transformStreamController = controller;
|
||
controller._transformAlgorithm = transformAlgorithm;
|
||
controller._flushAlgorithm = flushAlgorithm;
|
||
}
|
||
function SetUpTransformStreamDefaultControllerFromTransformer(stream, transformer) {
|
||
const controller = Object.create(TransformStreamDefaultController.prototype);
|
||
let transformAlgorithm = (chunk) => {
|
||
try {
|
||
TransformStreamDefaultControllerEnqueue(controller, chunk);
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
catch (transformResultE) {
|
||
return promiseRejectedWith(transformResultE);
|
||
}
|
||
};
|
||
let flushAlgorithm = () => promiseResolvedWith(undefined);
|
||
if (transformer.transform !== undefined) {
|
||
transformAlgorithm = chunk => transformer.transform(chunk, controller);
|
||
}
|
||
if (transformer.flush !== undefined) {
|
||
flushAlgorithm = () => transformer.flush(controller);
|
||
}
|
||
SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm);
|
||
}
|
||
function TransformStreamDefaultControllerClearAlgorithms(controller) {
|
||
controller._transformAlgorithm = undefined;
|
||
controller._flushAlgorithm = undefined;
|
||
}
|
||
function TransformStreamDefaultControllerEnqueue(controller, chunk) {
|
||
const stream = controller._controlledTransformStream;
|
||
const readableController = stream._readable._readableStreamController;
|
||
if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController)) {
|
||
throw new TypeError('Readable side is not in a state that permits enqueue');
|
||
}
|
||
// We throttle transform invocations based on the backpressure of the ReadableStream, but we still
|
||
// accept TransformStreamDefaultControllerEnqueue() calls.
|
||
try {
|
||
ReadableStreamDefaultControllerEnqueue(readableController, chunk);
|
||
}
|
||
catch (e) {
|
||
// This happens when readableStrategy.size() throws.
|
||
TransformStreamErrorWritableAndUnblockWrite(stream, e);
|
||
throw stream._readable._storedError;
|
||
}
|
||
const backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController);
|
||
if (backpressure !== stream._backpressure) {
|
||
TransformStreamSetBackpressure(stream, true);
|
||
}
|
||
}
|
||
function TransformStreamDefaultControllerError(controller, e) {
|
||
TransformStreamError(controller._controlledTransformStream, e);
|
||
}
|
||
function TransformStreamDefaultControllerPerformTransform(controller, chunk) {
|
||
const transformPromise = controller._transformAlgorithm(chunk);
|
||
return transformPromiseWith(transformPromise, undefined, r => {
|
||
TransformStreamError(controller._controlledTransformStream, r);
|
||
throw r;
|
||
});
|
||
}
|
||
function TransformStreamDefaultControllerTerminate(controller) {
|
||
const stream = controller._controlledTransformStream;
|
||
const readableController = stream._readable._readableStreamController;
|
||
ReadableStreamDefaultControllerClose(readableController);
|
||
const error = new TypeError('TransformStream terminated');
|
||
TransformStreamErrorWritableAndUnblockWrite(stream, error);
|
||
}
|
||
// TransformStreamDefaultSink Algorithms
|
||
function TransformStreamDefaultSinkWriteAlgorithm(stream, chunk) {
|
||
const controller = stream._transformStreamController;
|
||
if (stream._backpressure) {
|
||
const backpressureChangePromise = stream._backpressureChangePromise;
|
||
return transformPromiseWith(backpressureChangePromise, () => {
|
||
const writable = stream._writable;
|
||
const state = writable._state;
|
||
if (state === 'erroring') {
|
||
throw writable._storedError;
|
||
}
|
||
return TransformStreamDefaultControllerPerformTransform(controller, chunk);
|
||
});
|
||
}
|
||
return TransformStreamDefaultControllerPerformTransform(controller, chunk);
|
||
}
|
||
function TransformStreamDefaultSinkAbortAlgorithm(stream, reason) {
|
||
// abort() is not called synchronously, so it is possible for abort() to be called when the stream is already
|
||
// errored.
|
||
TransformStreamError(stream, reason);
|
||
return promiseResolvedWith(undefined);
|
||
}
|
||
function TransformStreamDefaultSinkCloseAlgorithm(stream) {
|
||
// stream._readable cannot change after construction, so caching it across a call to user code is safe.
|
||
const readable = stream._readable;
|
||
const controller = stream._transformStreamController;
|
||
const flushPromise = controller._flushAlgorithm();
|
||
TransformStreamDefaultControllerClearAlgorithms(controller);
|
||
// Return a promise that is fulfilled with undefined on success.
|
||
return transformPromiseWith(flushPromise, () => {
|
||
if (readable._state === 'errored') {
|
||
throw readable._storedError;
|
||
}
|
||
ReadableStreamDefaultControllerClose(readable._readableStreamController);
|
||
}, r => {
|
||
TransformStreamError(stream, r);
|
||
throw readable._storedError;
|
||
});
|
||
}
|
||
// TransformStreamDefaultSource Algorithms
|
||
function TransformStreamDefaultSourcePullAlgorithm(stream) {
|
||
// Invariant. Enforced by the promises returned by start() and pull().
|
||
TransformStreamSetBackpressure(stream, false);
|
||
// Prevent the next pull() call until there is backpressure.
|
||
return stream._backpressureChangePromise;
|
||
}
|
||
// Helper functions for the TransformStreamDefaultController.
|
||
function defaultControllerBrandCheckException(name) {
|
||
return new TypeError(`TransformStreamDefaultController.prototype.${name} can only be used on a TransformStreamDefaultController`);
|
||
}
|
||
// Helper functions for the TransformStream.
|
||
function streamBrandCheckException(name) {
|
||
return new TypeError(`TransformStream.prototype.${name} can only be used on a TransformStream`);
|
||
}
|
||
|
||
exports.ByteLengthQueuingStrategy = ByteLengthQueuingStrategy;
|
||
exports.CountQueuingStrategy = CountQueuingStrategy;
|
||
exports.ReadableByteStreamController = ReadableByteStreamController;
|
||
exports.ReadableStream = ReadableStream;
|
||
exports.ReadableStreamBYOBReader = ReadableStreamBYOBReader;
|
||
exports.ReadableStreamBYOBRequest = ReadableStreamBYOBRequest;
|
||
exports.ReadableStreamDefaultController = ReadableStreamDefaultController;
|
||
exports.ReadableStreamDefaultReader = ReadableStreamDefaultReader;
|
||
exports.TransformStream = TransformStream;
|
||
exports.TransformStreamDefaultController = TransformStreamDefaultController;
|
||
exports.WritableStream = WritableStream;
|
||
exports.WritableStreamDefaultController = WritableStreamDefaultController;
|
||
exports.WritableStreamDefaultWriter = WritableStreamDefaultWriter;
|
||
|
||
Object.defineProperty(exports, '__esModule', { value: true });
|
||
|
||
})));
|
||
//# sourceMappingURL=ponyfill.es2018.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2940:
|
||
/***/ ((module) => {
|
||
|
||
// Returns a wrapper function that returns a wrapped callback
|
||
// The wrapper function should do some stuff, and return a
|
||
// presumably different callback function.
|
||
// This makes sure that own properties are retained, so that
|
||
// decorations and such are not lost along the way.
|
||
module.exports = wrappy
|
||
function wrappy (fn, cb) {
|
||
if (fn && cb) return wrappy(fn)(cb)
|
||
|
||
if (typeof fn !== 'function')
|
||
throw new TypeError('need wrapper function')
|
||
|
||
Object.keys(fn).forEach(function (k) {
|
||
wrapper[k] = fn[k]
|
||
})
|
||
|
||
return wrapper
|
||
|
||
function wrapper() {
|
||
var args = new Array(arguments.length)
|
||
for (var i = 0; i < args.length; i++) {
|
||
args[i] = arguments[i]
|
||
}
|
||
var ret = fn.apply(this, args)
|
||
var cb = args[args.length-1]
|
||
if (typeof ret === 'function' && ret !== cb) {
|
||
Object.keys(cb).forEach(function (k) {
|
||
ret[k] = cb[k]
|
||
})
|
||
}
|
||
return ret
|
||
}
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4633:
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
// ESM COMPAT FLAG
|
||
__nccwpck_require__.r(__webpack_exports__);
|
||
|
||
// EXTERNAL MODULE: external "fs"
|
||
var external_fs_ = __nccwpck_require__(7147);
|
||
// EXTERNAL MODULE: external "https"
|
||
var external_https_ = __nccwpck_require__(5687);
|
||
// EXTERNAL MODULE: external "path"
|
||
var external_path_ = __nccwpck_require__(1017);
|
||
// EXTERNAL MODULE: ./node_modules/@actions/exec/lib/exec.js
|
||
var exec = __nccwpck_require__(1514);
|
||
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
||
var core = __nccwpck_require__(2186);
|
||
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
|
||
var github = __nccwpck_require__(5438);
|
||
;// CONCATENATED MODULE: ./package.json
|
||
const package_namespaceObject = {"i8":"3.1.0"};
|
||
;// CONCATENATED MODULE: ./src/buildExec.ts
|
||
|
||
|
||
|
||
const context = github.context;
|
||
const isTrue = (variable) => {
|
||
const lowercase = variable.toLowerCase();
|
||
return (lowercase === '1' ||
|
||
lowercase === 't' ||
|
||
lowercase === 'true' ||
|
||
lowercase === 'y' ||
|
||
lowercase === 'yes');
|
||
};
|
||
const buildExec = () => {
|
||
const clean = core.getInput('move_coverage_to_trash');
|
||
const commitParent = core.getInput('commit_parent');
|
||
const envVars = core.getInput('env_vars');
|
||
const dryRun = isTrue(core.getInput('dry_run'));
|
||
const failCi = isTrue(core.getInput('fail_ci_if_error'));
|
||
const file = core.getInput('file');
|
||
const files = core.getInput('files');
|
||
const flags = core.getInput('flags');
|
||
const gcov = core.getInput('gcov');
|
||
const gcovArgs = core.getInput('gcov_args');
|
||
const gcovIgnore = core.getInput('gcov_ignore');
|
||
const gcovInclude = core.getInput('gcov_include');
|
||
const functionalities = core.getInput('functionalities');
|
||
const name = core.getInput('name');
|
||
const os = core.getInput('os');
|
||
const overrideBranch = core.getInput('override_branch');
|
||
const overrideBuild = core.getInput('override_build');
|
||
const overrideCommit = core.getInput('override_commit');
|
||
const overridePr = core.getInput('override_pr');
|
||
const overrideTag = core.getInput('override_tag');
|
||
const rootDir = core.getInput('root_dir');
|
||
const searchDir = core.getInput('directory');
|
||
const slug = core.getInput('slug');
|
||
const token = core.getInput('token');
|
||
let uploaderVersion = core.getInput('version');
|
||
const url = core.getInput('url');
|
||
const verbose = isTrue(core.getInput('verbose'));
|
||
const workingDir = core.getInput('working-directory');
|
||
const xcode = core.getInput('xcode');
|
||
const xcodeArchivePath = core.getInput('xcode_archive_path');
|
||
const execArgs = [];
|
||
execArgs.push('-n', `${name}`, '-Q', `github-action-${package_namespaceObject.i8}`);
|
||
const options = {};
|
||
options.env = Object.assign(process.env, {
|
||
GITHUB_ACTION: process.env.GITHUB_ACTION,
|
||
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
|
||
GITHUB_REF: process.env.GITHUB_REF,
|
||
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
|
||
GITHUB_SHA: process.env.GITHUB_SHA,
|
||
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
|
||
});
|
||
const envVarsArg = [];
|
||
for (const envVar of envVars.split(',')) {
|
||
const envVarClean = envVar.trim();
|
||
if (envVarClean) {
|
||
options.env[envVarClean] = process.env[envVarClean];
|
||
envVarsArg.push(envVarClean);
|
||
}
|
||
}
|
||
if (token) {
|
||
options.env.CODECOV_TOKEN = token;
|
||
}
|
||
if (clean) {
|
||
execArgs.push('-c');
|
||
}
|
||
if (commitParent) {
|
||
execArgs.push('-N', `${commitParent}`);
|
||
}
|
||
if (dryRun) {
|
||
execArgs.push('-d');
|
||
}
|
||
if (envVarsArg.length) {
|
||
execArgs.push('-e', envVarsArg.join(','));
|
||
}
|
||
if (functionalities) {
|
||
functionalities.split(',').map((f) => f.trim()).forEach((f) => {
|
||
execArgs.push('-X', `${f}`);
|
||
});
|
||
}
|
||
if (failCi) {
|
||
execArgs.push('-Z');
|
||
}
|
||
if (file) {
|
||
execArgs.push('-f', `${file}`);
|
||
}
|
||
if (files) {
|
||
files.split(',').map((f) => f.trim()).forEach((f) => {
|
||
execArgs.push('-f', `${f}`);
|
||
});
|
||
}
|
||
if (flags) {
|
||
flags.split(',').map((f) => f.trim()).forEach((f) => {
|
||
execArgs.push('-F', `${f}`);
|
||
});
|
||
}
|
||
if (gcov) {
|
||
execArgs.push('-g');
|
||
}
|
||
if (gcovArgs) {
|
||
execArgs.push('--gcovArgs', `${gcovArgs}`);
|
||
}
|
||
if (gcovIgnore) {
|
||
execArgs.push('--gcovIgnore', `${gcovIgnore}`);
|
||
}
|
||
if (gcovInclude) {
|
||
execArgs.push('--gcovInclude', `${gcovInclude}`);
|
||
}
|
||
if (overrideBranch) {
|
||
execArgs.push('-B', `${overrideBranch}`);
|
||
}
|
||
if (overrideBuild) {
|
||
execArgs.push('-b', `${overrideBuild}`);
|
||
}
|
||
if (overrideCommit) {
|
||
execArgs.push('-C', `${overrideCommit}`);
|
||
}
|
||
else if (`${context.eventName}` == 'pull_request' ||
|
||
`${context.eventName}` == 'pull_request_target') {
|
||
execArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||
}
|
||
if (overridePr) {
|
||
execArgs.push('-P', `${overridePr}`);
|
||
}
|
||
else if (`${context.eventName}` == 'pull_request_target') {
|
||
execArgs.push('-P', `${context.payload.number}`);
|
||
}
|
||
if (overrideTag) {
|
||
execArgs.push('-T', `${overrideTag}`);
|
||
}
|
||
if (rootDir) {
|
||
execArgs.push('-R', `${rootDir}`);
|
||
}
|
||
if (searchDir) {
|
||
execArgs.push('-s', `${searchDir}`);
|
||
}
|
||
if (slug) {
|
||
execArgs.push('-r', `${slug}`);
|
||
}
|
||
if (url) {
|
||
execArgs.push('-u', `${url}`);
|
||
}
|
||
if (verbose) {
|
||
execArgs.push('-v');
|
||
}
|
||
if (workingDir) {
|
||
options.cwd = workingDir;
|
||
}
|
||
if (xcode && xcodeArchivePath) {
|
||
execArgs.push('--xc');
|
||
execArgs.push('--xp', `${xcodeArchivePath}`);
|
||
}
|
||
if (uploaderVersion == '') {
|
||
uploaderVersion = 'latest';
|
||
}
|
||
if (verbose) {
|
||
console.debug({ execArgs });
|
||
}
|
||
return { execArgs, options, failCi, os, uploaderVersion, verbose };
|
||
};
|
||
/* harmony default export */ const src_buildExec = (buildExec);
|
||
|
||
;// CONCATENATED MODULE: ./src/helpers.ts
|
||
|
||
const PLATFORMS = ['alpine', 'linux', 'macos', 'windows'];
|
||
const setFailure = (message, failCi) => {
|
||
failCi ? core.setFailed(message) : core.warning(message);
|
||
if (failCi) {
|
||
process.exit();
|
||
}
|
||
};
|
||
const getUploaderName = (platform) => {
|
||
if (isWindows(platform)) {
|
||
return 'codecov.exe';
|
||
}
|
||
else {
|
||
return 'codecov';
|
||
}
|
||
};
|
||
const isValidPlatform = (platform) => {
|
||
return PLATFORMS.includes(platform);
|
||
};
|
||
const isWindows = (platform) => {
|
||
return platform === 'windows';
|
||
};
|
||
const getPlatform = (os) => {
|
||
var _a;
|
||
if (isValidPlatform(os)) {
|
||
core.info(`==> ${os} OS provided`);
|
||
return os;
|
||
}
|
||
const platform = (_a = process.env.RUNNER_OS) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
||
if (isValidPlatform(platform)) {
|
||
core.info(`==> ${platform} OS detected`);
|
||
return platform;
|
||
}
|
||
core.info('==> Could not detect OS or provided OS is invalid. Defaulting to linux');
|
||
return 'linux';
|
||
};
|
||
const getBaseUrl = (platform, version) => {
|
||
return `https://uploader.codecov.io/${version}/${platform}/${getUploaderName(platform)}`;
|
||
};
|
||
|
||
|
||
// EXTERNAL MODULE: external "crypto"
|
||
var external_crypto_ = __nccwpck_require__(6113);
|
||
// EXTERNAL MODULE: ./node_modules/openpgp/dist/node/openpgp.min.js
|
||
var openpgp_min = __nccwpck_require__(7946);
|
||
;// CONCATENATED MODULE: external "node:http"
|
||
const external_node_http_namespaceObject = require("node:http");
|
||
;// CONCATENATED MODULE: external "node:https"
|
||
const external_node_https_namespaceObject = require("node:https");
|
||
;// CONCATENATED MODULE: external "node:zlib"
|
||
const external_node_zlib_namespaceObject = require("node:zlib");
|
||
;// CONCATENATED MODULE: external "node:stream"
|
||
const external_node_stream_namespaceObject = require("node:stream");
|
||
;// CONCATENATED MODULE: external "node:buffer"
|
||
const external_node_buffer_namespaceObject = require("node:buffer");
|
||
;// CONCATENATED MODULE: ./node_modules/data-uri-to-buffer/dist/index.js
|
||
/**
|
||
* Returns a `Buffer` instance from the given data URI `uri`.
|
||
*
|
||
* @param {String} uri Data URI to turn into a Buffer instance
|
||
* @returns {Buffer} Buffer instance from Data URI
|
||
* @api public
|
||
*/
|
||
function dataUriToBuffer(uri) {
|
||
if (!/^data:/i.test(uri)) {
|
||
throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
|
||
}
|
||
// strip newlines
|
||
uri = uri.replace(/\r?\n/g, '');
|
||
// split the URI up into the "metadata" and the "data" portions
|
||
const firstComma = uri.indexOf(',');
|
||
if (firstComma === -1 || firstComma <= 4) {
|
||
throw new TypeError('malformed data: URI');
|
||
}
|
||
// remove the "data:" scheme and parse the metadata
|
||
const meta = uri.substring(5, firstComma).split(';');
|
||
let charset = '';
|
||
let base64 = false;
|
||
const type = meta[0] || 'text/plain';
|
||
let typeFull = type;
|
||
for (let i = 1; i < meta.length; i++) {
|
||
if (meta[i] === 'base64') {
|
||
base64 = true;
|
||
}
|
||
else {
|
||
typeFull += `;${meta[i]}`;
|
||
if (meta[i].indexOf('charset=') === 0) {
|
||
charset = meta[i].substring(8);
|
||
}
|
||
}
|
||
}
|
||
// defaults to US-ASCII only if type is not provided
|
||
if (!meta[0] && !charset.length) {
|
||
typeFull += ';charset=US-ASCII';
|
||
charset = 'US-ASCII';
|
||
}
|
||
// get the encoded data portion and decode URI-encoded chars
|
||
const encoding = base64 ? 'base64' : 'ascii';
|
||
const data = unescape(uri.substring(firstComma + 1));
|
||
const buffer = Buffer.from(data, encoding);
|
||
// set `.type` and `.typeFull` properties to MIME type
|
||
buffer.type = type;
|
||
buffer.typeFull = typeFull;
|
||
// set the `.charset` property
|
||
buffer.charset = charset;
|
||
return buffer;
|
||
}
|
||
/* harmony default export */ const dist = (dataUriToBuffer);
|
||
//# sourceMappingURL=index.js.map
|
||
;// CONCATENATED MODULE: external "node:util"
|
||
const external_node_util_namespaceObject = require("node:util");
|
||
// EXTERNAL MODULE: ./node_modules/fetch-blob/index.js
|
||
var fetch_blob = __nccwpck_require__(1410);
|
||
// EXTERNAL MODULE: ./node_modules/formdata-polyfill/esm.min.js
|
||
var esm_min = __nccwpck_require__(8010);
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/errors/base.js
|
||
class FetchBaseError extends Error {
|
||
constructor(message, type) {
|
||
super(message);
|
||
// Hide custom error implementation details from end-users
|
||
Error.captureStackTrace(this, this.constructor);
|
||
|
||
this.type = type;
|
||
}
|
||
|
||
get name() {
|
||
return this.constructor.name;
|
||
}
|
||
|
||
get [Symbol.toStringTag]() {
|
||
return this.constructor.name;
|
||
}
|
||
}
|
||
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/errors/fetch-error.js
|
||
|
||
|
||
|
||
/**
|
||
* @typedef {{ address?: string, code: string, dest?: string, errno: number, info?: object, message: string, path?: string, port?: number, syscall: string}} SystemError
|
||
*/
|
||
|
||
/**
|
||
* FetchError interface for operational errors
|
||
*/
|
||
class FetchError extends FetchBaseError {
|
||
/**
|
||
* @param {string} message - Error message for human
|
||
* @param {string} [type] - Error type for machine
|
||
* @param {SystemError} [systemError] - For Node.js system error
|
||
*/
|
||
constructor(message, type, systemError) {
|
||
super(message, type);
|
||
// When err.type is `system`, err.erroredSysCall contains system error and err.code contains system error code
|
||
if (systemError) {
|
||
// eslint-disable-next-line no-multi-assign
|
||
this.code = this.errno = systemError.code;
|
||
this.erroredSysCall = systemError.syscall;
|
||
}
|
||
}
|
||
}
|
||
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/utils/is.js
|
||
/**
|
||
* Is.js
|
||
*
|
||
* Object type checks.
|
||
*/
|
||
|
||
const NAME = Symbol.toStringTag;
|
||
|
||
/**
|
||
* Check if `obj` is a URLSearchParams object
|
||
* ref: https://github.com/node-fetch/node-fetch/issues/296#issuecomment-307598143
|
||
* @param {*} object - Object to check for
|
||
* @return {boolean}
|
||
*/
|
||
const isURLSearchParameters = object => {
|
||
return (
|
||
typeof object === 'object' &&
|
||
typeof object.append === 'function' &&
|
||
typeof object.delete === 'function' &&
|
||
typeof object.get === 'function' &&
|
||
typeof object.getAll === 'function' &&
|
||
typeof object.has === 'function' &&
|
||
typeof object.set === 'function' &&
|
||
typeof object.sort === 'function' &&
|
||
object[NAME] === 'URLSearchParams'
|
||
);
|
||
};
|
||
|
||
/**
|
||
* Check if `object` is a W3C `Blob` object (which `File` inherits from)
|
||
* @param {*} object - Object to check for
|
||
* @return {boolean}
|
||
*/
|
||
const isBlob = object => {
|
||
return (
|
||
object &&
|
||
typeof object === 'object' &&
|
||
typeof object.arrayBuffer === 'function' &&
|
||
typeof object.type === 'string' &&
|
||
typeof object.stream === 'function' &&
|
||
typeof object.constructor === 'function' &&
|
||
/^(Blob|File)$/.test(object[NAME])
|
||
);
|
||
};
|
||
|
||
/**
|
||
* Check if `obj` is an instance of AbortSignal.
|
||
* @param {*} object - Object to check for
|
||
* @return {boolean}
|
||
*/
|
||
const isAbortSignal = object => {
|
||
return (
|
||
typeof object === 'object' && (
|
||
object[NAME] === 'AbortSignal' ||
|
||
object[NAME] === 'EventTarget'
|
||
)
|
||
);
|
||
};
|
||
|
||
/**
|
||
* isDomainOrSubdomain reports whether sub is a subdomain (or exact match) of
|
||
* the parent domain.
|
||
*
|
||
* Both domains must already be in canonical form.
|
||
* @param {string|URL} original
|
||
* @param {string|URL} destination
|
||
*/
|
||
const isDomainOrSubdomain = (destination, original) => {
|
||
const orig = new URL(original).hostname;
|
||
const dest = new URL(destination).hostname;
|
||
|
||
return orig === dest || orig.endsWith(`.${dest}`);
|
||
};
|
||
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/body.js
|
||
|
||
/**
|
||
* Body.js
|
||
*
|
||
* Body interface provides common methods for Request and Response
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
const pipeline = (0,external_node_util_namespaceObject.promisify)(external_node_stream_namespaceObject.pipeline);
|
||
const INTERNALS = Symbol('Body internals');
|
||
|
||
/**
|
||
* Body mixin
|
||
*
|
||
* Ref: https://fetch.spec.whatwg.org/#body
|
||
*
|
||
* @param Stream body Readable stream
|
||
* @param Object opts Response options
|
||
* @return Void
|
||
*/
|
||
class Body {
|
||
constructor(body, {
|
||
size = 0
|
||
} = {}) {
|
||
let boundary = null;
|
||
|
||
if (body === null) {
|
||
// Body is undefined or null
|
||
body = null;
|
||
} else if (isURLSearchParameters(body)) {
|
||
// Body is a URLSearchParams
|
||
body = external_node_buffer_namespaceObject.Buffer.from(body.toString());
|
||
} else if (isBlob(body)) {
|
||
// Body is blob
|
||
} else if (external_node_buffer_namespaceObject.Buffer.isBuffer(body)) {
|
||
// Body is Buffer
|
||
} else if (external_node_util_namespaceObject.types.isAnyArrayBuffer(body)) {
|
||
// Body is ArrayBuffer
|
||
body = external_node_buffer_namespaceObject.Buffer.from(body);
|
||
} else if (ArrayBuffer.isView(body)) {
|
||
// Body is ArrayBufferView
|
||
body = external_node_buffer_namespaceObject.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
||
} else if (body instanceof external_node_stream_namespaceObject) {
|
||
// Body is stream
|
||
} else if (body instanceof esm_min/* FormData */.Ct) {
|
||
// Body is FormData
|
||
body = (0,esm_min/* formDataToBlob */.au)(body);
|
||
boundary = body.type.split('=')[1];
|
||
} else {
|
||
// None of the above
|
||
// coerce to string then buffer
|
||
body = external_node_buffer_namespaceObject.Buffer.from(String(body));
|
||
}
|
||
|
||
let stream = body;
|
||
|
||
if (external_node_buffer_namespaceObject.Buffer.isBuffer(body)) {
|
||
stream = external_node_stream_namespaceObject.Readable.from(body);
|
||
} else if (isBlob(body)) {
|
||
stream = external_node_stream_namespaceObject.Readable.from(body.stream());
|
||
}
|
||
|
||
this[INTERNALS] = {
|
||
body,
|
||
stream,
|
||
boundary,
|
||
disturbed: false,
|
||
error: null
|
||
};
|
||
this.size = size;
|
||
|
||
if (body instanceof external_node_stream_namespaceObject) {
|
||
body.on('error', error_ => {
|
||
const error = error_ instanceof FetchBaseError ?
|
||
error_ :
|
||
new FetchError(`Invalid response body while trying to fetch ${this.url}: ${error_.message}`, 'system', error_);
|
||
this[INTERNALS].error = error;
|
||
});
|
||
}
|
||
}
|
||
|
||
get body() {
|
||
return this[INTERNALS].stream;
|
||
}
|
||
|
||
get bodyUsed() {
|
||
return this[INTERNALS].disturbed;
|
||
}
|
||
|
||
/**
|
||
* Decode response as ArrayBuffer
|
||
*
|
||
* @return Promise
|
||
*/
|
||
async arrayBuffer() {
|
||
const {buffer, byteOffset, byteLength} = await consumeBody(this);
|
||
return buffer.slice(byteOffset, byteOffset + byteLength);
|
||
}
|
||
|
||
async formData() {
|
||
const ct = this.headers.get('content-type');
|
||
|
||
if (ct.startsWith('application/x-www-form-urlencoded')) {
|
||
const formData = new esm_min/* FormData */.Ct();
|
||
const parameters = new URLSearchParams(await this.text());
|
||
|
||
for (const [name, value] of parameters) {
|
||
formData.append(name, value);
|
||
}
|
||
|
||
return formData;
|
||
}
|
||
|
||
const {toFormData} = await __nccwpck_require__.e(/* import() */ 37).then(__nccwpck_require__.bind(__nccwpck_require__, 4037));
|
||
return toFormData(this.body, ct);
|
||
}
|
||
|
||
/**
|
||
* Return raw response as Blob
|
||
*
|
||
* @return Promise
|
||
*/
|
||
async blob() {
|
||
const ct = (this.headers && this.headers.get('content-type')) || (this[INTERNALS].body && this[INTERNALS].body.type) || '';
|
||
const buf = await this.arrayBuffer();
|
||
|
||
return new fetch_blob/* default */.Z([buf], {
|
||
type: ct
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Decode response as json
|
||
*
|
||
* @return Promise
|
||
*/
|
||
async json() {
|
||
const text = await this.text();
|
||
return JSON.parse(text);
|
||
}
|
||
|
||
/**
|
||
* Decode response as text
|
||
*
|
||
* @return Promise
|
||
*/
|
||
async text() {
|
||
const buffer = await consumeBody(this);
|
||
return new TextDecoder().decode(buffer);
|
||
}
|
||
|
||
/**
|
||
* Decode response as buffer (non-spec api)
|
||
*
|
||
* @return Promise
|
||
*/
|
||
buffer() {
|
||
return consumeBody(this);
|
||
}
|
||
}
|
||
|
||
Body.prototype.buffer = (0,external_node_util_namespaceObject.deprecate)(Body.prototype.buffer, 'Please use \'response.arrayBuffer()\' instead of \'response.buffer()\'', 'node-fetch#buffer');
|
||
|
||
// In browsers, all properties are enumerable.
|
||
Object.defineProperties(Body.prototype, {
|
||
body: {enumerable: true},
|
||
bodyUsed: {enumerable: true},
|
||
arrayBuffer: {enumerable: true},
|
||
blob: {enumerable: true},
|
||
json: {enumerable: true},
|
||
text: {enumerable: true},
|
||
data: {get: (0,external_node_util_namespaceObject.deprecate)(() => {},
|
||
'data doesn\'t exist, use json(), text(), arrayBuffer(), or body instead',
|
||
'https://github.com/node-fetch/node-fetch/issues/1000 (response)')}
|
||
});
|
||
|
||
/**
|
||
* Consume and convert an entire Body to a Buffer.
|
||
*
|
||
* Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
|
||
*
|
||
* @return Promise
|
||
*/
|
||
async function consumeBody(data) {
|
||
if (data[INTERNALS].disturbed) {
|
||
throw new TypeError(`body used already for: ${data.url}`);
|
||
}
|
||
|
||
data[INTERNALS].disturbed = true;
|
||
|
||
if (data[INTERNALS].error) {
|
||
throw data[INTERNALS].error;
|
||
}
|
||
|
||
const {body} = data;
|
||
|
||
// Body is null
|
||
if (body === null) {
|
||
return external_node_buffer_namespaceObject.Buffer.alloc(0);
|
||
}
|
||
|
||
/* c8 ignore next 3 */
|
||
if (!(body instanceof external_node_stream_namespaceObject)) {
|
||
return external_node_buffer_namespaceObject.Buffer.alloc(0);
|
||
}
|
||
|
||
// Body is stream
|
||
// get ready to actually consume the body
|
||
const accum = [];
|
||
let accumBytes = 0;
|
||
|
||
try {
|
||
for await (const chunk of body) {
|
||
if (data.size > 0 && accumBytes + chunk.length > data.size) {
|
||
const error = new FetchError(`content size at ${data.url} over limit: ${data.size}`, 'max-size');
|
||
body.destroy(error);
|
||
throw error;
|
||
}
|
||
|
||
accumBytes += chunk.length;
|
||
accum.push(chunk);
|
||
}
|
||
} catch (error) {
|
||
const error_ = error instanceof FetchBaseError ? error : new FetchError(`Invalid response body while trying to fetch ${data.url}: ${error.message}`, 'system', error);
|
||
throw error_;
|
||
}
|
||
|
||
if (body.readableEnded === true || body._readableState.ended === true) {
|
||
try {
|
||
if (accum.every(c => typeof c === 'string')) {
|
||
return external_node_buffer_namespaceObject.Buffer.from(accum.join(''));
|
||
}
|
||
|
||
return external_node_buffer_namespaceObject.Buffer.concat(accum, accumBytes);
|
||
} catch (error) {
|
||
throw new FetchError(`Could not create Buffer from response body for ${data.url}: ${error.message}`, 'system', error);
|
||
}
|
||
} else {
|
||
throw new FetchError(`Premature close of server response while trying to fetch ${data.url}`);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Clone body given Res/Req instance
|
||
*
|
||
* @param Mixed instance Response or Request instance
|
||
* @param String highWaterMark highWaterMark for both PassThrough body streams
|
||
* @return Mixed
|
||
*/
|
||
const clone = (instance, highWaterMark) => {
|
||
let p1;
|
||
let p2;
|
||
let {body} = instance[INTERNALS];
|
||
|
||
// Don't allow cloning a used body
|
||
if (instance.bodyUsed) {
|
||
throw new Error('cannot clone body after it is used');
|
||
}
|
||
|
||
// Check that body is a stream and not form-data object
|
||
// note: we can't clone the form-data object without having it as a dependency
|
||
if ((body instanceof external_node_stream_namespaceObject) && (typeof body.getBoundary !== 'function')) {
|
||
// Tee instance body
|
||
p1 = new external_node_stream_namespaceObject.PassThrough({highWaterMark});
|
||
p2 = new external_node_stream_namespaceObject.PassThrough({highWaterMark});
|
||
body.pipe(p1);
|
||
body.pipe(p2);
|
||
// Set instance body to teed body and return the other teed body
|
||
instance[INTERNALS].stream = p1;
|
||
body = p2;
|
||
}
|
||
|
||
return body;
|
||
};
|
||
|
||
const getNonSpecFormDataBoundary = (0,external_node_util_namespaceObject.deprecate)(
|
||
body => body.getBoundary(),
|
||
'form-data doesn\'t follow the spec and requires special treatment. Use alternative package',
|
||
'https://github.com/node-fetch/node-fetch/issues/1167'
|
||
);
|
||
|
||
/**
|
||
* Performs the operation "extract a `Content-Type` value from |object|" as
|
||
* specified in the specification:
|
||
* https://fetch.spec.whatwg.org/#concept-bodyinit-extract
|
||
*
|
||
* This function assumes that instance.body is present.
|
||
*
|
||
* @param {any} body Any options.body input
|
||
* @returns {string | null}
|
||
*/
|
||
const extractContentType = (body, request) => {
|
||
// Body is null or undefined
|
||
if (body === null) {
|
||
return null;
|
||
}
|
||
|
||
// Body is string
|
||
if (typeof body === 'string') {
|
||
return 'text/plain;charset=UTF-8';
|
||
}
|
||
|
||
// Body is a URLSearchParams
|
||
if (isURLSearchParameters(body)) {
|
||
return 'application/x-www-form-urlencoded;charset=UTF-8';
|
||
}
|
||
|
||
// Body is blob
|
||
if (isBlob(body)) {
|
||
return body.type || null;
|
||
}
|
||
|
||
// Body is a Buffer (Buffer, ArrayBuffer or ArrayBufferView)
|
||
if (external_node_buffer_namespaceObject.Buffer.isBuffer(body) || external_node_util_namespaceObject.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
|
||
return null;
|
||
}
|
||
|
||
if (body instanceof esm_min/* FormData */.Ct) {
|
||
return `multipart/form-data; boundary=${request[INTERNALS].boundary}`;
|
||
}
|
||
|
||
// Detect form data input from form-data module
|
||
if (body && typeof body.getBoundary === 'function') {
|
||
return `multipart/form-data;boundary=${getNonSpecFormDataBoundary(body)}`;
|
||
}
|
||
|
||
// Body is stream - can't really do much about this
|
||
if (body instanceof external_node_stream_namespaceObject) {
|
||
return null;
|
||
}
|
||
|
||
// Body constructor defaults other things to string
|
||
return 'text/plain;charset=UTF-8';
|
||
};
|
||
|
||
/**
|
||
* The Fetch Standard treats this as if "total bytes" is a property on the body.
|
||
* For us, we have to explicitly get it with a function.
|
||
*
|
||
* ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
|
||
*
|
||
* @param {any} obj.body Body object from the Body instance.
|
||
* @returns {number | null}
|
||
*/
|
||
const getTotalBytes = request => {
|
||
const {body} = request[INTERNALS];
|
||
|
||
// Body is null or undefined
|
||
if (body === null) {
|
||
return 0;
|
||
}
|
||
|
||
// Body is Blob
|
||
if (isBlob(body)) {
|
||
return body.size;
|
||
}
|
||
|
||
// Body is Buffer
|
||
if (external_node_buffer_namespaceObject.Buffer.isBuffer(body)) {
|
||
return body.length;
|
||
}
|
||
|
||
// Detect form data input from form-data module
|
||
if (body && typeof body.getLengthSync === 'function') {
|
||
return body.hasKnownLength && body.hasKnownLength() ? body.getLengthSync() : null;
|
||
}
|
||
|
||
// Body is stream
|
||
return null;
|
||
};
|
||
|
||
/**
|
||
* Write a Body to a Node.js WritableStream (e.g. http.Request) object.
|
||
*
|
||
* @param {Stream.Writable} dest The stream to write to.
|
||
* @param obj.body Body object from the Body instance.
|
||
* @returns {Promise<void>}
|
||
*/
|
||
const writeToStream = async (dest, {body}) => {
|
||
if (body === null) {
|
||
// Body is null
|
||
dest.end();
|
||
} else {
|
||
// Body is stream
|
||
await pipeline(body, dest);
|
||
}
|
||
};
|
||
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/headers.js
|
||
/**
|
||
* Headers.js
|
||
*
|
||
* Headers class offers convenient helpers
|
||
*/
|
||
|
||
|
||
|
||
|
||
/* c8 ignore next 9 */
|
||
const validateHeaderName = typeof external_node_http_namespaceObject.validateHeaderName === 'function' ?
|
||
external_node_http_namespaceObject.validateHeaderName :
|
||
name => {
|
||
if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
|
||
const error = new TypeError(`Header name must be a valid HTTP token [${name}]`);
|
||
Object.defineProperty(error, 'code', {value: 'ERR_INVALID_HTTP_TOKEN'});
|
||
throw error;
|
||
}
|
||
};
|
||
|
||
/* c8 ignore next 9 */
|
||
const validateHeaderValue = typeof external_node_http_namespaceObject.validateHeaderValue === 'function' ?
|
||
external_node_http_namespaceObject.validateHeaderValue :
|
||
(name, value) => {
|
||
if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) {
|
||
const error = new TypeError(`Invalid character in header content ["${name}"]`);
|
||
Object.defineProperty(error, 'code', {value: 'ERR_INVALID_CHAR'});
|
||
throw error;
|
||
}
|
||
};
|
||
|
||
/**
|
||
* @typedef {Headers | Record<string, string> | Iterable<readonly [string, string]> | Iterable<Iterable<string>>} HeadersInit
|
||
*/
|
||
|
||
/**
|
||
* This Fetch API interface allows you to perform various actions on HTTP request and response headers.
|
||
* These actions include retrieving, setting, adding to, and removing.
|
||
* A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.
|
||
* You can add to this using methods like append() (see Examples.)
|
||
* In all methods of this interface, header names are matched by case-insensitive byte sequence.
|
||
*
|
||
*/
|
||
class Headers extends URLSearchParams {
|
||
/**
|
||
* Headers class
|
||
*
|
||
* @constructor
|
||
* @param {HeadersInit} [init] - Response headers
|
||
*/
|
||
constructor(init) {
|
||
// Validate and normalize init object in [name, value(s)][]
|
||
/** @type {string[][]} */
|
||
let result = [];
|
||
if (init instanceof Headers) {
|
||
const raw = init.raw();
|
||
for (const [name, values] of Object.entries(raw)) {
|
||
result.push(...values.map(value => [name, value]));
|
||
}
|
||
} else if (init == null) { // eslint-disable-line no-eq-null, eqeqeq
|
||
// No op
|
||
} else if (typeof init === 'object' && !external_node_util_namespaceObject.types.isBoxedPrimitive(init)) {
|
||
const method = init[Symbol.iterator];
|
||
// eslint-disable-next-line no-eq-null, eqeqeq
|
||
if (method == null) {
|
||
// Record<ByteString, ByteString>
|
||
result.push(...Object.entries(init));
|
||
} else {
|
||
if (typeof method !== 'function') {
|
||
throw new TypeError('Header pairs must be iterable');
|
||
}
|
||
|
||
// Sequence<sequence<ByteString>>
|
||
// Note: per spec we have to first exhaust the lists then process them
|
||
result = [...init]
|
||
.map(pair => {
|
||
if (
|
||
typeof pair !== 'object' || external_node_util_namespaceObject.types.isBoxedPrimitive(pair)
|
||
) {
|
||
throw new TypeError('Each header pair must be an iterable object');
|
||
}
|
||
|
||
return [...pair];
|
||
}).map(pair => {
|
||
if (pair.length !== 2) {
|
||
throw new TypeError('Each header pair must be a name/value tuple');
|
||
}
|
||
|
||
return [...pair];
|
||
});
|
||
}
|
||
} else {
|
||
throw new TypeError('Failed to construct \'Headers\': The provided value is not of type \'(sequence<sequence<ByteString>> or record<ByteString, ByteString>)');
|
||
}
|
||
|
||
// Validate and lowercase
|
||
result =
|
||
result.length > 0 ?
|
||
result.map(([name, value]) => {
|
||
validateHeaderName(name);
|
||
validateHeaderValue(name, String(value));
|
||
return [String(name).toLowerCase(), String(value)];
|
||
}) :
|
||
undefined;
|
||
|
||
super(result);
|
||
|
||
// Returning a Proxy that will lowercase key names, validate parameters and sort keys
|
||
// eslint-disable-next-line no-constructor-return
|
||
return new Proxy(this, {
|
||
get(target, p, receiver) {
|
||
switch (p) {
|
||
case 'append':
|
||
case 'set':
|
||
return (name, value) => {
|
||
validateHeaderName(name);
|
||
validateHeaderValue(name, String(value));
|
||
return URLSearchParams.prototype[p].call(
|
||
target,
|
||
String(name).toLowerCase(),
|
||
String(value)
|
||
);
|
||
};
|
||
|
||
case 'delete':
|
||
case 'has':
|
||
case 'getAll':
|
||
return name => {
|
||
validateHeaderName(name);
|
||
return URLSearchParams.prototype[p].call(
|
||
target,
|
||
String(name).toLowerCase()
|
||
);
|
||
};
|
||
|
||
case 'keys':
|
||
return () => {
|
||
target.sort();
|
||
return new Set(URLSearchParams.prototype.keys.call(target)).keys();
|
||
};
|
||
|
||
default:
|
||
return Reflect.get(target, p, receiver);
|
||
}
|
||
}
|
||
});
|
||
/* c8 ignore next */
|
||
}
|
||
|
||
get [Symbol.toStringTag]() {
|
||
return this.constructor.name;
|
||
}
|
||
|
||
toString() {
|
||
return Object.prototype.toString.call(this);
|
||
}
|
||
|
||
get(name) {
|
||
const values = this.getAll(name);
|
||
if (values.length === 0) {
|
||
return null;
|
||
}
|
||
|
||
let value = values.join(', ');
|
||
if (/^content-encoding$/i.test(name)) {
|
||
value = value.toLowerCase();
|
||
}
|
||
|
||
return value;
|
||
}
|
||
|
||
forEach(callback, thisArg = undefined) {
|
||
for (const name of this.keys()) {
|
||
Reflect.apply(callback, thisArg, [this.get(name), name, this]);
|
||
}
|
||
}
|
||
|
||
* values() {
|
||
for (const name of this.keys()) {
|
||
yield this.get(name);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @type {() => IterableIterator<[string, string]>}
|
||
*/
|
||
* entries() {
|
||
for (const name of this.keys()) {
|
||
yield [name, this.get(name)];
|
||
}
|
||
}
|
||
|
||
[Symbol.iterator]() {
|
||
return this.entries();
|
||
}
|
||
|
||
/**
|
||
* Node-fetch non-spec method
|
||
* returning all headers and their values as array
|
||
* @returns {Record<string, string[]>}
|
||
*/
|
||
raw() {
|
||
return [...this.keys()].reduce((result, key) => {
|
||
result[key] = this.getAll(key);
|
||
return result;
|
||
}, {});
|
||
}
|
||
|
||
/**
|
||
* For better console.log(headers) and also to convert Headers into Node.js Request compatible format
|
||
*/
|
||
[Symbol.for('nodejs.util.inspect.custom')]() {
|
||
return [...this.keys()].reduce((result, key) => {
|
||
const values = this.getAll(key);
|
||
// Http.request() only supports string as Host header.
|
||
// This hack makes specifying custom Host header possible.
|
||
if (key === 'host') {
|
||
result[key] = values[0];
|
||
} else {
|
||
result[key] = values.length > 1 ? values : values[0];
|
||
}
|
||
|
||
return result;
|
||
}, {});
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Re-shaping object for Web IDL tests
|
||
* Only need to do it for overridden methods
|
||
*/
|
||
Object.defineProperties(
|
||
Headers.prototype,
|
||
['get', 'entries', 'forEach', 'values'].reduce((result, property) => {
|
||
result[property] = {enumerable: true};
|
||
return result;
|
||
}, {})
|
||
);
|
||
|
||
/**
|
||
* Create a Headers object from an http.IncomingMessage.rawHeaders, ignoring those that do
|
||
* not conform to HTTP grammar productions.
|
||
* @param {import('http').IncomingMessage['rawHeaders']} headers
|
||
*/
|
||
function fromRawHeaders(headers = []) {
|
||
return new Headers(
|
||
headers
|
||
// Split into pairs
|
||
.reduce((result, value, index, array) => {
|
||
if (index % 2 === 0) {
|
||
result.push(array.slice(index, index + 2));
|
||
}
|
||
|
||
return result;
|
||
}, [])
|
||
.filter(([name, value]) => {
|
||
try {
|
||
validateHeaderName(name);
|
||
validateHeaderValue(name, String(value));
|
||
return true;
|
||
} catch {
|
||
return false;
|
||
}
|
||
})
|
||
|
||
);
|
||
}
|
||
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/utils/is-redirect.js
|
||
const redirectStatus = new Set([301, 302, 303, 307, 308]);
|
||
|
||
/**
|
||
* Redirect code matching
|
||
*
|
||
* @param {number} code - Status code
|
||
* @return {boolean}
|
||
*/
|
||
const isRedirect = code => {
|
||
return redirectStatus.has(code);
|
||
};
|
||
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/response.js
|
||
/**
|
||
* Response.js
|
||
*
|
||
* Response class provides content decoding
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
const response_INTERNALS = Symbol('Response internals');
|
||
|
||
/**
|
||
* Response class
|
||
*
|
||
* Ref: https://fetch.spec.whatwg.org/#response-class
|
||
*
|
||
* @param Stream body Readable stream
|
||
* @param Object opts Response options
|
||
* @return Void
|
||
*/
|
||
class Response extends Body {
|
||
constructor(body = null, options = {}) {
|
||
super(body, options);
|
||
|
||
// eslint-disable-next-line no-eq-null, eqeqeq, no-negated-condition
|
||
const status = options.status != null ? options.status : 200;
|
||
|
||
const headers = new Headers(options.headers);
|
||
|
||
if (body !== null && !headers.has('Content-Type')) {
|
||
const contentType = extractContentType(body, this);
|
||
if (contentType) {
|
||
headers.append('Content-Type', contentType);
|
||
}
|
||
}
|
||
|
||
this[response_INTERNALS] = {
|
||
type: 'default',
|
||
url: options.url,
|
||
status,
|
||
statusText: options.statusText || '',
|
||
headers,
|
||
counter: options.counter,
|
||
highWaterMark: options.highWaterMark
|
||
};
|
||
}
|
||
|
||
get type() {
|
||
return this[response_INTERNALS].type;
|
||
}
|
||
|
||
get url() {
|
||
return this[response_INTERNALS].url || '';
|
||
}
|
||
|
||
get status() {
|
||
return this[response_INTERNALS].status;
|
||
}
|
||
|
||
/**
|
||
* Convenience property representing if the request ended normally
|
||
*/
|
||
get ok() {
|
||
return this[response_INTERNALS].status >= 200 && this[response_INTERNALS].status < 300;
|
||
}
|
||
|
||
get redirected() {
|
||
return this[response_INTERNALS].counter > 0;
|
||
}
|
||
|
||
get statusText() {
|
||
return this[response_INTERNALS].statusText;
|
||
}
|
||
|
||
get headers() {
|
||
return this[response_INTERNALS].headers;
|
||
}
|
||
|
||
get highWaterMark() {
|
||
return this[response_INTERNALS].highWaterMark;
|
||
}
|
||
|
||
/**
|
||
* Clone this response
|
||
*
|
||
* @return Response
|
||
*/
|
||
clone() {
|
||
return new Response(clone(this, this.highWaterMark), {
|
||
type: this.type,
|
||
url: this.url,
|
||
status: this.status,
|
||
statusText: this.statusText,
|
||
headers: this.headers,
|
||
ok: this.ok,
|
||
redirected: this.redirected,
|
||
size: this.size,
|
||
highWaterMark: this.highWaterMark
|
||
});
|
||
}
|
||
|
||
/**
|
||
* @param {string} url The URL that the new response is to originate from.
|
||
* @param {number} status An optional status code for the response (e.g., 302.)
|
||
* @returns {Response} A Response object.
|
||
*/
|
||
static redirect(url, status = 302) {
|
||
if (!isRedirect(status)) {
|
||
throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
|
||
}
|
||
|
||
return new Response(null, {
|
||
headers: {
|
||
location: new URL(url).toString()
|
||
},
|
||
status
|
||
});
|
||
}
|
||
|
||
static error() {
|
||
const response = new Response(null, {status: 0, statusText: ''});
|
||
response[response_INTERNALS].type = 'error';
|
||
return response;
|
||
}
|
||
|
||
get [Symbol.toStringTag]() {
|
||
return 'Response';
|
||
}
|
||
}
|
||
|
||
Object.defineProperties(Response.prototype, {
|
||
type: {enumerable: true},
|
||
url: {enumerable: true},
|
||
status: {enumerable: true},
|
||
ok: {enumerable: true},
|
||
redirected: {enumerable: true},
|
||
statusText: {enumerable: true},
|
||
headers: {enumerable: true},
|
||
clone: {enumerable: true}
|
||
});
|
||
|
||
;// CONCATENATED MODULE: external "node:url"
|
||
const external_node_url_namespaceObject = require("node:url");
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/utils/get-search.js
|
||
const getSearch = parsedURL => {
|
||
if (parsedURL.search) {
|
||
return parsedURL.search;
|
||
}
|
||
|
||
const lastOffset = parsedURL.href.length - 1;
|
||
const hash = parsedURL.hash || (parsedURL.href[lastOffset] === '#' ? '#' : '');
|
||
return parsedURL.href[lastOffset - hash.length] === '?' ? '?' : '';
|
||
};
|
||
|
||
;// CONCATENATED MODULE: external "node:net"
|
||
const external_node_net_namespaceObject = require("node:net");
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/utils/referrer.js
|
||
|
||
|
||
/**
|
||
* @external URL
|
||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL|URL}
|
||
*/
|
||
|
||
/**
|
||
* @module utils/referrer
|
||
* @private
|
||
*/
|
||
|
||
/**
|
||
* @see {@link https://w3c.github.io/webappsec-referrer-policy/#strip-url|Referrer Policy §8.4. Strip url for use as a referrer}
|
||
* @param {string} URL
|
||
* @param {boolean} [originOnly=false]
|
||
*/
|
||
function stripURLForUseAsAReferrer(url, originOnly = false) {
|
||
// 1. If url is null, return no referrer.
|
||
if (url == null) { // eslint-disable-line no-eq-null, eqeqeq
|
||
return 'no-referrer';
|
||
}
|
||
|
||
url = new URL(url);
|
||
|
||
// 2. If url's scheme is a local scheme, then return no referrer.
|
||
if (/^(about|blob|data):$/.test(url.protocol)) {
|
||
return 'no-referrer';
|
||
}
|
||
|
||
// 3. Set url's username to the empty string.
|
||
url.username = '';
|
||
|
||
// 4. Set url's password to null.
|
||
// Note: `null` appears to be a mistake as this actually results in the password being `"null"`.
|
||
url.password = '';
|
||
|
||
// 5. Set url's fragment to null.
|
||
// Note: `null` appears to be a mistake as this actually results in the fragment being `"#null"`.
|
||
url.hash = '';
|
||
|
||
// 6. If the origin-only flag is true, then:
|
||
if (originOnly) {
|
||
// 6.1. Set url's path to null.
|
||
// Note: `null` appears to be a mistake as this actually results in the path being `"/null"`.
|
||
url.pathname = '';
|
||
|
||
// 6.2. Set url's query to null.
|
||
// Note: `null` appears to be a mistake as this actually results in the query being `"?null"`.
|
||
url.search = '';
|
||
}
|
||
|
||
// 7. Return url.
|
||
return url;
|
||
}
|
||
|
||
/**
|
||
* @see {@link https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy|enum ReferrerPolicy}
|
||
*/
|
||
const ReferrerPolicy = new Set([
|
||
'',
|
||
'no-referrer',
|
||
'no-referrer-when-downgrade',
|
||
'same-origin',
|
||
'origin',
|
||
'strict-origin',
|
||
'origin-when-cross-origin',
|
||
'strict-origin-when-cross-origin',
|
||
'unsafe-url'
|
||
]);
|
||
|
||
/**
|
||
* @see {@link https://w3c.github.io/webappsec-referrer-policy/#default-referrer-policy|default referrer policy}
|
||
*/
|
||
const DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin';
|
||
|
||
/**
|
||
* @see {@link https://w3c.github.io/webappsec-referrer-policy/#referrer-policies|Referrer Policy §3. Referrer Policies}
|
||
* @param {string} referrerPolicy
|
||
* @returns {string} referrerPolicy
|
||
*/
|
||
function validateReferrerPolicy(referrerPolicy) {
|
||
if (!ReferrerPolicy.has(referrerPolicy)) {
|
||
throw new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);
|
||
}
|
||
|
||
return referrerPolicy;
|
||
}
|
||
|
||
/**
|
||
* @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy|Referrer Policy §3.2. Is origin potentially trustworthy?}
|
||
* @param {external:URL} url
|
||
* @returns `true`: "Potentially Trustworthy", `false`: "Not Trustworthy"
|
||
*/
|
||
function isOriginPotentiallyTrustworthy(url) {
|
||
// 1. If origin is an opaque origin, return "Not Trustworthy".
|
||
// Not applicable
|
||
|
||
// 2. Assert: origin is a tuple origin.
|
||
// Not for implementations
|
||
|
||
// 3. If origin's scheme is either "https" or "wss", return "Potentially Trustworthy".
|
||
if (/^(http|ws)s:$/.test(url.protocol)) {
|
||
return true;
|
||
}
|
||
|
||
// 4. If origin's host component matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return "Potentially Trustworthy".
|
||
const hostIp = url.host.replace(/(^\[)|(]$)/g, '');
|
||
const hostIPVersion = (0,external_node_net_namespaceObject.isIP)(hostIp);
|
||
|
||
if (hostIPVersion === 4 && /^127\./.test(hostIp)) {
|
||
return true;
|
||
}
|
||
|
||
if (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {
|
||
return true;
|
||
}
|
||
|
||
// 5. If origin's host component is "localhost" or falls within ".localhost", and the user agent conforms to the name resolution rules in [let-localhost-be-localhost], return "Potentially Trustworthy".
|
||
// We are returning FALSE here because we cannot ensure conformance to
|
||
// let-localhost-be-loalhost (https://tools.ietf.org/html/draft-west-let-localhost-be-localhost)
|
||
if (/^(.+\.)*localhost$/.test(url.host)) {
|
||
return false;
|
||
}
|
||
|
||
// 6. If origin's scheme component is file, return "Potentially Trustworthy".
|
||
if (url.protocol === 'file:') {
|
||
return true;
|
||
}
|
||
|
||
// 7. If origin's scheme component is one which the user agent considers to be authenticated, return "Potentially Trustworthy".
|
||
// Not supported
|
||
|
||
// 8. If origin has been configured as a trustworthy origin, return "Potentially Trustworthy".
|
||
// Not supported
|
||
|
||
// 9. Return "Not Trustworthy".
|
||
return false;
|
||
}
|
||
|
||
/**
|
||
* @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy|Referrer Policy §3.3. Is url potentially trustworthy?}
|
||
* @param {external:URL} url
|
||
* @returns `true`: "Potentially Trustworthy", `false`: "Not Trustworthy"
|
||
*/
|
||
function isUrlPotentiallyTrustworthy(url) {
|
||
// 1. If url is "about:blank" or "about:srcdoc", return "Potentially Trustworthy".
|
||
if (/^about:(blank|srcdoc)$/.test(url)) {
|
||
return true;
|
||
}
|
||
|
||
// 2. If url's scheme is "data", return "Potentially Trustworthy".
|
||
if (url.protocol === 'data:') {
|
||
return true;
|
||
}
|
||
|
||
// Note: The origin of blob: and filesystem: URLs is the origin of the context in which they were
|
||
// created. Therefore, blobs created in a trustworthy origin will themselves be potentially
|
||
// trustworthy.
|
||
if (/^(blob|filesystem):$/.test(url.protocol)) {
|
||
return true;
|
||
}
|
||
|
||
// 3. Return the result of executing §3.2 Is origin potentially trustworthy? on url's origin.
|
||
return isOriginPotentiallyTrustworthy(url);
|
||
}
|
||
|
||
/**
|
||
* Modifies the referrerURL to enforce any extra security policy considerations.
|
||
* @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7
|
||
* @callback module:utils/referrer~referrerURLCallback
|
||
* @param {external:URL} referrerURL
|
||
* @returns {external:URL} modified referrerURL
|
||
*/
|
||
|
||
/**
|
||
* Modifies the referrerOrigin to enforce any extra security policy considerations.
|
||
* @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7
|
||
* @callback module:utils/referrer~referrerOriginCallback
|
||
* @param {external:URL} referrerOrigin
|
||
* @returns {external:URL} modified referrerOrigin
|
||
*/
|
||
|
||
/**
|
||
* @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}
|
||
* @param {Request} request
|
||
* @param {object} o
|
||
* @param {module:utils/referrer~referrerURLCallback} o.referrerURLCallback
|
||
* @param {module:utils/referrer~referrerOriginCallback} o.referrerOriginCallback
|
||
* @returns {external:URL} Request's referrer
|
||
*/
|
||
function determineRequestsReferrer(request, {referrerURLCallback, referrerOriginCallback} = {}) {
|
||
// There are 2 notes in the specification about invalid pre-conditions. We return null, here, for
|
||
// these cases:
|
||
// > Note: If request's referrer is "no-referrer", Fetch will not call into this algorithm.
|
||
// > Note: If request's referrer policy is the empty string, Fetch will not call into this
|
||
// > algorithm.
|
||
if (request.referrer === 'no-referrer' || request.referrerPolicy === '') {
|
||
return null;
|
||
}
|
||
|
||
// 1. Let policy be request's associated referrer policy.
|
||
const policy = request.referrerPolicy;
|
||
|
||
// 2. Let environment be request's client.
|
||
// not applicable to node.js
|
||
|
||
// 3. Switch on request's referrer:
|
||
if (request.referrer === 'about:client') {
|
||
return 'no-referrer';
|
||
}
|
||
|
||
// "a URL": Let referrerSource be request's referrer.
|
||
const referrerSource = request.referrer;
|
||
|
||
// 4. Let request's referrerURL be the result of stripping referrerSource for use as a referrer.
|
||
let referrerURL = stripURLForUseAsAReferrer(referrerSource);
|
||
|
||
// 5. Let referrerOrigin be the result of stripping referrerSource for use as a referrer, with the
|
||
// origin-only flag set to true.
|
||
let referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);
|
||
|
||
// 6. If the result of serializing referrerURL is a string whose length is greater than 4096, set
|
||
// referrerURL to referrerOrigin.
|
||
if (referrerURL.toString().length > 4096) {
|
||
referrerURL = referrerOrigin;
|
||
}
|
||
|
||
// 7. The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary
|
||
// policy considerations in the interests of minimizing data leakage. For example, the user
|
||
// agent could strip the URL down to an origin, modify its host, replace it with an empty
|
||
// string, etc.
|
||
if (referrerURLCallback) {
|
||
referrerURL = referrerURLCallback(referrerURL);
|
||
}
|
||
|
||
if (referrerOriginCallback) {
|
||
referrerOrigin = referrerOriginCallback(referrerOrigin);
|
||
}
|
||
|
||
// 8.Execute the statements corresponding to the value of policy:
|
||
const currentURL = new URL(request.url);
|
||
|
||
switch (policy) {
|
||
case 'no-referrer':
|
||
return 'no-referrer';
|
||
|
||
case 'origin':
|
||
return referrerOrigin;
|
||
|
||
case 'unsafe-url':
|
||
return referrerURL;
|
||
|
||
case 'strict-origin':
|
||
// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a
|
||
// potentially trustworthy URL, then return no referrer.
|
||
if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
|
||
return 'no-referrer';
|
||
}
|
||
|
||
// 2. Return referrerOrigin.
|
||
return referrerOrigin.toString();
|
||
|
||
case 'strict-origin-when-cross-origin':
|
||
// 1. If the origin of referrerURL and the origin of request's current URL are the same, then
|
||
// return referrerURL.
|
||
if (referrerURL.origin === currentURL.origin) {
|
||
return referrerURL;
|
||
}
|
||
|
||
// 2. If referrerURL is a potentially trustworthy URL and request's current URL is not a
|
||
// potentially trustworthy URL, then return no referrer.
|
||
if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
|
||
return 'no-referrer';
|
||
}
|
||
|
||
// 3. Return referrerOrigin.
|
||
return referrerOrigin;
|
||
|
||
case 'same-origin':
|
||
// 1. If the origin of referrerURL and the origin of request's current URL are the same, then
|
||
// return referrerURL.
|
||
if (referrerURL.origin === currentURL.origin) {
|
||
return referrerURL;
|
||
}
|
||
|
||
// 2. Return no referrer.
|
||
return 'no-referrer';
|
||
|
||
case 'origin-when-cross-origin':
|
||
// 1. If the origin of referrerURL and the origin of request's current URL are the same, then
|
||
// return referrerURL.
|
||
if (referrerURL.origin === currentURL.origin) {
|
||
return referrerURL;
|
||
}
|
||
|
||
// Return referrerOrigin.
|
||
return referrerOrigin;
|
||
|
||
case 'no-referrer-when-downgrade':
|
||
// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a
|
||
// potentially trustworthy URL, then return no referrer.
|
||
if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
|
||
return 'no-referrer';
|
||
}
|
||
|
||
// 2. Return referrerURL.
|
||
return referrerURL;
|
||
|
||
default:
|
||
throw new TypeError(`Invalid referrerPolicy: ${policy}`);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @see {@link https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header|Referrer Policy §8.1. Parse a referrer policy from a Referrer-Policy header}
|
||
* @param {Headers} headers Response headers
|
||
* @returns {string} policy
|
||
*/
|
||
function parseReferrerPolicyFromHeader(headers) {
|
||
// 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy`
|
||
// and response’s header list.
|
||
const policyTokens = (headers.get('referrer-policy') || '').split(/[,\s]+/);
|
||
|
||
// 2. Let policy be the empty string.
|
||
let policy = '';
|
||
|
||
// 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty
|
||
// string, then set policy to token.
|
||
// Note: This algorithm loops over multiple policy values to allow deployment of new policy
|
||
// values with fallbacks for older user agents, as described in § 11.1 Unknown Policy Values.
|
||
for (const token of policyTokens) {
|
||
if (token && ReferrerPolicy.has(token)) {
|
||
policy = token;
|
||
}
|
||
}
|
||
|
||
// 4. Return policy.
|
||
return policy;
|
||
}
|
||
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/request.js
|
||
/**
|
||
* Request.js
|
||
*
|
||
* Request class contains server only options
|
||
*
|
||
* All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
const request_INTERNALS = Symbol('Request internals');
|
||
|
||
/**
|
||
* Check if `obj` is an instance of Request.
|
||
*
|
||
* @param {*} object
|
||
* @return {boolean}
|
||
*/
|
||
const isRequest = object => {
|
||
return (
|
||
typeof object === 'object' &&
|
||
typeof object[request_INTERNALS] === 'object'
|
||
);
|
||
};
|
||
|
||
const doBadDataWarn = (0,external_node_util_namespaceObject.deprecate)(() => {},
|
||
'.data is not a valid RequestInit property, use .body instead',
|
||
'https://github.com/node-fetch/node-fetch/issues/1000 (request)');
|
||
|
||
/**
|
||
* Request class
|
||
*
|
||
* Ref: https://fetch.spec.whatwg.org/#request-class
|
||
*
|
||
* @param Mixed input Url or Request instance
|
||
* @param Object init Custom options
|
||
* @return Void
|
||
*/
|
||
class Request extends Body {
|
||
constructor(input, init = {}) {
|
||
let parsedURL;
|
||
|
||
// Normalize input and force URL to be encoded as UTF-8 (https://github.com/node-fetch/node-fetch/issues/245)
|
||
if (isRequest(input)) {
|
||
parsedURL = new URL(input.url);
|
||
} else {
|
||
parsedURL = new URL(input);
|
||
input = {};
|
||
}
|
||
|
||
if (parsedURL.username !== '' || parsedURL.password !== '') {
|
||
throw new TypeError(`${parsedURL} is an url with embedded credentials.`);
|
||
}
|
||
|
||
let method = init.method || input.method || 'GET';
|
||
if (/^(delete|get|head|options|post|put)$/i.test(method)) {
|
||
method = method.toUpperCase();
|
||
}
|
||
|
||
if ('data' in init) {
|
||
doBadDataWarn();
|
||
}
|
||
|
||
// eslint-disable-next-line no-eq-null, eqeqeq
|
||
if ((init.body != null || (isRequest(input) && input.body !== null)) &&
|
||
(method === 'GET' || method === 'HEAD')) {
|
||
throw new TypeError('Request with GET/HEAD method cannot have body');
|
||
}
|
||
|
||
const inputBody = init.body ?
|
||
init.body :
|
||
(isRequest(input) && input.body !== null ?
|
||
clone(input) :
|
||
null);
|
||
|
||
super(inputBody, {
|
||
size: init.size || input.size || 0
|
||
});
|
||
|
||
const headers = new Headers(init.headers || input.headers || {});
|
||
|
||
if (inputBody !== null && !headers.has('Content-Type')) {
|
||
const contentType = extractContentType(inputBody, this);
|
||
if (contentType) {
|
||
headers.set('Content-Type', contentType);
|
||
}
|
||
}
|
||
|
||
let signal = isRequest(input) ?
|
||
input.signal :
|
||
null;
|
||
if ('signal' in init) {
|
||
signal = init.signal;
|
||
}
|
||
|
||
// eslint-disable-next-line no-eq-null, eqeqeq
|
||
if (signal != null && !isAbortSignal(signal)) {
|
||
throw new TypeError('Expected signal to be an instanceof AbortSignal or EventTarget');
|
||
}
|
||
|
||
// §5.4, Request constructor steps, step 15.1
|
||
// eslint-disable-next-line no-eq-null, eqeqeq
|
||
let referrer = init.referrer == null ? input.referrer : init.referrer;
|
||
if (referrer === '') {
|
||
// §5.4, Request constructor steps, step 15.2
|
||
referrer = 'no-referrer';
|
||
} else if (referrer) {
|
||
// §5.4, Request constructor steps, step 15.3.1, 15.3.2
|
||
const parsedReferrer = new URL(referrer);
|
||
// §5.4, Request constructor steps, step 15.3.3, 15.3.4
|
||
referrer = /^about:(\/\/)?client$/.test(parsedReferrer) ? 'client' : parsedReferrer;
|
||
} else {
|
||
referrer = undefined;
|
||
}
|
||
|
||
this[request_INTERNALS] = {
|
||
method,
|
||
redirect: init.redirect || input.redirect || 'follow',
|
||
headers,
|
||
parsedURL,
|
||
signal,
|
||
referrer
|
||
};
|
||
|
||
// Node-fetch-only options
|
||
this.follow = init.follow === undefined ? (input.follow === undefined ? 20 : input.follow) : init.follow;
|
||
this.compress = init.compress === undefined ? (input.compress === undefined ? true : input.compress) : init.compress;
|
||
this.counter = init.counter || input.counter || 0;
|
||
this.agent = init.agent || input.agent;
|
||
this.highWaterMark = init.highWaterMark || input.highWaterMark || 16384;
|
||
this.insecureHTTPParser = init.insecureHTTPParser || input.insecureHTTPParser || false;
|
||
|
||
// §5.4, Request constructor steps, step 16.
|
||
// Default is empty string per https://fetch.spec.whatwg.org/#concept-request-referrer-policy
|
||
this.referrerPolicy = init.referrerPolicy || input.referrerPolicy || '';
|
||
}
|
||
|
||
/** @returns {string} */
|
||
get method() {
|
||
return this[request_INTERNALS].method;
|
||
}
|
||
|
||
/** @returns {string} */
|
||
get url() {
|
||
return (0,external_node_url_namespaceObject.format)(this[request_INTERNALS].parsedURL);
|
||
}
|
||
|
||
/** @returns {Headers} */
|
||
get headers() {
|
||
return this[request_INTERNALS].headers;
|
||
}
|
||
|
||
get redirect() {
|
||
return this[request_INTERNALS].redirect;
|
||
}
|
||
|
||
/** @returns {AbortSignal} */
|
||
get signal() {
|
||
return this[request_INTERNALS].signal;
|
||
}
|
||
|
||
// https://fetch.spec.whatwg.org/#dom-request-referrer
|
||
get referrer() {
|
||
if (this[request_INTERNALS].referrer === 'no-referrer') {
|
||
return '';
|
||
}
|
||
|
||
if (this[request_INTERNALS].referrer === 'client') {
|
||
return 'about:client';
|
||
}
|
||
|
||
if (this[request_INTERNALS].referrer) {
|
||
return this[request_INTERNALS].referrer.toString();
|
||
}
|
||
|
||
return undefined;
|
||
}
|
||
|
||
get referrerPolicy() {
|
||
return this[request_INTERNALS].referrerPolicy;
|
||
}
|
||
|
||
set referrerPolicy(referrerPolicy) {
|
||
this[request_INTERNALS].referrerPolicy = validateReferrerPolicy(referrerPolicy);
|
||
}
|
||
|
||
/**
|
||
* Clone this request
|
||
*
|
||
* @return Request
|
||
*/
|
||
clone() {
|
||
return new Request(this);
|
||
}
|
||
|
||
get [Symbol.toStringTag]() {
|
||
return 'Request';
|
||
}
|
||
}
|
||
|
||
Object.defineProperties(Request.prototype, {
|
||
method: {enumerable: true},
|
||
url: {enumerable: true},
|
||
headers: {enumerable: true},
|
||
redirect: {enumerable: true},
|
||
clone: {enumerable: true},
|
||
signal: {enumerable: true},
|
||
referrer: {enumerable: true},
|
||
referrerPolicy: {enumerable: true}
|
||
});
|
||
|
||
/**
|
||
* Convert a Request to Node.js http request options.
|
||
*
|
||
* @param {Request} request - A Request instance
|
||
* @return The options object to be passed to http.request
|
||
*/
|
||
const getNodeRequestOptions = request => {
|
||
const {parsedURL} = request[request_INTERNALS];
|
||
const headers = new Headers(request[request_INTERNALS].headers);
|
||
|
||
// Fetch step 1.3
|
||
if (!headers.has('Accept')) {
|
||
headers.set('Accept', '*/*');
|
||
}
|
||
|
||
// HTTP-network-or-cache fetch steps 2.4-2.7
|
||
let contentLengthValue = null;
|
||
if (request.body === null && /^(post|put)$/i.test(request.method)) {
|
||
contentLengthValue = '0';
|
||
}
|
||
|
||
if (request.body !== null) {
|
||
const totalBytes = getTotalBytes(request);
|
||
// Set Content-Length if totalBytes is a number (that is not NaN)
|
||
if (typeof totalBytes === 'number' && !Number.isNaN(totalBytes)) {
|
||
contentLengthValue = String(totalBytes);
|
||
}
|
||
}
|
||
|
||
if (contentLengthValue) {
|
||
headers.set('Content-Length', contentLengthValue);
|
||
}
|
||
|
||
// 4.1. Main fetch, step 2.6
|
||
// > If request's referrer policy is the empty string, then set request's referrer policy to the
|
||
// > default referrer policy.
|
||
if (request.referrerPolicy === '') {
|
||
request.referrerPolicy = DEFAULT_REFERRER_POLICY;
|
||
}
|
||
|
||
// 4.1. Main fetch, step 2.7
|
||
// > If request's referrer is not "no-referrer", set request's referrer to the result of invoking
|
||
// > determine request's referrer.
|
||
if (request.referrer && request.referrer !== 'no-referrer') {
|
||
request[request_INTERNALS].referrer = determineRequestsReferrer(request);
|
||
} else {
|
||
request[request_INTERNALS].referrer = 'no-referrer';
|
||
}
|
||
|
||
// 4.5. HTTP-network-or-cache fetch, step 6.9
|
||
// > If httpRequest's referrer is a URL, then append `Referer`/httpRequest's referrer, serialized
|
||
// > and isomorphic encoded, to httpRequest's header list.
|
||
if (request[request_INTERNALS].referrer instanceof URL) {
|
||
headers.set('Referer', request.referrer);
|
||
}
|
||
|
||
// HTTP-network-or-cache fetch step 2.11
|
||
if (!headers.has('User-Agent')) {
|
||
headers.set('User-Agent', 'node-fetch');
|
||
}
|
||
|
||
// HTTP-network-or-cache fetch step 2.15
|
||
if (request.compress && !headers.has('Accept-Encoding')) {
|
||
headers.set('Accept-Encoding', 'gzip,deflate,br');
|
||
}
|
||
|
||
let {agent} = request;
|
||
if (typeof agent === 'function') {
|
||
agent = agent(parsedURL);
|
||
}
|
||
|
||
if (!headers.has('Connection') && !agent) {
|
||
headers.set('Connection', 'close');
|
||
}
|
||
|
||
// HTTP-network fetch step 4.2
|
||
// chunked encoding is handled by Node.js
|
||
|
||
const search = getSearch(parsedURL);
|
||
|
||
// Pass the full URL directly to request(), but overwrite the following
|
||
// options:
|
||
const options = {
|
||
// Overwrite search to retain trailing ? (issue #776)
|
||
path: parsedURL.pathname + search,
|
||
// The following options are not expressed in the URL
|
||
method: request.method,
|
||
headers: headers[Symbol.for('nodejs.util.inspect.custom')](),
|
||
insecureHTTPParser: request.insecureHTTPParser,
|
||
agent
|
||
};
|
||
|
||
return {
|
||
/** @type {URL} */
|
||
parsedURL,
|
||
options
|
||
};
|
||
};
|
||
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/errors/abort-error.js
|
||
|
||
|
||
/**
|
||
* AbortError interface for cancelled requests
|
||
*/
|
||
class AbortError extends FetchBaseError {
|
||
constructor(message, type = 'aborted') {
|
||
super(message, type);
|
||
}
|
||
}
|
||
|
||
// EXTERNAL MODULE: ./node_modules/fetch-blob/from.js + 2 modules
|
||
var from = __nccwpck_require__(2777);
|
||
;// CONCATENATED MODULE: ./node_modules/node-fetch/src/index.js
|
||
/**
|
||
* Index.js
|
||
*
|
||
* a request API compatible with window.fetch
|
||
*
|
||
* All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
const supportedSchemas = new Set(['data:', 'http:', 'https:']);
|
||
|
||
/**
|
||
* Fetch function
|
||
*
|
||
* @param {string | URL | import('./request').default} url - Absolute url or Request instance
|
||
* @param {*} [options_] - Fetch options
|
||
* @return {Promise<import('./response').default>}
|
||
*/
|
||
async function fetch(url, options_) {
|
||
return new Promise((resolve, reject) => {
|
||
// Build request object
|
||
const request = new Request(url, options_);
|
||
const {parsedURL, options} = getNodeRequestOptions(request);
|
||
if (!supportedSchemas.has(parsedURL.protocol)) {
|
||
throw new TypeError(`node-fetch cannot load ${url}. URL scheme "${parsedURL.protocol.replace(/:$/, '')}" is not supported.`);
|
||
}
|
||
|
||
if (parsedURL.protocol === 'data:') {
|
||
const data = dist(request.url);
|
||
const response = new Response(data, {headers: {'Content-Type': data.typeFull}});
|
||
resolve(response);
|
||
return;
|
||
}
|
||
|
||
// Wrap http.request into fetch
|
||
const send = (parsedURL.protocol === 'https:' ? external_node_https_namespaceObject : external_node_http_namespaceObject).request;
|
||
const {signal} = request;
|
||
let response = null;
|
||
|
||
const abort = () => {
|
||
const error = new AbortError('The operation was aborted.');
|
||
reject(error);
|
||
if (request.body && request.body instanceof external_node_stream_namespaceObject.Readable) {
|
||
request.body.destroy(error);
|
||
}
|
||
|
||
if (!response || !response.body) {
|
||
return;
|
||
}
|
||
|
||
response.body.emit('error', error);
|
||
};
|
||
|
||
if (signal && signal.aborted) {
|
||
abort();
|
||
return;
|
||
}
|
||
|
||
const abortAndFinalize = () => {
|
||
abort();
|
||
finalize();
|
||
};
|
||
|
||
// Send request
|
||
const request_ = send(parsedURL.toString(), options);
|
||
|
||
if (signal) {
|
||
signal.addEventListener('abort', abortAndFinalize);
|
||
}
|
||
|
||
const finalize = () => {
|
||
request_.abort();
|
||
if (signal) {
|
||
signal.removeEventListener('abort', abortAndFinalize);
|
||
}
|
||
};
|
||
|
||
request_.on('error', error => {
|
||
reject(new FetchError(`request to ${request.url} failed, reason: ${error.message}`, 'system', error));
|
||
finalize();
|
||
});
|
||
|
||
fixResponseChunkedTransferBadEnding(request_, error => {
|
||
response.body.destroy(error);
|
||
});
|
||
|
||
/* c8 ignore next 18 */
|
||
if (process.version < 'v14') {
|
||
// Before Node.js 14, pipeline() does not fully support async iterators and does not always
|
||
// properly handle when the socket close/end events are out of order.
|
||
request_.on('socket', s => {
|
||
let endedWithEventsCount;
|
||
s.prependListener('end', () => {
|
||
endedWithEventsCount = s._eventsCount;
|
||
});
|
||
s.prependListener('close', hadError => {
|
||
// if end happened before close but the socket didn't emit an error, do it now
|
||
if (response && endedWithEventsCount < s._eventsCount && !hadError) {
|
||
const error = new Error('Premature close');
|
||
error.code = 'ERR_STREAM_PREMATURE_CLOSE';
|
||
response.body.emit('error', error);
|
||
}
|
||
});
|
||
});
|
||
}
|
||
|
||
request_.on('response', response_ => {
|
||
request_.setTimeout(0);
|
||
const headers = fromRawHeaders(response_.rawHeaders);
|
||
|
||
// HTTP fetch step 5
|
||
if (isRedirect(response_.statusCode)) {
|
||
// HTTP fetch step 5.2
|
||
const location = headers.get('Location');
|
||
|
||
// HTTP fetch step 5.3
|
||
let locationURL = null;
|
||
try {
|
||
locationURL = location === null ? null : new URL(location, request.url);
|
||
} catch {
|
||
// error here can only be invalid URL in Location: header
|
||
// do not throw when options.redirect == manual
|
||
// let the user extract the errorneous redirect URL
|
||
if (request.redirect !== 'manual') {
|
||
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
|
||
finalize();
|
||
return;
|
||
}
|
||
}
|
||
|
||
// HTTP fetch step 5.5
|
||
switch (request.redirect) {
|
||
case 'error':
|
||
reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
|
||
finalize();
|
||
return;
|
||
case 'manual':
|
||
// Nothing to do
|
||
break;
|
||
case 'follow': {
|
||
// HTTP-redirect fetch step 2
|
||
if (locationURL === null) {
|
||
break;
|
||
}
|
||
|
||
// HTTP-redirect fetch step 5
|
||
if (request.counter >= request.follow) {
|
||
reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
|
||
finalize();
|
||
return;
|
||
}
|
||
|
||
// HTTP-redirect fetch step 6 (counter increment)
|
||
// Create a new Request object.
|
||
const requestOptions = {
|
||
headers: new Headers(request.headers),
|
||
follow: request.follow,
|
||
counter: request.counter + 1,
|
||
agent: request.agent,
|
||
compress: request.compress,
|
||
method: request.method,
|
||
body: clone(request),
|
||
signal: request.signal,
|
||
size: request.size,
|
||
referrer: request.referrer,
|
||
referrerPolicy: request.referrerPolicy
|
||
};
|
||
|
||
// when forwarding sensitive headers like "Authorization",
|
||
// "WWW-Authenticate", and "Cookie" to untrusted targets,
|
||
// headers will be ignored when following a redirect to a domain
|
||
// that is not a subdomain match or exact match of the initial domain.
|
||
// For example, a redirect from "foo.com" to either "foo.com" or "sub.foo.com"
|
||
// will forward the sensitive headers, but a redirect to "bar.com" will not.
|
||
if (!isDomainOrSubdomain(request.url, locationURL)) {
|
||
for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
|
||
requestOptions.headers.delete(name);
|
||
}
|
||
}
|
||
|
||
// HTTP-redirect fetch step 9
|
||
if (response_.statusCode !== 303 && request.body && options_.body instanceof external_node_stream_namespaceObject.Readable) {
|
||
reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
|
||
finalize();
|
||
return;
|
||
}
|
||
|
||
// HTTP-redirect fetch step 11
|
||
if (response_.statusCode === 303 || ((response_.statusCode === 301 || response_.statusCode === 302) && request.method === 'POST')) {
|
||
requestOptions.method = 'GET';
|
||
requestOptions.body = undefined;
|
||
requestOptions.headers.delete('content-length');
|
||
}
|
||
|
||
// HTTP-redirect fetch step 14
|
||
const responseReferrerPolicy = parseReferrerPolicyFromHeader(headers);
|
||
if (responseReferrerPolicy) {
|
||
requestOptions.referrerPolicy = responseReferrerPolicy;
|
||
}
|
||
|
||
// HTTP-redirect fetch step 15
|
||
resolve(fetch(new Request(locationURL, requestOptions)));
|
||
finalize();
|
||
return;
|
||
}
|
||
|
||
default:
|
||
return reject(new TypeError(`Redirect option '${request.redirect}' is not a valid value of RequestRedirect`));
|
||
}
|
||
}
|
||
|
||
// Prepare response
|
||
if (signal) {
|
||
response_.once('end', () => {
|
||
signal.removeEventListener('abort', abortAndFinalize);
|
||
});
|
||
}
|
||
|
||
let body = (0,external_node_stream_namespaceObject.pipeline)(response_, new external_node_stream_namespaceObject.PassThrough(), error => {
|
||
if (error) {
|
||
reject(error);
|
||
}
|
||
});
|
||
// see https://github.com/nodejs/node/pull/29376
|
||
/* c8 ignore next 3 */
|
||
if (process.version < 'v12.10') {
|
||
response_.on('aborted', abortAndFinalize);
|
||
}
|
||
|
||
const responseOptions = {
|
||
url: request.url,
|
||
status: response_.statusCode,
|
||
statusText: response_.statusMessage,
|
||
headers,
|
||
size: request.size,
|
||
counter: request.counter,
|
||
highWaterMark: request.highWaterMark
|
||
};
|
||
|
||
// HTTP-network fetch step 12.1.1.3
|
||
const codings = headers.get('Content-Encoding');
|
||
|
||
// HTTP-network fetch step 12.1.1.4: handle content codings
|
||
|
||
// in following scenarios we ignore compression support
|
||
// 1. compression support is disabled
|
||
// 2. HEAD request
|
||
// 3. no Content-Encoding header
|
||
// 4. no content response (204)
|
||
// 5. content not modified response (304)
|
||
if (!request.compress || request.method === 'HEAD' || codings === null || response_.statusCode === 204 || response_.statusCode === 304) {
|
||
response = new Response(body, responseOptions);
|
||
resolve(response);
|
||
return;
|
||
}
|
||
|
||
// For Node v6+
|
||
// Be less strict when decoding compressed responses, since sometimes
|
||
// servers send slightly invalid responses that are still accepted
|
||
// by common browsers.
|
||
// Always using Z_SYNC_FLUSH is what cURL does.
|
||
const zlibOptions = {
|
||
flush: external_node_zlib_namespaceObject.Z_SYNC_FLUSH,
|
||
finishFlush: external_node_zlib_namespaceObject.Z_SYNC_FLUSH
|
||
};
|
||
|
||
// For gzip
|
||
if (codings === 'gzip' || codings === 'x-gzip') {
|
||
body = (0,external_node_stream_namespaceObject.pipeline)(body, external_node_zlib_namespaceObject.createGunzip(zlibOptions), error => {
|
||
if (error) {
|
||
reject(error);
|
||
}
|
||
});
|
||
response = new Response(body, responseOptions);
|
||
resolve(response);
|
||
return;
|
||
}
|
||
|
||
// For deflate
|
||
if (codings === 'deflate' || codings === 'x-deflate') {
|
||
// Handle the infamous raw deflate response from old servers
|
||
// a hack for old IIS and Apache servers
|
||
const raw = (0,external_node_stream_namespaceObject.pipeline)(response_, new external_node_stream_namespaceObject.PassThrough(), error => {
|
||
if (error) {
|
||
reject(error);
|
||
}
|
||
});
|
||
raw.once('data', chunk => {
|
||
// See http://stackoverflow.com/questions/37519828
|
||
if ((chunk[0] & 0x0F) === 0x08) {
|
||
body = (0,external_node_stream_namespaceObject.pipeline)(body, external_node_zlib_namespaceObject.createInflate(), error => {
|
||
if (error) {
|
||
reject(error);
|
||
}
|
||
});
|
||
} else {
|
||
body = (0,external_node_stream_namespaceObject.pipeline)(body, external_node_zlib_namespaceObject.createInflateRaw(), error => {
|
||
if (error) {
|
||
reject(error);
|
||
}
|
||
});
|
||
}
|
||
|
||
response = new Response(body, responseOptions);
|
||
resolve(response);
|
||
});
|
||
raw.once('end', () => {
|
||
// Some old IIS servers return zero-length OK deflate responses, so
|
||
// 'data' is never emitted. See https://github.com/node-fetch/node-fetch/pull/903
|
||
if (!response) {
|
||
response = new Response(body, responseOptions);
|
||
resolve(response);
|
||
}
|
||
});
|
||
return;
|
||
}
|
||
|
||
// For br
|
||
if (codings === 'br') {
|
||
body = (0,external_node_stream_namespaceObject.pipeline)(body, external_node_zlib_namespaceObject.createBrotliDecompress(), error => {
|
||
if (error) {
|
||
reject(error);
|
||
}
|
||
});
|
||
response = new Response(body, responseOptions);
|
||
resolve(response);
|
||
return;
|
||
}
|
||
|
||
// Otherwise, use response as-is
|
||
response = new Response(body, responseOptions);
|
||
resolve(response);
|
||
});
|
||
|
||
// eslint-disable-next-line promise/prefer-await-to-then
|
||
writeToStream(request_, request).catch(reject);
|
||
});
|
||
}
|
||
|
||
function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
||
const LAST_CHUNK = external_node_buffer_namespaceObject.Buffer.from('0\r\n\r\n');
|
||
|
||
let isChunkedTransfer = false;
|
||
let properLastChunkReceived = false;
|
||
let previousChunk;
|
||
|
||
request.on('response', response => {
|
||
const {headers} = response;
|
||
isChunkedTransfer = headers['transfer-encoding'] === 'chunked' && !headers['content-length'];
|
||
});
|
||
|
||
request.on('socket', socket => {
|
||
const onSocketClose = () => {
|
||
if (isChunkedTransfer && !properLastChunkReceived) {
|
||
const error = new Error('Premature close');
|
||
error.code = 'ERR_STREAM_PREMATURE_CLOSE';
|
||
errorCallback(error);
|
||
}
|
||
};
|
||
|
||
socket.prependListener('close', onSocketClose);
|
||
|
||
request.on('abort', () => {
|
||
socket.removeListener('close', onSocketClose);
|
||
});
|
||
|
||
socket.on('data', buf => {
|
||
properLastChunkReceived = external_node_buffer_namespaceObject.Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0;
|
||
|
||
// Sometimes final 0-length chunk and end of message code are in separate packets
|
||
if (!properLastChunkReceived && previousChunk) {
|
||
properLastChunkReceived = (
|
||
external_node_buffer_namespaceObject.Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 &&
|
||
external_node_buffer_namespaceObject.Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0
|
||
);
|
||
}
|
||
|
||
previousChunk = buf;
|
||
});
|
||
});
|
||
}
|
||
|
||
;// CONCATENATED MODULE: ./src/validate.ts
|
||
var __awaiter = (undefined && undefined.__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());
|
||
});
|
||
};
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
const verify = (filename, platform, version, verbose) => __awaiter(void 0, void 0, void 0, function* () {
|
||
try {
|
||
const uploaderName = getUploaderName(platform);
|
||
// Read in public key
|
||
const publicKeyArmored = yield external_fs_.readFileSync(__nccwpck_require__.ab + "pgp_keys.asc", 'utf-8');
|
||
// Get SHASUM and SHASUM signature files
|
||
console.log(`${getBaseUrl(platform, version)}.SHA256SUM`);
|
||
const shasumRes = yield fetch(`${getBaseUrl(platform, version)}.SHA256SUM`);
|
||
const shasum = yield shasumRes.text();
|
||
if (verbose) {
|
||
console.log(`Received SHA256SUM ${shasum}`);
|
||
}
|
||
const shaSigRes = yield fetch(`${getBaseUrl(platform, version)}.SHA256SUM.sig`);
|
||
const shaSig = yield shaSigRes.text();
|
||
if (verbose) {
|
||
console.log(`Received SHA256SUM signature ${shaSig}`);
|
||
}
|
||
// Verify shasum
|
||
const verified = yield openpgp_min/* verify */.T({
|
||
message: yield openpgp_min/* createMessage */.tn({ text: shasum }),
|
||
signature: yield openpgp_min/* readSignature */.Gi({ armoredSignature: shaSig }),
|
||
verificationKeys: yield openpgp_min/* readKeys */.Mq({ armoredKeys: publicKeyArmored }),
|
||
});
|
||
const valid = yield verified.signatures[0].verified;
|
||
if (valid) {
|
||
core.info('==> SHASUM file signed by key id ' +
|
||
verified.signatures[0].keyID.toHex());
|
||
}
|
||
else {
|
||
setFailure('Codecov: Error validating SHASUM signature', true);
|
||
}
|
||
const calculateHash = (filename) => __awaiter(void 0, void 0, void 0, function* () {
|
||
const stream = external_fs_.createReadStream(filename);
|
||
const uploaderSha = external_crypto_.createHash(`sha256`);
|
||
stream.pipe(uploaderSha);
|
||
return new Promise((resolve, reject) => {
|
||
stream.on('end', () => resolve(`${uploaderSha.digest('hex')} ${uploaderName}`));
|
||
stream.on('error', reject);
|
||
});
|
||
});
|
||
const hash = yield calculateHash(filename);
|
||
if (hash === shasum) {
|
||
core.info(`==> Uploader SHASUM verified (${hash})`);
|
||
}
|
||
else {
|
||
setFailure('Codecov: Uploader shasum does not match -- ' +
|
||
`uploader hash: ${hash}, public hash: ${shasum}`, true);
|
||
}
|
||
}
|
||
catch (err) {
|
||
setFailure(`Codecov: Error validating uploader: ${err.message}`, true);
|
||
}
|
||
});
|
||
/* harmony default export */ const validate = (verify);
|
||
|
||
;// CONCATENATED MODULE: ./src/version.ts
|
||
var version_awaiter = (undefined && undefined.__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());
|
||
});
|
||
};
|
||
|
||
|
||
const versionInfo = (platform, version) => version_awaiter(void 0, void 0, void 0, function* () {
|
||
if (version) {
|
||
core.info(`==> Running version ${version}`);
|
||
}
|
||
try {
|
||
const metadataRes = yield fetch(`https://uploader.codecov.io/${platform}/latest`, {
|
||
headers: { 'Accept': 'application/json' },
|
||
});
|
||
const metadata = yield metadataRes.json();
|
||
core.info(`==> Running version ${metadata['version']}`);
|
||
}
|
||
catch (err) {
|
||
core.info(`Could not pull latest version information: ${err}`);
|
||
}
|
||
});
|
||
/* harmony default export */ const version = (versionInfo);
|
||
|
||
;// CONCATENATED MODULE: ./src/index.ts
|
||
var src_awaiter = (undefined && undefined.__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());
|
||
});
|
||
};
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
let failCi;
|
||
try {
|
||
const { execArgs, options, failCi, os, uploaderVersion, verbose } = src_buildExec();
|
||
const platform = getPlatform(os);
|
||
const filename = external_path_.join(__dirname, getUploaderName(platform));
|
||
external_https_.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
||
// Image will be stored at this path
|
||
const filePath = external_fs_.createWriteStream(filename);
|
||
res.pipe(filePath);
|
||
filePath
|
||
.on('error', (err) => {
|
||
setFailure(`Codecov: Failed to write uploader binary: ${err.message}`, true);
|
||
}).on('finish', () => src_awaiter(void 0, void 0, void 0, function* () {
|
||
filePath.close();
|
||
yield validate(filename, platform, uploaderVersion, verbose);
|
||
yield version(platform, uploaderVersion);
|
||
yield external_fs_.chmodSync(filename, '777');
|
||
const unlink = () => {
|
||
external_fs_.unlink(filename, (err) => {
|
||
if (err) {
|
||
setFailure(`Codecov: Could not unlink uploader: ${err.message}`, failCi);
|
||
}
|
||
});
|
||
};
|
||
yield exec.exec(filename, execArgs, options)
|
||
.catch((err) => {
|
||
setFailure(`Codecov: Failed to properly upload: ${err.message}`, failCi);
|
||
}).then(() => {
|
||
unlink();
|
||
});
|
||
}));
|
||
});
|
||
}
|
||
catch (err) {
|
||
setFailure(`Codecov: Encountered an unexpected error ${err.message}`, failCi);
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2877:
|
||
/***/ ((module) => {
|
||
|
||
module.exports = eval("require")("encoding");
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 9491:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("assert");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4300:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("buffer");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2081:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("child_process");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 6113:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("crypto");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2361:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("events");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 7147:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("fs");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3685:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("http");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5687:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("https");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1808:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("net");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 7742:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("node:process");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2477:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("node:stream/web");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2037:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("os");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1017:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("path");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 5477:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("punycode");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2781:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("stream");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1576:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("string_decoder");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 9512:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("timers");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4404:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("tls");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 7310:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("url");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3837:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("util");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1267:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("worker_threads");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 9796:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = require("zlib");
|
||
|
||
/***/ }),
|
||
|
||
/***/ 8572:
|
||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => {
|
||
|
||
/* c8 ignore start */
|
||
// 64 KiB (same size chrome slice theirs blob into Uint8array's)
|
||
const POOL_SIZE = 65536
|
||
|
||
if (!globalThis.ReadableStream) {
|
||
// `node:stream/web` got introduced in v16.5.0 as experimental
|
||
// and it's preferred over the polyfilled version. So we also
|
||
// suppress the warning that gets emitted by NodeJS for using it.
|
||
try {
|
||
const process = __nccwpck_require__(7742)
|
||
const { emitWarning } = process
|
||
try {
|
||
process.emitWarning = () => {}
|
||
Object.assign(globalThis, __nccwpck_require__(2477))
|
||
process.emitWarning = emitWarning
|
||
} catch (error) {
|
||
process.emitWarning = emitWarning
|
||
throw error
|
||
}
|
||
} catch (error) {
|
||
// fallback to polyfill implementation
|
||
Object.assign(globalThis, __nccwpck_require__(1452))
|
||
}
|
||
}
|
||
|
||
try {
|
||
// Don't use node: prefix for this, require+node: is not supported until node v14.14
|
||
// Only `import()` can use prefix in 12.20 and later
|
||
const { Blob } = __nccwpck_require__(4300)
|
||
if (Blob && !Blob.prototype.stream) {
|
||
Blob.prototype.stream = function name (params) {
|
||
let position = 0
|
||
const blob = this
|
||
|
||
return new ReadableStream({
|
||
type: 'bytes',
|
||
async pull (ctrl) {
|
||
const chunk = blob.slice(position, Math.min(blob.size, position + POOL_SIZE))
|
||
const buffer = await chunk.arrayBuffer()
|
||
position += buffer.byteLength
|
||
ctrl.enqueue(new Uint8Array(buffer))
|
||
|
||
if (position === blob.size) {
|
||
ctrl.close()
|
||
}
|
||
}
|
||
})
|
||
}
|
||
}
|
||
} catch (error) {}
|
||
/* c8 ignore end */
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 3213:
|
||
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
||
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
/* harmony export */ });
|
||
/* unused harmony export File */
|
||
/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1410);
|
||
|
||
|
||
const _File = class File extends _index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
||
#lastModified = 0
|
||
#name = ''
|
||
|
||
/**
|
||
* @param {*[]} fileBits
|
||
* @param {string} fileName
|
||
* @param {{lastModified?: number, type?: string}} options
|
||
*/// @ts-ignore
|
||
constructor (fileBits, fileName, options = {}) {
|
||
if (arguments.length < 2) {
|
||
throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`)
|
||
}
|
||
super(fileBits, options)
|
||
|
||
if (options === null) options = {}
|
||
|
||
// Simulate WebIDL type casting for NaN value in lastModified option.
|
||
const lastModified = options.lastModified === undefined ? Date.now() : Number(options.lastModified)
|
||
if (!Number.isNaN(lastModified)) {
|
||
this.#lastModified = lastModified
|
||
}
|
||
|
||
this.#name = String(fileName)
|
||
}
|
||
|
||
get name () {
|
||
return this.#name
|
||
}
|
||
|
||
get lastModified () {
|
||
return this.#lastModified
|
||
}
|
||
|
||
get [Symbol.toStringTag] () {
|
||
return 'File'
|
||
}
|
||
|
||
static [Symbol.hasInstance] (object) {
|
||
return !!object && object instanceof _index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z &&
|
||
/^(File)$/.test(object[Symbol.toStringTag])
|
||
}
|
||
}
|
||
|
||
/** @type {typeof globalThis.File} */// @ts-ignore
|
||
const File = _File
|
||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (File);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2777:
|
||
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
|
||
// EXPORTS
|
||
__nccwpck_require__.d(__webpack_exports__, {
|
||
"$B": () => (/* reexport */ file/* default */.Z)
|
||
});
|
||
|
||
// UNUSED EXPORTS: Blob, blobFrom, blobFromSync, default, fileFrom, fileFromSync
|
||
|
||
;// CONCATENATED MODULE: external "node:fs"
|
||
const external_node_fs_namespaceObject = require("node:fs");
|
||
;// CONCATENATED MODULE: external "node:path"
|
||
const external_node_path_namespaceObject = require("node:path");
|
||
// EXTERNAL MODULE: ./node_modules/node-domexception/index.js
|
||
var node_domexception = __nccwpck_require__(7760);
|
||
// EXTERNAL MODULE: ./node_modules/fetch-blob/file.js
|
||
var file = __nccwpck_require__(3213);
|
||
// EXTERNAL MODULE: ./node_modules/fetch-blob/index.js
|
||
var fetch_blob = __nccwpck_require__(1410);
|
||
;// CONCATENATED MODULE: ./node_modules/fetch-blob/from.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
const { stat } = external_node_fs_namespaceObject.promises
|
||
|
||
/**
|
||
* @param {string} path filepath on the disk
|
||
* @param {string} [type] mimetype to use
|
||
*/
|
||
const blobFromSync = (path, type) => fromBlob(statSync(path), path, type)
|
||
|
||
/**
|
||
* @param {string} path filepath on the disk
|
||
* @param {string} [type] mimetype to use
|
||
* @returns {Promise<Blob>}
|
||
*/
|
||
const blobFrom = (path, type) => stat(path).then(stat => fromBlob(stat, path, type))
|
||
|
||
/**
|
||
* @param {string} path filepath on the disk
|
||
* @param {string} [type] mimetype to use
|
||
* @returns {Promise<File>}
|
||
*/
|
||
const fileFrom = (path, type) => stat(path).then(stat => fromFile(stat, path, type))
|
||
|
||
/**
|
||
* @param {string} path filepath on the disk
|
||
* @param {string} [type] mimetype to use
|
||
*/
|
||
const fileFromSync = (path, type) => fromFile(statSync(path), path, type)
|
||
|
||
// @ts-ignore
|
||
const fromBlob = (stat, path, type = '') => new Blob([new BlobDataItem({
|
||
path,
|
||
size: stat.size,
|
||
lastModified: stat.mtimeMs,
|
||
start: 0
|
||
})], { type })
|
||
|
||
// @ts-ignore
|
||
const fromFile = (stat, path, type = '') => new File([new BlobDataItem({
|
||
path,
|
||
size: stat.size,
|
||
lastModified: stat.mtimeMs,
|
||
start: 0
|
||
})], basename(path), { type, lastModified: stat.mtimeMs })
|
||
|
||
/**
|
||
* This is a blob backed up by a file on the disk
|
||
* with minium requirement. Its wrapped around a Blob as a blobPart
|
||
* so you have no direct access to this.
|
||
*
|
||
* @private
|
||
*/
|
||
class BlobDataItem {
|
||
#path
|
||
#start
|
||
|
||
constructor (options) {
|
||
this.#path = options.path
|
||
this.#start = options.start
|
||
this.size = options.size
|
||
this.lastModified = options.lastModified
|
||
this.originalSize = options.originalSize === undefined
|
||
? options.size
|
||
: options.originalSize
|
||
}
|
||
|
||
/**
|
||
* Slicing arguments is first validated and formatted
|
||
* to not be out of range by Blob.prototype.slice
|
||
*/
|
||
slice (start, end) {
|
||
return new BlobDataItem({
|
||
path: this.#path,
|
||
lastModified: this.lastModified,
|
||
originalSize: this.originalSize,
|
||
size: end - start,
|
||
start: this.#start + start
|
||
})
|
||
}
|
||
|
||
async * stream () {
|
||
const { mtimeMs, size } = await stat(this.#path)
|
||
|
||
if (mtimeMs > this.lastModified || this.originalSize !== size) {
|
||
throw new DOMException('The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.', 'NotReadableError')
|
||
}
|
||
|
||
yield * createReadStream(this.#path, {
|
||
start: this.#start,
|
||
end: this.#start + this.size - 1
|
||
})
|
||
}
|
||
|
||
get [Symbol.toStringTag] () {
|
||
return 'Blob'
|
||
}
|
||
}
|
||
|
||
/* harmony default export */ const from = ((/* unused pure expression or super */ null && (blobFromSync)));
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1410:
|
||
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
||
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
/* harmony export */ });
|
||
/* unused harmony export Blob */
|
||
/* harmony import */ var _streams_cjs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(8572);
|
||
/*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||
|
||
// TODO (jimmywarting): in the feature use conditional loading with top level await (requires 14.x)
|
||
// Node has recently added whatwg stream into core
|
||
|
||
|
||
|
||
// 64 KiB (same size chrome slice theirs blob into Uint8array's)
|
||
const POOL_SIZE = 65536
|
||
|
||
/** @param {(Blob | Uint8Array)[]} parts */
|
||
async function * toIterator (parts, clone = true) {
|
||
for (const part of parts) {
|
||
if ('stream' in part) {
|
||
yield * (/** @type {AsyncIterableIterator<Uint8Array>} */ (part.stream()))
|
||
} else if (ArrayBuffer.isView(part)) {
|
||
if (clone) {
|
||
let position = part.byteOffset
|
||
const end = part.byteOffset + part.byteLength
|
||
while (position !== end) {
|
||
const size = Math.min(end - position, POOL_SIZE)
|
||
const chunk = part.buffer.slice(position, position + size)
|
||
position += chunk.byteLength
|
||
yield new Uint8Array(chunk)
|
||
}
|
||
} else {
|
||
yield part
|
||
}
|
||
/* c8 ignore next 10 */
|
||
} else {
|
||
// For blobs that have arrayBuffer but no stream method (nodes buffer.Blob)
|
||
let position = 0, b = (/** @type {Blob} */ (part))
|
||
while (position !== b.size) {
|
||
const chunk = b.slice(position, Math.min(b.size, position + POOL_SIZE))
|
||
const buffer = await chunk.arrayBuffer()
|
||
position += buffer.byteLength
|
||
yield new Uint8Array(buffer)
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
const _Blob = class Blob {
|
||
/** @type {Array.<(Blob|Uint8Array)>} */
|
||
#parts = []
|
||
#type = ''
|
||
#size = 0
|
||
#endings = 'transparent'
|
||
|
||
/**
|
||
* The Blob() constructor returns a new Blob object. The content
|
||
* of the blob consists of the concatenation of the values given
|
||
* in the parameter array.
|
||
*
|
||
* @param {*} blobParts
|
||
* @param {{ type?: string, endings?: string }} [options]
|
||
*/
|
||
constructor (blobParts = [], options = {}) {
|
||
if (typeof blobParts !== 'object' || blobParts === null) {
|
||
throw new TypeError('Failed to construct \'Blob\': The provided value cannot be converted to a sequence.')
|
||
}
|
||
|
||
if (typeof blobParts[Symbol.iterator] !== 'function') {
|
||
throw new TypeError('Failed to construct \'Blob\': The object must have a callable @@iterator property.')
|
||
}
|
||
|
||
if (typeof options !== 'object' && typeof options !== 'function') {
|
||
throw new TypeError('Failed to construct \'Blob\': parameter 2 cannot convert to dictionary.')
|
||
}
|
||
|
||
if (options === null) options = {}
|
||
|
||
const encoder = new TextEncoder()
|
||
for (const element of blobParts) {
|
||
let part
|
||
if (ArrayBuffer.isView(element)) {
|
||
part = new Uint8Array(element.buffer.slice(element.byteOffset, element.byteOffset + element.byteLength))
|
||
} else if (element instanceof ArrayBuffer) {
|
||
part = new Uint8Array(element.slice(0))
|
||
} else if (element instanceof Blob) {
|
||
part = element
|
||
} else {
|
||
part = encoder.encode(`${element}`)
|
||
}
|
||
|
||
const size = ArrayBuffer.isView(part) ? part.byteLength : part.size
|
||
// Avoid pushing empty parts into the array to better GC them
|
||
if (size) {
|
||
this.#size += size
|
||
this.#parts.push(part)
|
||
}
|
||
}
|
||
|
||
this.#endings = `${options.endings === undefined ? 'transparent' : options.endings}`
|
||
const type = options.type === undefined ? '' : String(options.type)
|
||
this.#type = /^[\x20-\x7E]*$/.test(type) ? type : ''
|
||
}
|
||
|
||
/**
|
||
* The Blob interface's size property returns the
|
||
* size of the Blob in bytes.
|
||
*/
|
||
get size () {
|
||
return this.#size
|
||
}
|
||
|
||
/**
|
||
* The type property of a Blob object returns the MIME type of the file.
|
||
*/
|
||
get type () {
|
||
return this.#type
|
||
}
|
||
|
||
/**
|
||
* The text() method in the Blob interface returns a Promise
|
||
* that resolves with a string containing the contents of
|
||
* the blob, interpreted as UTF-8.
|
||
*
|
||
* @return {Promise<string>}
|
||
*/
|
||
async text () {
|
||
// More optimized than using this.arrayBuffer()
|
||
// that requires twice as much ram
|
||
const decoder = new TextDecoder()
|
||
let str = ''
|
||
for await (const part of toIterator(this.#parts, false)) {
|
||
str += decoder.decode(part, { stream: true })
|
||
}
|
||
// Remaining
|
||
str += decoder.decode()
|
||
return str
|
||
}
|
||
|
||
/**
|
||
* The arrayBuffer() method in the Blob interface returns a
|
||
* Promise that resolves with the contents of the blob as
|
||
* binary data contained in an ArrayBuffer.
|
||
*
|
||
* @return {Promise<ArrayBuffer>}
|
||
*/
|
||
async arrayBuffer () {
|
||
// Easier way... Just a unnecessary overhead
|
||
// const view = new Uint8Array(this.size);
|
||
// await this.stream().getReader({mode: 'byob'}).read(view);
|
||
// return view.buffer;
|
||
|
||
const data = new Uint8Array(this.size)
|
||
let offset = 0
|
||
for await (const chunk of toIterator(this.#parts, false)) {
|
||
data.set(chunk, offset)
|
||
offset += chunk.length
|
||
}
|
||
|
||
return data.buffer
|
||
}
|
||
|
||
stream () {
|
||
const it = toIterator(this.#parts, true)
|
||
|
||
return new globalThis.ReadableStream({
|
||
// @ts-ignore
|
||
type: 'bytes',
|
||
async pull (ctrl) {
|
||
const chunk = await it.next()
|
||
chunk.done ? ctrl.close() : ctrl.enqueue(chunk.value)
|
||
},
|
||
|
||
async cancel () {
|
||
await it.return()
|
||
}
|
||
})
|
||
}
|
||
|
||
/**
|
||
* The Blob interface's slice() method creates and returns a
|
||
* new Blob object which contains data from a subset of the
|
||
* blob on which it's called.
|
||
*
|
||
* @param {number} [start]
|
||
* @param {number} [end]
|
||
* @param {string} [type]
|
||
*/
|
||
slice (start = 0, end = this.size, type = '') {
|
||
const { size } = this
|
||
|
||
let relativeStart = start < 0 ? Math.max(size + start, 0) : Math.min(start, size)
|
||
let relativeEnd = end < 0 ? Math.max(size + end, 0) : Math.min(end, size)
|
||
|
||
const span = Math.max(relativeEnd - relativeStart, 0)
|
||
const parts = this.#parts
|
||
const blobParts = []
|
||
let added = 0
|
||
|
||
for (const part of parts) {
|
||
// don't add the overflow to new blobParts
|
||
if (added >= span) {
|
||
break
|
||
}
|
||
|
||
const size = ArrayBuffer.isView(part) ? part.byteLength : part.size
|
||
if (relativeStart && size <= relativeStart) {
|
||
// Skip the beginning and change the relative
|
||
// start & end position as we skip the unwanted parts
|
||
relativeStart -= size
|
||
relativeEnd -= size
|
||
} else {
|
||
let chunk
|
||
if (ArrayBuffer.isView(part)) {
|
||
chunk = part.subarray(relativeStart, Math.min(size, relativeEnd))
|
||
added += chunk.byteLength
|
||
} else {
|
||
chunk = part.slice(relativeStart, Math.min(size, relativeEnd))
|
||
added += chunk.size
|
||
}
|
||
relativeEnd -= size
|
||
blobParts.push(chunk)
|
||
relativeStart = 0 // All next sequential parts should start at 0
|
||
}
|
||
}
|
||
|
||
const blob = new Blob([], { type: String(type).toLowerCase() })
|
||
blob.#size = span
|
||
blob.#parts = blobParts
|
||
|
||
return blob
|
||
}
|
||
|
||
get [Symbol.toStringTag] () {
|
||
return 'Blob'
|
||
}
|
||
|
||
static [Symbol.hasInstance] (object) {
|
||
return (
|
||
object &&
|
||
typeof object === 'object' &&
|
||
typeof object.constructor === 'function' &&
|
||
(
|
||
typeof object.stream === 'function' ||
|
||
typeof object.arrayBuffer === 'function'
|
||
) &&
|
||
/^(Blob|File)$/.test(object[Symbol.toStringTag])
|
||
)
|
||
}
|
||
}
|
||
|
||
Object.defineProperties(_Blob.prototype, {
|
||
size: { enumerable: true },
|
||
type: { enumerable: true },
|
||
slice: { enumerable: true }
|
||
})
|
||
|
||
/** @type {typeof globalThis.Blob} */
|
||
const Blob = _Blob
|
||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Blob);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 8010:
|
||
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
||
|
||
"use strict";
|
||
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
||
/* harmony export */ "Ct": () => (/* binding */ FormData),
|
||
/* harmony export */ "au": () => (/* binding */ formDataToBlob)
|
||
/* harmony export */ });
|
||
/* unused harmony export File */
|
||
/* harmony import */ var fetch_blob__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1410);
|
||
/* harmony import */ var fetch_blob_file_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3213);
|
||
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||
|
||
|
||
|
||
|
||
var {toStringTag:t,iterator:i,hasInstance:h}=Symbol,
|
||
r=Math.random,
|
||
m='append,set,get,getAll,delete,keys,values,entries,forEach,constructor'.split(','),
|
||
f=(a,b,c)=>(a+='',/^(Blob|File)$/.test(b && b[t])?[(c=c!==void 0?c+'':b[t]=='File'?b.name:'blob',a),b.name!==c||b[t]=='blob'?new fetch_blob_file_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z([b],c,b):b]:[a,b+'']),
|
||
e=(c,f)=>(f?c:c.replace(/\r?\n|\r/g,'\r\n')).replace(/\n/g,'%0A').replace(/\r/g,'%0D').replace(/"/g,'%22'),
|
||
x=(n, a, e)=>{if(a.length<e){throw new TypeError(`Failed to execute '${n}' on 'FormData': ${e} arguments required, but only ${a.length} present.`)}}
|
||
|
||
const File = (/* unused pure expression or super */ null && (F))
|
||
|
||
/** @type {typeof globalThis.FormData} */
|
||
const FormData = class FormData {
|
||
#d=[];
|
||
constructor(...a){if(a.length)throw new TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`)}
|
||
get [t]() {return 'FormData'}
|
||
[i](){return this.entries()}
|
||
static [h](o) {return o&&typeof o==='object'&&o[t]==='FormData'&&!m.some(m=>typeof o[m]!='function')}
|
||
append(...a){x('append',arguments,2);this.#d.push(f(...a))}
|
||
delete(a){x('delete',arguments,1);a+='';this.#d=this.#d.filter(([b])=>b!==a)}
|
||
get(a){x('get',arguments,1);a+='';for(var b=this.#d,l=b.length,c=0;c<l;c++)if(b[c][0]===a)return b[c][1];return null}
|
||
getAll(a,b){x('getAll',arguments,1);b=[];a+='';this.#d.forEach(c=>c[0]===a&&b.push(c[1]));return b}
|
||
has(a){x('has',arguments,1);a+='';return this.#d.some(b=>b[0]===a)}
|
||
forEach(a,b){x('forEach',arguments,1);for(var [c,d]of this)a.call(b,d,c,this)}
|
||
set(...a){x('set',arguments,2);var b=[],c=!0;a=f(...a);this.#d.forEach(d=>{d[0]===a[0]?c&&(c=!b.push(a)):b.push(d)});c&&b.push(a);this.#d=b}
|
||
*entries(){yield*this.#d}
|
||
*keys(){for(var[a]of this)yield a}
|
||
*values(){for(var[,a]of this)yield a}}
|
||
|
||
/** @param {FormData} F */
|
||
function formDataToBlob (F,B=fetch_blob__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z){
|
||
var b=`${r()}${r()}`.replace(/\./g, '').slice(-28).padStart(32, '-'),c=[],p=`--${b}\r\nContent-Disposition: form-data; name="`
|
||
F.forEach((v,n)=>typeof v=='string'
|
||
?c.push(p+e(n)+`"\r\n\r\n${v.replace(/\r(?!\n)|(?<!\r)\n/g, '\r\n')}\r\n`)
|
||
:c.push(p+e(n)+`"; filename="${e(v.name, 1)}"\r\nContent-Type: ${v.type||"application/octet-stream"}\r\n\r\n`, v, '\r\n'))
|
||
c.push(`--${b}--`)
|
||
return new B(c,{type:"multipart/form-data; boundary="+b})}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 6492:
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mapped",[359]],[[359,359],"valid"],[[360,360],"mapped",[361]],[[361,361],"valid"],[[362,362],"mapped",[363]],[[363,363],"valid"],[[364,364],"mapped",[365]],[[365,365],"valid"],[[366,366],"mapped",[367]],[[367,367],"valid"],[[368,368],"mapped",[369]],[[369,369],"valid"],[[370,370],"mapped",[371]],[[371,371],"valid"],[[372,372],"mapped",[373]],[[373,373],"valid"],[[374,374],"mapped",[375]],[[375,375],"valid"],[[376,376],"mapped",[255]],[[377,377],"mapped",[378]],[[378,378],"valid"],[[379,379],"mapped",[380]],[[380,380],"valid"],[[381,381],"mapped",[382]],[[382,382],"valid"],[[383,383],"mapped",[115]],[[384,384],"valid"],[[385,385],"mapped",[595]],[[386,386],"mapped",[387]],[[387,387],"valid"],[[388,388],"mapped",[389]],[[389,389],"valid"],[[390,390],"mapped",[596]],[[391,391],"mapped",[392]],[[392,392],"valid"],[[393,393],"mapped",[598]],[[394,394],"mapped",[599]],[[395,395],"mapped",[396]],[[396,397],"valid"],[[398,398],"mapped",[477]],[[399,399],"mapped",[601]],[[400,400],"mapped",[603]],[[401,401],"mapped",[402]],[[402,402],"valid"],[[403,403],"mapped",[608]],[[404,404],"mapped",[611]],[[405,405],"valid"],[[406,406],"mapped",[617]],[[407,407],"mapped",[616]],[[408,408],"mapped",[409]],[[409,411],"valid"],[[412,412],"mapped",[623]],[[413,413],"mapped",[626]],[[414,414],"valid"],[[415,415],"mapped",[629]],[[416,416],"mapped",[417]],[[417,417],"valid"],[[418,418],"mapped",[419]],[[419,419],"valid"],[[420,420],"mapped",[421]],[[421,421],"valid"],[[422,422],"mapped",[640]],[[423,423],"mapped",[424]],[[424,424],"valid"],[[425,425],"mapped",[643]],[[426,427],"valid"],[[428,428],"mapped",[429]],[[429,429],"valid"],[[430,430],"mapped",[648]],[[431,431],"mapped",[432]],[[432,432],"valid"],[[433,433],"mapped",[650]],[[434,434],"mapped",[651]],[[435,435],"mapped",[436]],[[436,436],"valid"],[[437,437],"mapped",[438]],[[438,438],"valid"],[[439,439],"mapped",[658]],[[440,440],"mapped",[441]],[[441,443],"valid"],[[444,444],"mapped",[445]],[[445,451],"valid"],[[452,454],"mapped",[100,382]],[[455,457],"mapped",[108,106]],[[458,460],"mapped",[110,106]],[[461,461],"mapped",[462]],[[462,462],"valid"],[[463,463],"mapped",[464]],[[464,464],"valid"],[[465,465],"mapped",[466]],[[466,466],"valid"],[[467,467],"mapped",[468]],[[468,468],"valid"],[[469,469],"mapped",[470]],[[470,470],"valid"],[[471,471],"mapped",[472]],[[472,472],"valid"],[[473,473],"mapped",[474]],[[474,474],"valid"],[[475,475],"mapped",[476]],[[476,477],"valid"],[[478,478],"mapped",[479]],[[479,479],"valid"],[[480,480],"mapped",[481]],[[481,481],"valid"],[[482,482],"mapped",[483]],[[483,483],"valid"],[[484,484],"mapped",[485]],[[485,485],"valid"],[[486,486],"mapped",[487]],[[487,487],"valid"],[[488,488],"mapped",[489]],[[489,489],"valid"],[[490,490],"mapped",[491]],[[491,491],"valid"],[[492,492],"mapped",[493]],[[493,493],"valid"],[[494,494],"mapped",[495]],[[495,496],"valid"],[[497,499],"mapped",[100,122]],[[500,500],"mapped",[501]],[[501,501],"valid"],[[502,502],"mapped",[405]],[[503,503],"mapped",[447]],[[504,504],"mapped",[505]],[[505,505],"valid"],[[506,506],"mapped",[507]],[[507,507],"valid"],[[508,508],"mapped",[509]],[[509,509],"valid"],[[510,510],"mapped",[511]],[[511,511],"valid"],[[512,512],"mapped",[513]],[[513,513],"valid"],[[514,514],"mapped",[515]],[[515,515],"valid"],[[516,516],"mapped",[517]],[[517,517],"valid"],[[518,518],"mapped",[519]],[[519,519],"valid"],[[520,520],"mapped",[521]],[[521,521],"valid"],[[522,522],"mapped",[523]],[[523,523],"valid"],[[524,524],"mapped",[525]],[[525,525],"valid"],[[526,526],"mapped",[527]],[[527,527],"valid"],[[528,528],"mapped",[529]],[[529,529],"valid"],[[530,530],"mapped",[531]],[[531,531],"valid"],[[532,532],"mapped",[533]],[[533,533],"valid"],[[534,534],"mapped",[535]],[[535,535],"valid"],[[536,536],"mapped",[537]],[[537,537],"valid"],[[538,538],"mapped",[539]],[[539,539],"valid"],[[540,540],"mapped",[541]],[[541,541],"valid"],[[542,542],"mapped",[543]],[[543,543],"valid"],[[544,544],"mapped",[414]],[[545,545],"valid"],[[546,546],"mapped",[547]],[[547,547],"valid"],[[548,548],"mapped",[549]],[[549,549],"valid"],[[550,550],"mapped",[551]],[[551,551],"valid"],[[552,552],"mapped",[553]],[[553,553],"valid"],[[554,554],"mapped",[555]],[[555,555],"valid"],[[556,556],"mapped",[557]],[[557,557],"valid"],[[558,558],"mapped",[559]],[[559,559],"valid"],[[560,560],"mapped",[561]],[[561,561],"valid"],[[562,562],"mapped",[563]],[[563,563],"valid"],[[564,566],"valid"],[[567,569],"valid"],[[570,570],"mapped",[11365]],[[571,571],"mapped",[572]],[[572,572],"valid"],[[573,573],"mapped",[410]],[[574,574],"mapped",[11366]],[[575,576],"valid"],[[577,577],"mapped",[578]],[[578,578],"valid"],[[579,579],"mapped",[384]],[[580,580],"mapped",[649]],[[581,581],"mapped",[652]],[[582,582],"mapped",[583]],[[583,583],"valid"],[[584,584],"mapped",[585]],[[585,585],"valid"],[[586,586],"mapped",[587]],[[587,587],"valid"],[[588,588],"mapped",[589]],[[589,589],"valid"],[[590,590],"mapped",[591]],[[591,591],"valid"],[[592,680],"valid"],[[681,685],"valid"],[[686,687],"valid"],[[688,688],"mapped",[104]],[[689,689],"mapped",[614]],[[690,690],"mapped",[106]],[[691,691],"mapped",[114]],[[692,692],"mapped",[633]],[[693,693],"mapped",[635]],[[694,694],"mapped",[641]],[[695,695],"mapped",[119]],[[696,696],"mapped",[121]],[[697,705],"valid"],[[706,709],"valid",[],"NV8"],[[710,721],"valid"],[[722,727],"valid",[],"NV8"],[[728,728],"disallowed_STD3_mapped",[32,774]],[[729,729],"disallowed_STD3_mapped",[32,775]],[[730,730],"disallowed_STD3_mapped",[32,778]],[[731,731],"disallowed_STD3_mapped",[32,808]],[[732,732],"disallowed_STD3_mapped",[32,771]],[[733,733],"disallowed_STD3_mapped",[32,779]],[[734,734],"valid",[],"NV8"],[[735,735],"valid",[],"NV8"],[[736,736],"mapped",[611]],[[737,737],"mapped",[108]],[[738,738],"mapped",[115]],[[739,739],"mapped",[120]],[[740,740],"mapped",[661]],[[741,745],"valid",[],"NV8"],[[746,747],"valid",[],"NV8"],[[748,748],"valid"],[[749,749],"valid",[],"NV8"],[[750,750],"valid"],[[751,767],"valid",[],"NV8"],[[768,831],"valid"],[[832,832],"mapped",[768]],[[833,833],"mapped",[769]],[[834,834],"valid"],[[835,835],"mapped",[787]],[[836,836],"mapped",[776,769]],[[837,837],"mapped",[953]],[[838,846],"valid"],[[847,847],"ignored"],[[848,855],"valid"],[[856,860],"valid"],[[861,863],"valid"],[[864,865],"valid"],[[866,866],"valid"],[[867,879],"valid"],[[880,880],"mapped",[881]],[[881,881],"valid"],[[882,882],"mapped",[883]],[[883,883],"valid"],[[884,884],"mapped",[697]],[[885,885],"valid"],[[886,886],"mapped",[887]],[[887,887],"valid"],[[888,889],"disallowed"],[[890,890],"disallowed_STD3_mapped",[32,953]],[[891,893],"valid"],[[894,894],"disallowed_STD3_mapped",[59]],[[895,895],"mapped",[1011]],[[896,899],"disallowed"],[[900,900],"disallowed_STD3_mapped",[32,769]],[[901,901],"disallowed_STD3_mapped",[32,776,769]],[[902,902],"mapped",[940]],[[903,903],"mapped",[183]],[[904,904],"mapped",[941]],[[905,905],"mapped",[942]],[[906,906],"mapped",[943]],[[907,907],"disallowed"],[[908,908],"mapped",[972]],[[909,909],"disallowed"],[[910,910],"mapped",[973]],[[911,911],"mapped",[974]],[[912,912],"valid"],[[913,913],"mapped",[945]],[[914,914],"mapped",[946]],[[915,915],"mapped",[947]],[[916,916],"mapped",[948]],[[917,917],"mapped",[949]],[[918,918],"mapped",[950]],[[919,919],"mapped",[951]],[[920,920],"mapped",[952]],[[921,921],"mapped",[953]],[[922,922],"mapped",[954]],[[923,923],"mapped",[955]],[[924,924],"mapped",[956]],[[925,925],"mapped",[957]],[[926,926],"mapped",[958]],[[927,927],"mapped",[959]],[[928,928],"mapped",[960]],[[929,929],"mapped",[961]],[[930,930],"disallowed"],[[931,931],"mapped",[963]],[[932,932],"mapped",[964]],[[933,933],"mapped",[965]],[[934,934],"mapped",[966]],[[935,935],"mapped",[967]],[[936,936],"mapped",[968]],[[937,937],"mapped",[969]],[[938,938],"mapped",[970]],[[939,939],"mapped",[971]],[[940,961],"valid"],[[962,962],"deviation",[963]],[[963,974],"valid"],[[975,975],"mapped",[983]],[[976,976],"mapped",[946]],[[977,977],"mapped",[952]],[[978,978],"mapped",[965]],[[979,979],"mapped",[973]],[[980,980],"mapped",[971]],[[981,981],"mapped",[966]],[[982,982],"mapped",[960]],[[983,983],"valid"],[[984,984],"mapped",[985]],[[985,985],"valid"],[[986,986],"mapped",[987]],[[987,987],"valid"],[[988,988],"mapped",[989]],[[989,989],"valid"],[[990,990],"mapped",[991]],[[991,991],"valid"],[[992,992],"mapped",[993]],[[993,993],"valid"],[[994,994],"mapped",[995]],[[995,995],"valid"],[[996,996],"mapped",[997]],[[997,997],"valid"],[[998,998],"mapped",[999]],[[999,999],"valid"],[[1000,1000],"mapped",[1001]],[[1001,1001],"valid"],[[1002,1002],"mapped",[1003]],[[1003,1003],"valid"],[[1004,1004],"mapped",[1005]],[[1005,1005],"valid"],[[1006,1006],"mapped",[1007]],[[1007,1007],"valid"],[[1008,1008],"mapped",[954]],[[1009,1009],"mapped",[961]],[[1010,1010],"mapped",[963]],[[1011,1011],"valid"],[[1012,1012],"mapped",[952]],[[1013,1013],"mapped",[949]],[[1014,1014],"valid",[],"NV8"],[[1015,1015],"mapped",[1016]],[[1016,1016],"valid"],[[1017,1017],"mapped",[963]],[[1018,1018],"mapped",[1019]],[[1019,1019],"valid"],[[1020,1020],"valid"],[[1021,1021],"mapped",[891]],[[1022,1022],"mapped",[892]],[[1023,1023],"mapped",[893]],[[1024,1024],"mapped",[1104]],[[1025,1025],"mapped",[1105]],[[1026,1026],"mapped",[1106]],[[1027,1027],"mapped",[1107]],[[1028,1028],"mapped",[1108]],[[1029,1029],"mapped",[1109]],[[1030,1030],"mapped",[1110]],[[1031,1031],"mapped",[1111]],[[1032,1032],"mapped",[1112]],[[1033,1033],"mapped",[1113]],[[1034,1034],"mapped",[1114]],[[1035,1035],"mapped",[1115]],[[1036,1036],"mapped",[1116]],[[1037,1037],"mapped",[1117]],[[1038,1038],"mapped",[1118]],[[1039,1039],"mapped",[1119]],[[1040,1040],"mapped",[1072]],[[1041,1041],"mapped",[1073]],[[1042,1042],"mapped",[1074]],[[1043,1043],"mapped",[1075]],[[1044,1044],"mapped",[1076]],[[1045,1045],"mapped",[1077]],[[1046,1046],"mapped",[1078]],[[1047,1047],"mapped",[1079]],[[1048,1048],"mapped",[1080]],[[1049,1049],"mapped",[1081]],[[1050,1050],"mapped",[1082]],[[1051,1051],"mapped",[1083]],[[1052,1052],"mapped",[1084]],[[1053,1053],"mapped",[1085]],[[1054,1054],"mapped",[1086]],[[1055,1055],"mapped",[1087]],[[1056,1056],"mapped",[1088]],[[1057,1057],"mapped",[1089]],[[1058,1058],"mapped",[1090]],[[1059,1059],"mapped",[1091]],[[1060,1060],"mapped",[1092]],[[1061,1061],"mapped",[1093]],[[1062,1062],"mapped",[1094]],[[1063,1063],"mapped",[1095]],[[1064,1064],"mapped",[1096]],[[1065,1065],"mapped",[1097]],[[1066,1066],"mapped",[1098]],[[1067,1067],"mapped",[1099]],[[1068,1068],"mapped",[1100]],[[1069,1069],"mapped",[1101]],[[1070,1070],"mapped",[1102]],[[1071,1071],"mapped",[1103]],[[1072,1103],"valid"],[[1104,1104],"valid"],[[1105,1116],"valid"],[[1117,1117],"valid"],[[1118,1119],"valid"],[[1120,1120],"mapped",[1121]],[[1121,1121],"valid"],[[1122,1122],"mapped",[1123]],[[1123,1123],"valid"],[[1124,1124],"mapped",[1125]],[[1125,1125],"valid"],[[1126,1126],"mapped",[1127]],[[1127,1127],"valid"],[[1128,1128],"mapped",[1129]],[[1129,1129],"valid"],[[1130,1130],"mapped",[1131]],[[1131,1131],"valid"],[[1132,1132],"mapped",[1133]],[[1133,1133],"valid"],[[1134,1134],"mapped",[1135]],[[1135,1135],"valid"],[[1136,1136],"mapped",[1137]],[[1137,1137],"valid"],[[1138,1138],"mapped",[1139]],[[1139,1139],"valid"],[[1140,1140],"mapped",[1141]],[[1141,1141],"valid"],[[1142,1142],"mapped",[1143]],[[1143,1143],"valid"],[[1144,1144],"mapped",[1145]],[[1145,1145],"valid"],[[1146,1146],"mapped",[1147]],[[1147,1147],"valid"],[[1148,1148],"mapped",[1149]],[[1149,1149],"valid"],[[1150,1150],"mapped",[1151]],[[1151,1151],"valid"],[[1152,1152],"mapped",[1153]],[[1153,1153],"valid"],[[1154,1154],"valid",[],"NV8"],[[1155,1158],"valid"],[[1159,1159],"valid"],[[1160,1161],"valid",[],"NV8"],[[1162,1162],"mapped",[1163]],[[1163,1163],"valid"],[[1164,1164],"mapped",[1165]],[[1165,1165],"valid"],[[1166,1166],"mapped",[1167]],[[1167,1167],"valid"],[[1168,1168],"mapped",[1169]],[[1169,1169],"valid"],[[1170,1170],"mapped",[1171]],[[1171,1171],"valid"],[[1172,1172],"mapped",[1173]],[[1173,1173],"valid"],[[1174,1174],"mapped",[1175]],[[1175,1175],"valid"],[[1176,1176],"mapped",[1177]],[[1177,1177],"valid"],[[1178,1178],"mapped",[1179]],[[1179,1179],"valid"],[[1180,1180],"mapped",[1181]],[[1181,1181],"valid"],[[1182,1182],"mapped",[1183]],[[1183,1183],"valid"],[[1184,1184],"mapped",[1185]],[[1185,1185],"valid"],[[1186,1186],"mapped",[1187]],[[1187,1187],"valid"],[[1188,1188],"mapped",[1189]],[[1189,1189],"valid"],[[1190,1190],"mapped",[1191]],[[1191,1191],"valid"],[[1192,1192],"mapped",[1193]],[[1193,1193],"valid"],[[1194,1194],"mapped",[1195]],[[1195,1195],"valid"],[[1196,1196],"mapped",[1197]],[[1197,1197],"valid"],[[1198,1198],"mapped",[1199]],[[1199,1199],"valid"],[[1200,1200],"mapped",[1201]],[[1201,1201],"valid"],[[1202,1202],"mapped",[1203]],[[1203,1203],"valid"],[[1204,1204],"mapped",[1205]],[[1205,1205],"valid"],[[1206,1206],"mapped",[1207]],[[1207,1207],"valid"],[[1208,1208],"mapped",[1209]],[[1209,1209],"valid"],[[1210,1210],"mapped",[1211]],[[1211,1211],"valid"],[[1212,1212],"mapped",[1213]],[[1213,1213],"valid"],[[1214,1214],"mapped",[1215]],[[1215,1215],"valid"],[[1216,1216],"disallowed"],[[1217,1217],"mapped",[1218]],[[1218,1218],"valid"],[[1219,1219],"mapped",[1220]],[[1220,1220],"valid"],[[1221,1221],"mapped",[1222]],[[1222,1222],"valid"],[[1223,1223],"mapped",[1224]],[[1224,1224],"valid"],[[1225,1225],"mapped",[1226]],[[1226,1226],"valid"],[[1227,1227],"mapped",[1228]],[[1228,1228],"valid"],[[1229,1229],"mapped",[1230]],[[1230,1230],"valid"],[[1231,1231],"valid"],[[1232,1232],"mapped",[1233]],[[1233,1233],"valid"],[[1234,1234],"mapped",[1235]],[[1235,1235],"valid"],[[1236,1236],"mapped",[1237]],[[1237,1237],"valid"],[[1238,1238],"mapped",[1239]],[[1239,1239],"valid"],[[1240,1240],"mapped",[1241]],[[1241,1241],"valid"],[[1242,1242],"mapped",[1243]],[[1243,1243],"valid"],[[1244,1244],"mapped",[1245]],[[1245,1245],"valid"],[[1246,1246],"mapped",[1247]],[[1247,1247],"valid"],[[1248,1248],"mapped",[1249]],[[1249,1249],"valid"],[[1250,1250],"mapped",[1251]],[[1251,1251],"valid"],[[1252,1252],"mapped",[1253]],[[1253,1253],"valid"],[[1254,1254],"mapped",[1255]],[[1255,1255],"valid"],[[1256,1256],"mapped",[1257]],[[1257,1257],"valid"],[[1258,1258],"mapped",[1259]],[[1259,1259],"valid"],[[1260,1260],"mapped",[1261]],[[1261,1261],"valid"],[[1262,1262],"mapped",[1263]],[[1263,1263],"valid"],[[1264,1264],"mapped",[1265]],[[1265,1265],"valid"],[[1266,1266],"mapped",[1267]],[[1267,1267],"valid"],[[1268,1268],"mapped",[1269]],[[1269,1269],"valid"],[[1270,1270],"mapped",[1271]],[[1271,1271],"valid"],[[1272,1272],"mapped",[1273]],[[1273,1273],"valid"],[[1274,1274],"mapped",[1275]],[[1275,1275],"valid"],[[1276,1276],"mapped",[1277]],[[1277,1277],"valid"],[[1278,1278],"mapped",[1279]],[[1279,1279],"valid"],[[1280,1280],"mapped",[1281]],[[1281,1281],"valid"],[[1282,1282],"mapped",[1283]],[[1283,1283],"valid"],[[1284,1284],"mapped",[1285]],[[1285,1285],"valid"],[[1286,1286],"mapped",[1287]],[[1287,1287],"valid"],[[1288,1288],"mapped",[1289]],[[1289,1289],"valid"],[[1290,1290],"mapped",[1291]],[[1291,1291],"valid"],[[1292,1292],"mapped",[1293]],[[1293,1293],"valid"],[[1294,1294],"mapped",[1295]],[[1295,1295],"valid"],[[1296,1296],"mapped",[1297]],[[1297,1297],"valid"],[[1298,1298],"mapped",[1299]],[[1299,1299],"valid"],[[1300,1300],"mapped",[1301]],[[1301,1301],"valid"],[[1302,1302],"mapped",[1303]],[[1303,1303],"valid"],[[1304,1304],"mapped",[1305]],[[1305,1305],"valid"],[[1306,1306],"mapped",[1307]],[[1307,1307],"valid"],[[1308,1308],"mapped",[1309]],[[1309,1309],"valid"],[[1310,1310],"mapped",[1311]],[[1311,1311],"valid"],[[1312,1312],"mapped",[1313]],[[1313,1313],"valid"],[[1314,1314],"mapped",[1315]],[[1315,1315],"valid"],[[1316,1316],"mapped",[1317]],[[1317,1317],"valid"],[[1318,1318],"mapped",[1319]],[[1319,1319],"valid"],[[1320,1320],"mapped",[1321]],[[1321,1321],"valid"],[[1322,1322],"mapped",[1323]],[[1323,1323],"valid"],[[1324,1324],"mapped",[1325]],[[1325,1325],"valid"],[[1326,1326],"mapped",[1327]],[[1327,1327],"valid"],[[1328,1328],"disallowed"],[[1329,1329],"mapped",[1377]],[[1330,1330],"mapped",[1378]],[[1331,1331],"mapped",[1379]],[[1332,1332],"mapped",[1380]],[[1333,1333],"mapped",[1381]],[[1334,1334],"mapped",[1382]],[[1335,1335],"mapped",[1383]],[[1336,1336],"mapped",[1384]],[[1337,1337],"mapped",[1385]],[[1338,1338],"mapped",[1386]],[[1339,1339],"mapped",[1387]],[[1340,1340],"mapped",[1388]],[[1341,1341],"mapped",[1389]],[[1342,1342],"mapped",[1390]],[[1343,1343],"mapped",[1391]],[[1344,1344],"mapped",[1392]],[[1345,1345],"mapped",[1393]],[[1346,1346],"mapped",[1394]],[[1347,1347],"mapped",[1395]],[[1348,1348],"mapped",[1396]],[[1349,1349],"mapped",[1397]],[[1350,1350],"mapped",[1398]],[[1351,1351],"mapped",[1399]],[[1352,1352],"mapped",[1400]],[[1353,1353],"mapped",[1401]],[[1354,1354],"mapped",[1402]],[[1355,1355],"mapped",[1403]],[[1356,1356],"mapped",[1404]],[[1357,1357],"mapped",[1405]],[[1358,1358],"mapped",[1406]],[[1359,1359],"mapped",[1407]],[[1360,1360],"mapped",[1408]],[[1361,1361],"mapped",[1409]],[[1362,1362],"mapped",[1410]],[[1363,1363],"mapped",[1411]],[[1364,1364],"mapped",[1412]],[[1365,1365],"mapped",[1413]],[[1366,1366],"mapped",[1414]],[[1367,1368],"disallowed"],[[1369,1369],"valid"],[[1370,1375],"valid",[],"NV8"],[[1376,1376],"disallowed"],[[1377,1414],"valid"],[[1415,1415],"mapped",[1381,1410]],[[1416,1416],"disallowed"],[[1417,1417],"valid",[],"NV8"],[[1418,1418],"valid",[],"NV8"],[[1419,1420],"disallowed"],[[1421,1422],"valid",[],"NV8"],[[1423,1423],"valid",[],"NV8"],[[1424,1424],"disallowed"],[[1425,1441],"valid"],[[1442,1442],"valid"],[[1443,1455],"valid"],[[1456,1465],"valid"],[[1466,1466],"valid"],[[1467,1469],"valid"],[[1470,1470],"valid",[],"NV8"],[[1471,1471],"valid"],[[1472,1472],"valid",[],"NV8"],[[1473,1474],"valid"],[[1475,1475],"valid",[],"NV8"],[[1476,1476],"valid"],[[1477,1477],"valid"],[[1478,1478],"valid",[],"NV8"],[[1479,1479],"valid"],[[1480,1487],"disallowed"],[[1488,1514],"valid"],[[1515,1519],"disallowed"],[[1520,1524],"valid"],[[1525,1535],"disallowed"],[[1536,1539],"disallowed"],[[1540,1540],"disallowed"],[[1541,1541],"disallowed"],[[1542,1546],"valid",[],"NV8"],[[1547,1547],"valid",[],"NV8"],[[1548,1548],"valid",[],"NV8"],[[1549,1551],"valid",[],"NV8"],[[1552,1557],"valid"],[[1558,1562],"valid"],[[1563,1563],"valid",[],"NV8"],[[1564,1564],"disallowed"],[[1565,1565],"disallowed"],[[1566,1566],"valid",[],"NV8"],[[1567,1567],"valid",[],"NV8"],[[1568,1568],"valid"],[[1569,1594],"valid"],[[1595,1599],"valid"],[[1600,1600],"valid",[],"NV8"],[[1601,1618],"valid"],[[1619,1621],"valid"],[[1622,1624],"valid"],[[1625,1630],"valid"],[[1631,1631],"valid"],[[1632,1641],"valid"],[[1642,1645],"valid",[],"NV8"],[[1646,1647],"valid"],[[1648,1652],"valid"],[[1653,1653],"mapped",[1575,1652]],[[1654,1654],"mapped",[1608,1652]],[[1655,1655],"mapped",[1735,1652]],[[1656,1656],"mapped",[1610,1652]],[[1657,1719],"valid"],[[1720,1721],"valid"],[[1722,1726],"valid"],[[1727,1727],"valid"],[[1728,1742],"valid"],[[1743,1743],"valid"],[[1744,1747],"valid"],[[1748,1748],"valid",[],"NV8"],[[1749,1756],"valid"],[[1757,1757],"disallowed"],[[1758,1758],"valid",[],"NV8"],[[1759,1768],"valid"],[[1769,1769],"valid",[],"NV8"],[[1770,1773],"valid"],[[1774,1775],"valid"],[[1776,1785],"valid"],[[1786,1790],"valid"],[[1791,1791],"valid"],[[1792,1805],"valid",[],"NV8"],[[1806,1806],"disallowed"],[[1807,1807],"disallowed"],[[1808,1836],"valid"],[[1837,1839],"valid"],[[1840,1866],"valid"],[[1867,1868],"disallowed"],[[1869,1871],"valid"],[[1872,1901],"valid"],[[1902,1919],"valid"],[[1920,1968],"valid"],[[1969,1969],"valid"],[[1970,1983],"disallowed"],[[1984,2037],"valid"],[[2038,2042],"valid",[],"NV8"],[[2043,2047],"disallowed"],[[2048,2093],"valid"],[[2094,2095],"disallowed"],[[2096,2110],"valid",[],"NV8"],[[2111,2111],"disallowed"],[[2112,2139],"valid"],[[2140,2141],"disallowed"],[[2142,2142],"valid",[],"NV8"],[[2143,2207],"disallowed"],[[2208,2208],"valid"],[[2209,2209],"valid"],[[2210,2220],"valid"],[[2221,2226],"valid"],[[2227,2228],"valid"],[[2229,2274],"disallowed"],[[2275,2275],"valid"],[[2276,2302],"valid"],[[2303,2303],"valid"],[[2304,2304],"valid"],[[2305,2307],"valid"],[[2308,2308],"valid"],[[2309,2361],"valid"],[[2362,2363],"valid"],[[2364,2381],"valid"],[[2382,2382],"valid"],[[2383,2383],"valid"],[[2384,2388],"valid"],[[2389,2389],"valid"],[[2390,2391],"valid"],[[2392,2392],"mapped",[2325,2364]],[[2393,2393],"mapped",[2326,2364]],[[2394,2394],"mapped",[2327,2364]],[[2395,2395],"mapped",[2332,2364]],[[2396,2396],"mapped",[2337,2364]],[[2397,2397],"mapped",[2338,2364]],[[2398,2398],"mapped",[2347,2364]],[[2399,2399],"mapped",[2351,2364]],[[2400,2403],"valid"],[[2404,2405],"valid",[],"NV8"],[[2406,2415],"valid"],[[2416,2416],"valid",[],"NV8"],[[2417,2418],"valid"],[[2419,2423],"valid"],[[2424,2424],"valid"],[[2425,2426],"valid"],[[2427,2428],"valid"],[[2429,2429],"valid"],[[2430,2431],"valid"],[[2432,2432],"valid"],[[2433,2435],"valid"],[[2436,2436],"disallowed"],[[2437,2444],"valid"],[[2445,2446],"disallowed"],[[2447,2448],"valid"],[[2449,2450],"disallowed"],[[2451,2472],"valid"],[[2473,2473],"disallowed"],[[2474,2480],"valid"],[[2481,2481],"disallowed"],[[2482,2482],"valid"],[[2483,2485],"disallowed"],[[2486,2489],"valid"],[[2490,2491],"disallowed"],[[2492,2492],"valid"],[[2493,2493],"valid"],[[2494,2500],"valid"],[[2501,2502],"disallowed"],[[2503,2504],"valid"],[[2505,2506],"disallowed"],[[2507,2509],"valid"],[[2510,2510],"valid"],[[2511,2518],"disallowed"],[[2519,2519],"valid"],[[2520,2523],"disallowed"],[[2524,2524],"mapped",[2465,2492]],[[2525,2525],"mapped",[2466,2492]],[[2526,2526],"disallowed"],[[2527,2527],"mapped",[2479,2492]],[[2528,2531],"valid"],[[2532,2533],"disallowed"],[[2534,2545],"valid"],[[2546,2554],"valid",[],"NV8"],[[2555,2555],"valid",[],"NV8"],[[2556,2560],"disallowed"],[[2561,2561],"valid"],[[2562,2562],"valid"],[[2563,2563],"valid"],[[2564,2564],"disallowed"],[[2565,2570],"valid"],[[2571,2574],"disallowed"],[[2575,2576],"valid"],[[2577,2578],"disallowed"],[[2579,2600],"valid"],[[2601,2601],"disallowed"],[[2602,2608],"valid"],[[2609,2609],"disallowed"],[[2610,2610],"valid"],[[2611,2611],"mapped",[2610,2620]],[[2612,2612],"disallowed"],[[2613,2613],"valid"],[[2614,2614],"mapped",[2616,2620]],[[2615,2615],"disallowed"],[[2616,2617],"valid"],[[2618,2619],"disallowed"],[[2620,2620],"valid"],[[2621,2621],"disallowed"],[[2622,2626],"valid"],[[2627,2630],"disallowed"],[[2631,2632],"valid"],[[2633,2634],"disallowed"],[[2635,2637],"valid"],[[2638,2640],"disallowed"],[[2641,2641],"valid"],[[2642,2648],"disallowed"],[[2649,2649],"mapped",[2582,2620]],[[2650,2650],"mapped",[2583,2620]],[[2651,2651],"mapped",[2588,2620]],[[2652,2652],"valid"],[[2653,2653],"disallowed"],[[2654,2654],"mapped",[2603,2620]],[[2655,2661],"disallowed"],[[2662,2676],"valid"],[[2677,2677],"valid"],[[2678,2688],"disallowed"],[[2689,2691],"valid"],[[2692,2692],"disallowed"],[[2693,2699],"valid"],[[2700,2700],"valid"],[[2701,2701],"valid"],[[2702,2702],"disallowed"],[[2703,2705],"valid"],[[2706,2706],"disallowed"],[[2707,2728],"valid"],[[2729,2729],"disallowed"],[[2730,2736],"valid"],[[2737,2737],"disallowed"],[[2738,2739],"valid"],[[2740,2740],"disallowed"],[[2741,2745],"valid"],[[2746,2747],"disallowed"],[[2748,2757],"valid"],[[2758,2758],"disallowed"],[[2759,2761],"valid"],[[2762,2762],"disallowed"],[[2763,2765],"valid"],[[2766,2767],"disallowed"],[[2768,2768],"valid"],[[2769,2783],"disallowed"],[[2784,2784],"valid"],[[2785,2787],"valid"],[[2788,2789],"disallowed"],[[2790,2799],"valid"],[[2800,2800],"valid",[],"NV8"],[[2801,2801],"valid",[],"NV8"],[[2802,2808],"disallowed"],[[2809,2809],"valid"],[[2810,2816],"disallowed"],[[2817,2819],"valid"],[[2820,2820],"disallowed"],[[2821,2828],"valid"],[[2829,2830],"disallowed"],[[2831,2832],"valid"],[[2833,2834],"disallowed"],[[2835,2856],"valid"],[[2857,2857],"disallowed"],[[2858,2864],"valid"],[[2865,2865],"disallowed"],[[2866,2867],"valid"],[[2868,2868],"disallowed"],[[2869,2869],"valid"],[[2870,2873],"valid"],[[2874,2875],"disallowed"],[[2876,2883],"valid"],[[2884,2884],"valid"],[[2885,2886],"disallowed"],[[2887,2888],"valid"],[[2889,2890],"disallowed"],[[2891,2893],"valid"],[[2894,2901],"disallowed"],[[2902,2903],"valid"],[[2904,2907],"disallowed"],[[2908,2908],"mapped",[2849,2876]],[[2909,2909],"mapped",[2850,2876]],[[2910,2910],"disallowed"],[[2911,2913],"valid"],[[2914,2915],"valid"],[[2916,2917],"disallowed"],[[2918,2927],"valid"],[[2928,2928],"valid",[],"NV8"],[[2929,2929],"valid"],[[2930,2935],"valid",[],"NV8"],[[2936,2945],"disallowed"],[[2946,2947],"valid"],[[2948,2948],"disallowed"],[[2949,2954],"valid"],[[2955,2957],"disallowed"],[[2958,2960],"valid"],[[2961,2961],"disallowed"],[[2962,2965],"valid"],[[2966,2968],"disallowed"],[[2969,2970],"valid"],[[2971,2971],"disallowed"],[[2972,2972],"valid"],[[2973,2973],"disallowed"],[[2974,2975],"valid"],[[2976,2978],"disallowed"],[[2979,2980],"valid"],[[2981,2983],"disallowed"],[[2984,2986],"valid"],[[2987,2989],"disallowed"],[[2990,2997],"valid"],[[2998,2998],"valid"],[[2999,3001],"valid"],[[3002,3005],"disallowed"],[[3006,3010],"valid"],[[3011,3013],"disallowed"],[[3014,3016],"valid"],[[3017,3017],"disallowed"],[[3018,3021],"valid"],[[3022,3023],"disallowed"],[[3024,3024],"valid"],[[3025,3030],"disallowed"],[[3031,3031],"valid"],[[3032,3045],"disallowed"],[[3046,3046],"valid"],[[3047,3055],"valid"],[[3056,3058],"valid",[],"NV8"],[[3059,3066],"valid",[],"NV8"],[[3067,3071],"disallowed"],[[3072,3072],"valid"],[[3073,3075],"valid"],[[3076,3076],"disallowed"],[[3077,3084],"valid"],[[3085,3085],"disallowed"],[[3086,3088],"valid"],[[3089,3089],"disallowed"],[[3090,3112],"valid"],[[3113,3113],"disallowed"],[[3114,3123],"valid"],[[3124,3124],"valid"],[[3125,3129],"valid"],[[3130,3132],"disallowed"],[[3133,3133],"valid"],[[3134,3140],"valid"],[[3141,3141],"disallowed"],[[3142,3144],"valid"],[[3145,3145],"disallowed"],[[3146,3149],"valid"],[[3150,3156],"disallowed"],[[3157,3158],"valid"],[[3159,3159],"disallowed"],[[3160,3161],"valid"],[[3162,3162],"valid"],[[3163,3167],"disallowed"],[[3168,3169],"valid"],[[3170,3171],"valid"],[[3172,3173],"disallowed"],[[3174,3183],"valid"],[[3184,3191],"disallowed"],[[3192,3199],"valid",[],"NV8"],[[3200,3200],"disallowed"],[[3201,3201],"valid"],[[3202,3203],"valid"],[[3204,3204],"disallowed"],[[3205,3212],"valid"],[[3213,3213],"disallowed"],[[3214,3216],"valid"],[[3217,3217],"disallowed"],[[3218,3240],"valid"],[[3241,3241],"disallowed"],[[3242,3251],"valid"],[[3252,3252],"disallowed"],[[3253,3257],"valid"],[[3258,3259],"disallowed"],[[3260,3261],"valid"],[[3262,3268],"valid"],[[3269,3269],"disallowed"],[[3270,3272],"valid"],[[3273,3273],"disallowed"],[[3274,3277],"valid"],[[3278,3284],"disallowed"],[[3285,3286],"valid"],[[3287,3293],"disallowed"],[[3294,3294],"valid"],[[3295,3295],"disallowed"],[[3296,3297],"valid"],[[3298,3299],"valid"],[[3300,3301],"disallowed"],[[3302,3311],"valid"],[[3312,3312],"disallowed"],[[3313,3314],"valid"],[[3315,3328],"disallowed"],[[3329,3329],"valid"],[[3330,3331],"valid"],[[3332,3332],"disallowed"],[[3333,3340],"valid"],[[3341,3341],"disallowed"],[[3342,3344],"valid"],[[3345,3345],"disallowed"],[[3346,3368],"valid"],[[3369,3369],"valid"],[[3370,3385],"valid"],[[3386,3386],"valid"],[[3387,3388],"disallowed"],[[3389,3389],"valid"],[[3390,3395],"valid"],[[3396,3396],"valid"],[[3397,3397],"disallowed"],[[3398,3400],"valid"],[[3401,3401],"disallowed"],[[3402,3405],"valid"],[[3406,3406],"valid"],[[3407,3414],"disallowed"],[[3415,3415],"valid"],[[3416,3422],"disallowed"],[[3423,3423],"valid"],[[3424,3425],"valid"],[[3426,3427],"valid"],[[3428,3429],"disallowed"],[[3430,3439],"valid"],[[3440,3445],"valid",[],"NV8"],[[3446,3448],"disallowed"],[[3449,3449],"valid",[],"NV8"],[[3450,3455],"valid"],[[3456,3457],"disallowed"],[[3458,3459],"valid"],[[3460,3460],"disallowed"],[[3461,3478],"valid"],[[3479,3481],"disallowed"],[[3482,3505],"valid"],[[3506,3506],"disallowed"],[[3507,3515],"valid"],[[3516,3516],"disallowed"],[[3517,3517],"valid"],[[3518,3519],"disallowed"],[[3520,3526],"valid"],[[3527,3529],"disallowed"],[[3530,3530],"valid"],[[3531,3534],"disallowed"],[[3535,3540],"valid"],[[3541,3541],"disallowed"],[[3542,3542],"valid"],[[3543,3543],"disallowed"],[[3544,3551],"valid"],[[3552,3557],"disallowed"],[[3558,3567],"valid"],[[3568,3569],"disallowed"],[[3570,3571],"valid"],[[3572,3572],"valid",[],"NV8"],[[3573,3584],"disallowed"],[[3585,3634],"valid"],[[3635,3635],"mapped",[3661,3634]],[[3636,3642],"valid"],[[3643,3646],"disallowed"],[[3647,3647],"valid",[],"NV8"],[[3648,3662],"valid"],[[3663,3663],"valid",[],"NV8"],[[3664,3673],"valid"],[[3674,3675],"valid",[],"NV8"],[[3676,3712],"disallowed"],[[3713,3714],"valid"],[[3715,3715],"disallowed"],[[3716,3716],"valid"],[[3717,3718],"disallowed"],[[3719,3720],"valid"],[[3721,3721],"disallowed"],[[3722,3722],"valid"],[[3723,3724],"disallowed"],[[3725,3725],"valid"],[[3726,3731],"disallowed"],[[3732,3735],"valid"],[[3736,3736],"disallowed"],[[3737,3743],"valid"],[[3744,3744],"disallowed"],[[3745,3747],"valid"],[[3748,3748],"disallowed"],[[3749,3749],"valid"],[[3750,3750],"disallowed"],[[3751,3751],"valid"],[[3752,3753],"disallowed"],[[3754,3755],"valid"],[[3756,3756],"disallowed"],[[3757,3762],"valid"],[[3763,3763],"mapped",[3789,3762]],[[3764,3769],"valid"],[[3770,3770],"disallowed"],[[3771,3773],"valid"],[[3774,3775],"disallowed"],[[3776,3780],"valid"],[[3781,3781],"disallowed"],[[3782,3782],"valid"],[[3783,3783],"disallowed"],[[3784,3789],"valid"],[[3790,3791],"disallowed"],[[3792,3801],"valid"],[[3802,3803],"disallowed"],[[3804,3804],"mapped",[3755,3737]],[[3805,3805],"mapped",[3755,3745]],[[3806,3807],"valid"],[[3808,3839],"disallowed"],[[3840,3840],"valid"],[[3841,3850],"valid",[],"NV8"],[[3851,3851],"valid"],[[3852,3852],"mapped",[3851]],[[3853,3863],"valid",[],"NV8"],[[3864,3865],"valid"],[[3866,3871],"valid",[],"NV8"],[[3872,3881],"valid"],[[3882,3892],"valid",[],"NV8"],[[3893,3893],"valid"],[[3894,3894],"valid",[],"NV8"],[[3895,3895],"valid"],[[3896,3896],"valid",[],"NV8"],[[3897,3897],"valid"],[[3898,3901],"valid",[],"NV8"],[[3902,3906],"valid"],[[3907,3907],"mapped",[3906,4023]],[[3908,3911],"valid"],[[3912,3912],"disallowed"],[[3913,3916],"valid"],[[3917,3917],"mapped",[3916,4023]],[[3918,3921],"valid"],[[3922,3922],"mapped",[3921,4023]],[[3923,3926],"valid"],[[3927,3927],"mapped",[3926,4023]],[[3928,3931],"valid"],[[3932,3932],"mapped",[3931,4023]],[[3933,3944],"valid"],[[3945,3945],"mapped",[3904,4021]],[[3946,3946],"valid"],[[3947,3948],"valid"],[[3949,3952],"disallowed"],[[3953,3954],"valid"],[[3955,3955],"mapped",[3953,3954]],[[3956,3956],"valid"],[[3957,3957],"mapped",[3953,3956]],[[3958,3958],"mapped",[4018,3968]],[[3959,3959],"mapped",[4018,3953,3968]],[[3960,3960],"mapped",[4019,3968]],[[3961,3961],"mapped",[4019,3953,3968]],[[3962,3968],"valid"],[[3969,3969],"mapped",[3953,3968]],[[3970,3972],"valid"],[[3973,3973],"valid",[],"NV8"],[[3974,3979],"valid"],[[3980,3983],"valid"],[[3984,3986],"valid"],[[3987,3987],"mapped",[3986,4023]],[[3988,3989],"valid"],[[3990,3990],"valid"],[[3991,3991],"valid"],[[3992,3992],"disallowed"],[[3993,3996],"valid"],[[3997,3997],"mapped",[3996,4023]],[[3998,4001],"valid"],[[4002,4002],"mapped",[4001,4023]],[[4003,4006],"valid"],[[4007,4007],"mapped",[4006,4023]],[[4008,4011],"valid"],[[4012,4012],"mapped",[4011,4023]],[[4013,4013],"valid"],[[4014,4016],"valid"],[[4017,4023],"valid"],[[4024,4024],"valid"],[[4025,4025],"mapped",[3984,4021]],[[4026,4028],"valid"],[[4029,4029],"disallowed"],[[4030,4037],"valid",[],"NV8"],[[4038,4038],"valid"],[[4039,4044],"valid",[],"NV8"],[[4045,4045],"disallowed"],[[4046,4046],"valid",[],"NV8"],[[4047,4047],"valid",[],"NV8"],[[4048,4049],"valid",[],"NV8"],[[4050,4052],"valid",[],"NV8"],[[4053,4056],"valid",[],"NV8"],[[4057,4058],"valid",[],"NV8"],[[4059,4095],"disallowed"],[[4096,4129],"valid"],[[4130,4130],"valid"],[[4131,4135],"valid"],[[4136,4136],"valid"],[[4137,4138],"valid"],[[4139,4139],"valid"],[[4140,4146],"valid"],[[4147,4149],"valid"],[[4150,4153],"valid"],[[4154,4159],"valid"],[[4160,4169],"valid"],[[4170,4175],"valid",[],"NV8"],[[4176,4185],"valid"],[[4186,4249],"valid"],[[4250,4253],"valid"],[[4254,4255],"valid",[],"NV8"],[[4256,4293],"disallowed"],[[4294,4294],"disallowed"],[[4295,4295],"mapped",[11559]],[[4296,4300],"disallowed"],[[4301,4301],"mapped",[11565]],[[4302,4303],"disallowed"],[[4304,4342],"valid"],[[4343,4344],"valid"],[[4345,4346],"valid"],[[4347,4347],"valid",[],"NV8"],[[4348,4348],"mapped",[4316]],[[4349,4351],"valid"],[[4352,4441],"valid",[],"NV8"],[[4442,4446],"valid",[],"NV8"],[[4447,4448],"disallowed"],[[4449,4514],"valid",[],"NV8"],[[4515,4519],"valid",[],"NV8"],[[4520,4601],"valid",[],"NV8"],[[4602,4607],"valid",[],"NV8"],[[4608,4614],"valid"],[[4615,4615],"valid"],[[4616,4678],"valid"],[[4679,4679],"valid"],[[4680,4680],"valid"],[[4681,4681],"disallowed"],[[4682,4685],"valid"],[[4686,4687],"disallowed"],[[4688,4694],"valid"],[[4695,4695],"disallowed"],[[4696,4696],"valid"],[[4697,4697],"disallowed"],[[4698,4701],"valid"],[[4702,4703],"disallowed"],[[4704,4742],"valid"],[[4743,4743],"valid"],[[4744,4744],"valid"],[[4745,4745],"disallowed"],[[4746,4749],"valid"],[[4750,4751],"disallowed"],[[4752,4782],"valid"],[[4783,4783],"valid"],[[4784,4784],"valid"],[[4785,4785],"disallowed"],[[4786,4789],"valid"],[[4790,4791],"disallowed"],[[4792,4798],"valid"],[[4799,4799],"disallowed"],[[4800,4800],"valid"],[[4801,4801],"disallowed"],[[4802,4805],"valid"],[[4806,4807],"disallowed"],[[4808,4814],"valid"],[[4815,4815],"valid"],[[4816,4822],"valid"],[[4823,4823],"disallowed"],[[4824,4846],"valid"],[[4847,4847],"valid"],[[4848,4878],"valid"],[[4879,4879],"valid"],[[4880,4880],"valid"],[[4881,4881],"disallowed"],[[4882,4885],"valid"],[[4886,4887],"disallowed"],[[4888,4894],"valid"],[[4895,4895],"valid"],[[4896,4934],"valid"],[[4935,4935],"valid"],[[4936,4954],"valid"],[[4955,4956],"disallowed"],[[4957,4958],"valid"],[[4959,4959],"valid"],[[4960,4960],"valid",[],"NV8"],[[4961,4988],"valid",[],"NV8"],[[4989,4991],"disallowed"],[[4992,5007],"valid"],[[5008,5017],"valid",[],"NV8"],[[5018,5023],"disallowed"],[[5024,5108],"valid"],[[5109,5109],"valid"],[[5110,5111],"disallowed"],[[5112,5112],"mapped",[5104]],[[5113,5113],"mapped",[5105]],[[5114,5114],"mapped",[5106]],[[5115,5115],"mapped",[5107]],[[5116,5116],"mapped",[5108]],[[5117,5117],"mapped",[5109]],[[5118,5119],"disallowed"],[[5120,5120],"valid",[],"NV8"],[[5121,5740],"valid"],[[5741,5742],"valid",[],"NV8"],[[5743,5750],"valid"],[[5751,5759],"valid"],[[5760,5760],"disallowed"],[[5761,5786],"valid"],[[5787,5788],"valid",[],"NV8"],[[5789,5791],"disallowed"],[[5792,5866],"valid"],[[5867,5872],"valid",[],"NV8"],[[5873,5880],"valid"],[[5881,5887],"disallowed"],[[5888,5900],"valid"],[[5901,5901],"disallowed"],[[5902,5908],"valid"],[[5909,5919],"disallowed"],[[5920,5940],"valid"],[[5941,5942],"valid",[],"NV8"],[[5943,5951],"disallowed"],[[5952,5971],"valid"],[[5972,5983],"disallowed"],[[5984,5996],"valid"],[[5997,5997],"disallowed"],[[5998,6000],"valid"],[[6001,6001],"disallowed"],[[6002,6003],"valid"],[[6004,6015],"disallowed"],[[6016,6067],"valid"],[[6068,6069],"disallowed"],[[6070,6099],"valid"],[[6100,6102],"valid",[],"NV8"],[[6103,6103],"valid"],[[6104,6107],"valid",[],"NV8"],[[6108,6108],"valid"],[[6109,6109],"valid"],[[6110,6111],"disallowed"],[[6112,6121],"valid"],[[6122,6127],"disallowed"],[[6128,6137],"valid",[],"NV8"],[[6138,6143],"disallowed"],[[6144,6149],"valid",[],"NV8"],[[6150,6150],"disallowed"],[[6151,6154],"valid",[],"NV8"],[[6155,6157],"ignored"],[[6158,6158],"disallowed"],[[6159,6159],"disallowed"],[[6160,6169],"valid"],[[6170,6175],"disallowed"],[[6176,6263],"valid"],[[6264,6271],"disallowed"],[[6272,6313],"valid"],[[6314,6314],"valid"],[[6315,6319],"disallowed"],[[6320,6389],"valid"],[[6390,6399],"disallowed"],[[6400,6428],"valid"],[[6429,6430],"valid"],[[6431,6431],"disallowed"],[[6432,6443],"valid"],[[6444,6447],"disallowed"],[[6448,6459],"valid"],[[6460,6463],"disallowed"],[[6464,6464],"valid",[],"NV8"],[[6465,6467],"disallowed"],[[6468,6469],"valid",[],"NV8"],[[6470,6509],"valid"],[[6510,6511],"disallowed"],[[6512,6516],"valid"],[[6517,6527],"disallowed"],[[6528,6569],"valid"],[[6570,6571],"valid"],[[6572,6575],"disallowed"],[[6576,6601],"valid"],[[6602,6607],"disallowed"],[[6608,6617],"valid"],[[6618,6618],"valid",[],"XV8"],[[6619,6621],"disallowed"],[[6622,6623],"valid",[],"NV8"],[[6624,6655],"valid",[],"NV8"],[[6656,6683],"valid"],[[6684,6685],"disallowed"],[[6686,6687],"valid",[],"NV8"],[[6688,6750],"valid"],[[6751,6751],"disallowed"],[[6752,6780],"valid"],[[6781,6782],"disallowed"],[[6783,6793],"valid"],[[6794,6799],"disallowed"],[[6800,6809],"valid"],[[6810,6815],"disallowed"],[[6816,6822],"valid",[],"NV8"],[[6823,6823],"valid"],[[6824,6829],"valid",[],"NV8"],[[6830,6831],"disallowed"],[[6832,6845],"valid"],[[6846,6846],"valid",[],"NV8"],[[6847,6911],"disallowed"],[[6912,6987],"valid"],[[6988,6991],"disallowed"],[[6992,7001],"valid"],[[7002,7018],"valid",[],"NV8"],[[7019,7027],"valid"],[[7028,7036],"valid",[],"NV8"],[[7037,7039],"disallowed"],[[7040,7082],"valid"],[[7083,7085],"valid"],[[7086,7097],"valid"],[[7098,7103],"valid"],[[7104,7155],"valid"],[[7156,7163],"disallowed"],[[7164,7167],"valid",[],"NV8"],[[7168,7223],"valid"],[[7224,7226],"disallowed"],[[7227,7231],"valid",[],"NV8"],[[7232,7241],"valid"],[[7242,7244],"disallowed"],[[7245,7293],"valid"],[[7294,7295],"valid",[],"NV8"],[[7296,7359],"disallowed"],[[7360,7367],"valid",[],"NV8"],[[7368,7375],"disallowed"],[[7376,7378],"valid"],[[7379,7379],"valid",[],"NV8"],[[7380,7410],"valid"],[[7411,7414],"valid"],[[7415,7415],"disallowed"],[[7416,7417],"valid"],[[7418,7423],"disallowed"],[[7424,7467],"valid"],[[7468,7468],"mapped",[97]],[[7469,7469],"mapped",[230]],[[7470,7470],"mapped",[98]],[[7471,7471],"valid"],[[7472,7472],"mapped",[100]],[[7473,7473],"mapped",[101]],[[7474,7474],"mapped",[477]],[[7475,7475],"mapped",[103]],[[7476,7476],"mapped",[104]],[[7477,7477],"mapped",[105]],[[7478,7478],"mapped",[106]],[[7479,7479],"mapped",[107]],[[7480,7480],"mapped",[108]],[[7481,7481],"mapped",[109]],[[7482,7482],"mapped",[110]],[[7483,7483],"valid"],[[7484,7484],"mapped",[111]],[[7485,7485],"mapped",[547]],[[7486,7486],"mapped",[112]],[[7487,7487],"mapped",[114]],[[7488,7488],"mapped",[116]],[[7489,7489],"mapped",[117]],[[7490,7490],"mapped",[119]],[[7491,7491],"mapped",[97]],[[7492,7492],"mapped",[592]],[[7493,7493],"mapped",[593]],[[7494,7494],"mapped",[7426]],[[7495,7495],"mapped",[98]],[[7496,7496],"mapped",[100]],[[7497,7497],"mapped",[101]],[[7498,7498],"mapped",[601]],[[7499,7499],"mapped",[603]],[[7500,7500],"mapped",[604]],[[7501,7501],"mapped",[103]],[[7502,7502],"valid"],[[7503,7503],"mapped",[107]],[[7504,7504],"mapped",[109]],[[7505,7505],"mapped",[331]],[[7506,7506],"mapped",[111]],[[7507,7507],"mapped",[596]],[[7508,7508],"mapped",[7446]],[[7509,7509],"mapped",[7447]],[[7510,7510],"mapped",[112]],[[7511,7511],"mapped",[116]],[[7512,7512],"mapped",[117]],[[7513,7513],"mapped",[7453]],[[7514,7514],"mapped",[623]],[[7515,7515],"mapped",[118]],[[7516,7516],"mapped",[7461]],[[7517,7517],"mapped",[946]],[[7518,7518],"mapped",[947]],[[7519,7519],"mapped",[948]],[[7520,7520],"mapped",[966]],[[7521,7521],"mapped",[967]],[[7522,7522],"mapped",[105]],[[7523,7523],"mapped",[114]],[[7524,7524],"mapped",[117]],[[7525,7525],"mapped",[118]],[[7526,7526],"mapped",[946]],[[7527,7527],"mapped",[947]],[[7528,7528],"mapped",[961]],[[7529,7529],"mapped",[966]],[[7530,7530],"mapped",[967]],[[7531,7531],"valid"],[[7532,7543],"valid"],[[7544,7544],"mapped",[1085]],[[7545,7578],"valid"],[[7579,7579],"mapped",[594]],[[7580,7580],"mapped",[99]],[[7581,7581],"mapped",[597]],[[7582,7582],"mapped",[240]],[[7583,7583],"mapped",[604]],[[7584,7584],"mapped",[102]],[[7585,7585],"mapped",[607]],[[7586,7586],"mapped",[609]],[[7587,7587],"mapped",[613]],[[7588,7588],"mapped",[616]],[[7589,7589],"mapped",[617]],[[7590,7590],"mapped",[618]],[[7591,7591],"mapped",[7547]],[[7592,7592],"mapped",[669]],[[7593,7593],"mapped",[621]],[[7594,7594],"mapped",[7557]],[[7595,7595],"mapped",[671]],[[7596,7596],"mapped",[625]],[[7597,7597],"mapped",[624]],[[7598,7598],"mapped",[626]],[[7599,7599],"mapped",[627]],[[7600,7600],"mapped",[628]],[[7601,7601],"mapped",[629]],[[7602,7602],"mapped",[632]],[[7603,7603],"mapped",[642]],[[7604,7604],"mapped",[643]],[[7605,7605],"mapped",[427]],[[7606,7606],"mapped",[649]],[[7607,7607],"mapped",[650]],[[7608,7608],"mapped",[7452]],[[7609,7609],"mapped",[651]],[[7610,7610],"mapped",[652]],[[7611,7611],"mapped",[122]],[[7612,7612],"mapped",[656]],[[7613,7613],"mapped",[657]],[[7614,7614],"mapped",[658]],[[7615,7615],"mapped",[952]],[[7616,7619],"valid"],[[7620,7626],"valid"],[[7627,7654],"valid"],[[7655,7669],"valid"],[[7670,7675],"disallowed"],[[7676,7676],"valid"],[[7677,7677],"valid"],[[7678,7679],"valid"],[[7680,7680],"mapped",[7681]],[[7681,7681],"valid"],[[7682,7682],"mapped",[7683]],[[7683,7683],"valid"],[[7684,7684],"mapped",[7685]],[[7685,7685],"valid"],[[7686,7686],"mapped",[7687]],[[7687,7687],"valid"],[[7688,7688],"mapped",[7689]],[[7689,7689],"valid"],[[7690,7690],"mapped",[7691]],[[7691,7691],"valid"],[[7692,7692],"mapped",[7693]],[[7693,7693],"valid"],[[7694,7694],"mapped",[7695]],[[7695,7695],"valid"],[[7696,7696],"mapped",[7697]],[[7697,7697],"valid"],[[7698,7698],"mapped",[7699]],[[7699,7699],"valid"],[[7700,7700],"mapped",[7701]],[[7701,7701],"valid"],[[7702,7702],"mapped",[7703]],[[7703,7703],"valid"],[[7704,7704],"mapped",[7705]],[[7705,7705],"valid"],[[7706,7706],"mapped",[7707]],[[7707,7707],"valid"],[[7708,7708],"mapped",[7709]],[[7709,7709],"valid"],[[7710,7710],"mapped",[7711]],[[7711,7711],"valid"],[[7712,7712],"mapped",[7713]],[[7713,7713],"valid"],[[7714,7714],"mapped",[7715]],[[7715,7715],"valid"],[[7716,7716],"mapped",[7717]],[[7717,7717],"valid"],[[7718,7718],"mapped",[7719]],[[7719,7719],"valid"],[[7720,7720],"mapped",[7721]],[[7721,7721],"valid"],[[7722,7722],"mapped",[7723]],[[7723,7723],"valid"],[[7724,7724],"mapped",[7725]],[[7725,7725],"valid"],[[7726,7726],"mapped",[7727]],[[7727,7727],"valid"],[[7728,7728],"mapped",[7729]],[[7729,7729],"valid"],[[7730,7730],"mapped",[7731]],[[7731,7731],"valid"],[[7732,7732],"mapped",[7733]],[[7733,7733],"valid"],[[7734,7734],"mapped",[7735]],[[7735,7735],"valid"],[[7736,7736],"mapped",[7737]],[[7737,7737],"valid"],[[7738,7738],"mapped",[7739]],[[7739,7739],"valid"],[[7740,7740],"mapped",[7741]],[[7741,7741],"valid"],[[7742,7742],"mapped",[7743]],[[7743,7743],"valid"],[[7744,7744],"mapped",[7745]],[[7745,7745],"valid"],[[7746,7746],"mapped",[7747]],[[7747,7747],"valid"],[[7748,7748],"mapped",[7749]],[[7749,7749],"valid"],[[7750,7750],"mapped",[7751]],[[7751,7751],"valid"],[[7752,7752],"mapped",[7753]],[[7753,7753],"valid"],[[7754,7754],"mapped",[7755]],[[7755,7755],"valid"],[[7756,7756],"mapped",[7757]],[[7757,7757],"valid"],[[7758,7758],"mapped",[7759]],[[7759,7759],"valid"],[[7760,7760],"mapped",[7761]],[[7761,7761],"valid"],[[7762,7762],"mapped",[7763]],[[7763,7763],"valid"],[[7764,7764],"mapped",[7765]],[[7765,7765],"valid"],[[7766,7766],"mapped",[7767]],[[7767,7767],"valid"],[[7768,7768],"mapped",[7769]],[[7769,7769],"valid"],[[7770,7770],"mapped",[7771]],[[7771,7771],"valid"],[[7772,7772],"mapped",[7773]],[[7773,7773],"valid"],[[7774,7774],"mapped",[7775]],[[7775,7775],"valid"],[[7776,7776],"mapped",[7777]],[[7777,7777],"valid"],[[7778,7778],"mapped",[7779]],[[7779,7779],"valid"],[[7780,7780],"mapped",[7781]],[[7781,7781],"valid"],[[7782,7782],"mapped",[7783]],[[7783,7783],"valid"],[[7784,7784],"mapped",[7785]],[[7785,7785],"valid"],[[7786,7786],"mapped",[7787]],[[7787,7787],"valid"],[[7788,7788],"mapped",[7789]],[[7789,7789],"valid"],[[7790,7790],"mapped",[7791]],[[7791,7791],"valid"],[[7792,7792],"mapped",[7793]],[[7793,7793],"valid"],[[7794,7794],"mapped",[7795]],[[7795,7795],"valid"],[[7796,7796],"mapped",[7797]],[[7797,7797],"valid"],[[7798,7798],"mapped",[7799]],[[7799,7799],"valid"],[[7800,7800],"mapped",[7801]],[[7801,7801],"valid"],[[7802,7802],"mapped",[7803]],[[7803,7803],"valid"],[[7804,7804],"mapped",[7805]],[[7805,7805],"valid"],[[7806,7806],"mapped",[7807]],[[7807,7807],"valid"],[[7808,7808],"mapped",[7809]],[[7809,7809],"valid"],[[7810,7810],"mapped",[7811]],[[7811,7811],"valid"],[[7812,7812],"mapped",[7813]],[[7813,7813],"valid"],[[7814,7814],"mapped",[7815]],[[7815,7815],"valid"],[[7816,7816],"mapped",[7817]],[[7817,7817],"valid"],[[7818,7818],"mapped",[7819]],[[7819,7819],"valid"],[[7820,7820],"mapped",[7821]],[[7821,7821],"valid"],[[7822,7822],"mapped",[7823]],[[7823,7823],"valid"],[[7824,7824],"mapped",[7825]],[[7825,7825],"valid"],[[7826,7826],"mapped",[7827]],[[7827,7827],"valid"],[[7828,7828],"mapped",[7829]],[[7829,7833],"valid"],[[7834,7834],"mapped",[97,702]],[[7835,7835],"mapped",[7777]],[[7836,7837],"valid"],[[7838,7838],"mapped",[115,115]],[[7839,7839],"valid"],[[7840,7840],"mapped",[7841]],[[7841,7841],"valid"],[[7842,7842],"mapped",[7843]],[[7843,7843],"valid"],[[7844,7844],"mapped",[7845]],[[7845,7845],"valid"],[[7846,7846],"mapped",[7847]],[[7847,7847],"valid"],[[7848,7848],"mapped",[7849]],[[7849,7849],"valid"],[[7850,7850],"mapped",[7851]],[[7851,7851],"valid"],[[7852,7852],"mapped",[7853]],[[7853,7853],"valid"],[[7854,7854],"mapped",[7855]],[[7855,7855],"valid"],[[7856,7856],"mapped",[7857]],[[7857,7857],"valid"],[[7858,7858],"mapped",[7859]],[[7859,7859],"valid"],[[7860,7860],"mapped",[7861]],[[7861,7861],"valid"],[[7862,7862],"mapped",[7863]],[[7863,7863],"valid"],[[7864,7864],"mapped",[7865]],[[7865,7865],"valid"],[[7866,7866],"mapped",[7867]],[[7867,7867],"valid"],[[7868,7868],"mapped",[7869]],[[7869,7869],"valid"],[[7870,7870],"mapped",[7871]],[[7871,7871],"valid"],[[7872,7872],"mapped",[7873]],[[7873,7873],"valid"],[[7874,7874],"mapped",[7875]],[[7875,7875],"valid"],[[7876,7876],"mapped",[7877]],[[7877,7877],"valid"],[[7878,7878],"mapped",[7879]],[[7879,7879],"valid"],[[7880,7880],"mapped",[7881]],[[7881,7881],"valid"],[[7882,7882],"mapped",[7883]],[[7883,7883],"valid"],[[7884,7884],"mapped",[7885]],[[7885,7885],"valid"],[[7886,7886],"mapped",[7887]],[[7887,7887],"valid"],[[7888,7888],"mapped",[7889]],[[7889,7889],"valid"],[[7890,7890],"mapped",[7891]],[[7891,7891],"valid"],[[7892,7892],"mapped",[7893]],[[7893,7893],"valid"],[[7894,7894],"mapped",[7895]],[[7895,7895],"valid"],[[7896,7896],"mapped",[7897]],[[7897,7897],"valid"],[[7898,7898],"mapped",[7899]],[[7899,7899],"valid"],[[7900,7900],"mapped",[7901]],[[7901,7901],"valid"],[[7902,7902],"mapped",[7903]],[[7903,7903],"valid"],[[7904,7904],"mapped",[7905]],[[7905,7905],"valid"],[[7906,7906],"mapped",[7907]],[[7907,7907],"valid"],[[7908,7908],"mapped",[7909]],[[7909,7909],"valid"],[[7910,7910],"mapped",[7911]],[[7911,7911],"valid"],[[7912,7912],"mapped",[7913]],[[7913,7913],"valid"],[[7914,7914],"mapped",[7915]],[[7915,7915],"valid"],[[7916,7916],"mapped",[7917]],[[7917,7917],"valid"],[[7918,7918],"mapped",[7919]],[[7919,7919],"valid"],[[7920,7920],"mapped",[7921]],[[7921,7921],"valid"],[[7922,7922],"mapped",[7923]],[[7923,7923],"valid"],[[7924,7924],"mapped",[7925]],[[7925,7925],"valid"],[[7926,7926],"mapped",[7927]],[[7927,7927],"valid"],[[7928,7928],"mapped",[7929]],[[7929,7929],"valid"],[[7930,7930],"mapped",[7931]],[[7931,7931],"valid"],[[7932,7932],"mapped",[7933]],[[7933,7933],"valid"],[[7934,7934],"mapped",[7935]],[[7935,7935],"valid"],[[7936,7943],"valid"],[[7944,7944],"mapped",[7936]],[[7945,7945],"mapped",[7937]],[[7946,7946],"mapped",[7938]],[[7947,7947],"mapped",[7939]],[[7948,7948],"mapped",[7940]],[[7949,7949],"mapped",[7941]],[[7950,7950],"mapped",[7942]],[[7951,7951],"mapped",[7943]],[[7952,7957],"valid"],[[7958,7959],"disallowed"],[[7960,7960],"mapped",[7952]],[[7961,7961],"mapped",[7953]],[[7962,7962],"mapped",[7954]],[[7963,7963],"mapped",[7955]],[[7964,7964],"mapped",[7956]],[[7965,7965],"mapped",[7957]],[[7966,7967],"disallowed"],[[7968,7975],"valid"],[[7976,7976],"mapped",[7968]],[[7977,7977],"mapped",[7969]],[[7978,7978],"mapped",[7970]],[[7979,7979],"mapped",[7971]],[[7980,7980],"mapped",[7972]],[[7981,7981],"mapped",[7973]],[[7982,7982],"mapped",[7974]],[[7983,7983],"mapped",[7975]],[[7984,7991],"valid"],[[7992,7992],"mapped",[7984]],[[7993,7993],"mapped",[7985]],[[7994,7994],"mapped",[7986]],[[7995,7995],"mapped",[7987]],[[7996,7996],"mapped",[7988]],[[7997,7997],"mapped",[7989]],[[7998,7998],"mapped",[7990]],[[7999,7999],"mapped",[7991]],[[8000,8005],"valid"],[[8006,8007],"disallowed"],[[8008,8008],"mapped",[8000]],[[8009,8009],"mapped",[8001]],[[8010,8010],"mapped",[8002]],[[8011,8011],"mapped",[8003]],[[8012,8012],"mapped",[8004]],[[8013,8013],"mapped",[8005]],[[8014,8015],"disallowed"],[[8016,8023],"valid"],[[8024,8024],"disallowed"],[[8025,8025],"mapped",[8017]],[[8026,8026],"disallowed"],[[8027,8027],"mapped",[8019]],[[8028,8028],"disallowed"],[[8029,8029],"mapped",[8021]],[[8030,8030],"disallowed"],[[8031,8031],"mapped",[8023]],[[8032,8039],"valid"],[[8040,8040],"mapped",[8032]],[[8041,8041],"mapped",[8033]],[[8042,8042],"mapped",[8034]],[[8043,8043],"mapped",[8035]],[[8044,8044],"mapped",[8036]],[[8045,8045],"mapped",[8037]],[[8046,8046],"mapped",[8038]],[[8047,8047],"mapped",[8039]],[[8048,8048],"valid"],[[8049,8049],"mapped",[940]],[[8050,8050],"valid"],[[8051,8051],"mapped",[941]],[[8052,8052],"valid"],[[8053,8053],"mapped",[942]],[[8054,8054],"valid"],[[8055,8055],"mapped",[943]],[[8056,8056],"valid"],[[8057,8057],"mapped",[972]],[[8058,8058],"valid"],[[8059,8059],"mapped",[973]],[[8060,8060],"valid"],[[8061,8061],"mapped",[974]],[[8062,8063],"disallowed"],[[8064,8064],"mapped",[7936,953]],[[8065,8065],"mapped",[7937,953]],[[8066,8066],"mapped",[7938,953]],[[8067,8067],"mapped",[7939,953]],[[8068,8068],"mapped",[7940,953]],[[8069,8069],"mapped",[7941,953]],[[8070,8070],"mapped",[7942,953]],[[8071,8071],"mapped",[7943,953]],[[8072,8072],"mapped",[7936,953]],[[8073,8073],"mapped",[7937,953]],[[8074,8074],"mapped",[7938,953]],[[8075,8075],"mapped",[7939,953]],[[8076,8076],"mapped",[7940,953]],[[8077,8077],"mapped",[7941,953]],[[8078,8078],"mapped",[7942,953]],[[8079,8079],"mapped",[7943,953]],[[8080,8080],"mapped",[7968,953]],[[8081,8081],"mapped",[7969,953]],[[8082,8082],"mapped",[7970,953]],[[8083,8083],"mapped",[7971,953]],[[8084,8084],"mapped",[7972,953]],[[8085,8085],"mapped",[7973,953]],[[8086,8086],"mapped",[7974,953]],[[8087,8087],"mapped",[7975,953]],[[8088,8088],"mapped",[7968,953]],[[8089,8089],"mapped",[7969,953]],[[8090,8090],"mapped",[7970,953]],[[8091,8091],"mapped",[7971,953]],[[8092,8092],"mapped",[7972,953]],[[8093,8093],"mapped",[7973,953]],[[8094,8094],"mapped",[7974,953]],[[8095,8095],"mapped",[7975,953]],[[8096,8096],"mapped",[8032,953]],[[8097,8097],"mapped",[8033,953]],[[8098,8098],"mapped",[8034,953]],[[8099,8099],"mapped",[8035,953]],[[8100,8100],"mapped",[8036,953]],[[8101,8101],"mapped",[8037,953]],[[8102,8102],"mapped",[8038,953]],[[8103,8103],"mapped",[8039,953]],[[8104,8104],"mapped",[8032,953]],[[8105,8105],"mapped",[8033,953]],[[8106,8106],"mapped",[8034,953]],[[8107,8107],"mapped",[8035,953]],[[8108,8108],"mapped",[8036,953]],[[8109,8109],"mapped",[8037,953]],[[8110,8110],"mapped",[8038,953]],[[8111,8111],"mapped",[8039,953]],[[8112,8113],"valid"],[[8114,8114],"mapped",[8048,953]],[[8115,8115],"mapped",[945,953]],[[8116,8116],"mapped",[940,953]],[[8117,8117],"disallowed"],[[8118,8118],"valid"],[[8119,8119],"mapped",[8118,953]],[[8120,8120],"mapped",[8112]],[[8121,8121],"mapped",[8113]],[[8122,8122],"mapped",[8048]],[[8123,8123],"mapped",[940]],[[8124,8124],"mapped",[945,953]],[[8125,8125],"disallowed_STD3_mapped",[32,787]],[[8126,8126],"mapped",[953]],[[8127,8127],"disallowed_STD3_mapped",[32,787]],[[8128,8128],"disallowed_STD3_mapped",[32,834]],[[8129,8129],"disallowed_STD3_mapped",[32,776,834]],[[8130,8130],"mapped",[8052,953]],[[8131,8131],"mapped",[951,953]],[[8132,8132],"mapped",[942,953]],[[8133,8133],"disallowed"],[[8134,8134],"valid"],[[8135,8135],"mapped",[8134,953]],[[8136,8136],"mapped",[8050]],[[8137,8137],"mapped",[941]],[[8138,8138],"mapped",[8052]],[[8139,8139],"mapped",[942]],[[8140,8140],"mapped",[951,953]],[[8141,8141],"disallowed_STD3_mapped",[32,787,768]],[[8142,8142],"disallowed_STD3_mapped",[32,787,769]],[[8143,8143],"disallowed_STD3_mapped",[32,787,834]],[[8144,8146],"valid"],[[8147,8147],"mapped",[912]],[[8148,8149],"disallowed"],[[8150,8151],"valid"],[[8152,8152],"mapped",[8144]],[[8153,8153],"mapped",[8145]],[[8154,8154],"mapped",[8054]],[[8155,8155],"mapped",[943]],[[8156,8156],"disallowed"],[[8157,8157],"disallowed_STD3_mapped",[32,788,768]],[[8158,8158],"disallowed_STD3_mapped",[32,788,769]],[[8159,8159],"disallowed_STD3_mapped",[32,788,834]],[[8160,8162],"valid"],[[8163,8163],"mapped",[944]],[[8164,8167],"valid"],[[8168,8168],"mapped",[8160]],[[8169,8169],"mapped",[8161]],[[8170,8170],"mapped",[8058]],[[8171,8171],"mapped",[973]],[[8172,8172],"mapped",[8165]],[[8173,8173],"disallowed_STD3_mapped",[32,776,768]],[[8174,8174],"disallowed_STD3_mapped",[32,776,769]],[[8175,8175],"disallowed_STD3_mapped",[96]],[[8176,8177],"disallowed"],[[8178,8178],"mapped",[8060,953]],[[8179,8179],"mapped",[969,953]],[[8180,8180],"mapped",[974,953]],[[8181,8181],"disallowed"],[[8182,8182],"valid"],[[8183,8183],"mapped",[8182,953]],[[8184,8184],"mapped",[8056]],[[8185,8185],"mapped",[972]],[[8186,8186],"mapped",[8060]],[[8187,8187],"mapped",[974]],[[8188,8188],"mapped",[969,953]],[[8189,8189],"disallowed_STD3_mapped",[32,769]],[[8190,8190],"disallowed_STD3_mapped",[32,788]],[[8191,8191],"disallowed"],[[8192,8202],"disallowed_STD3_mapped",[32]],[[8203,8203],"ignored"],[[8204,8205],"deviation",[]],[[8206,8207],"disallowed"],[[8208,8208],"valid",[],"NV8"],[[8209,8209],"mapped",[8208]],[[8210,8214],"valid",[],"NV8"],[[8215,8215],"disallowed_STD3_mapped",[32,819]],[[8216,8227],"valid",[],"NV8"],[[8228,8230],"disallowed"],[[8231,8231],"valid",[],"NV8"],[[8232,8238],"disallowed"],[[8239,8239],"disallowed_STD3_mapped",[32]],[[8240,8242],"valid",[],"NV8"],[[8243,8243],"mapped",[8242,8242]],[[8244,8244],"mapped",[8242,8242,8242]],[[8245,8245],"valid",[],"NV8"],[[8246,8246],"mapped",[8245,8245]],[[8247,8247],"mapped",[8245,8245,8245]],[[8248,8251],"valid",[],"NV8"],[[8252,8252],"disallowed_STD3_mapped",[33,33]],[[8253,8253],"valid",[],"NV8"],[[8254,8254],"disallowed_STD3_mapped",[32,773]],[[8255,8262],"valid",[],"NV8"],[[8263,8263],"disallowed_STD3_mapped",[63,63]],[[8264,8264],"disallowed_STD3_mapped",[63,33]],[[8265,8265],"disallowed_STD3_mapped",[33,63]],[[8266,8269],"valid",[],"NV8"],[[8270,8274],"valid",[],"NV8"],[[8275,8276],"valid",[],"NV8"],[[8277,8278],"valid",[],"NV8"],[[8279,8279],"mapped",[8242,8242,8242,8242]],[[8280,8286],"valid",[],"NV8"],[[8287,8287],"disallowed_STD3_mapped",[32]],[[8288,8288],"ignored"],[[8289,8291],"disallowed"],[[8292,8292],"ignored"],[[8293,8293],"disallowed"],[[8294,8297],"disallowed"],[[8298,8303],"disallowed"],[[8304,8304],"mapped",[48]],[[8305,8305],"mapped",[105]],[[8306,8307],"disallowed"],[[8308,8308],"mapped",[52]],[[8309,8309],"mapped",[53]],[[8310,8310],"mapped",[54]],[[8311,8311],"mapped",[55]],[[8312,8312],"mapped",[56]],[[8313,8313],"mapped",[57]],[[8314,8314],"disallowed_STD3_mapped",[43]],[[8315,8315],"mapped",[8722]],[[8316,8316],"disallowed_STD3_mapped",[61]],[[8317,8317],"disallowed_STD3_mapped",[40]],[[8318,8318],"disallowed_STD3_mapped",[41]],[[8319,8319],"mapped",[110]],[[8320,8320],"mapped",[48]],[[8321,8321],"mapped",[49]],[[8322,8322],"mapped",[50]],[[8323,8323],"mapped",[51]],[[8324,8324],"mapped",[52]],[[8325,8325],"mapped",[53]],[[8326,8326],"mapped",[54]],[[8327,8327],"mapped",[55]],[[8328,8328],"mapped",[56]],[[8329,8329],"mapped",[57]],[[8330,8330],"disallowed_STD3_mapped",[43]],[[8331,8331],"mapped",[8722]],[[8332,8332],"disallowed_STD3_mapped",[61]],[[8333,8333],"disallowed_STD3_mapped",[40]],[[8334,8334],"disallowed_STD3_mapped",[41]],[[8335,8335],"disallowed"],[[8336,8336],"mapped",[97]],[[8337,8337],"mapped",[101]],[[8338,8338],"mapped",[111]],[[8339,8339],"mapped",[120]],[[8340,8340],"mapped",[601]],[[8341,8341],"mapped",[104]],[[8342,8342],"mapped",[107]],[[8343,8343],"mapped",[108]],[[8344,8344],"mapped",[109]],[[8345,8345],"mapped",[110]],[[8346,8346],"mapped",[112]],[[8347,8347],"mapped",[115]],[[8348,8348],"mapped",[116]],[[8349,8351],"disallowed"],[[8352,8359],"valid",[],"NV8"],[[8360,8360],"mapped",[114,115]],[[8361,8362],"valid",[],"NV8"],[[8363,8363],"valid",[],"NV8"],[[8364,8364],"valid",[],"NV8"],[[8365,8367],"valid",[],"NV8"],[[8368,8369],"valid",[],"NV8"],[[8370,8373],"valid",[],"NV8"],[[8374,8376],"valid",[],"NV8"],[[8377,8377],"valid",[],"NV8"],[[8378,8378],"valid",[],"NV8"],[[8379,8381],"valid",[],"NV8"],[[8382,8382],"valid",[],"NV8"],[[8383,8399],"disallowed"],[[8400,8417],"valid",[],"NV8"],[[8418,8419],"valid",[],"NV8"],[[8420,8426],"valid",[],"NV8"],[[8427,8427],"valid",[],"NV8"],[[8428,8431],"valid",[],"NV8"],[[8432,8432],"valid",[],"NV8"],[[8433,8447],"disallowed"],[[8448,8448],"disallowed_STD3_mapped",[97,47,99]],[[8449,8449],"disallowed_STD3_mapped",[97,47,115]],[[8450,8450],"mapped",[99]],[[8451,8451],"mapped",[176,99]],[[8452,8452],"valid",[],"NV8"],[[8453,8453],"disallowed_STD3_mapped",[99,47,111]],[[8454,8454],"disallowed_STD3_mapped",[99,47,117]],[[8455,8455],"mapped",[603]],[[8456,8456],"valid",[],"NV8"],[[8457,8457],"mapped",[176,102]],[[8458,8458],"mapped",[103]],[[8459,8462],"mapped",[104]],[[8463,8463],"mapped",[295]],[[8464,8465],"mapped",[105]],[[8466,8467],"mapped",[108]],[[8468,8468],"valid",[],"NV8"],[[8469,8469],"mapped",[110]],[[8470,8470],"mapped",[110,111]],[[8471,8472],"valid",[],"NV8"],[[8473,8473],"mapped",[112]],[[8474,8474],"mapped",[113]],[[8475,8477],"mapped",[114]],[[8478,8479],"valid",[],"NV8"],[[8480,8480],"mapped",[115,109]],[[8481,8481],"mapped",[116,101,108]],[[8482,8482],"mapped",[116,109]],[[8483,8483],"valid",[],"NV8"],[[8484,8484],"mapped",[122]],[[8485,8485],"valid",[],"NV8"],[[8486,8486],"mapped",[969]],[[8487,8487],"valid",[],"NV8"],[[8488,8488],"mapped",[122]],[[8489,8489],"valid",[],"NV8"],[[8490,8490],"mapped",[107]],[[8491,8491],"mapped",[229]],[[8492,8492],"mapped",[98]],[[8493,8493],"mapped",[99]],[[8494,8494],"valid",[],"NV8"],[[8495,8496],"mapped",[101]],[[8497,8497],"mapped",[102]],[[8498,8498],"disallowed"],[[8499,8499],"mapped",[109]],[[8500,8500],"mapped",[111]],[[8501,8501],"mapped",[1488]],[[8502,8502],"mapped",[1489]],[[8503,8503],"mapped",[1490]],[[8504,8504],"mapped",[1491]],[[8505,8505],"mapped",[105]],[[8506,8506],"valid",[],"NV8"],[[8507,8507],"mapped",[102,97,120]],[[8508,8508],"mapped",[960]],[[8509,8510],"mapped",[947]],[[8511,8511],"mapped",[960]],[[8512,8512],"mapped",[8721]],[[8513,8516],"valid",[],"NV8"],[[8517,8518],"mapped",[100]],[[8519,8519],"mapped",[101]],[[8520,8520],"mapped",[105]],[[8521,8521],"mapped",[106]],[[8522,8523],"valid",[],"NV8"],[[8524,8524],"valid",[],"NV8"],[[8525,8525],"valid",[],"NV8"],[[8526,8526],"valid"],[[8527,8527],"valid",[],"NV8"],[[8528,8528],"mapped",[49,8260,55]],[[8529,8529],"mapped",[49,8260,57]],[[8530,8530],"mapped",[49,8260,49,48]],[[8531,8531],"mapped",[49,8260,51]],[[8532,8532],"mapped",[50,8260,51]],[[8533,8533],"mapped",[49,8260,53]],[[8534,8534],"mapped",[50,8260,53]],[[8535,8535],"mapped",[51,8260,53]],[[8536,8536],"mapped",[52,8260,53]],[[8537,8537],"mapped",[49,8260,54]],[[8538,8538],"mapped",[53,8260,54]],[[8539,8539],"mapped",[49,8260,56]],[[8540,8540],"mapped",[51,8260,56]],[[8541,8541],"mapped",[53,8260,56]],[[8542,8542],"mapped",[55,8260,56]],[[8543,8543],"mapped",[49,8260]],[[8544,8544],"mapped",[105]],[[8545,8545],"mapped",[105,105]],[[8546,8546],"mapped",[105,105,105]],[[8547,8547],"mapped",[105,118]],[[8548,8548],"mapped",[118]],[[8549,8549],"mapped",[118,105]],[[8550,8550],"mapped",[118,105,105]],[[8551,8551],"mapped",[118,105,105,105]],[[8552,8552],"mapped",[105,120]],[[8553,8553],"mapped",[120]],[[8554,8554],"mapped",[120,105]],[[8555,8555],"mapped",[120,105,105]],[[8556,8556],"mapped",[108]],[[8557,8557],"mapped",[99]],[[8558,8558],"mapped",[100]],[[8559,8559],"mapped",[109]],[[8560,8560],"mapped",[105]],[[8561,8561],"mapped",[105,105]],[[8562,8562],"mapped",[105,105,105]],[[8563,8563],"mapped",[105,118]],[[8564,8564],"mapped",[118]],[[8565,8565],"mapped",[118,105]],[[8566,8566],"mapped",[118,105,105]],[[8567,8567],"mapped",[118,105,105,105]],[[8568,8568],"mapped",[105,120]],[[8569,8569],"mapped",[120]],[[8570,8570],"mapped",[120,105]],[[8571,8571],"mapped",[120,105,105]],[[8572,8572],"mapped",[108]],[[8573,8573],"mapped",[99]],[[8574,8574],"mapped",[100]],[[8575,8575],"mapped",[109]],[[8576,8578],"valid",[],"NV8"],[[8579,8579],"disallowed"],[[8580,8580],"valid"],[[8581,8584],"valid",[],"NV8"],[[8585,8585],"mapped",[48,8260,51]],[[8586,8587],"valid",[],"NV8"],[[8588,8591],"disallowed"],[[8592,8682],"valid",[],"NV8"],[[8683,8691],"valid",[],"NV8"],[[8692,8703],"valid",[],"NV8"],[[8704,8747],"valid",[],"NV8"],[[8748,8748],"mapped",[8747,8747]],[[8749,8749],"mapped",[8747,8747,8747]],[[8750,8750],"valid",[],"NV8"],[[8751,8751],"mapped",[8750,8750]],[[8752,8752],"mapped",[8750,8750,8750]],[[8753,8799],"valid",[],"NV8"],[[8800,8800],"disallowed_STD3_valid"],[[8801,8813],"valid",[],"NV8"],[[8814,8815],"disallowed_STD3_valid"],[[8816,8945],"valid",[],"NV8"],[[8946,8959],"valid",[],"NV8"],[[8960,8960],"valid",[],"NV8"],[[8961,8961],"valid",[],"NV8"],[[8962,9000],"valid",[],"NV8"],[[9001,9001],"mapped",[12296]],[[9002,9002],"mapped",[12297]],[[9003,9082],"valid",[],"NV8"],[[9083,9083],"valid",[],"NV8"],[[9084,9084],"valid",[],"NV8"],[[9085,9114],"valid",[],"NV8"],[[9115,9166],"valid",[],"NV8"],[[9167,9168],"valid",[],"NV8"],[[9169,9179],"valid",[],"NV8"],[[9180,9191],"valid",[],"NV8"],[[9192,9192],"valid",[],"NV8"],[[9193,9203],"valid",[],"NV8"],[[9204,9210],"valid",[],"NV8"],[[9211,9215],"disallowed"],[[9216,9252],"valid",[],"NV8"],[[9253,9254],"valid",[],"NV8"],[[9255,9279],"disallowed"],[[9280,9290],"valid",[],"NV8"],[[9291,9311],"disallowed"],[[9312,9312],"mapped",[49]],[[9313,9313],"mapped",[50]],[[9314,9314],"mapped",[51]],[[9315,9315],"mapped",[52]],[[9316,9316],"mapped",[53]],[[9317,9317],"mapped",[54]],[[9318,9318],"mapped",[55]],[[9319,9319],"mapped",[56]],[[9320,9320],"mapped",[57]],[[9321,9321],"mapped",[49,48]],[[9322,9322],"mapped",[49,49]],[[9323,9323],"mapped",[49,50]],[[9324,9324],"mapped",[49,51]],[[9325,9325],"mapped",[49,52]],[[9326,9326],"mapped",[49,53]],[[9327,9327],"mapped",[49,54]],[[9328,9328],"mapped",[49,55]],[[9329,9329],"mapped",[49,56]],[[9330,9330],"mapped",[49,57]],[[9331,9331],"mapped",[50,48]],[[9332,9332],"disallowed_STD3_mapped",[40,49,41]],[[9333,9333],"disallowed_STD3_mapped",[40,50,41]],[[9334,9334],"disallowed_STD3_mapped",[40,51,41]],[[9335,9335],"disallowed_STD3_mapped",[40,52,41]],[[9336,9336],"disallowed_STD3_mapped",[40,53,41]],[[9337,9337],"disallowed_STD3_mapped",[40,54,41]],[[9338,9338],"disallowed_STD3_mapped",[40,55,41]],[[9339,9339],"disallowed_STD3_mapped",[40,56,41]],[[9340,9340],"disallowed_STD3_mapped",[40,57,41]],[[9341,9341],"disallowed_STD3_mapped",[40,49,48,41]],[[9342,9342],"disallowed_STD3_mapped",[40,49,49,41]],[[9343,9343],"disallowed_STD3_mapped",[40,49,50,41]],[[9344,9344],"disallowed_STD3_mapped",[40,49,51,41]],[[9345,9345],"disallowed_STD3_mapped",[40,49,52,41]],[[9346,9346],"disallowed_STD3_mapped",[40,49,53,41]],[[9347,9347],"disallowed_STD3_mapped",[40,49,54,41]],[[9348,9348],"disallowed_STD3_mapped",[40,49,55,41]],[[9349,9349],"disallowed_STD3_mapped",[40,49,56,41]],[[9350,9350],"disallowed_STD3_mapped",[40,49,57,41]],[[9351,9351],"disallowed_STD3_mapped",[40,50,48,41]],[[9352,9371],"disallowed"],[[9372,9372],"disallowed_STD3_mapped",[40,97,41]],[[9373,9373],"disallowed_STD3_mapped",[40,98,41]],[[9374,9374],"disallowed_STD3_mapped",[40,99,41]],[[9375,9375],"disallowed_STD3_mapped",[40,100,41]],[[9376,9376],"disallowed_STD3_mapped",[40,101,41]],[[9377,9377],"disallowed_STD3_mapped",[40,102,41]],[[9378,9378],"disallowed_STD3_mapped",[40,103,41]],[[9379,9379],"disallowed_STD3_mapped",[40,104,41]],[[9380,9380],"disallowed_STD3_mapped",[40,105,41]],[[9381,9381],"disallowed_STD3_mapped",[40,106,41]],[[9382,9382],"disallowed_STD3_mapped",[40,107,41]],[[9383,9383],"disallowed_STD3_mapped",[40,108,41]],[[9384,9384],"disallowed_STD3_mapped",[40,109,41]],[[9385,9385],"disallowed_STD3_mapped",[40,110,41]],[[9386,9386],"disallowed_STD3_mapped",[40,111,41]],[[9387,9387],"disallowed_STD3_mapped",[40,112,41]],[[9388,9388],"disallowed_STD3_mapped",[40,113,41]],[[9389,9389],"disallowed_STD3_mapped",[40,114,41]],[[9390,9390],"disallowed_STD3_mapped",[40,115,41]],[[9391,9391],"disallowed_STD3_mapped",[40,116,41]],[[9392,9392],"disallowed_STD3_mapped",[40,117,41]],[[9393,9393],"disallowed_STD3_mapped",[40,118,41]],[[9394,9394],"disallowed_STD3_mapped",[40,119,41]],[[9395,9395],"disallowed_STD3_mapped",[40,120,41]],[[9396,9396],"disallowed_STD3_mapped",[40,121,41]],[[9397,9397],"disallowed_STD3_mapped",[40,122,41]],[[9398,9398],"mapped",[97]],[[9399,9399],"mapped",[98]],[[9400,9400],"mapped",[99]],[[9401,9401],"mapped",[100]],[[9402,9402],"mapped",[101]],[[9403,9403],"mapped",[102]],[[9404,9404],"mapped",[103]],[[9405,9405],"mapped",[104]],[[9406,9406],"mapped",[105]],[[9407,9407],"mapped",[106]],[[9408,9408],"mapped",[107]],[[9409,9409],"mapped",[108]],[[9410,9410],"mapped",[109]],[[9411,9411],"mapped",[110]],[[9412,9412],"mapped",[111]],[[9413,9413],"mapped",[112]],[[9414,9414],"mapped",[113]],[[9415,9415],"mapped",[114]],[[9416,9416],"mapped",[115]],[[9417,9417],"mapped",[116]],[[9418,9418],"mapped",[117]],[[9419,9419],"mapped",[118]],[[9420,9420],"mapped",[119]],[[9421,9421],"mapped",[120]],[[9422,9422],"mapped",[121]],[[9423,9423],"mapped",[122]],[[9424,9424],"mapped",[97]],[[9425,9425],"mapped",[98]],[[9426,9426],"mapped",[99]],[[9427,9427],"mapped",[100]],[[9428,9428],"mapped",[101]],[[9429,9429],"mapped",[102]],[[9430,9430],"mapped",[103]],[[9431,9431],"mapped",[104]],[[9432,9432],"mapped",[105]],[[9433,9433],"mapped",[106]],[[9434,9434],"mapped",[107]],[[9435,9435],"mapped",[108]],[[9436,9436],"mapped",[109]],[[9437,9437],"mapped",[110]],[[9438,9438],"mapped",[111]],[[9439,9439],"mapped",[112]],[[9440,9440],"mapped",[113]],[[9441,9441],"mapped",[114]],[[9442,9442],"mapped",[115]],[[9443,9443],"mapped",[116]],[[9444,9444],"mapped",[117]],[[9445,9445],"mapped",[118]],[[9446,9446],"mapped",[119]],[[9447,9447],"mapped",[120]],[[9448,9448],"mapped",[121]],[[9449,9449],"mapped",[122]],[[9450,9450],"mapped",[48]],[[9451,9470],"valid",[],"NV8"],[[9471,9471],"valid",[],"NV8"],[[9472,9621],"valid",[],"NV8"],[[9622,9631],"valid",[],"NV8"],[[9632,9711],"valid",[],"NV8"],[[9712,9719],"valid",[],"NV8"],[[9720,9727],"valid",[],"NV8"],[[9728,9747],"valid",[],"NV8"],[[9748,9749],"valid",[],"NV8"],[[9750,9751],"valid",[],"NV8"],[[9752,9752],"valid",[],"NV8"],[[9753,9753],"valid",[],"NV8"],[[9754,9839],"valid",[],"NV8"],[[9840,9841],"valid",[],"NV8"],[[9842,9853],"valid",[],"NV8"],[[9854,9855],"valid",[],"NV8"],[[9856,9865],"valid",[],"NV8"],[[9866,9873],"valid",[],"NV8"],[[9874,9884],"valid",[],"NV8"],[[9885,9885],"valid",[],"NV8"],[[9886,9887],"valid",[],"NV8"],[[9888,9889],"valid",[],"NV8"],[[9890,9905],"valid",[],"NV8"],[[9906,9906],"valid",[],"NV8"],[[9907,9916],"valid",[],"NV8"],[[9917,9919],"valid",[],"NV8"],[[9920,9923],"valid",[],"NV8"],[[9924,9933],"valid",[],"NV8"],[[9934,9934],"valid",[],"NV8"],[[9935,9953],"valid",[],"NV8"],[[9954,9954],"valid",[],"NV8"],[[9955,9955],"valid",[],"NV8"],[[9956,9959],"valid",[],"NV8"],[[9960,9983],"valid",[],"NV8"],[[9984,9984],"valid",[],"NV8"],[[9985,9988],"valid",[],"NV8"],[[9989,9989],"valid",[],"NV8"],[[9990,9993],"valid",[],"NV8"],[[9994,9995],"valid",[],"NV8"],[[9996,10023],"valid",[],"NV8"],[[10024,10024],"valid",[],"NV8"],[[10025,10059],"valid",[],"NV8"],[[10060,10060],"valid",[],"NV8"],[[10061,10061],"valid",[],"NV8"],[[10062,10062],"valid",[],"NV8"],[[10063,10066],"valid",[],"NV8"],[[10067,10069],"valid",[],"NV8"],[[10070,10070],"valid",[],"NV8"],[[10071,10071],"valid",[],"NV8"],[[10072,10078],"valid",[],"NV8"],[[10079,10080],"valid",[],"NV8"],[[10081,10087],"valid",[],"NV8"],[[10088,10101],"valid",[],"NV8"],[[10102,10132],"valid",[],"NV8"],[[10133,10135],"valid",[],"NV8"],[[10136,10159],"valid",[],"NV8"],[[10160,10160],"valid",[],"NV8"],[[10161,10174],"valid",[],"NV8"],[[10175,10175],"valid",[],"NV8"],[[10176,10182],"valid",[],"NV8"],[[10183,10186],"valid",[],"NV8"],[[10187,10187],"valid",[],"NV8"],[[10188,10188],"valid",[],"NV8"],[[10189,10189],"valid",[],"NV8"],[[10190,10191],"valid",[],"NV8"],[[10192,10219],"valid",[],"NV8"],[[10220,10223],"valid",[],"NV8"],[[10224,10239],"valid",[],"NV8"],[[10240,10495],"valid",[],"NV8"],[[10496,10763],"valid",[],"NV8"],[[10764,10764],"mapped",[8747,8747,8747,8747]],[[10765,10867],"valid",[],"NV8"],[[10868,10868],"disallowed_STD3_mapped",[58,58,61]],[[10869,10869],"disallowed_STD3_mapped",[61,61]],[[10870,10870],"disallowed_STD3_mapped",[61,61,61]],[[10871,10971],"valid",[],"NV8"],[[10972,10972],"mapped",[10973,824]],[[10973,11007],"valid",[],"NV8"],[[11008,11021],"valid",[],"NV8"],[[11022,11027],"valid",[],"NV8"],[[11028,11034],"valid",[],"NV8"],[[11035,11039],"valid",[],"NV8"],[[11040,11043],"valid",[],"NV8"],[[11044,11084],"valid",[],"NV8"],[[11085,11087],"valid",[],"NV8"],[[11088,11092],"valid",[],"NV8"],[[11093,11097],"valid",[],"NV8"],[[11098,11123],"valid",[],"NV8"],[[11124,11125],"disallowed"],[[11126,11157],"valid",[],"NV8"],[[11158,11159],"disallowed"],[[11160,11193],"valid",[],"NV8"],[[11194,11196],"disallowed"],[[11197,11208],"valid",[],"NV8"],[[11209,11209],"disallowed"],[[11210,11217],"valid",[],"NV8"],[[11218,11243],"disallowed"],[[11244,11247],"valid",[],"NV8"],[[11248,11263],"disallowed"],[[11264,11264],"mapped",[11312]],[[11265,11265],"mapped",[11313]],[[11266,11266],"mapped",[11314]],[[11267,11267],"mapped",[11315]],[[11268,11268],"mapped",[11316]],[[11269,11269],"mapped",[11317]],[[11270,11270],"mapped",[11318]],[[11271,11271],"mapped",[11319]],[[11272,11272],"mapped",[11320]],[[11273,11273],"mapped",[11321]],[[11274,11274],"mapped",[11322]],[[11275,11275],"mapped",[11323]],[[11276,11276],"mapped",[11324]],[[11277,11277],"mapped",[11325]],[[11278,11278],"mapped",[11326]],[[11279,11279],"mapped",[11327]],[[11280,11280],"mapped",[11328]],[[11281,11281],"mapped",[11329]],[[11282,11282],"mapped",[11330]],[[11283,11283],"mapped",[11331]],[[11284,11284],"mapped",[11332]],[[11285,11285],"mapped",[11333]],[[11286,11286],"mapped",[11334]],[[11287,11287],"mapped",[11335]],[[11288,11288],"mapped",[11336]],[[11289,11289],"mapped",[11337]],[[11290,11290],"mapped",[11338]],[[11291,11291],"mapped",[11339]],[[11292,11292],"mapped",[11340]],[[11293,11293],"mapped",[11341]],[[11294,11294],"mapped",[11342]],[[11295,11295],"mapped",[11343]],[[11296,11296],"mapped",[11344]],[[11297,11297],"mapped",[11345]],[[11298,11298],"mapped",[11346]],[[11299,11299],"mapped",[11347]],[[11300,11300],"mapped",[11348]],[[11301,11301],"mapped",[11349]],[[11302,11302],"mapped",[11350]],[[11303,11303],"mapped",[11351]],[[11304,11304],"mapped",[11352]],[[11305,11305],"mapped",[11353]],[[11306,11306],"mapped",[11354]],[[11307,11307],"mapped",[11355]],[[11308,11308],"mapped",[11356]],[[11309,11309],"mapped",[11357]],[[11310,11310],"mapped",[11358]],[[11311,11311],"disallowed"],[[11312,11358],"valid"],[[11359,11359],"disallowed"],[[11360,11360],"mapped",[11361]],[[11361,11361],"valid"],[[11362,11362],"mapped",[619]],[[11363,11363],"mapped",[7549]],[[11364,11364],"mapped",[637]],[[11365,11366],"valid"],[[11367,11367],"mapped",[11368]],[[11368,11368],"valid"],[[11369,11369],"mapped",[11370]],[[11370,11370],"valid"],[[11371,11371],"mapped",[11372]],[[11372,11372],"valid"],[[11373,11373],"mapped",[593]],[[11374,11374],"mapped",[625]],[[11375,11375],"mapped",[592]],[[11376,11376],"mapped",[594]],[[11377,11377],"valid"],[[11378,11378],"mapped",[11379]],[[11379,11379],"valid"],[[11380,11380],"valid"],[[11381,11381],"mapped",[11382]],[[11382,11383],"valid"],[[11384,11387],"valid"],[[11388,11388],"mapped",[106]],[[11389,11389],"mapped",[118]],[[11390,11390],"mapped",[575]],[[11391,11391],"mapped",[576]],[[11392,11392],"mapped",[11393]],[[11393,11393],"valid"],[[11394,11394],"mapped",[11395]],[[11395,11395],"valid"],[[11396,11396],"mapped",[11397]],[[11397,11397],"valid"],[[11398,11398],"mapped",[11399]],[[11399,11399],"valid"],[[11400,11400],"mapped",[11401]],[[11401,11401],"valid"],[[11402,11402],"mapped",[11403]],[[11403,11403],"valid"],[[11404,11404],"mapped",[11405]],[[11405,11405],"valid"],[[11406,11406],"mapped",[11407]],[[11407,11407],"valid"],[[11408,11408],"mapped",[11409]],[[11409,11409],"valid"],[[11410,11410],"mapped",[11411]],[[11411,11411],"valid"],[[11412,11412],"mapped",[11413]],[[11413,11413],"valid"],[[11414,11414],"mapped",[11415]],[[11415,11415],"valid"],[[11416,11416],"mapped",[11417]],[[11417,11417],"valid"],[[11418,11418],"mapped",[11419]],[[11419,11419],"valid"],[[11420,11420],"mapped",[11421]],[[11421,11421],"valid"],[[11422,11422],"mapped",[11423]],[[11423,11423],"valid"],[[11424,11424],"mapped",[11425]],[[11425,11425],"valid"],[[11426,11426],"mapped",[11427]],[[11427,11427],"valid"],[[11428,11428],"mapped",[11429]],[[11429,11429],"valid"],[[11430,11430],"mapped",[11431]],[[11431,11431],"valid"],[[11432,11432],"mapped",[11433]],[[11433,11433],"valid"],[[11434,11434],"mapped",[11435]],[[11435,11435],"valid"],[[11436,11436],"mapped",[11437]],[[11437,11437],"valid"],[[11438,11438],"mapped",[11439]],[[11439,11439],"valid"],[[11440,11440],"mapped",[11441]],[[11441,11441],"valid"],[[11442,11442],"mapped",[11443]],[[11443,11443],"valid"],[[11444,11444],"mapped",[11445]],[[11445,11445],"valid"],[[11446,11446],"mapped",[11447]],[[11447,11447],"valid"],[[11448,11448],"mapped",[11449]],[[11449,11449],"valid"],[[11450,11450],"mapped",[11451]],[[11451,11451],"valid"],[[11452,11452],"mapped",[11453]],[[11453,11453],"valid"],[[11454,11454],"mapped",[11455]],[[11455,11455],"valid"],[[11456,11456],"mapped",[11457]],[[11457,11457],"valid"],[[11458,11458],"mapped",[11459]],[[11459,11459],"valid"],[[11460,11460],"mapped",[11461]],[[11461,11461],"valid"],[[11462,11462],"mapped",[11463]],[[11463,11463],"valid"],[[11464,11464],"mapped",[11465]],[[11465,11465],"valid"],[[11466,11466],"mapped",[11467]],[[11467,11467],"valid"],[[11468,11468],"mapped",[11469]],[[11469,11469],"valid"],[[11470,11470],"mapped",[11471]],[[11471,11471],"valid"],[[11472,11472],"mapped",[11473]],[[11473,11473],"valid"],[[11474,11474],"mapped",[11475]],[[11475,11475],"valid"],[[11476,11476],"mapped",[11477]],[[11477,11477],"valid"],[[11478,11478],"mapped",[11479]],[[11479,11479],"valid"],[[11480,11480],"mapped",[11481]],[[11481,11481],"valid"],[[11482,11482],"mapped",[11483]],[[11483,11483],"valid"],[[11484,11484],"mapped",[11485]],[[11485,11485],"valid"],[[11486,11486],"mapped",[11487]],[[11487,11487],"valid"],[[11488,11488],"mapped",[11489]],[[11489,11489],"valid"],[[11490,11490],"mapped",[11491]],[[11491,11492],"valid"],[[11493,11498],"valid",[],"NV8"],[[11499,11499],"mapped",[11500]],[[11500,11500],"valid"],[[11501,11501],"mapped",[11502]],[[11502,11505],"valid"],[[11506,11506],"mapped",[11507]],[[11507,11507],"valid"],[[11508,11512],"disallowed"],[[11513,11519],"valid",[],"NV8"],[[11520,11557],"valid"],[[11558,11558],"disallowed"],[[11559,11559],"valid"],[[11560,11564],"disallowed"],[[11565,11565],"valid"],[[11566,11567],"disallowed"],[[11568,11621],"valid"],[[11622,11623],"valid"],[[11624,11630],"disallowed"],[[11631,11631],"mapped",[11617]],[[11632,11632],"valid",[],"NV8"],[[11633,11646],"disallowed"],[[11647,11647],"valid"],[[11648,11670],"valid"],[[11671,11679],"disallowed"],[[11680,11686],"valid"],[[11687,11687],"disallowed"],[[11688,11694],"valid"],[[11695,11695],"disallowed"],[[11696,11702],"valid"],[[11703,11703],"disallowed"],[[11704,11710],"valid"],[[11711,11711],"disallowed"],[[11712,11718],"valid"],[[11719,11719],"disallowed"],[[11720,11726],"valid"],[[11727,11727],"disallowed"],[[11728,11734],"valid"],[[11735,11735],"disallowed"],[[11736,11742],"valid"],[[11743,11743],"disallowed"],[[11744,11775],"valid"],[[11776,11799],"valid",[],"NV8"],[[11800,11803],"valid",[],"NV8"],[[11804,11805],"valid",[],"NV8"],[[11806,11822],"valid",[],"NV8"],[[11823,11823],"valid"],[[11824,11824],"valid",[],"NV8"],[[11825,11825],"valid",[],"NV8"],[[11826,11835],"valid",[],"NV8"],[[11836,11842],"valid",[],"NV8"],[[11843,11903],"disallowed"],[[11904,11929],"valid",[],"NV8"],[[11930,11930],"disallowed"],[[11931,11934],"valid",[],"NV8"],[[11935,11935],"mapped",[27597]],[[11936,12018],"valid",[],"NV8"],[[12019,12019],"mapped",[40863]],[[12020,12031],"disallowed"],[[12032,12032],"mapped",[19968]],[[12033,12033],"mapped",[20008]],[[12034,12034],"mapped",[20022]],[[12035,12035],"mapped",[20031]],[[12036,12036],"mapped",[20057]],[[12037,12037],"mapped",[20101]],[[12038,12038],"mapped",[20108]],[[12039,12039],"mapped",[20128]],[[12040,12040],"mapped",[20154]],[[12041,12041],"mapped",[20799]],[[12042,12042],"mapped",[20837]],[[12043,12043],"mapped",[20843]],[[12044,12044],"mapped",[20866]],[[12045,12045],"mapped",[20886]],[[12046,12046],"mapped",[20907]],[[12047,12047],"mapped",[20960]],[[12048,12048],"mapped",[20981]],[[12049,12049],"mapped",[20992]],[[12050,12050],"mapped",[21147]],[[12051,12051],"mapped",[21241]],[[12052,12052],"mapped",[21269]],[[12053,12053],"mapped",[21274]],[[12054,12054],"mapped",[21304]],[[12055,12055],"mapped",[21313]],[[12056,12056],"mapped",[21340]],[[12057,12057],"mapped",[21353]],[[12058,12058],"mapped",[21378]],[[12059,12059],"mapped",[21430]],[[12060,12060],"mapped",[21448]],[[12061,12061],"mapped",[21475]],[[12062,12062],"mapped",[22231]],[[12063,12063],"mapped",[22303]],[[12064,12064],"mapped",[22763]],[[12065,12065],"mapped",[22786]],[[12066,12066],"mapped",[22794]],[[12067,12067],"mapped",[22805]],[[12068,12068],"mapped",[22823]],[[12069,12069],"mapped",[22899]],[[12070,12070],"mapped",[23376]],[[12071,12071],"mapped",[23424]],[[12072,12072],"mapped",[23544]],[[12073,12073],"mapped",[23567]],[[12074,12074],"mapped",[23586]],[[12075,12075],"mapped",[23608]],[[12076,12076],"mapped",[23662]],[[12077,12077],"mapped",[23665]],[[12078,12078],"mapped",[24027]],[[12079,12079],"mapped",[24037]],[[12080,12080],"mapped",[24049]],[[12081,12081],"mapped",[24062]],[[12082,12082],"mapped",[24178]],[[12083,12083],"mapped",[24186]],[[12084,12084],"mapped",[24191]],[[12085,12085],"mapped",[24308]],[[12086,12086],"mapped",[24318]],[[12087,12087],"mapped",[24331]],[[12088,12088],"mapped",[24339]],[[12089,12089],"mapped",[24400]],[[12090,12090],"mapped",[24417]],[[12091,12091],"mapped",[24435]],[[12092,12092],"mapped",[24515]],[[12093,12093],"mapped",[25096]],[[12094,12094],"mapped",[25142]],[[12095,12095],"mapped",[25163]],[[12096,12096],"mapped",[25903]],[[12097,12097],"mapped",[25908]],[[12098,12098],"mapped",[25991]],[[12099,12099],"mapped",[26007]],[[12100,12100],"mapped",[26020]],[[12101,12101],"mapped",[26041]],[[12102,12102],"mapped",[26080]],[[12103,12103],"mapped",[26085]],[[12104,12104],"mapped",[26352]],[[12105,12105],"mapped",[26376]],[[12106,12106],"mapped",[26408]],[[12107,12107],"mapped",[27424]],[[12108,12108],"mapped",[27490]],[[12109,12109],"mapped",[27513]],[[12110,12110],"mapped",[27571]],[[12111,12111],"mapped",[27595]],[[12112,12112],"mapped",[27604]],[[12113,12113],"mapped",[27611]],[[12114,12114],"mapped",[27663]],[[12115,12115],"mapped",[27668]],[[12116,12116],"mapped",[27700]],[[12117,12117],"mapped",[28779]],[[12118,12118],"mapped",[29226]],[[12119,12119],"mapped",[29238]],[[12120,12120],"mapped",[29243]],[[12121,12121],"mapped",[29247]],[[12122,12122],"mapped",[29255]],[[12123,12123],"mapped",[29273]],[[12124,12124],"mapped",[29275]],[[12125,12125],"mapped",[29356]],[[12126,12126],"mapped",[29572]],[[12127,12127],"mapped",[29577]],[[12128,12128],"mapped",[29916]],[[12129,12129],"mapped",[29926]],[[12130,12130],"mapped",[29976]],[[12131,12131],"mapped",[29983]],[[12132,12132],"mapped",[29992]],[[12133,12133],"mapped",[30000]],[[12134,12134],"mapped",[30091]],[[12135,12135],"mapped",[30098]],[[12136,12136],"mapped",[30326]],[[12137,12137],"mapped",[30333]],[[12138,12138],"mapped",[30382]],[[12139,12139],"mapped",[30399]],[[12140,12140],"mapped",[30446]],[[12141,12141],"mapped",[30683]],[[12142,12142],"mapped",[30690]],[[12143,12143],"mapped",[30707]],[[12144,12144],"mapped",[31034]],[[12145,12145],"mapped",[31160]],[[12146,12146],"mapped",[31166]],[[12147,12147],"mapped",[31348]],[[12148,12148],"mapped",[31435]],[[12149,12149],"mapped",[31481]],[[12150,12150],"mapped",[31859]],[[12151,12151],"mapped",[31992]],[[12152,12152],"mapped",[32566]],[[12153,12153],"mapped",[32593]],[[12154,12154],"mapped",[32650]],[[12155,12155],"mapped",[32701]],[[12156,12156],"mapped",[32769]],[[12157,12157],"mapped",[32780]],[[12158,12158],"mapped",[32786]],[[12159,12159],"mapped",[32819]],[[12160,12160],"mapped",[32895]],[[12161,12161],"mapped",[32905]],[[12162,12162],"mapped",[33251]],[[12163,12163],"mapped",[33258]],[[12164,12164],"mapped",[33267]],[[12165,12165],"mapped",[33276]],[[12166,12166],"mapped",[33292]],[[12167,12167],"mapped",[33307]],[[12168,12168],"mapped",[33311]],[[12169,12169],"mapped",[33390]],[[12170,12170],"mapped",[33394]],[[12171,12171],"mapped",[33400]],[[12172,12172],"mapped",[34381]],[[12173,12173],"mapped",[34411]],[[12174,12174],"mapped",[34880]],[[12175,12175],"mapped",[34892]],[[12176,12176],"mapped",[34915]],[[12177,12177],"mapped",[35198]],[[12178,12178],"mapped",[35211]],[[12179,12179],"mapped",[35282]],[[12180,12180],"mapped",[35328]],[[12181,12181],"mapped",[35895]],[[12182,12182],"mapped",[35910]],[[12183,12183],"mapped",[35925]],[[12184,12184],"mapped",[35960]],[[12185,12185],"mapped",[35997]],[[12186,12186],"mapped",[36196]],[[12187,12187],"mapped",[36208]],[[12188,12188],"mapped",[36275]],[[12189,12189],"mapped",[36523]],[[12190,12190],"mapped",[36554]],[[12191,12191],"mapped",[36763]],[[12192,12192],"mapped",[36784]],[[12193,12193],"mapped",[36789]],[[12194,12194],"mapped",[37009]],[[12195,12195],"mapped",[37193]],[[12196,12196],"mapped",[37318]],[[12197,12197],"mapped",[37324]],[[12198,12198],"mapped",[37329]],[[12199,12199],"mapped",[38263]],[[12200,12200],"mapped",[38272]],[[12201,12201],"mapped",[38428]],[[12202,12202],"mapped",[38582]],[[12203,12203],"mapped",[38585]],[[12204,12204],"mapped",[38632]],[[12205,12205],"mapped",[38737]],[[12206,12206],"mapped",[38750]],[[12207,12207],"mapped",[38754]],[[12208,12208],"mapped",[38761]],[[12209,12209],"mapped",[38859]],[[12210,12210],"mapped",[38893]],[[12211,12211],"mapped",[38899]],[[12212,12212],"mapped",[38913]],[[12213,12213],"mapped",[39080]],[[12214,12214],"mapped",[39131]],[[12215,12215],"mapped",[39135]],[[12216,12216],"mapped",[39318]],[[12217,12217],"mapped",[39321]],[[12218,12218],"mapped",[39340]],[[12219,12219],"mapped",[39592]],[[12220,12220],"mapped",[39640]],[[12221,12221],"mapped",[39647]],[[12222,12222],"mapped",[39717]],[[12223,12223],"mapped",[39727]],[[12224,12224],"mapped",[39730]],[[12225,12225],"mapped",[39740]],[[12226,12226],"mapped",[39770]],[[12227,12227],"mapped",[40165]],[[12228,12228],"mapped",[40565]],[[12229,12229],"mapped",[40575]],[[12230,12230],"mapped",[40613]],[[12231,12231],"mapped",[40635]],[[12232,12232],"mapped",[40643]],[[12233,12233],"mapped",[40653]],[[12234,12234],"mapped",[40657]],[[12235,12235],"mapped",[40697]],[[12236,12236],"mapped",[40701]],[[12237,12237],"mapped",[40718]],[[12238,12238],"mapped",[40723]],[[12239,12239],"mapped",[40736]],[[12240,12240],"mapped",[40763]],[[12241,12241],"mapped",[40778]],[[12242,12242],"mapped",[40786]],[[12243,12243],"mapped",[40845]],[[12244,12244],"mapped",[40860]],[[12245,12245],"mapped",[40864]],[[12246,12271],"disallowed"],[[12272,12283],"disallowed"],[[12284,12287],"disallowed"],[[12288,12288],"disallowed_STD3_mapped",[32]],[[12289,12289],"valid",[],"NV8"],[[12290,12290],"mapped",[46]],[[12291,12292],"valid",[],"NV8"],[[12293,12295],"valid"],[[12296,12329],"valid",[],"NV8"],[[12330,12333],"valid"],[[12334,12341],"valid",[],"NV8"],[[12342,12342],"mapped",[12306]],[[12343,12343],"valid",[],"NV8"],[[12344,12344],"mapped",[21313]],[[12345,12345],"mapped",[21316]],[[12346,12346],"mapped",[21317]],[[12347,12347],"valid",[],"NV8"],[[12348,12348],"valid"],[[12349,12349],"valid",[],"NV8"],[[12350,12350],"valid",[],"NV8"],[[12351,12351],"valid",[],"NV8"],[[12352,12352],"disallowed"],[[12353,12436],"valid"],[[12437,12438],"valid"],[[12439,12440],"disallowed"],[[12441,12442],"valid"],[[12443,12443],"disallowed_STD3_mapped",[32,12441]],[[12444,12444],"disallowed_STD3_mapped",[32,12442]],[[12445,12446],"valid"],[[12447,12447],"mapped",[12424,12426]],[[12448,12448],"valid",[],"NV8"],[[12449,12542],"valid"],[[12543,12543],"mapped",[12467,12488]],[[12544,12548],"disallowed"],[[12549,12588],"valid"],[[12589,12589],"valid"],[[12590,12592],"disallowed"],[[12593,12593],"mapped",[4352]],[[12594,12594],"mapped",[4353]],[[12595,12595],"mapped",[4522]],[[12596,12596],"mapped",[4354]],[[12597,12597],"mapped",[4524]],[[12598,12598],"mapped",[4525]],[[12599,12599],"mapped",[4355]],[[12600,12600],"mapped",[4356]],[[12601,12601],"mapped",[4357]],[[12602,12602],"mapped",[4528]],[[12603,12603],"mapped",[4529]],[[12604,12604],"mapped",[4530]],[[12605,12605],"mapped",[4531]],[[12606,12606],"mapped",[4532]],[[12607,12607],"mapped",[4533]],[[12608,12608],"mapped",[4378]],[[12609,12609],"mapped",[4358]],[[12610,12610],"mapped",[4359]],[[12611,12611],"mapped",[4360]],[[12612,12612],"mapped",[4385]],[[12613,12613],"mapped",[4361]],[[12614,12614],"mapped",[4362]],[[12615,12615],"mapped",[4363]],[[12616,12616],"mapped",[4364]],[[12617,12617],"mapped",[4365]],[[12618,12618],"mapped",[4366]],[[12619,12619],"mapped",[4367]],[[12620,12620],"mapped",[4368]],[[12621,12621],"mapped",[4369]],[[12622,12622],"mapped",[4370]],[[12623,12623],"mapped",[4449]],[[12624,12624],"mapped",[4450]],[[12625,12625],"mapped",[4451]],[[12626,12626],"mapped",[4452]],[[12627,12627],"mapped",[4453]],[[12628,12628],"mapped",[4454]],[[12629,12629],"mapped",[4455]],[[12630,12630],"mapped",[4456]],[[12631,12631],"mapped",[4457]],[[12632,12632],"mapped",[4458]],[[12633,12633],"mapped",[4459]],[[12634,12634],"mapped",[4460]],[[12635,12635],"mapped",[4461]],[[12636,12636],"mapped",[4462]],[[12637,12637],"mapped",[4463]],[[12638,12638],"mapped",[4464]],[[12639,12639],"mapped",[4465]],[[12640,12640],"mapped",[4466]],[[12641,12641],"mapped",[4467]],[[12642,12642],"mapped",[4468]],[[12643,12643],"mapped",[4469]],[[12644,12644],"disallowed"],[[12645,12645],"mapped",[4372]],[[12646,12646],"mapped",[4373]],[[12647,12647],"mapped",[4551]],[[12648,12648],"mapped",[4552]],[[12649,12649],"mapped",[4556]],[[12650,12650],"mapped",[4558]],[[12651,12651],"mapped",[4563]],[[12652,12652],"mapped",[4567]],[[12653,12653],"mapped",[4569]],[[12654,12654],"mapped",[4380]],[[12655,12655],"mapped",[4573]],[[12656,12656],"mapped",[4575]],[[12657,12657],"mapped",[4381]],[[12658,12658],"mapped",[4382]],[[12659,12659],"mapped",[4384]],[[12660,12660],"mapped",[4386]],[[12661,12661],"mapped",[4387]],[[12662,12662],"mapped",[4391]],[[12663,12663],"mapped",[4393]],[[12664,12664],"mapped",[4395]],[[12665,12665],"mapped",[4396]],[[12666,12666],"mapped",[4397]],[[12667,12667],"mapped",[4398]],[[12668,12668],"mapped",[4399]],[[12669,12669],"mapped",[4402]],[[12670,12670],"mapped",[4406]],[[12671,12671],"mapped",[4416]],[[12672,12672],"mapped",[4423]],[[12673,12673],"mapped",[4428]],[[12674,12674],"mapped",[4593]],[[12675,12675],"mapped",[4594]],[[12676,12676],"mapped",[4439]],[[12677,12677],"mapped",[4440]],[[12678,12678],"mapped",[4441]],[[12679,12679],"mapped",[4484]],[[12680,12680],"mapped",[4485]],[[12681,12681],"mapped",[4488]],[[12682,12682],"mapped",[4497]],[[12683,12683],"mapped",[4498]],[[12684,12684],"mapped",[4500]],[[12685,12685],"mapped",[4510]],[[12686,12686],"mapped",[4513]],[[12687,12687],"disallowed"],[[12688,12689],"valid",[],"NV8"],[[12690,12690],"mapped",[19968]],[[12691,12691],"mapped",[20108]],[[12692,12692],"mapped",[19977]],[[12693,12693],"mapped",[22235]],[[12694,12694],"mapped",[19978]],[[12695,12695],"mapped",[20013]],[[12696,12696],"mapped",[19979]],[[12697,12697],"mapped",[30002]],[[12698,12698],"mapped",[20057]],[[12699,12699],"mapped",[19993]],[[12700,12700],"mapped",[19969]],[[12701,12701],"mapped",[22825]],[[12702,12702],"mapped",[22320]],[[12703,12703],"mapped",[20154]],[[12704,12727],"valid"],[[12728,12730],"valid"],[[12731,12735],"disallowed"],[[12736,12751],"valid",[],"NV8"],[[12752,12771],"valid",[],"NV8"],[[12772,12783],"disallowed"],[[12784,12799],"valid"],[[12800,12800],"disallowed_STD3_mapped",[40,4352,41]],[[12801,12801],"disallowed_STD3_mapped",[40,4354,41]],[[12802,12802],"disallowed_STD3_mapped",[40,4355,41]],[[12803,12803],"disallowed_STD3_mapped",[40,4357,41]],[[12804,12804],"disallowed_STD3_mapped",[40,4358,41]],[[12805,12805],"disallowed_STD3_mapped",[40,4359,41]],[[12806,12806],"disallowed_STD3_mapped",[40,4361,41]],[[12807,12807],"disallowed_STD3_mapped",[40,4363,41]],[[12808,12808],"disallowed_STD3_mapped",[40,4364,41]],[[12809,12809],"disallowed_STD3_mapped",[40,4366,41]],[[12810,12810],"disallowed_STD3_mapped",[40,4367,41]],[[12811,12811],"disallowed_STD3_mapped",[40,4368,41]],[[12812,12812],"disallowed_STD3_mapped",[40,4369,41]],[[12813,12813],"disallowed_STD3_mapped",[40,4370,41]],[[12814,12814],"disallowed_STD3_mapped",[40,44032,41]],[[12815,12815],"disallowed_STD3_mapped",[40,45208,41]],[[12816,12816],"disallowed_STD3_mapped",[40,45796,41]],[[12817,12817],"disallowed_STD3_mapped",[40,46972,41]],[[12818,12818],"disallowed_STD3_mapped",[40,47560,41]],[[12819,12819],"disallowed_STD3_mapped",[40,48148,41]],[[12820,12820],"disallowed_STD3_mapped",[40,49324,41]],[[12821,12821],"disallowed_STD3_mapped",[40,50500,41]],[[12822,12822],"disallowed_STD3_mapped",[40,51088,41]],[[12823,12823],"disallowed_STD3_mapped",[40,52264,41]],[[12824,12824],"disallowed_STD3_mapped",[40,52852,41]],[[12825,12825],"disallowed_STD3_mapped",[40,53440,41]],[[12826,12826],"disallowed_STD3_mapped",[40,54028,41]],[[12827,12827],"disallowed_STD3_mapped",[40,54616,41]],[[12828,12828],"disallowed_STD3_mapped",[40,51452,41]],[[12829,12829],"disallowed_STD3_mapped",[40,50724,51204,41]],[[12830,12830],"disallowed_STD3_mapped",[40,50724,54980,41]],[[12831,12831],"disallowed"],[[12832,12832],"disallowed_STD3_mapped",[40,19968,41]],[[12833,12833],"disallowed_STD3_mapped",[40,20108,41]],[[12834,12834],"disallowed_STD3_mapped",[40,19977,41]],[[12835,12835],"disallowed_STD3_mapped",[40,22235,41]],[[12836,12836],"disallowed_STD3_mapped",[40,20116,41]],[[12837,12837],"disallowed_STD3_mapped",[40,20845,41]],[[12838,12838],"disallowed_STD3_mapped",[40,19971,41]],[[12839,12839],"disallowed_STD3_mapped",[40,20843,41]],[[12840,12840],"disallowed_STD3_mapped",[40,20061,41]],[[12841,12841],"disallowed_STD3_mapped",[40,21313,41]],[[12842,12842],"disallowed_STD3_mapped",[40,26376,41]],[[12843,12843],"disallowed_STD3_mapped",[40,28779,41]],[[12844,12844],"disallowed_STD3_mapped",[40,27700,41]],[[12845,12845],"disallowed_STD3_mapped",[40,26408,41]],[[12846,12846],"disallowed_STD3_mapped",[40,37329,41]],[[12847,12847],"disallowed_STD3_mapped",[40,22303,41]],[[12848,12848],"disallowed_STD3_mapped",[40,26085,41]],[[12849,12849],"disallowed_STD3_mapped",[40,26666,41]],[[12850,12850],"disallowed_STD3_mapped",[40,26377,41]],[[12851,12851],"disallowed_STD3_mapped",[40,31038,41]],[[12852,12852],"disallowed_STD3_mapped",[40,21517,41]],[[12853,12853],"disallowed_STD3_mapped",[40,29305,41]],[[12854,12854],"disallowed_STD3_mapped",[40,36001,41]],[[12855,12855],"disallowed_STD3_mapped",[40,31069,41]],[[12856,12856],"disallowed_STD3_mapped",[40,21172,41]],[[12857,12857],"disallowed_STD3_mapped",[40,20195,41]],[[12858,12858],"disallowed_STD3_mapped",[40,21628,41]],[[12859,12859],"disallowed_STD3_mapped",[40,23398,41]],[[12860,12860],"disallowed_STD3_mapped",[40,30435,41]],[[12861,12861],"disallowed_STD3_mapped",[40,20225,41]],[[12862,12862],"disallowed_STD3_mapped",[40,36039,41]],[[12863,12863],"disallowed_STD3_mapped",[40,21332,41]],[[12864,12864],"disallowed_STD3_mapped",[40,31085,41]],[[12865,12865],"disallowed_STD3_mapped",[40,20241,41]],[[12866,12866],"disallowed_STD3_mapped",[40,33258,41]],[[12867,12867],"disallowed_STD3_mapped",[40,33267,41]],[[12868,12868],"mapped",[21839]],[[12869,12869],"mapped",[24188]],[[12870,12870],"mapped",[25991]],[[12871,12871],"mapped",[31631]],[[12872,12879],"valid",[],"NV8"],[[12880,12880],"mapped",[112,116,101]],[[12881,12881],"mapped",[50,49]],[[12882,12882],"mapped",[50,50]],[[12883,12883],"mapped",[50,51]],[[12884,12884],"mapped",[50,52]],[[12885,12885],"mapped",[50,53]],[[12886,12886],"mapped",[50,54]],[[12887,12887],"mapped",[50,55]],[[12888,12888],"mapped",[50,56]],[[12889,12889],"mapped",[50,57]],[[12890,12890],"mapped",[51,48]],[[12891,12891],"mapped",[51,49]],[[12892,12892],"mapped",[51,50]],[[12893,12893],"mapped",[51,51]],[[12894,12894],"mapped",[51,52]],[[12895,12895],"mapped",[51,53]],[[12896,12896],"mapped",[4352]],[[12897,12897],"mapped",[4354]],[[12898,12898],"mapped",[4355]],[[12899,12899],"mapped",[4357]],[[12900,12900],"mapped",[4358]],[[12901,12901],"mapped",[4359]],[[12902,12902],"mapped",[4361]],[[12903,12903],"mapped",[4363]],[[12904,12904],"mapped",[4364]],[[12905,12905],"mapped",[4366]],[[12906,12906],"mapped",[4367]],[[12907,12907],"mapped",[4368]],[[12908,12908],"mapped",[4369]],[[12909,12909],"mapped",[4370]],[[12910,12910],"mapped",[44032]],[[12911,12911],"mapped",[45208]],[[12912,12912],"mapped",[45796]],[[12913,12913],"mapped",[46972]],[[12914,12914],"mapped",[47560]],[[12915,12915],"mapped",[48148]],[[12916,12916],"mapped",[49324]],[[12917,12917],"mapped",[50500]],[[12918,12918],"mapped",[51088]],[[12919,12919],"mapped",[52264]],[[12920,12920],"mapped",[52852]],[[12921,12921],"mapped",[53440]],[[12922,12922],"mapped",[54028]],[[12923,12923],"mapped",[54616]],[[12924,12924],"mapped",[52280,44256]],[[12925,12925],"mapped",[51452,51032]],[[12926,12926],"mapped",[50864]],[[12927,12927],"valid",[],"NV8"],[[12928,12928],"mapped",[19968]],[[12929,12929],"mapped",[20108]],[[12930,12930],"mapped",[19977]],[[12931,12931],"mapped",[22235]],[[12932,12932],"mapped",[20116]],[[12933,12933],"mapped",[20845]],[[12934,12934],"mapped",[19971]],[[12935,12935],"mapped",[20843]],[[12936,12936],"mapped",[20061]],[[12937,12937],"mapped",[21313]],[[12938,12938],"mapped",[26376]],[[12939,12939],"mapped",[28779]],[[12940,12940],"mapped",[27700]],[[12941,12941],"mapped",[26408]],[[12942,12942],"mapped",[37329]],[[12943,12943],"mapped",[22303]],[[12944,12944],"mapped",[26085]],[[12945,12945],"mapped",[26666]],[[12946,12946],"mapped",[26377]],[[12947,12947],"mapped",[31038]],[[12948,12948],"mapped",[21517]],[[12949,12949],"mapped",[29305]],[[12950,12950],"mapped",[36001]],[[12951,12951],"mapped",[31069]],[[12952,12952],"mapped",[21172]],[[12953,12953],"mapped",[31192]],[[12954,12954],"mapped",[30007]],[[12955,12955],"mapped",[22899]],[[12956,12956],"mapped",[36969]],[[12957,12957],"mapped",[20778]],[[12958,12958],"mapped",[21360]],[[12959,12959],"mapped",[27880]],[[12960,12960],"mapped",[38917]],[[12961,12961],"mapped",[20241]],[[12962,12962],"mapped",[20889]],[[12963,12963],"mapped",[27491]],[[12964,12964],"mapped",[19978]],[[12965,12965],"mapped",[20013]],[[12966,12966],"mapped",[19979]],[[12967,12967],"mapped",[24038]],[[12968,12968],"mapped",[21491]],[[12969,12969],"mapped",[21307]],[[12970,12970],"mapped",[23447]],[[12971,12971],"mapped",[23398]],[[12972,12972],"mapped",[30435]],[[12973,12973],"mapped",[20225]],[[12974,12974],"mapped",[36039]],[[12975,12975],"mapped",[21332]],[[12976,12976],"mapped",[22812]],[[12977,12977],"mapped",[51,54]],[[12978,12978],"mapped",[51,55]],[[12979,12979],"mapped",[51,56]],[[12980,12980],"mapped",[51,57]],[[12981,12981],"mapped",[52,48]],[[12982,12982],"mapped",[52,49]],[[12983,12983],"mapped",[52,50]],[[12984,12984],"mapped",[52,51]],[[12985,12985],"mapped",[52,52]],[[12986,12986],"mapped",[52,53]],[[12987,12987],"mapped",[52,54]],[[12988,12988],"mapped",[52,55]],[[12989,12989],"mapped",[52,56]],[[12990,12990],"mapped",[52,57]],[[12991,12991],"mapped",[53,48]],[[12992,12992],"mapped",[49,26376]],[[12993,12993],"mapped",[50,26376]],[[12994,12994],"mapped",[51,26376]],[[12995,12995],"mapped",[52,26376]],[[12996,12996],"mapped",[53,26376]],[[12997,12997],"mapped",[54,26376]],[[12998,12998],"mapped",[55,26376]],[[12999,12999],"mapped",[56,26376]],[[13000,13000],"mapped",[57,26376]],[[13001,13001],"mapped",[49,48,26376]],[[13002,13002],"mapped",[49,49,26376]],[[13003,13003],"mapped",[49,50,26376]],[[13004,13004],"mapped",[104,103]],[[13005,13005],"mapped",[101,114,103]],[[13006,13006],"mapped",[101,118]],[[13007,13007],"mapped",[108,116,100]],[[13008,13008],"mapped",[12450]],[[13009,13009],"mapped",[12452]],[[13010,13010],"mapped",[12454]],[[13011,13011],"mapped",[12456]],[[13012,13012],"mapped",[12458]],[[13013,13013],"mapped",[12459]],[[13014,13014],"mapped",[12461]],[[13015,13015],"mapped",[12463]],[[13016,13016],"mapped",[12465]],[[13017,13017],"mapped",[12467]],[[13018,13018],"mapped",[12469]],[[13019,13019],"mapped",[12471]],[[13020,13020],"mapped",[12473]],[[13021,13021],"mapped",[12475]],[[13022,13022],"mapped",[12477]],[[13023,13023],"mapped",[12479]],[[13024,13024],"mapped",[12481]],[[13025,13025],"mapped",[12484]],[[13026,13026],"mapped",[12486]],[[13027,13027],"mapped",[12488]],[[13028,13028],"mapped",[12490]],[[13029,13029],"mapped",[12491]],[[13030,13030],"mapped",[12492]],[[13031,13031],"mapped",[12493]],[[13032,13032],"mapped",[12494]],[[13033,13033],"mapped",[12495]],[[13034,13034],"mapped",[12498]],[[13035,13035],"mapped",[12501]],[[13036,13036],"mapped",[12504]],[[13037,13037],"mapped",[12507]],[[13038,13038],"mapped",[12510]],[[13039,13039],"mapped",[12511]],[[13040,13040],"mapped",[12512]],[[13041,13041],"mapped",[12513]],[[13042,13042],"mapped",[12514]],[[13043,13043],"mapped",[12516]],[[13044,13044],"mapped",[12518]],[[13045,13045],"mapped",[12520]],[[13046,13046],"mapped",[12521]],[[13047,13047],"mapped",[12522]],[[13048,13048],"mapped",[12523]],[[13049,13049],"mapped",[12524]],[[13050,13050],"mapped",[12525]],[[13051,13051],"mapped",[12527]],[[13052,13052],"mapped",[12528]],[[13053,13053],"mapped",[12529]],[[13054,13054],"mapped",[12530]],[[13055,13055],"disallowed"],[[13056,13056],"mapped",[12450,12497,12540,12488]],[[13057,13057],"mapped",[12450,12523,12501,12449]],[[13058,13058],"mapped",[12450,12531,12506,12450]],[[13059,13059],"mapped",[12450,12540,12523]],[[13060,13060],"mapped",[12452,12491,12531,12464]],[[13061,13061],"mapped",[12452,12531,12481]],[[13062,13062],"mapped",[12454,12457,12531]],[[13063,13063],"mapped",[12456,12473,12463,12540,12489]],[[13064,13064],"mapped",[12456,12540,12459,12540]],[[13065,13065],"mapped",[12458,12531,12473]],[[13066,13066],"mapped",[12458,12540,12512]],[[13067,13067],"mapped",[12459,12452,12522]],[[13068,13068],"mapped",[12459,12521,12483,12488]],[[13069,13069],"mapped",[12459,12525,12522,12540]],[[13070,13070],"mapped",[12460,12525,12531]],[[13071,13071],"mapped",[12460,12531,12510]],[[13072,13072],"mapped",[12462,12460]],[[13073,13073],"mapped",[12462,12491,12540]],[[13074,13074],"mapped",[12461,12517,12522,12540]],[[13075,13075],"mapped",[12462,12523,12480,12540]],[[13076,13076],"mapped",[12461,12525]],[[13077,13077],"mapped",[12461,12525,12464,12521,12512]],[[13078,13078],"mapped",[12461,12525,12513,12540,12488,12523]],[[13079,13079],"mapped",[12461,12525,12527,12483,12488]],[[13080,13080],"mapped",[12464,12521,12512]],[[13081,13081],"mapped",[12464,12521,12512,12488,12531]],[[13082,13082],"mapped",[12463,12523,12476,12452,12525]],[[13083,13083],"mapped",[12463,12525,12540,12493]],[[13084,13084],"mapped",[12465,12540,12473]],[[13085,13085],"mapped",[12467,12523,12490]],[[13086,13086],"mapped",[12467,12540,12509]],[[13087,13087],"mapped",[12469,12452,12463,12523]],[[13088,13088],"mapped",[12469,12531,12481,12540,12512]],[[13089,13089],"mapped",[12471,12522,12531,12464]],[[13090,13090],"mapped",[12475,12531,12481]],[[13091,13091],"mapped",[12475,12531,12488]],[[13092,13092],"mapped",[12480,12540,12473]],[[13093,13093],"mapped",[12487,12471]],[[13094,13094],"mapped",[12489,12523]],[[13095,13095],"mapped",[12488,12531]],[[13096,13096],"mapped",[12490,12494]],[[13097,13097],"mapped",[12494,12483,12488]],[[13098,13098],"mapped",[12495,12452,12484]],[[13099,13099],"mapped",[12497,12540,12475,12531,12488]],[[13100,13100],"mapped",[12497,12540,12484]],[[13101,13101],"mapped",[12496,12540,12524,12523]],[[13102,13102],"mapped",[12500,12450,12473,12488,12523]],[[13103,13103],"mapped",[12500,12463,12523]],[[13104,13104],"mapped",[12500,12467]],[[13105,13105],"mapped",[12499,12523]],[[13106,13106],"mapped",[12501,12449,12521,12483,12489]],[[13107,13107],"mapped",[12501,12451,12540,12488]],[[13108,13108],"mapped",[12502,12483,12471,12455,12523]],[[13109,13109],"mapped",[12501,12521,12531]],[[13110,13110],"mapped",[12504,12463,12479,12540,12523]],[[13111,13111],"mapped",[12506,12477]],[[13112,13112],"mapped",[12506,12491,12498]],[[13113,13113],"mapped",[12504,12523,12484]],[[13114,13114],"mapped",[12506,12531,12473]],[[13115,13115],"mapped",[12506,12540,12472]],[[13116,13116],"mapped",[12505,12540,12479]],[[13117,13117],"mapped",[12509,12452,12531,12488]],[[13118,13118],"mapped",[12508,12523,12488]],[[13119,13119],"mapped",[12507,12531]],[[13120,13120],"mapped",[12509,12531,12489]],[[13121,13121],"mapped",[12507,12540,12523]],[[13122,13122],"mapped",[12507,12540,12531]],[[13123,13123],"mapped",[12510,12452,12463,12525]],[[13124,13124],"mapped",[12510,12452,12523]],[[13125,13125],"mapped",[12510,12483,12495]],[[13126,13126],"mapped",[12510,12523,12463]],[[13127,13127],"mapped",[12510,12531,12471,12519,12531]],[[13128,13128],"mapped",[12511,12463,12525,12531]],[[13129,13129],"mapped",[12511,12522]],[[13130,13130],"mapped",[12511,12522,12496,12540,12523]],[[13131,13131],"mapped",[12513,12460]],[[13132,13132],"mapped",[12513,12460,12488,12531]],[[13133,13133],"mapped",[12513,12540,12488,12523]],[[13134,13134],"mapped",[12516,12540,12489]],[[13135,13135],"mapped",[12516,12540,12523]],[[13136,13136],"mapped",[12518,12450,12531]],[[13137,13137],"mapped",[12522,12483,12488,12523]],[[13138,13138],"mapped",[12522,12521]],[[13139,13139],"mapped",[12523,12500,12540]],[[13140,13140],"mapped",[12523,12540,12502,12523]],[[13141,13141],"mapped",[12524,12512]],[[13142,13142],"mapped",[12524,12531,12488,12466,12531]],[[13143,13143],"mapped",[12527,12483,12488]],[[13144,13144],"mapped",[48,28857]],[[13145,13145],"mapped",[49,28857]],[[13146,13146],"mapped",[50,28857]],[[13147,13147],"mapped",[51,28857]],[[13148,13148],"mapped",[52,28857]],[[13149,13149],"mapped",[53,28857]],[[13150,13150],"mapped",[54,28857]],[[13151,13151],"mapped",[55,28857]],[[13152,13152],"mapped",[56,28857]],[[13153,13153],"mapped",[57,28857]],[[13154,13154],"mapped",[49,48,28857]],[[13155,13155],"mapped",[49,49,28857]],[[13156,13156],"mapped",[49,50,28857]],[[13157,13157],"mapped",[49,51,28857]],[[13158,13158],"mapped",[49,52,28857]],[[13159,13159],"mapped",[49,53,28857]],[[13160,13160],"mapped",[49,54,28857]],[[13161,13161],"mapped",[49,55,28857]],[[13162,13162],"mapped",[49,56,28857]],[[13163,13163],"mapped",[49,57,28857]],[[13164,13164],"mapped",[50,48,28857]],[[13165,13165],"mapped",[50,49,28857]],[[13166,13166],"mapped",[50,50,28857]],[[13167,13167],"mapped",[50,51,28857]],[[13168,13168],"mapped",[50,52,28857]],[[13169,13169],"mapped",[104,112,97]],[[13170,13170],"mapped",[100,97]],[[13171,13171],"mapped",[97,117]],[[13172,13172],"mapped",[98,97,114]],[[13173,13173],"mapped",[111,118]],[[13174,13174],"mapped",[112,99]],[[13175,13175],"mapped",[100,109]],[[13176,13176],"mapped",[100,109,50]],[[13177,13177],"mapped",[100,109,51]],[[13178,13178],"mapped",[105,117]],[[13179,13179],"mapped",[24179,25104]],[[13180,13180],"mapped",[26157,21644]],[[13181,13181],"mapped",[22823,27491]],[[13182,13182],"mapped",[26126,27835]],[[13183,13183],"mapped",[26666,24335,20250,31038]],[[13184,13184],"mapped",[112,97]],[[13185,13185],"mapped",[110,97]],[[13186,13186],"mapped",[956,97]],[[13187,13187],"mapped",[109,97]],[[13188,13188],"mapped",[107,97]],[[13189,13189],"mapped",[107,98]],[[13190,13190],"mapped",[109,98]],[[13191,13191],"mapped",[103,98]],[[13192,13192],"mapped",[99,97,108]],[[13193,13193],"mapped",[107,99,97,108]],[[13194,13194],"mapped",[112,102]],[[13195,13195],"mapped",[110,102]],[[13196,13196],"mapped",[956,102]],[[13197,13197],"mapped",[956,103]],[[13198,13198],"mapped",[109,103]],[[13199,13199],"mapped",[107,103]],[[13200,13200],"mapped",[104,122]],[[13201,13201],"mapped",[107,104,122]],[[13202,13202],"mapped",[109,104,122]],[[13203,13203],"mapped",[103,104,122]],[[13204,13204],"mapped",[116,104,122]],[[13205,13205],"mapped",[956,108]],[[13206,13206],"mapped",[109,108]],[[13207,13207],"mapped",[100,108]],[[13208,13208],"mapped",[107,108]],[[13209,13209],"mapped",[102,109]],[[13210,13210],"mapped",[110,109]],[[13211,13211],"mapped",[956,109]],[[13212,13212],"mapped",[109,109]],[[13213,13213],"mapped",[99,109]],[[13214,13214],"mapped",[107,109]],[[13215,13215],"mapped",[109,109,50]],[[13216,13216],"mapped",[99,109,50]],[[13217,13217],"mapped",[109,50]],[[13218,13218],"mapped",[107,109,50]],[[13219,13219],"mapped",[109,109,51]],[[13220,13220],"mapped",[99,109,51]],[[13221,13221],"mapped",[109,51]],[[13222,13222],"mapped",[107,109,51]],[[13223,13223],"mapped",[109,8725,115]],[[13224,13224],"mapped",[109,8725,115,50]],[[13225,13225],"mapped",[112,97]],[[13226,13226],"mapped",[107,112,97]],[[13227,13227],"mapped",[109,112,97]],[[13228,13228],"mapped",[103,112,97]],[[13229,13229],"mapped",[114,97,100]],[[13230,13230],"mapped",[114,97,100,8725,115]],[[13231,13231],"mapped",[114,97,100,8725,115,50]],[[13232,13232],"mapped",[112,115]],[[13233,13233],"mapped",[110,115]],[[13234,13234],"mapped",[956,115]],[[13235,13235],"mapped",[109,115]],[[13236,13236],"mapped",[112,118]],[[13237,13237],"mapped",[110,118]],[[13238,13238],"mapped",[956,118]],[[13239,13239],"mapped",[109,118]],[[13240,13240],"mapped",[107,118]],[[13241,13241],"mapped",[109,118]],[[13242,13242],"mapped",[112,119]],[[13243,13243],"mapped",[110,119]],[[13244,13244],"mapped",[956,119]],[[13245,13245],"mapped",[109,119]],[[13246,13246],"mapped",[107,119]],[[13247,13247],"mapped",[109,119]],[[13248,13248],"mapped",[107,969]],[[13249,13249],"mapped",[109,969]],[[13250,13250],"disallowed"],[[13251,13251],"mapped",[98,113]],[[13252,13252],"mapped",[99,99]],[[13253,13253],"mapped",[99,100]],[[13254,13254],"mapped",[99,8725,107,103]],[[13255,13255],"disallowed"],[[13256,13256],"mapped",[100,98]],[[13257,13257],"mapped",[103,121]],[[13258,13258],"mapped",[104,97]],[[13259,13259],"mapped",[104,112]],[[13260,13260],"mapped",[105,110]],[[13261,13261],"mapped",[107,107]],[[13262,13262],"mapped",[107,109]],[[13263,13263],"mapped",[107,116]],[[13264,13264],"mapped",[108,109]],[[13265,13265],"mapped",[108,110]],[[13266,13266],"mapped",[108,111,103]],[[13267,13267],"mapped",[108,120]],[[13268,13268],"mapped",[109,98]],[[13269,13269],"mapped",[109,105,108]],[[13270,13270],"mapped",[109,111,108]],[[13271,13271],"mapped",[112,104]],[[13272,13272],"disallowed"],[[13273,13273],"mapped",[112,112,109]],[[13274,13274],"mapped",[112,114]],[[13275,13275],"mapped",[115,114]],[[13276,13276],"mapped",[115,118]],[[13277,13277],"mapped",[119,98]],[[13278,13278],"mapped",[118,8725,109]],[[13279,13279],"mapped",[97,8725,109]],[[13280,13280],"mapped",[49,26085]],[[13281,13281],"mapped",[50,26085]],[[13282,13282],"mapped",[51,26085]],[[13283,13283],"mapped",[52,26085]],[[13284,13284],"mapped",[53,26085]],[[13285,13285],"mapped",[54,26085]],[[13286,13286],"mapped",[55,26085]],[[13287,13287],"mapped",[56,26085]],[[13288,13288],"mapped",[57,26085]],[[13289,13289],"mapped",[49,48,26085]],[[13290,13290],"mapped",[49,49,26085]],[[13291,13291],"mapped",[49,50,26085]],[[13292,13292],"mapped",[49,51,26085]],[[13293,13293],"mapped",[49,52,26085]],[[13294,13294],"mapped",[49,53,26085]],[[13295,13295],"mapped",[49,54,26085]],[[13296,13296],"mapped",[49,55,26085]],[[13297,13297],"mapped",[49,56,26085]],[[13298,13298],"mapped",[49,57,26085]],[[13299,13299],"mapped",[50,48,26085]],[[13300,13300],"mapped",[50,49,26085]],[[13301,13301],"mapped",[50,50,26085]],[[13302,13302],"mapped",[50,51,26085]],[[13303,13303],"mapped",[50,52,26085]],[[13304,13304],"mapped",[50,53,26085]],[[13305,13305],"mapped",[50,54,26085]],[[13306,13306],"mapped",[50,55,26085]],[[13307,13307],"mapped",[50,56,26085]],[[13308,13308],"mapped",[50,57,26085]],[[13309,13309],"mapped",[51,48,26085]],[[13310,13310],"mapped",[51,49,26085]],[[13311,13311],"mapped",[103,97,108]],[[13312,19893],"valid"],[[19894,19903],"disallowed"],[[19904,19967],"valid",[],"NV8"],[[19968,40869],"valid"],[[40870,40891],"valid"],[[40892,40899],"valid"],[[40900,40907],"valid"],[[40908,40908],"valid"],[[40909,40917],"valid"],[[40918,40959],"disallowed"],[[40960,42124],"valid"],[[42125,42127],"disallowed"],[[42128,42145],"valid",[],"NV8"],[[42146,42147],"valid",[],"NV8"],[[42148,42163],"valid",[],"NV8"],[[42164,42164],"valid",[],"NV8"],[[42165,42176],"valid",[],"NV8"],[[42177,42177],"valid",[],"NV8"],[[42178,42180],"valid",[],"NV8"],[[42181,42181],"valid",[],"NV8"],[[42182,42182],"valid",[],"NV8"],[[42183,42191],"disallowed"],[[42192,42237],"valid"],[[42238,42239],"valid",[],"NV8"],[[42240,42508],"valid"],[[42509,42511],"valid",[],"NV8"],[[42512,42539],"valid"],[[42540,42559],"disallowed"],[[42560,42560],"mapped",[42561]],[[42561,42561],"valid"],[[42562,42562],"mapped",[42563]],[[42563,42563],"valid"],[[42564,42564],"mapped",[42565]],[[42565,42565],"valid"],[[42566,42566],"mapped",[42567]],[[42567,42567],"valid"],[[42568,42568],"mapped",[42569]],[[42569,42569],"valid"],[[42570,42570],"mapped",[42571]],[[42571,42571],"valid"],[[42572,42572],"mapped",[42573]],[[42573,42573],"valid"],[[42574,42574],"mapped",[42575]],[[42575,42575],"valid"],[[42576,42576],"mapped",[42577]],[[42577,42577],"valid"],[[42578,42578],"mapped",[42579]],[[42579,42579],"valid"],[[42580,42580],"mapped",[42581]],[[42581,42581],"valid"],[[42582,42582],"mapped",[42583]],[[42583,42583],"valid"],[[42584,42584],"mapped",[42585]],[[42585,42585],"valid"],[[42586,42586],"mapped",[42587]],[[42587,42587],"valid"],[[42588,42588],"mapped",[42589]],[[42589,42589],"valid"],[[42590,42590],"mapped",[42591]],[[42591,42591],"valid"],[[42592,42592],"mapped",[42593]],[[42593,42593],"valid"],[[42594,42594],"mapped",[42595]],[[42595,42595],"valid"],[[42596,42596],"mapped",[42597]],[[42597,42597],"valid"],[[42598,42598],"mapped",[42599]],[[42599,42599],"valid"],[[42600,42600],"mapped",[42601]],[[42601,42601],"valid"],[[42602,42602],"mapped",[42603]],[[42603,42603],"valid"],[[42604,42604],"mapped",[42605]],[[42605,42607],"valid"],[[42608,42611],"valid",[],"NV8"],[[42612,42619],"valid"],[[42620,42621],"valid"],[[42622,42622],"valid",[],"NV8"],[[42623,42623],"valid"],[[42624,42624],"mapped",[42625]],[[42625,42625],"valid"],[[42626,42626],"mapped",[42627]],[[42627,42627],"valid"],[[42628,42628],"mapped",[42629]],[[42629,42629],"valid"],[[42630,42630],"mapped",[42631]],[[42631,42631],"valid"],[[42632,42632],"mapped",[42633]],[[42633,42633],"valid"],[[42634,42634],"mapped",[42635]],[[42635,42635],"valid"],[[42636,42636],"mapped",[42637]],[[42637,42637],"valid"],[[42638,42638],"mapped",[42639]],[[42639,42639],"valid"],[[42640,42640],"mapped",[42641]],[[42641,42641],"valid"],[[42642,42642],"mapped",[42643]],[[42643,42643],"valid"],[[42644,42644],"mapped",[42645]],[[42645,42645],"valid"],[[42646,42646],"mapped",[42647]],[[42647,42647],"valid"],[[42648,42648],"mapped",[42649]],[[42649,42649],"valid"],[[42650,42650],"mapped",[42651]],[[42651,42651],"valid"],[[42652,42652],"mapped",[1098]],[[42653,42653],"mapped",[1100]],[[42654,42654],"valid"],[[42655,42655],"valid"],[[42656,42725],"valid"],[[42726,42735],"valid",[],"NV8"],[[42736,42737],"valid"],[[42738,42743],"valid",[],"NV8"],[[42744,42751],"disallowed"],[[42752,42774],"valid",[],"NV8"],[[42775,42778],"valid"],[[42779,42783],"valid"],[[42784,42785],"valid",[],"NV8"],[[42786,42786],"mapped",[42787]],[[42787,42787],"valid"],[[42788,42788],"mapped",[42789]],[[42789,42789],"valid"],[[42790,42790],"mapped",[42791]],[[42791,42791],"valid"],[[42792,42792],"mapped",[42793]],[[42793,42793],"valid"],[[42794,42794],"mapped",[42795]],[[42795,42795],"valid"],[[42796,42796],"mapped",[42797]],[[42797,42797],"valid"],[[42798,42798],"mapped",[42799]],[[42799,42801],"valid"],[[42802,42802],"mapped",[42803]],[[42803,42803],"valid"],[[42804,42804],"mapped",[42805]],[[42805,42805],"valid"],[[42806,42806],"mapped",[42807]],[[42807,42807],"valid"],[[42808,42808],"mapped",[42809]],[[42809,42809],"valid"],[[42810,42810],"mapped",[42811]],[[42811,42811],"valid"],[[42812,42812],"mapped",[42813]],[[42813,42813],"valid"],[[42814,42814],"mapped",[42815]],[[42815,42815],"valid"],[[42816,42816],"mapped",[42817]],[[42817,42817],"valid"],[[42818,42818],"mapped",[42819]],[[42819,42819],"valid"],[[42820,42820],"mapped",[42821]],[[42821,42821],"valid"],[[42822,42822],"mapped",[42823]],[[42823,42823],"valid"],[[42824,42824],"mapped",[42825]],[[42825,42825],"valid"],[[42826,42826],"mapped",[42827]],[[42827,42827],"valid"],[[42828,42828],"mapped",[42829]],[[42829,42829],"valid"],[[42830,42830],"mapped",[42831]],[[42831,42831],"valid"],[[42832,42832],"mapped",[42833]],[[42833,42833],"valid"],[[42834,42834],"mapped",[42835]],[[42835,42835],"valid"],[[42836,42836],"mapped",[42837]],[[42837,42837],"valid"],[[42838,42838],"mapped",[42839]],[[42839,42839],"valid"],[[42840,42840],"mapped",[42841]],[[42841,42841],"valid"],[[42842,42842],"mapped",[42843]],[[42843,42843],"valid"],[[42844,42844],"mapped",[42845]],[[42845,42845],"valid"],[[42846,42846],"mapped",[42847]],[[42847,42847],"valid"],[[42848,42848],"mapped",[42849]],[[42849,42849],"valid"],[[42850,42850],"mapped",[42851]],[[42851,42851],"valid"],[[42852,42852],"mapped",[42853]],[[42853,42853],"valid"],[[42854,42854],"mapped",[42855]],[[42855,42855],"valid"],[[42856,42856],"mapped",[42857]],[[42857,42857],"valid"],[[42858,42858],"mapped",[42859]],[[42859,42859],"valid"],[[42860,42860],"mapped",[42861]],[[42861,42861],"valid"],[[42862,42862],"mapped",[42863]],[[42863,42863],"valid"],[[42864,42864],"mapped",[42863]],[[42865,42872],"valid"],[[42873,42873],"mapped",[42874]],[[42874,42874],"valid"],[[42875,42875],"mapped",[42876]],[[42876,42876],"valid"],[[42877,42877],"mapped",[7545]],[[42878,42878],"mapped",[42879]],[[42879,42879],"valid"],[[42880,42880],"mapped",[42881]],[[42881,42881],"valid"],[[42882,42882],"mapped",[42883]],[[42883,42883],"valid"],[[42884,42884],"mapped",[42885]],[[42885,42885],"valid"],[[42886,42886],"mapped",[42887]],[[42887,42888],"valid"],[[42889,42890],"valid",[],"NV8"],[[42891,42891],"mapped",[42892]],[[42892,42892],"valid"],[[42893,42893],"mapped",[613]],[[42894,42894],"valid"],[[42895,42895],"valid"],[[42896,42896],"mapped",[42897]],[[42897,42897],"valid"],[[42898,42898],"mapped",[42899]],[[42899,42899],"valid"],[[42900,42901],"valid"],[[42902,42902],"mapped",[42903]],[[42903,42903],"valid"],[[42904,42904],"mapped",[42905]],[[42905,42905],"valid"],[[42906,42906],"mapped",[42907]],[[42907,42907],"valid"],[[42908,42908],"mapped",[42909]],[[42909,42909],"valid"],[[42910,42910],"mapped",[42911]],[[42911,42911],"valid"],[[42912,42912],"mapped",[42913]],[[42913,42913],"valid"],[[42914,42914],"mapped",[42915]],[[42915,42915],"valid"],[[42916,42916],"mapped",[42917]],[[42917,42917],"valid"],[[42918,42918],"mapped",[42919]],[[42919,42919],"valid"],[[42920,42920],"mapped",[42921]],[[42921,42921],"valid"],[[42922,42922],"mapped",[614]],[[42923,42923],"mapped",[604]],[[42924,42924],"mapped",[609]],[[42925,42925],"mapped",[620]],[[42926,42927],"disallowed"],[[42928,42928],"mapped",[670]],[[42929,42929],"mapped",[647]],[[42930,42930],"mapped",[669]],[[42931,42931],"mapped",[43859]],[[42932,42932],"mapped",[42933]],[[42933,42933],"valid"],[[42934,42934],"mapped",[42935]],[[42935,42935],"valid"],[[42936,42998],"disallowed"],[[42999,42999],"valid"],[[43000,43000],"mapped",[295]],[[43001,43001],"mapped",[339]],[[43002,43002],"valid"],[[43003,43007],"valid"],[[43008,43047],"valid"],[[43048,43051],"valid",[],"NV8"],[[43052,43055],"disallowed"],[[43056,43065],"valid",[],"NV8"],[[43066,43071],"disallowed"],[[43072,43123],"valid"],[[43124,43127],"valid",[],"NV8"],[[43128,43135],"disallowed"],[[43136,43204],"valid"],[[43205,43213],"disallowed"],[[43214,43215],"valid",[],"NV8"],[[43216,43225],"valid"],[[43226,43231],"disallowed"],[[43232,43255],"valid"],[[43256,43258],"valid",[],"NV8"],[[43259,43259],"valid"],[[43260,43260],"valid",[],"NV8"],[[43261,43261],"valid"],[[43262,43263],"disallowed"],[[43264,43309],"valid"],[[43310,43311],"valid",[],"NV8"],[[43312,43347],"valid"],[[43348,43358],"disallowed"],[[43359,43359],"valid",[],"NV8"],[[43360,43388],"valid",[],"NV8"],[[43389,43391],"disallowed"],[[43392,43456],"valid"],[[43457,43469],"valid",[],"NV8"],[[43470,43470],"disallowed"],[[43471,43481],"valid"],[[43482,43485],"disallowed"],[[43486,43487],"valid",[],"NV8"],[[43488,43518],"valid"],[[43519,43519],"disallowed"],[[43520,43574],"valid"],[[43575,43583],"disallowed"],[[43584,43597],"valid"],[[43598,43599],"disallowed"],[[43600,43609],"valid"],[[43610,43611],"disallowed"],[[43612,43615],"valid",[],"NV8"],[[43616,43638],"valid"],[[43639,43641],"valid",[],"NV8"],[[43642,43643],"valid"],[[43644,43647],"valid"],[[43648,43714],"valid"],[[43715,43738],"disallowed"],[[43739,43741],"valid"],[[43742,43743],"valid",[],"NV8"],[[43744,43759],"valid"],[[43760,43761],"valid",[],"NV8"],[[43762,43766],"valid"],[[43767,43776],"disallowed"],[[43777,43782],"valid"],[[43783,43784],"disallowed"],[[43785,43790],"valid"],[[43791,43792],"disallowed"],[[43793,43798],"valid"],[[43799,43807],"disallowed"],[[43808,43814],"valid"],[[43815,43815],"disallowed"],[[43816,43822],"valid"],[[43823,43823],"disallowed"],[[43824,43866],"valid"],[[43867,43867],"valid",[],"NV8"],[[43868,43868],"mapped",[42791]],[[43869,43869],"mapped",[43831]],[[43870,43870],"mapped",[619]],[[43871,43871],"mapped",[43858]],[[43872,43875],"valid"],[[43876,43877],"valid"],[[43878,43887],"disallowed"],[[43888,43888],"mapped",[5024]],[[43889,43889],"mapped",[5025]],[[43890,43890],"mapped",[5026]],[[43891,43891],"mapped",[5027]],[[43892,43892],"mapped",[5028]],[[43893,43893],"mapped",[5029]],[[43894,43894],"mapped",[5030]],[[43895,43895],"mapped",[5031]],[[43896,43896],"mapped",[5032]],[[43897,43897],"mapped",[5033]],[[43898,43898],"mapped",[5034]],[[43899,43899],"mapped",[5035]],[[43900,43900],"mapped",[5036]],[[43901,43901],"mapped",[5037]],[[43902,43902],"mapped",[5038]],[[43903,43903],"mapped",[5039]],[[43904,43904],"mapped",[5040]],[[43905,43905],"mapped",[5041]],[[43906,43906],"mapped",[5042]],[[43907,43907],"mapped",[5043]],[[43908,43908],"mapped",[5044]],[[43909,43909],"mapped",[5045]],[[43910,43910],"mapped",[5046]],[[43911,43911],"mapped",[5047]],[[43912,43912],"mapped",[5048]],[[43913,43913],"mapped",[5049]],[[43914,43914],"mapped",[5050]],[[43915,43915],"mapped",[5051]],[[43916,43916],"mapped",[5052]],[[43917,43917],"mapped",[5053]],[[43918,43918],"mapped",[5054]],[[43919,43919],"mapped",[5055]],[[43920,43920],"mapped",[5056]],[[43921,43921],"mapped",[5057]],[[43922,43922],"mapped",[5058]],[[43923,43923],"mapped",[5059]],[[43924,43924],"mapped",[5060]],[[43925,43925],"mapped",[5061]],[[43926,43926],"mapped",[5062]],[[43927,43927],"mapped",[5063]],[[43928,43928],"mapped",[5064]],[[43929,43929],"mapped",[5065]],[[43930,43930],"mapped",[5066]],[[43931,43931],"mapped",[5067]],[[43932,43932],"mapped",[5068]],[[43933,43933],"mapped",[5069]],[[43934,43934],"mapped",[5070]],[[43935,43935],"mapped",[5071]],[[43936,43936],"mapped",[5072]],[[43937,43937],"mapped",[5073]],[[43938,43938],"mapped",[5074]],[[43939,43939],"mapped",[5075]],[[43940,43940],"mapped",[5076]],[[43941,43941],"mapped",[5077]],[[43942,43942],"mapped",[5078]],[[43943,43943],"mapped",[5079]],[[43944,43944],"mapped",[5080]],[[43945,43945],"mapped",[5081]],[[43946,43946],"mapped",[5082]],[[43947,43947],"mapped",[5083]],[[43948,43948],"mapped",[5084]],[[43949,43949],"mapped",[5085]],[[43950,43950],"mapped",[5086]],[[43951,43951],"mapped",[5087]],[[43952,43952],"mapped",[5088]],[[43953,43953],"mapped",[5089]],[[43954,43954],"mapped",[5090]],[[43955,43955],"mapped",[5091]],[[43956,43956],"mapped",[5092]],[[43957,43957],"mapped",[5093]],[[43958,43958],"mapped",[5094]],[[43959,43959],"mapped",[5095]],[[43960,43960],"mapped",[5096]],[[43961,43961],"mapped",[5097]],[[43962,43962],"mapped",[5098]],[[43963,43963],"mapped",[5099]],[[43964,43964],"mapped",[5100]],[[43965,43965],"mapped",[5101]],[[43966,43966],"mapped",[5102]],[[43967,43967],"mapped",[5103]],[[43968,44010],"valid"],[[44011,44011],"valid",[],"NV8"],[[44012,44013],"valid"],[[44014,44015],"disallowed"],[[44016,44025],"valid"],[[44026,44031],"disallowed"],[[44032,55203],"valid"],[[55204,55215],"disallowed"],[[55216,55238],"valid",[],"NV8"],[[55239,55242],"disallowed"],[[55243,55291],"valid",[],"NV8"],[[55292,55295],"disallowed"],[[55296,57343],"disallowed"],[[57344,63743],"disallowed"],[[63744,63744],"mapped",[35912]],[[63745,63745],"mapped",[26356]],[[63746,63746],"mapped",[36554]],[[63747,63747],"mapped",[36040]],[[63748,63748],"mapped",[28369]],[[63749,63749],"mapped",[20018]],[[63750,63750],"mapped",[21477]],[[63751,63752],"mapped",[40860]],[[63753,63753],"mapped",[22865]],[[63754,63754],"mapped",[37329]],[[63755,63755],"mapped",[21895]],[[63756,63756],"mapped",[22856]],[[63757,63757],"mapped",[25078]],[[63758,63758],"mapped",[30313]],[[63759,63759],"mapped",[32645]],[[63760,63760],"mapped",[34367]],[[63761,63761],"mapped",[34746]],[[63762,63762],"mapped",[35064]],[[63763,63763],"mapped",[37007]],[[63764,63764],"mapped",[27138]],[[63765,63765],"mapped",[27931]],[[63766,63766],"mapped",[28889]],[[63767,63767],"mapped",[29662]],[[63768,63768],"mapped",[33853]],[[63769,63769],"mapped",[37226]],[[63770,63770],"mapped",[39409]],[[63771,63771],"mapped",[20098]],[[63772,63772],"mapped",[21365]],[[63773,63773],"mapped",[27396]],[[63774,63774],"mapped",[29211]],[[63775,63775],"mapped",[34349]],[[63776,63776],"mapped",[40478]],[[63777,63777],"mapped",[23888]],[[63778,63778],"mapped",[28651]],[[63779,63779],"mapped",[34253]],[[63780,63780],"mapped",[35172]],[[63781,63781],"mapped",[25289]],[[63782,63782],"mapped",[33240]],[[63783,63783],"mapped",[34847]],[[63784,63784],"mapped",[24266]],[[63785,63785],"mapped",[26391]],[[63786,63786],"mapped",[28010]],[[63787,63787],"mapped",[29436]],[[63788,63788],"mapped",[37070]],[[63789,63789],"mapped",[20358]],[[63790,63790],"mapped",[20919]],[[63791,63791],"mapped",[21214]],[[63792,63792],"mapped",[25796]],[[63793,63793],"mapped",[27347]],[[63794,63794],"mapped",[29200]],[[63795,63795],"mapped",[30439]],[[63796,63796],"mapped",[32769]],[[63797,63797],"mapped",[34310]],[[63798,63798],"mapped",[34396]],[[63799,63799],"mapped",[36335]],[[63800,63800],"mapped",[38706]],[[63801,63801],"mapped",[39791]],[[63802,63802],"mapped",[40442]],[[63803,63803],"mapped",[30860]],[[63804,63804],"mapped",[31103]],[[63805,63805],"mapped",[32160]],[[63806,63806],"mapped",[33737]],[[63807,63807],"mapped",[37636]],[[63808,63808],"mapped",[40575]],[[63809,63809],"mapped",[35542]],[[63810,63810],"mapped",[22751]],[[63811,63811],"mapped",[24324]],[[63812,63812],"mapped",[31840]],[[63813,63813],"mapped",[32894]],[[63814,63814],"mapped",[29282]],[[63815,63815],"mapped",[30922]],[[63816,63816],"mapped",[36034]],[[63817,63817],"mapped",[38647]],[[63818,63818],"mapped",[22744]],[[63819,63819],"mapped",[23650]],[[63820,63820],"mapped",[27155]],[[63821,63821],"mapped",[28122]],[[63822,63822],"mapped",[28431]],[[63823,63823],"mapped",[32047]],[[63824,63824],"mapped",[32311]],[[63825,63825],"mapped",[38475]],[[63826,63826],"mapped",[21202]],[[63827,63827],"mapped",[32907]],[[63828,63828],"mapped",[20956]],[[63829,63829],"mapped",[20940]],[[63830,63830],"mapped",[31260]],[[63831,63831],"mapped",[32190]],[[63832,63832],"mapped",[33777]],[[63833,63833],"mapped",[38517]],[[63834,63834],"mapped",[35712]],[[63835,63835],"mapped",[25295]],[[63836,63836],"mapped",[27138]],[[63837,63837],"mapped",[35582]],[[63838,63838],"mapped",[20025]],[[63839,63839],"mapped",[23527]],[[63840,63840],"mapped",[24594]],[[63841,63841],"mapped",[29575]],[[63842,63842],"mapped",[30064]],[[63843,63843],"mapped",[21271]],[[63844,63844],"mapped",[30971]],[[63845,63845],"mapped",[20415]],[[63846,63846],"mapped",[24489]],[[63847,63847],"mapped",[19981]],[[63848,63848],"mapped",[27852]],[[63849,63849],"mapped",[25976]],[[63850,63850],"mapped",[32034]],[[63851,63851],"mapped",[21443]],[[63852,63852],"mapped",[22622]],[[63853,63853],"mapped",[30465]],[[63854,63854],"mapped",[33865]],[[63855,63855],"mapped",[35498]],[[63856,63856],"mapped",[27578]],[[63857,63857],"mapped",[36784]],[[63858,63858],"mapped",[27784]],[[63859,63859],"mapped",[25342]],[[63860,63860],"mapped",[33509]],[[63861,63861],"mapped",[25504]],[[63862,63862],"mapped",[30053]],[[63863,63863],"mapped",[20142]],[[63864,63864],"mapped",[20841]],[[63865,63865],"mapped",[20937]],[[63866,63866],"mapped",[26753]],[[63867,63867],"mapped",[31975]],[[63868,63868],"mapped",[33391]],[[63869,63869],"mapped",[35538]],[[63870,63870],"mapped",[37327]],[[63871,63871],"mapped",[21237]],[[63872,63872],"mapped",[21570]],[[63873,63873],"mapped",[22899]],[[63874,63874],"mapped",[24300]],[[63875,63875],"mapped",[26053]],[[63876,63876],"mapped",[28670]],[[63877,63877],"mapped",[31018]],[[63878,63878],"mapped",[38317]],[[63879,63879],"mapped",[39530]],[[63880,63880],"mapped",[40599]],[[63881,63881],"mapped",[40654]],[[63882,63882],"mapped",[21147]],[[63883,63883],"mapped",[26310]],[[63884,63884],"mapped",[27511]],[[63885,63885],"mapped",[36706]],[[63886,63886],"mapped",[24180]],[[63887,63887],"mapped",[24976]],[[63888,63888],"mapped",[25088]],[[63889,63889],"mapped",[25754]],[[63890,63890],"mapped",[28451]],[[63891,63891],"mapped",[29001]],[[63892,63892],"mapped",[29833]],[[63893,63893],"mapped",[31178]],[[63894,63894],"mapped",[32244]],[[63895,63895],"mapped",[32879]],[[63896,63896],"mapped",[36646]],[[63897,63897],"mapped",[34030]],[[63898,63898],"mapped",[36899]],[[63899,63899],"mapped",[37706]],[[63900,63900],"mapped",[21015]],[[63901,63901],"mapped",[21155]],[[63902,63902],"mapped",[21693]],[[63903,63903],"mapped",[28872]],[[63904,63904],"mapped",[35010]],[[63905,63905],"mapped",[35498]],[[63906,63906],"mapped",[24265]],[[63907,63907],"mapped",[24565]],[[63908,63908],"mapped",[25467]],[[63909,63909],"mapped",[27566]],[[63910,63910],"mapped",[31806]],[[63911,63911],"mapped",[29557]],[[63912,63912],"mapped",[20196]],[[63913,63913],"mapped",[22265]],[[63914,63914],"mapped",[23527]],[[63915,63915],"mapped",[23994]],[[63916,63916],"mapped",[24604]],[[63917,63917],"mapped",[29618]],[[63918,63918],"mapped",[29801]],[[63919,63919],"mapped",[32666]],[[63920,63920],"mapped",[32838]],[[63921,63921],"mapped",[37428]],[[63922,63922],"mapped",[38646]],[[63923,63923],"mapped",[38728]],[[63924,63924],"mapped",[38936]],[[63925,63925],"mapped",[20363]],[[63926,63926],"mapped",[31150]],[[63927,63927],"mapped",[37300]],[[63928,63928],"mapped",[38584]],[[63929,63929],"mapped",[24801]],[[63930,63930],"mapped",[20102]],[[63931,63931],"mapped",[20698]],[[63932,63932],"mapped",[23534]],[[63933,63933],"mapped",[23615]],[[63934,63934],"mapped",[26009]],[[63935,63935],"mapped",[27138]],[[63936,63936],"mapped",[29134]],[[63937,63937],"mapped",[30274]],[[63938,63938],"mapped",[34044]],[[63939,63939],"mapped",[36988]],[[63940,63940],"mapped",[40845]],[[63941,63941],"mapped",[26248]],[[63942,63942],"mapped",[38446]],[[63943,63943],"mapped",[21129]],[[63944,63944],"mapped",[26491]],[[63945,63945],"mapped",[26611]],[[63946,63946],"mapped",[27969]],[[63947,63947],"mapped",[28316]],[[63948,63948],"mapped",[29705]],[[63949,63949],"mapped",[30041]],[[63950,63950],"mapped",[30827]],[[63951,63951],"mapped",[32016]],[[63952,63952],"mapped",[39006]],[[63953,63953],"mapped",[20845]],[[63954,63954],"mapped",[25134]],[[63955,63955],"mapped",[38520]],[[63956,63956],"mapped",[20523]],[[63957,63957],"mapped",[23833]],[[63958,63958],"mapped",[28138]],[[63959,63959],"mapped",[36650]],[[63960,63960],"mapped",[24459]],[[63961,63961],"mapped",[24900]],[[63962,63962],"mapped",[26647]],[[63963,63963],"mapped",[29575]],[[63964,63964],"mapped",[38534]],[[63965,63965],"mapped",[21033]],[[63966,63966],"mapped",[21519]],[[63967,63967],"mapped",[23653]],[[63968,63968],"mapped",[26131]],[[63969,63969],"mapped",[26446]],[[63970,63970],"mapped",[26792]],[[63971,63971],"mapped",[27877]],[[63972,63972],"mapped",[29702]],[[63973,63973],"mapped",[30178]],[[63974,63974],"mapped",[32633]],[[63975,63975],"mapped",[35023]],[[63976,63976],"mapped",[35041]],[[63977,63977],"mapped",[37324]],[[63978,63978],"mapped",[38626]],[[63979,63979],"mapped",[21311]],[[63980,63980],"mapped",[28346]],[[63981,63981],"mapped",[21533]],[[63982,63982],"mapped",[29136]],[[63983,63983],"mapped",[29848]],[[63984,63984],"mapped",[34298]],[[63985,63985],"mapped",[38563]],[[63986,63986],"mapped",[40023]],[[63987,63987],"mapped",[40607]],[[63988,63988],"mapped",[26519]],[[63989,63989],"mapped",[28107]],[[63990,63990],"mapped",[33256]],[[63991,63991],"mapped",[31435]],[[63992,63992],"mapped",[31520]],[[63993,63993],"mapped",[31890]],[[63994,63994],"mapped",[29376]],[[63995,63995],"mapped",[28825]],[[63996,63996],"mapped",[35672]],[[63997,63997],"mapped",[20160]],[[63998,63998],"mapped",[33590]],[[63999,63999],"mapped",[21050]],[[64000,64000],"mapped",[20999]],[[64001,64001],"mapped",[24230]],[[64002,64002],"mapped",[25299]],[[64003,64003],"mapped",[31958]],[[64004,64004],"mapped",[23429]],[[64005,64005],"mapped",[27934]],[[64006,64006],"mapped",[26292]],[[64007,64007],"mapped",[36667]],[[64008,64008],"mapped",[34892]],[[64009,64009],"mapped",[38477]],[[64010,64010],"mapped",[35211]],[[64011,64011],"mapped",[24275]],[[64012,64012],"mapped",[20800]],[[64013,64013],"mapped",[21952]],[[64014,64015],"valid"],[[64016,64016],"mapped",[22618]],[[64017,64017],"valid"],[[64018,64018],"mapped",[26228]],[[64019,64020],"valid"],[[64021,64021],"mapped",[20958]],[[64022,64022],"mapped",[29482]],[[64023,64023],"mapped",[30410]],[[64024,64024],"mapped",[31036]],[[64025,64025],"mapped",[31070]],[[64026,64026],"mapped",[31077]],[[64027,64027],"mapped",[31119]],[[64028,64028],"mapped",[38742]],[[64029,64029],"mapped",[31934]],[[64030,64030],"mapped",[32701]],[[64031,64031],"valid"],[[64032,64032],"mapped",[34322]],[[64033,64033],"valid"],[[64034,64034],"mapped",[35576]],[[64035,64036],"valid"],[[64037,64037],"mapped",[36920]],[[64038,64038],"mapped",[37117]],[[64039,64041],"valid"],[[64042,64042],"mapped",[39151]],[[64043,64043],"mapped",[39164]],[[64044,64044],"mapped",[39208]],[[64045,64045],"mapped",[40372]],[[64046,64046],"mapped",[37086]],[[64047,64047],"mapped",[38583]],[[64048,64048],"mapped",[20398]],[[64049,64049],"mapped",[20711]],[[64050,64050],"mapped",[20813]],[[64051,64051],"mapped",[21193]],[[64052,64052],"mapped",[21220]],[[64053,64053],"mapped",[21329]],[[64054,64054],"mapped",[21917]],[[64055,64055],"mapped",[22022]],[[64056,64056],"mapped",[22120]],[[64057,64057],"mapped",[22592]],[[64058,64058],"mapped",[22696]],[[64059,64059],"mapped",[23652]],[[64060,64060],"mapped",[23662]],[[64061,64061],"mapped",[24724]],[[64062,64062],"mapped",[24936]],[[64063,64063],"mapped",[24974]],[[64064,64064],"mapped",[25074]],[[64065,64065],"mapped",[25935]],[[64066,64066],"mapped",[26082]],[[64067,64067],"mapped",[26257]],[[64068,64068],"mapped",[26757]],[[64069,64069],"mapped",[28023]],[[64070,64070],"mapped",[28186]],[[64071,64071],"mapped",[28450]],[[64072,64072],"mapped",[29038]],[[64073,64073],"mapped",[29227]],[[64074,64074],"mapped",[29730]],[[64075,64075],"mapped",[30865]],[[64076,64076],"mapped",[31038]],[[64077,64077],"mapped",[31049]],[[64078,64078],"mapped",[31048]],[[64079,64079],"mapped",[31056]],[[64080,64080],"mapped",[31062]],[[64081,64081],"mapped",[31069]],[[64082,64082],"mapped",[31117]],[[64083,64083],"mapped",[31118]],[[64084,64084],"mapped",[31296]],[[64085,64085],"mapped",[31361]],[[64086,64086],"mapped",[31680]],[[64087,64087],"mapped",[32244]],[[64088,64088],"mapped",[32265]],[[64089,64089],"mapped",[32321]],[[64090,64090],"mapped",[32626]],[[64091,64091],"mapped",[32773]],[[64092,64092],"mapped",[33261]],[[64093,64094],"mapped",[33401]],[[64095,64095],"mapped",[33879]],[[64096,64096],"mapped",[35088]],[[64097,64097],"mapped",[35222]],[[64098,64098],"mapped",[35585]],[[64099,64099],"mapped",[35641]],[[64100,64100],"mapped",[36051]],[[64101,64101],"mapped",[36104]],[[64102,64102],"mapped",[36790]],[[64103,64103],"mapped",[36920]],[[64104,64104],"mapped",[38627]],[[64105,64105],"mapped",[38911]],[[64106,64106],"mapped",[38971]],[[64107,64107],"mapped",[24693]],[[64108,64108],"mapped",[148206]],[[64109,64109],"mapped",[33304]],[[64110,64111],"disallowed"],[[64112,64112],"mapped",[20006]],[[64113,64113],"mapped",[20917]],[[64114,64114],"mapped",[20840]],[[64115,64115],"mapped",[20352]],[[64116,64116],"mapped",[20805]],[[64117,64117],"mapped",[20864]],[[64118,64118],"mapped",[21191]],[[64119,64119],"mapped",[21242]],[[64120,64120],"mapped",[21917]],[[64121,64121],"mapped",[21845]],[[64122,64122],"mapped",[21913]],[[64123,64123],"mapped",[21986]],[[64124,64124],"mapped",[22618]],[[64125,64125],"mapped",[22707]],[[64126,64126],"mapped",[22852]],[[64127,64127],"mapped",[22868]],[[64128,64128],"mapped",[23138]],[[64129,64129],"mapped",[23336]],[[64130,64130],"mapped",[24274]],[[64131,64131],"mapped",[24281]],[[64132,64132],"mapped",[24425]],[[64133,64133],"mapped",[24493]],[[64134,64134],"mapped",[24792]],[[64135,64135],"mapped",[24910]],[[64136,64136],"mapped",[24840]],[[64137,64137],"mapped",[24974]],[[64138,64138],"mapped",[24928]],[[64139,64139],"mapped",[25074]],[[64140,64140],"mapped",[25140]],[[64141,64141],"mapped",[25540]],[[64142,64142],"mapped",[25628]],[[64143,64143],"mapped",[25682]],[[64144,64144],"mapped",[25942]],[[64145,64145],"mapped",[26228]],[[64146,64146],"mapped",[26391]],[[64147,64147],"mapped",[26395]],[[64148,64148],"mapped",[26454]],[[64149,64149],"mapped",[27513]],[[64150,64150],"mapped",[27578]],[[64151,64151],"mapped",[27969]],[[64152,64152],"mapped",[28379]],[[64153,64153],"mapped",[28363]],[[64154,64154],"mapped",[28450]],[[64155,64155],"mapped",[28702]],[[64156,64156],"mapped",[29038]],[[64157,64157],"mapped",[30631]],[[64158,64158],"mapped",[29237]],[[64159,64159],"mapped",[29359]],[[64160,64160],"mapped",[29482]],[[64161,64161],"mapped",[29809]],[[64162,64162],"mapped",[29958]],[[64163,64163],"mapped",[30011]],[[64164,64164],"mapped",[30237]],[[64165,64165],"mapped",[30239]],[[64166,64166],"mapped",[30410]],[[64167,64167],"mapped",[30427]],[[64168,64168],"mapped",[30452]],[[64169,64169],"mapped",[30538]],[[64170,64170],"mapped",[30528]],[[64171,64171],"mapped",[30924]],[[64172,64172],"mapped",[31409]],[[64173,64173],"mapped",[31680]],[[64174,64174],"mapped",[31867]],[[64175,64175],"mapped",[32091]],[[64176,64176],"mapped",[32244]],[[64177,64177],"mapped",[32574]],[[64178,64178],"mapped",[32773]],[[64179,64179],"mapped",[33618]],[[64180,64180],"mapped",[33775]],[[64181,64181],"mapped",[34681]],[[64182,64182],"mapped",[35137]],[[64183,64183],"mapped",[35206]],[[64184,64184],"mapped",[35222]],[[64185,64185],"mapped",[35519]],[[64186,64186],"mapped",[35576]],[[64187,64187],"mapped",[35531]],[[64188,64188],"mapped",[35585]],[[64189,64189],"mapped",[35582]],[[64190,64190],"mapped",[35565]],[[64191,64191],"mapped",[35641]],[[64192,64192],"mapped",[35722]],[[64193,64193],"mapped",[36104]],[[64194,64194],"mapped",[36664]],[[64195,64195],"mapped",[36978]],[[64196,64196],"mapped",[37273]],[[64197,64197],"mapped",[37494]],[[64198,64198],"mapped",[38524]],[[64199,64199],"mapped",[38627]],[[64200,64200],"mapped",[38742]],[[64201,64201],"mapped",[38875]],[[64202,64202],"mapped",[38911]],[[64203,64203],"mapped",[38923]],[[64204,64204],"mapped",[38971]],[[64205,64205],"mapped",[39698]],[[64206,64206],"mapped",[40860]],[[64207,64207],"mapped",[141386]],[[64208,64208],"mapped",[141380]],[[64209,64209],"mapped",[144341]],[[64210,64210],"mapped",[15261]],[[64211,64211],"mapped",[16408]],[[64212,64212],"mapped",[16441]],[[64213,64213],"mapped",[152137]],[[64214,64214],"mapped",[154832]],[[64215,64215],"mapped",[163539]],[[64216,64216],"mapped",[40771]],[[64217,64217],"mapped",[40846]],[[64218,64255],"disallowed"],[[64256,64256],"mapped",[102,102]],[[64257,64257],"mapped",[102,105]],[[64258,64258],"mapped",[102,108]],[[64259,64259],"mapped",[102,102,105]],[[64260,64260],"mapped",[102,102,108]],[[64261,64262],"mapped",[115,116]],[[64263,64274],"disallowed"],[[64275,64275],"mapped",[1396,1398]],[[64276,64276],"mapped",[1396,1381]],[[64277,64277],"mapped",[1396,1387]],[[64278,64278],"mapped",[1406,1398]],[[64279,64279],"mapped",[1396,1389]],[[64280,64284],"disallowed"],[[64285,64285],"mapped",[1497,1460]],[[64286,64286],"valid"],[[64287,64287],"mapped",[1522,1463]],[[64288,64288],"mapped",[1506]],[[64289,64289],"mapped",[1488]],[[64290,64290],"mapped",[1491]],[[64291,64291],"mapped",[1492]],[[64292,64292],"mapped",[1499]],[[64293,64293],"mapped",[1500]],[[64294,64294],"mapped",[1501]],[[64295,64295],"mapped",[1512]],[[64296,64296],"mapped",[1514]],[[64297,64297],"disallowed_STD3_mapped",[43]],[[64298,64298],"mapped",[1513,1473]],[[64299,64299],"mapped",[1513,1474]],[[64300,64300],"mapped",[1513,1468,1473]],[[64301,64301],"mapped",[1513,1468,1474]],[[64302,64302],"mapped",[1488,1463]],[[64303,64303],"mapped",[1488,1464]],[[64304,64304],"mapped",[1488,1468]],[[64305,64305],"mapped",[1489,1468]],[[64306,64306],"mapped",[1490,1468]],[[64307,64307],"mapped",[1491,1468]],[[64308,64308],"mapped",[1492,1468]],[[64309,64309],"mapped",[1493,1468]],[[64310,64310],"mapped",[1494,1468]],[[64311,64311],"disallowed"],[[64312,64312],"mapped",[1496,1468]],[[64313,64313],"mapped",[1497,1468]],[[64314,64314],"mapped",[1498,1468]],[[64315,64315],"mapped",[1499,1468]],[[64316,64316],"mapped",[1500,1468]],[[64317,64317],"disallowed"],[[64318,64318],"mapped",[1502,1468]],[[64319,64319],"disallowed"],[[64320,64320],"mapped",[1504,1468]],[[64321,64321],"mapped",[1505,1468]],[[64322,64322],"disallowed"],[[64323,64323],"mapped",[1507,1468]],[[64324,64324],"mapped",[1508,1468]],[[64325,64325],"disallowed"],[[64326,64326],"mapped",[1510,1468]],[[64327,64327],"mapped",[1511,1468]],[[64328,64328],"mapped",[1512,1468]],[[64329,64329],"mapped",[1513,1468]],[[64330,64330],"mapped",[1514,1468]],[[64331,64331],"mapped",[1493,1465]],[[64332,64332],"mapped",[1489,1471]],[[64333,64333],"mapped",[1499,1471]],[[64334,64334],"mapped",[1508,1471]],[[64335,64335],"mapped",[1488,1500]],[[64336,64337],"mapped",[1649]],[[64338,64341],"mapped",[1659]],[[64342,64345],"mapped",[1662]],[[64346,64349],"mapped",[1664]],[[64350,64353],"mapped",[1658]],[[64354,64357],"mapped",[1663]],[[64358,64361],"mapped",[1657]],[[64362,64365],"mapped",[1700]],[[64366,64369],"mapped",[1702]],[[64370,64373],"mapped",[1668]],[[64374,64377],"mapped",[1667]],[[64378,64381],"mapped",[1670]],[[64382,64385],"mapped",[1671]],[[64386,64387],"mapped",[1677]],[[64388,64389],"mapped",[1676]],[[64390,64391],"mapped",[1678]],[[64392,64393],"mapped",[1672]],[[64394,64395],"mapped",[1688]],[[64396,64397],"mapped",[1681]],[[64398,64401],"mapped",[1705]],[[64402,64405],"mapped",[1711]],[[64406,64409],"mapped",[1715]],[[64410,64413],"mapped",[1713]],[[64414,64415],"mapped",[1722]],[[64416,64419],"mapped",[1723]],[[64420,64421],"mapped",[1728]],[[64422,64425],"mapped",[1729]],[[64426,64429],"mapped",[1726]],[[64430,64431],"mapped",[1746]],[[64432,64433],"mapped",[1747]],[[64434,64449],"valid",[],"NV8"],[[64450,64466],"disallowed"],[[64467,64470],"mapped",[1709]],[[64471,64472],"mapped",[1735]],[[64473,64474],"mapped",[1734]],[[64475,64476],"mapped",[1736]],[[64477,64477],"mapped",[1735,1652]],[[64478,64479],"mapped",[1739]],[[64480,64481],"mapped",[1733]],[[64482,64483],"mapped",[1737]],[[64484,64487],"mapped",[1744]],[[64488,64489],"mapped",[1609]],[[64490,64491],"mapped",[1574,1575]],[[64492,64493],"mapped",[1574,1749]],[[64494,64495],"mapped",[1574,1608]],[[64496,64497],"mapped",[1574,1735]],[[64498,64499],"mapped",[1574,1734]],[[64500,64501],"mapped",[1574,1736]],[[64502,64504],"mapped",[1574,1744]],[[64505,64507],"mapped",[1574,1609]],[[64508,64511],"mapped",[1740]],[[64512,64512],"mapped",[1574,1580]],[[64513,64513],"mapped",[1574,1581]],[[64514,64514],"mapped",[1574,1605]],[[64515,64515],"mapped",[1574,1609]],[[64516,64516],"mapped",[1574,1610]],[[64517,64517],"mapped",[1576,1580]],[[64518,64518],"mapped",[1576,1581]],[[64519,64519],"mapped",[1576,1582]],[[64520,64520],"mapped",[1576,1605]],[[64521,64521],"mapped",[1576,1609]],[[64522,64522],"mapped",[1576,1610]],[[64523,64523],"mapped",[1578,1580]],[[64524,64524],"mapped",[1578,1581]],[[64525,64525],"mapped",[1578,1582]],[[64526,64526],"mapped",[1578,1605]],[[64527,64527],"mapped",[1578,1609]],[[64528,64528],"mapped",[1578,1610]],[[64529,64529],"mapped",[1579,1580]],[[64530,64530],"mapped",[1579,1605]],[[64531,64531],"mapped",[1579,1609]],[[64532,64532],"mapped",[1579,1610]],[[64533,64533],"mapped",[1580,1581]],[[64534,64534],"mapped",[1580,1605]],[[64535,64535],"mapped",[1581,1580]],[[64536,64536],"mapped",[1581,1605]],[[64537,64537],"mapped",[1582,1580]],[[64538,64538],"mapped",[1582,1581]],[[64539,64539],"mapped",[1582,1605]],[[64540,64540],"mapped",[1587,1580]],[[64541,64541],"mapped",[1587,1581]],[[64542,64542],"mapped",[1587,1582]],[[64543,64543],"mapped",[1587,1605]],[[64544,64544],"mapped",[1589,1581]],[[64545,64545],"mapped",[1589,1605]],[[64546,64546],"mapped",[1590,1580]],[[64547,64547],"mapped",[1590,1581]],[[64548,64548],"mapped",[1590,1582]],[[64549,64549],"mapped",[1590,1605]],[[64550,64550],"mapped",[1591,1581]],[[64551,64551],"mapped",[1591,1605]],[[64552,64552],"mapped",[1592,1605]],[[64553,64553],"mapped",[1593,1580]],[[64554,64554],"mapped",[1593,1605]],[[64555,64555],"mapped",[1594,1580]],[[64556,64556],"mapped",[1594,1605]],[[64557,64557],"mapped",[1601,1580]],[[64558,64558],"mapped",[1601,1581]],[[64559,64559],"mapped",[1601,1582]],[[64560,64560],"mapped",[1601,1605]],[[64561,64561],"mapped",[1601,1609]],[[64562,64562],"mapped",[1601,1610]],[[64563,64563],"mapped",[1602,1581]],[[64564,64564],"mapped",[1602,1605]],[[64565,64565],"mapped",[1602,1609]],[[64566,64566],"mapped",[1602,1610]],[[64567,64567],"mapped",[1603,1575]],[[64568,64568],"mapped",[1603,1580]],[[64569,64569],"mapped",[1603,1581]],[[64570,64570],"mapped",[1603,1582]],[[64571,64571],"mapped",[1603,1604]],[[64572,64572],"mapped",[1603,1605]],[[64573,64573],"mapped",[1603,1609]],[[64574,64574],"mapped",[1603,1610]],[[64575,64575],"mapped",[1604,1580]],[[64576,64576],"mapped",[1604,1581]],[[64577,64577],"mapped",[1604,1582]],[[64578,64578],"mapped",[1604,1605]],[[64579,64579],"mapped",[1604,1609]],[[64580,64580],"mapped",[1604,1610]],[[64581,64581],"mapped",[1605,1580]],[[64582,64582],"mapped",[1605,1581]],[[64583,64583],"mapped",[1605,1582]],[[64584,64584],"mapped",[1605,1605]],[[64585,64585],"mapped",[1605,1609]],[[64586,64586],"mapped",[1605,1610]],[[64587,64587],"mapped",[1606,1580]],[[64588,64588],"mapped",[1606,1581]],[[64589,64589],"mapped",[1606,1582]],[[64590,64590],"mapped",[1606,1605]],[[64591,64591],"mapped",[1606,1609]],[[64592,64592],"mapped",[1606,1610]],[[64593,64593],"mapped",[1607,1580]],[[64594,64594],"mapped",[1607,1605]],[[64595,64595],"mapped",[1607,1609]],[[64596,64596],"mapped",[1607,1610]],[[64597,64597],"mapped",[1610,1580]],[[64598,64598],"mapped",[1610,1581]],[[64599,64599],"mapped",[1610,1582]],[[64600,64600],"mapped",[1610,1605]],[[64601,64601],"mapped",[1610,1609]],[[64602,64602],"mapped",[1610,1610]],[[64603,64603],"mapped",[1584,1648]],[[64604,64604],"mapped",[1585,1648]],[[64605,64605],"mapped",[1609,1648]],[[64606,64606],"disallowed_STD3_mapped",[32,1612,1617]],[[64607,64607],"disallowed_STD3_mapped",[32,1613,1617]],[[64608,64608],"disallowed_STD3_mapped",[32,1614,1617]],[[64609,64609],"disallowed_STD3_mapped",[32,1615,1617]],[[64610,64610],"disallowed_STD3_mapped",[32,1616,1617]],[[64611,64611],"disallowed_STD3_mapped",[32,1617,1648]],[[64612,64612],"mapped",[1574,1585]],[[64613,64613],"mapped",[1574,1586]],[[64614,64614],"mapped",[1574,1605]],[[64615,64615],"mapped",[1574,1606]],[[64616,64616],"mapped",[1574,1609]],[[64617,64617],"mapped",[1574,1610]],[[64618,64618],"mapped",[1576,1585]],[[64619,64619],"mapped",[1576,1586]],[[64620,64620],"mapped",[1576,1605]],[[64621,64621],"mapped",[1576,1606]],[[64622,64622],"mapped",[1576,1609]],[[64623,64623],"mapped",[1576,1610]],[[64624,64624],"mapped",[1578,1585]],[[64625,64625],"mapped",[1578,1586]],[[64626,64626],"mapped",[1578,1605]],[[64627,64627],"mapped",[1578,1606]],[[64628,64628],"mapped",[1578,1609]],[[64629,64629],"mapped",[1578,1610]],[[64630,64630],"mapped",[1579,1585]],[[64631,64631],"mapped",[1579,1586]],[[64632,64632],"mapped",[1579,1605]],[[64633,64633],"mapped",[1579,1606]],[[64634,64634],"mapped",[1579,1609]],[[64635,64635],"mapped",[1579,1610]],[[64636,64636],"mapped",[1601,1609]],[[64637,64637],"mapped",[1601,1610]],[[64638,64638],"mapped",[1602,1609]],[[64639,64639],"mapped",[1602,1610]],[[64640,64640],"mapped",[1603,1575]],[[64641,64641],"mapped",[1603,1604]],[[64642,64642],"mapped",[1603,1605]],[[64643,64643],"mapped",[1603,1609]],[[64644,64644],"mapped",[1603,1610]],[[64645,64645],"mapped",[1604,1605]],[[64646,64646],"mapped",[1604,1609]],[[64647,64647],"mapped",[1604,1610]],[[64648,64648],"mapped",[1605,1575]],[[64649,64649],"mapped",[1605,1605]],[[64650,64650],"mapped",[1606,1585]],[[64651,64651],"mapped",[1606,1586]],[[64652,64652],"mapped",[1606,1605]],[[64653,64653],"mapped",[1606,1606]],[[64654,64654],"mapped",[1606,1609]],[[64655,64655],"mapped",[1606,1610]],[[64656,64656],"mapped",[1609,1648]],[[64657,64657],"mapped",[1610,1585]],[[64658,64658],"mapped",[1610,1586]],[[64659,64659],"mapped",[1610,1605]],[[64660,64660],"mapped",[1610,1606]],[[64661,64661],"mapped",[1610,1609]],[[64662,64662],"mapped",[1610,1610]],[[64663,64663],"mapped",[1574,1580]],[[64664,64664],"mapped",[1574,1581]],[[64665,64665],"mapped",[1574,1582]],[[64666,64666],"mapped",[1574,1605]],[[64667,64667],"mapped",[1574,1607]],[[64668,64668],"mapped",[1576,1580]],[[64669,64669],"mapped",[1576,1581]],[[64670,64670],"mapped",[1576,1582]],[[64671,64671],"mapped",[1576,1605]],[[64672,64672],"mapped",[1576,1607]],[[64673,64673],"mapped",[1578,1580]],[[64674,64674],"mapped",[1578,1581]],[[64675,64675],"mapped",[1578,1582]],[[64676,64676],"mapped",[1578,1605]],[[64677,64677],"mapped",[1578,1607]],[[64678,64678],"mapped",[1579,1605]],[[64679,64679],"mapped",[1580,1581]],[[64680,64680],"mapped",[1580,1605]],[[64681,64681],"mapped",[1581,1580]],[[64682,64682],"mapped",[1581,1605]],[[64683,64683],"mapped",[1582,1580]],[[64684,64684],"mapped",[1582,1605]],[[64685,64685],"mapped",[1587,1580]],[[64686,64686],"mapped",[1587,1581]],[[64687,64687],"mapped",[1587,1582]],[[64688,64688],"mapped",[1587,1605]],[[64689,64689],"mapped",[1589,1581]],[[64690,64690],"mapped",[1589,1582]],[[64691,64691],"mapped",[1589,1605]],[[64692,64692],"mapped",[1590,1580]],[[64693,64693],"mapped",[1590,1581]],[[64694,64694],"mapped",[1590,1582]],[[64695,64695],"mapped",[1590,1605]],[[64696,64696],"mapped",[1591,1581]],[[64697,64697],"mapped",[1592,1605]],[[64698,64698],"mapped",[1593,1580]],[[64699,64699],"mapped",[1593,1605]],[[64700,64700],"mapped",[1594,1580]],[[64701,64701],"mapped",[1594,1605]],[[64702,64702],"mapped",[1601,1580]],[[64703,64703],"mapped",[1601,1581]],[[64704,64704],"mapped",[1601,1582]],[[64705,64705],"mapped",[1601,1605]],[[64706,64706],"mapped",[1602,1581]],[[64707,64707],"mapped",[1602,1605]],[[64708,64708],"mapped",[1603,1580]],[[64709,64709],"mapped",[1603,1581]],[[64710,64710],"mapped",[1603,1582]],[[64711,64711],"mapped",[1603,1604]],[[64712,64712],"mapped",[1603,1605]],[[64713,64713],"mapped",[1604,1580]],[[64714,64714],"mapped",[1604,1581]],[[64715,64715],"mapped",[1604,1582]],[[64716,64716],"mapped",[1604,1605]],[[64717,64717],"mapped",[1604,1607]],[[64718,64718],"mapped",[1605,1580]],[[64719,64719],"mapped",[1605,1581]],[[64720,64720],"mapped",[1605,1582]],[[64721,64721],"mapped",[1605,1605]],[[64722,64722],"mapped",[1606,1580]],[[64723,64723],"mapped",[1606,1581]],[[64724,64724],"mapped",[1606,1582]],[[64725,64725],"mapped",[1606,1605]],[[64726,64726],"mapped",[1606,1607]],[[64727,64727],"mapped",[1607,1580]],[[64728,64728],"mapped",[1607,1605]],[[64729,64729],"mapped",[1607,1648]],[[64730,64730],"mapped",[1610,1580]],[[64731,64731],"mapped",[1610,1581]],[[64732,64732],"mapped",[1610,1582]],[[64733,64733],"mapped",[1610,1605]],[[64734,64734],"mapped",[1610,1607]],[[64735,64735],"mapped",[1574,1605]],[[64736,64736],"mapped",[1574,1607]],[[64737,64737],"mapped",[1576,1605]],[[64738,64738],"mapped",[1576,1607]],[[64739,64739],"mapped",[1578,1605]],[[64740,64740],"mapped",[1578,1607]],[[64741,64741],"mapped",[1579,1605]],[[64742,64742],"mapped",[1579,1607]],[[64743,64743],"mapped",[1587,1605]],[[64744,64744],"mapped",[1587,1607]],[[64745,64745],"mapped",[1588,1605]],[[64746,64746],"mapped",[1588,1607]],[[64747,64747],"mapped",[1603,1604]],[[64748,64748],"mapped",[1603,1605]],[[64749,64749],"mapped",[1604,1605]],[[64750,64750],"mapped",[1606,1605]],[[64751,64751],"mapped",[1606,1607]],[[64752,64752],"mapped",[1610,1605]],[[64753,64753],"mapped",[1610,1607]],[[64754,64754],"mapped",[1600,1614,1617]],[[64755,64755],"mapped",[1600,1615,1617]],[[64756,64756],"mapped",[1600,1616,1617]],[[64757,64757],"mapped",[1591,1609]],[[64758,64758],"mapped",[1591,1610]],[[64759,64759],"mapped",[1593,1609]],[[64760,64760],"mapped",[1593,1610]],[[64761,64761],"mapped",[1594,1609]],[[64762,64762],"mapped",[1594,1610]],[[64763,64763],"mapped",[1587,1609]],[[64764,64764],"mapped",[1587,1610]],[[64765,64765],"mapped",[1588,1609]],[[64766,64766],"mapped",[1588,1610]],[[64767,64767],"mapped",[1581,1609]],[[64768,64768],"mapped",[1581,1610]],[[64769,64769],"mapped",[1580,1609]],[[64770,64770],"mapped",[1580,1610]],[[64771,64771],"mapped",[1582,1609]],[[64772,64772],"mapped",[1582,1610]],[[64773,64773],"mapped",[1589,1609]],[[64774,64774],"mapped",[1589,1610]],[[64775,64775],"mapped",[1590,1609]],[[64776,64776],"mapped",[1590,1610]],[[64777,64777],"mapped",[1588,1580]],[[64778,64778],"mapped",[1588,1581]],[[64779,64779],"mapped",[1588,1582]],[[64780,64780],"mapped",[1588,1605]],[[64781,64781],"mapped",[1588,1585]],[[64782,64782],"mapped",[1587,1585]],[[64783,64783],"mapped",[1589,1585]],[[64784,64784],"mapped",[1590,1585]],[[64785,64785],"mapped",[1591,1609]],[[64786,64786],"mapped",[1591,1610]],[[64787,64787],"mapped",[1593,1609]],[[64788,64788],"mapped",[1593,1610]],[[64789,64789],"mapped",[1594,1609]],[[64790,64790],"mapped",[1594,1610]],[[64791,64791],"mapped",[1587,1609]],[[64792,64792],"mapped",[1587,1610]],[[64793,64793],"mapped",[1588,1609]],[[64794,64794],"mapped",[1588,1610]],[[64795,64795],"mapped",[1581,1609]],[[64796,64796],"mapped",[1581,1610]],[[64797,64797],"mapped",[1580,1609]],[[64798,64798],"mapped",[1580,1610]],[[64799,64799],"mapped",[1582,1609]],[[64800,64800],"mapped",[1582,1610]],[[64801,64801],"mapped",[1589,1609]],[[64802,64802],"mapped",[1589,1610]],[[64803,64803],"mapped",[1590,1609]],[[64804,64804],"mapped",[1590,1610]],[[64805,64805],"mapped",[1588,1580]],[[64806,64806],"mapped",[1588,1581]],[[64807,64807],"mapped",[1588,1582]],[[64808,64808],"mapped",[1588,1605]],[[64809,64809],"mapped",[1588,1585]],[[64810,64810],"mapped",[1587,1585]],[[64811,64811],"mapped",[1589,1585]],[[64812,64812],"mapped",[1590,1585]],[[64813,64813],"mapped",[1588,1580]],[[64814,64814],"mapped",[1588,1581]],[[64815,64815],"mapped",[1588,1582]],[[64816,64816],"mapped",[1588,1605]],[[64817,64817],"mapped",[1587,1607]],[[64818,64818],"mapped",[1588,1607]],[[64819,64819],"mapped",[1591,1605]],[[64820,64820],"mapped",[1587,1580]],[[64821,64821],"mapped",[1587,1581]],[[64822,64822],"mapped",[1587,1582]],[[64823,64823],"mapped",[1588,1580]],[[64824,64824],"mapped",[1588,1581]],[[64825,64825],"mapped",[1588,1582]],[[64826,64826],"mapped",[1591,1605]],[[64827,64827],"mapped",[1592,1605]],[[64828,64829],"mapped",[1575,1611]],[[64830,64831],"valid",[],"NV8"],[[64832,64847],"disallowed"],[[64848,64848],"mapped",[1578,1580,1605]],[[64849,64850],"mapped",[1578,1581,1580]],[[64851,64851],"mapped",[1578,1581,1605]],[[64852,64852],"mapped",[1578,1582,1605]],[[64853,64853],"mapped",[1578,1605,1580]],[[64854,64854],"mapped",[1578,1605,1581]],[[64855,64855],"mapped",[1578,1605,1582]],[[64856,64857],"mapped",[1580,1605,1581]],[[64858,64858],"mapped",[1581,1605,1610]],[[64859,64859],"mapped",[1581,1605,1609]],[[64860,64860],"mapped",[1587,1581,1580]],[[64861,64861],"mapped",[1587,1580,1581]],[[64862,64862],"mapped",[1587,1580,1609]],[[64863,64864],"mapped",[1587,1605,1581]],[[64865,64865],"mapped",[1587,1605,1580]],[[64866,64867],"mapped",[1587,1605,1605]],[[64868,64869],"mapped",[1589,1581,1581]],[[64870,64870],"mapped",[1589,1605,1605]],[[64871,64872],"mapped",[1588,1581,1605]],[[64873,64873],"mapped",[1588,1580,1610]],[[64874,64875],"mapped",[1588,1605,1582]],[[64876,64877],"mapped",[1588,1605,1605]],[[64878,64878],"mapped",[1590,1581,1609]],[[64879,64880],"mapped",[1590,1582,1605]],[[64881,64882],"mapped",[1591,1605,1581]],[[64883,64883],"mapped",[1591,1605,1605]],[[64884,64884],"mapped",[1591,1605,1610]],[[64885,64885],"mapped",[1593,1580,1605]],[[64886,64887],"mapped",[1593,1605,1605]],[[64888,64888],"mapped",[1593,1605,1609]],[[64889,64889],"mapped",[1594,1605,1605]],[[64890,64890],"mapped",[1594,1605,1610]],[[64891,64891],"mapped",[1594,1605,1609]],[[64892,64893],"mapped",[1601,1582,1605]],[[64894,64894],"mapped",[1602,1605,1581]],[[64895,64895],"mapped",[1602,1605,1605]],[[64896,64896],"mapped",[1604,1581,1605]],[[64897,64897],"mapped",[1604,1581,1610]],[[64898,64898],"mapped",[1604,1581,1609]],[[64899,64900],"mapped",[1604,1580,1580]],[[64901,64902],"mapped",[1604,1582,1605]],[[64903,64904],"mapped",[1604,1605,1581]],[[64905,64905],"mapped",[1605,1581,1580]],[[64906,64906],"mapped",[1605,1581,1605]],[[64907,64907],"mapped",[1605,1581,1610]],[[64908,64908],"mapped",[1605,1580,1581]],[[64909,64909],"mapped",[1605,1580,1605]],[[64910,64910],"mapped",[1605,1582,1580]],[[64911,64911],"mapped",[1605,1582,1605]],[[64912,64913],"disallowed"],[[64914,64914],"mapped",[1605,1580,1582]],[[64915,64915],"mapped",[1607,1605,1580]],[[64916,64916],"mapped",[1607,1605,1605]],[[64917,64917],"mapped",[1606,1581,1605]],[[64918,64918],"mapped",[1606,1581,1609]],[[64919,64920],"mapped",[1606,1580,1605]],[[64921,64921],"mapped",[1606,1580,1609]],[[64922,64922],"mapped",[1606,1605,1610]],[[64923,64923],"mapped",[1606,1605,1609]],[[64924,64925],"mapped",[1610,1605,1605]],[[64926,64926],"mapped",[1576,1582,1610]],[[64927,64927],"mapped",[1578,1580,1610]],[[64928,64928],"mapped",[1578,1580,1609]],[[64929,64929],"mapped",[1578,1582,1610]],[[64930,64930],"mapped",[1578,1582,1609]],[[64931,64931],"mapped",[1578,1605,1610]],[[64932,64932],"mapped",[1578,1605,1609]],[[64933,64933],"mapped",[1580,1605,1610]],[[64934,64934],"mapped",[1580,1581,1609]],[[64935,64935],"mapped",[1580,1605,1609]],[[64936,64936],"mapped",[1587,1582,1609]],[[64937,64937],"mapped",[1589,1581,1610]],[[64938,64938],"mapped",[1588,1581,1610]],[[64939,64939],"mapped",[1590,1581,1610]],[[64940,64940],"mapped",[1604,1580,1610]],[[64941,64941],"mapped",[1604,1605,1610]],[[64942,64942],"mapped",[1610,1581,1610]],[[64943,64943],"mapped",[1610,1580,1610]],[[64944,64944],"mapped",[1610,1605,1610]],[[64945,64945],"mapped",[1605,1605,1610]],[[64946,64946],"mapped",[1602,1605,1610]],[[64947,64947],"mapped",[1606,1581,1610]],[[64948,64948],"mapped",[1602,1605,1581]],[[64949,64949],"mapped",[1604,1581,1605]],[[64950,64950],"mapped",[1593,1605,1610]],[[64951,64951],"mapped",[1603,1605,1610]],[[64952,64952],"mapped",[1606,1580,1581]],[[64953,64953],"mapped",[1605,1582,1610]],[[64954,64954],"mapped",[1604,1580,1605]],[[64955,64955],"mapped",[1603,1605,1605]],[[64956,64956],"mapped",[1604,1580,1605]],[[64957,64957],"mapped",[1606,1580,1581]],[[64958,64958],"mapped",[1580,1581,1610]],[[64959,64959],"mapped",[1581,1580,1610]],[[64960,64960],"mapped",[1605,1580,1610]],[[64961,64961],"mapped",[1601,1605,1610]],[[64962,64962],"mapped",[1576,1581,1610]],[[64963,64963],"mapped",[1603,1605,1605]],[[64964,64964],"mapped",[1593,1580,1605]],[[64965,64965],"mapped",[1589,1605,1605]],[[64966,64966],"mapped",[1587,1582,1610]],[[64967,64967],"mapped",[1606,1580,1610]],[[64968,64975],"disallowed"],[[64976,65007],"disallowed"],[[65008,65008],"mapped",[1589,1604,1746]],[[65009,65009],"mapped",[1602,1604,1746]],[[65010,65010],"mapped",[1575,1604,1604,1607]],[[65011,65011],"mapped",[1575,1603,1576,1585]],[[65012,65012],"mapped",[1605,1581,1605,1583]],[[65013,65013],"mapped",[1589,1604,1593,1605]],[[65014,65014],"mapped",[1585,1587,1608,1604]],[[65015,65015],"mapped",[1593,1604,1610,1607]],[[65016,65016],"mapped",[1608,1587,1604,1605]],[[65017,65017],"mapped",[1589,1604,1609]],[[65018,65018],"disallowed_STD3_mapped",[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605]],[[65019,65019],"disallowed_STD3_mapped",[1580,1604,32,1580,1604,1575,1604,1607]],[[65020,65020],"mapped",[1585,1740,1575,1604]],[[65021,65021],"valid",[],"NV8"],[[65022,65023],"disallowed"],[[65024,65039],"ignored"],[[65040,65040],"disallowed_STD3_mapped",[44]],[[65041,65041],"mapped",[12289]],[[65042,65042],"disallowed"],[[65043,65043],"disallowed_STD3_mapped",[58]],[[65044,65044],"disallowed_STD3_mapped",[59]],[[65045,65045],"disallowed_STD3_mapped",[33]],[[65046,65046],"disallowed_STD3_mapped",[63]],[[65047,65047],"mapped",[12310]],[[65048,65048],"mapped",[12311]],[[65049,65049],"disallowed"],[[65050,65055],"disallowed"],[[65056,65059],"valid"],[[65060,65062],"valid"],[[65063,65069],"valid"],[[65070,65071],"valid"],[[65072,65072],"disallowed"],[[65073,65073],"mapped",[8212]],[[65074,65074],"mapped",[8211]],[[65075,65076],"disallowed_STD3_mapped",[95]],[[65077,65077],"disallowed_STD3_mapped",[40]],[[65078,65078],"disallowed_STD3_mapped",[41]],[[65079,65079],"disallowed_STD3_mapped",[123]],[[65080,65080],"disallowed_STD3_mapped",[125]],[[65081,65081],"mapped",[12308]],[[65082,65082],"mapped",[12309]],[[65083,65083],"mapped",[12304]],[[65084,65084],"mapped",[12305]],[[65085,65085],"mapped",[12298]],[[65086,65086],"mapped",[12299]],[[65087,65087],"mapped",[12296]],[[65088,65088],"mapped",[12297]],[[65089,65089],"mapped",[12300]],[[65090,65090],"mapped",[12301]],[[65091,65091],"mapped",[12302]],[[65092,65092],"mapped",[12303]],[[65093,65094],"valid",[],"NV8"],[[65095,65095],"disallowed_STD3_mapped",[91]],[[65096,65096],"disallowed_STD3_mapped",[93]],[[65097,65100],"disallowed_STD3_mapped",[32,773]],[[65101,65103],"disallowed_STD3_mapped",[95]],[[65104,65104],"disallowed_STD3_mapped",[44]],[[65105,65105],"mapped",[12289]],[[65106,65106],"disallowed"],[[65107,65107],"disallowed"],[[65108,65108],"disallowed_STD3_mapped",[59]],[[65109,65109],"disallowed_STD3_mapped",[58]],[[65110,65110],"disallowed_STD3_mapped",[63]],[[65111,65111],"disallowed_STD3_mapped",[33]],[[65112,65112],"mapped",[8212]],[[65113,65113],"disallowed_STD3_mapped",[40]],[[65114,65114],"disallowed_STD3_mapped",[41]],[[65115,65115],"disallowed_STD3_mapped",[123]],[[65116,65116],"disallowed_STD3_mapped",[125]],[[65117,65117],"mapped",[12308]],[[65118,65118],"mapped",[12309]],[[65119,65119],"disallowed_STD3_mapped",[35]],[[65120,65120],"disallowed_STD3_mapped",[38]],[[65121,65121],"disallowed_STD3_mapped",[42]],[[65122,65122],"disallowed_STD3_mapped",[43]],[[65123,65123],"mapped",[45]],[[65124,65124],"disallowed_STD3_mapped",[60]],[[65125,65125],"disallowed_STD3_mapped",[62]],[[65126,65126],"disallowed_STD3_mapped",[61]],[[65127,65127],"disallowed"],[[65128,65128],"disallowed_STD3_mapped",[92]],[[65129,65129],"disallowed_STD3_mapped",[36]],[[65130,65130],"disallowed_STD3_mapped",[37]],[[65131,65131],"disallowed_STD3_mapped",[64]],[[65132,65135],"disallowed"],[[65136,65136],"disallowed_STD3_mapped",[32,1611]],[[65137,65137],"mapped",[1600,1611]],[[65138,65138],"disallowed_STD3_mapped",[32,1612]],[[65139,65139],"valid"],[[65140,65140],"disallowed_STD3_mapped",[32,1613]],[[65141,65141],"disallowed"],[[65142,65142],"disallowed_STD3_mapped",[32,1614]],[[65143,65143],"mapped",[1600,1614]],[[65144,65144],"disallowed_STD3_mapped",[32,1615]],[[65145,65145],"mapped",[1600,1615]],[[65146,65146],"disallowed_STD3_mapped",[32,1616]],[[65147,65147],"mapped",[1600,1616]],[[65148,65148],"disallowed_STD3_mapped",[32,1617]],[[65149,65149],"mapped",[1600,1617]],[[65150,65150],"disallowed_STD3_mapped",[32,1618]],[[65151,65151],"mapped",[1600,1618]],[[65152,65152],"mapped",[1569]],[[65153,65154],"mapped",[1570]],[[65155,65156],"mapped",[1571]],[[65157,65158],"mapped",[1572]],[[65159,65160],"mapped",[1573]],[[65161,65164],"mapped",[1574]],[[65165,65166],"mapped",[1575]],[[65167,65170],"mapped",[1576]],[[65171,65172],"mapped",[1577]],[[65173,65176],"mapped",[1578]],[[65177,65180],"mapped",[1579]],[[65181,65184],"mapped",[1580]],[[65185,65188],"mapped",[1581]],[[65189,65192],"mapped",[1582]],[[65193,65194],"mapped",[1583]],[[65195,65196],"mapped",[1584]],[[65197,65198],"mapped",[1585]],[[65199,65200],"mapped",[1586]],[[65201,65204],"mapped",[1587]],[[65205,65208],"mapped",[1588]],[[65209,65212],"mapped",[1589]],[[65213,65216],"mapped",[1590]],[[65217,65220],"mapped",[1591]],[[65221,65224],"mapped",[1592]],[[65225,65228],"mapped",[1593]],[[65229,65232],"mapped",[1594]],[[65233,65236],"mapped",[1601]],[[65237,65240],"mapped",[1602]],[[65241,65244],"mapped",[1603]],[[65245,65248],"mapped",[1604]],[[65249,65252],"mapped",[1605]],[[65253,65256],"mapped",[1606]],[[65257,65260],"mapped",[1607]],[[65261,65262],"mapped",[1608]],[[65263,65264],"mapped",[1609]],[[65265,65268],"mapped",[1610]],[[65269,65270],"mapped",[1604,1570]],[[65271,65272],"mapped",[1604,1571]],[[65273,65274],"mapped",[1604,1573]],[[65275,65276],"mapped",[1604,1575]],[[65277,65278],"disallowed"],[[65279,65279],"ignored"],[[65280,65280],"disallowed"],[[65281,65281],"disallowed_STD3_mapped",[33]],[[65282,65282],"disallowed_STD3_mapped",[34]],[[65283,65283],"disallowed_STD3_mapped",[35]],[[65284,65284],"disallowed_STD3_mapped",[36]],[[65285,65285],"disallowed_STD3_mapped",[37]],[[65286,65286],"disallowed_STD3_mapped",[38]],[[65287,65287],"disallowed_STD3_mapped",[39]],[[65288,65288],"disallowed_STD3_mapped",[40]],[[65289,65289],"disallowed_STD3_mapped",[41]],[[65290,65290],"disallowed_STD3_mapped",[42]],[[65291,65291],"disallowed_STD3_mapped",[43]],[[65292,65292],"disallowed_STD3_mapped",[44]],[[65293,65293],"mapped",[45]],[[65294,65294],"mapped",[46]],[[65295,65295],"disallowed_STD3_mapped",[47]],[[65296,65296],"mapped",[48]],[[65297,65297],"mapped",[49]],[[65298,65298],"mapped",[50]],[[65299,65299],"mapped",[51]],[[65300,65300],"mapped",[52]],[[65301,65301],"mapped",[53]],[[65302,65302],"mapped",[54]],[[65303,65303],"mapped",[55]],[[65304,65304],"mapped",[56]],[[65305,65305],"mapped",[57]],[[65306,65306],"disallowed_STD3_mapped",[58]],[[65307,65307],"disallowed_STD3_mapped",[59]],[[65308,65308],"disallowed_STD3_mapped",[60]],[[65309,65309],"disallowed_STD3_mapped",[61]],[[65310,65310],"disallowed_STD3_mapped",[62]],[[65311,65311],"disallowed_STD3_mapped",[63]],[[65312,65312],"disallowed_STD3_mapped",[64]],[[65313,65313],"mapped",[97]],[[65314,65314],"mapped",[98]],[[65315,65315],"mapped",[99]],[[65316,65316],"mapped",[100]],[[65317,65317],"mapped",[101]],[[65318,65318],"mapped",[102]],[[65319,65319],"mapped",[103]],[[65320,65320],"mapped",[104]],[[65321,65321],"mapped",[105]],[[65322,65322],"mapped",[106]],[[65323,65323],"mapped",[107]],[[65324,65324],"mapped",[108]],[[65325,65325],"mapped",[109]],[[65326,65326],"mapped",[110]],[[65327,65327],"mapped",[111]],[[65328,65328],"mapped",[112]],[[65329,65329],"mapped",[113]],[[65330,65330],"mapped",[114]],[[65331,65331],"mapped",[115]],[[65332,65332],"mapped",[116]],[[65333,65333],"mapped",[117]],[[65334,65334],"mapped",[118]],[[65335,65335],"mapped",[119]],[[65336,65336],"mapped",[120]],[[65337,65337],"mapped",[121]],[[65338,65338],"mapped",[122]],[[65339,65339],"disallowed_STD3_mapped",[91]],[[65340,65340],"disallowed_STD3_mapped",[92]],[[65341,65341],"disallowed_STD3_mapped",[93]],[[65342,65342],"disallowed_STD3_mapped",[94]],[[65343,65343],"disallowed_STD3_mapped",[95]],[[65344,65344],"disallowed_STD3_mapped",[96]],[[65345,65345],"mapped",[97]],[[65346,65346],"mapped",[98]],[[65347,65347],"mapped",[99]],[[65348,65348],"mapped",[100]],[[65349,65349],"mapped",[101]],[[65350,65350],"mapped",[102]],[[65351,65351],"mapped",[103]],[[65352,65352],"mapped",[104]],[[65353,65353],"mapped",[105]],[[65354,65354],"mapped",[106]],[[65355,65355],"mapped",[107]],[[65356,65356],"mapped",[108]],[[65357,65357],"mapped",[109]],[[65358,65358],"mapped",[110]],[[65359,65359],"mapped",[111]],[[65360,65360],"mapped",[112]],[[65361,65361],"mapped",[113]],[[65362,65362],"mapped",[114]],[[65363,65363],"mapped",[115]],[[65364,65364],"mapped",[116]],[[65365,65365],"mapped",[117]],[[65366,65366],"mapped",[118]],[[65367,65367],"mapped",[119]],[[65368,65368],"mapped",[120]],[[65369,65369],"mapped",[121]],[[65370,65370],"mapped",[122]],[[65371,65371],"disallowed_STD3_mapped",[123]],[[65372,65372],"disallowed_STD3_mapped",[124]],[[65373,65373],"disallowed_STD3_mapped",[125]],[[65374,65374],"disallowed_STD3_mapped",[126]],[[65375,65375],"mapped",[10629]],[[65376,65376],"mapped",[10630]],[[65377,65377],"mapped",[46]],[[65378,65378],"mapped",[12300]],[[65379,65379],"mapped",[12301]],[[65380,65380],"mapped",[12289]],[[65381,65381],"mapped",[12539]],[[65382,65382],"mapped",[12530]],[[65383,65383],"mapped",[12449]],[[65384,65384],"mapped",[12451]],[[65385,65385],"mapped",[12453]],[[65386,65386],"mapped",[12455]],[[65387,65387],"mapped",[12457]],[[65388,65388],"mapped",[12515]],[[65389,65389],"mapped",[12517]],[[65390,65390],"mapped",[12519]],[[65391,65391],"mapped",[12483]],[[65392,65392],"mapped",[12540]],[[65393,65393],"mapped",[12450]],[[65394,65394],"mapped",[12452]],[[65395,65395],"mapped",[12454]],[[65396,65396],"mapped",[12456]],[[65397,65397],"mapped",[12458]],[[65398,65398],"mapped",[12459]],[[65399,65399],"mapped",[12461]],[[65400,65400],"mapped",[12463]],[[65401,65401],"mapped",[12465]],[[65402,65402],"mapped",[12467]],[[65403,65403],"mapped",[12469]],[[65404,65404],"mapped",[12471]],[[65405,65405],"mapped",[12473]],[[65406,65406],"mapped",[12475]],[[65407,65407],"mapped",[12477]],[[65408,65408],"mapped",[12479]],[[65409,65409],"mapped",[12481]],[[65410,65410],"mapped",[12484]],[[65411,65411],"mapped",[12486]],[[65412,65412],"mapped",[12488]],[[65413,65413],"mapped",[12490]],[[65414,65414],"mapped",[12491]],[[65415,65415],"mapped",[12492]],[[65416,65416],"mapped",[12493]],[[65417,65417],"mapped",[12494]],[[65418,65418],"mapped",[12495]],[[65419,65419],"mapped",[12498]],[[65420,65420],"mapped",[12501]],[[65421,65421],"mapped",[12504]],[[65422,65422],"mapped",[12507]],[[65423,65423],"mapped",[12510]],[[65424,65424],"mapped",[12511]],[[65425,65425],"mapped",[12512]],[[65426,65426],"mapped",[12513]],[[65427,65427],"mapped",[12514]],[[65428,65428],"mapped",[12516]],[[65429,65429],"mapped",[12518]],[[65430,65430],"mapped",[12520]],[[65431,65431],"mapped",[12521]],[[65432,65432],"mapped",[12522]],[[65433,65433],"mapped",[12523]],[[65434,65434],"mapped",[12524]],[[65435,65435],"mapped",[12525]],[[65436,65436],"mapped",[12527]],[[65437,65437],"mapped",[12531]],[[65438,65438],"mapped",[12441]],[[65439,65439],"mapped",[12442]],[[65440,65440],"disallowed"],[[65441,65441],"mapped",[4352]],[[65442,65442],"mapped",[4353]],[[65443,65443],"mapped",[4522]],[[65444,65444],"mapped",[4354]],[[65445,65445],"mapped",[4524]],[[65446,65446],"mapped",[4525]],[[65447,65447],"mapped",[4355]],[[65448,65448],"mapped",[4356]],[[65449,65449],"mapped",[4357]],[[65450,65450],"mapped",[4528]],[[65451,65451],"mapped",[4529]],[[65452,65452],"mapped",[4530]],[[65453,65453],"mapped",[4531]],[[65454,65454],"mapped",[4532]],[[65455,65455],"mapped",[4533]],[[65456,65456],"mapped",[4378]],[[65457,65457],"mapped",[4358]],[[65458,65458],"mapped",[4359]],[[65459,65459],"mapped",[4360]],[[65460,65460],"mapped",[4385]],[[65461,65461],"mapped",[4361]],[[65462,65462],"mapped",[4362]],[[65463,65463],"mapped",[4363]],[[65464,65464],"mapped",[4364]],[[65465,65465],"mapped",[4365]],[[65466,65466],"mapped",[4366]],[[65467,65467],"mapped",[4367]],[[65468,65468],"mapped",[4368]],[[65469,65469],"mapped",[4369]],[[65470,65470],"mapped",[4370]],[[65471,65473],"disallowed"],[[65474,65474],"mapped",[4449]],[[65475,65475],"mapped",[4450]],[[65476,65476],"mapped",[4451]],[[65477,65477],"mapped",[4452]],[[65478,65478],"mapped",[4453]],[[65479,65479],"mapped",[4454]],[[65480,65481],"disallowed"],[[65482,65482],"mapped",[4455]],[[65483,65483],"mapped",[4456]],[[65484,65484],"mapped",[4457]],[[65485,65485],"mapped",[4458]],[[65486,65486],"mapped",[4459]],[[65487,65487],"mapped",[4460]],[[65488,65489],"disallowed"],[[65490,65490],"mapped",[4461]],[[65491,65491],"mapped",[4462]],[[65492,65492],"mapped",[4463]],[[65493,65493],"mapped",[4464]],[[65494,65494],"mapped",[4465]],[[65495,65495],"mapped",[4466]],[[65496,65497],"disallowed"],[[65498,65498],"mapped",[4467]],[[65499,65499],"mapped",[4468]],[[65500,65500],"mapped",[4469]],[[65501,65503],"disallowed"],[[65504,65504],"mapped",[162]],[[65505,65505],"mapped",[163]],[[65506,65506],"mapped",[172]],[[65507,65507],"disallowed_STD3_mapped",[32,772]],[[65508,65508],"mapped",[166]],[[65509,65509],"mapped",[165]],[[65510,65510],"mapped",[8361]],[[65511,65511],"disallowed"],[[65512,65512],"mapped",[9474]],[[65513,65513],"mapped",[8592]],[[65514,65514],"mapped",[8593]],[[65515,65515],"mapped",[8594]],[[65516,65516],"mapped",[8595]],[[65517,65517],"mapped",[9632]],[[65518,65518],"mapped",[9675]],[[65519,65528],"disallowed"],[[65529,65531],"disallowed"],[[65532,65532],"disallowed"],[[65533,65533],"disallowed"],[[65534,65535],"disallowed"],[[65536,65547],"valid"],[[65548,65548],"disallowed"],[[65549,65574],"valid"],[[65575,65575],"disallowed"],[[65576,65594],"valid"],[[65595,65595],"disallowed"],[[65596,65597],"valid"],[[65598,65598],"disallowed"],[[65599,65613],"valid"],[[65614,65615],"disallowed"],[[65616,65629],"valid"],[[65630,65663],"disallowed"],[[65664,65786],"valid"],[[65787,65791],"disallowed"],[[65792,65794],"valid",[],"NV8"],[[65795,65798],"disallowed"],[[65799,65843],"valid",[],"NV8"],[[65844,65846],"disallowed"],[[65847,65855],"valid",[],"NV8"],[[65856,65930],"valid",[],"NV8"],[[65931,65932],"valid",[],"NV8"],[[65933,65935],"disallowed"],[[65936,65947],"valid",[],"NV8"],[[65948,65951],"disallowed"],[[65952,65952],"valid",[],"NV8"],[[65953,65999],"disallowed"],[[66000,66044],"valid",[],"NV8"],[[66045,66045],"valid"],[[66046,66175],"disallowed"],[[66176,66204],"valid"],[[66205,66207],"disallowed"],[[66208,66256],"valid"],[[66257,66271],"disallowed"],[[66272,66272],"valid"],[[66273,66299],"valid",[],"NV8"],[[66300,66303],"disallowed"],[[66304,66334],"valid"],[[66335,66335],"valid"],[[66336,66339],"valid",[],"NV8"],[[66340,66351],"disallowed"],[[66352,66368],"valid"],[[66369,66369],"valid",[],"NV8"],[[66370,66377],"valid"],[[66378,66378],"valid",[],"NV8"],[[66379,66383],"disallowed"],[[66384,66426],"valid"],[[66427,66431],"disallowed"],[[66432,66461],"valid"],[[66462,66462],"disallowed"],[[66463,66463],"valid",[],"NV8"],[[66464,66499],"valid"],[[66500,66503],"disallowed"],[[66504,66511],"valid"],[[66512,66517],"valid",[],"NV8"],[[66518,66559],"disallowed"],[[66560,66560],"mapped",[66600]],[[66561,66561],"mapped",[66601]],[[66562,66562],"mapped",[66602]],[[66563,66563],"mapped",[66603]],[[66564,66564],"mapped",[66604]],[[66565,66565],"mapped",[66605]],[[66566,66566],"mapped",[66606]],[[66567,66567],"mapped",[66607]],[[66568,66568],"mapped",[66608]],[[66569,66569],"mapped",[66609]],[[66570,66570],"mapped",[66610]],[[66571,66571],"mapped",[66611]],[[66572,66572],"mapped",[66612]],[[66573,66573],"mapped",[66613]],[[66574,66574],"mapped",[66614]],[[66575,66575],"mapped",[66615]],[[66576,66576],"mapped",[66616]],[[66577,66577],"mapped",[66617]],[[66578,66578],"mapped",[66618]],[[66579,66579],"mapped",[66619]],[[66580,66580],"mapped",[66620]],[[66581,66581],"mapped",[66621]],[[66582,66582],"mapped",[66622]],[[66583,66583],"mapped",[66623]],[[66584,66584],"mapped",[66624]],[[66585,66585],"mapped",[66625]],[[66586,66586],"mapped",[66626]],[[66587,66587],"mapped",[66627]],[[66588,66588],"mapped",[66628]],[[66589,66589],"mapped",[66629]],[[66590,66590],"mapped",[66630]],[[66591,66591],"mapped",[66631]],[[66592,66592],"mapped",[66632]],[[66593,66593],"mapped",[66633]],[[66594,66594],"mapped",[66634]],[[66595,66595],"mapped",[66635]],[[66596,66596],"mapped",[66636]],[[66597,66597],"mapped",[66637]],[[66598,66598],"mapped",[66638]],[[66599,66599],"mapped",[66639]],[[66600,66637],"valid"],[[66638,66717],"valid"],[[66718,66719],"disallowed"],[[66720,66729],"valid"],[[66730,66815],"disallowed"],[[66816,66855],"valid"],[[66856,66863],"disallowed"],[[66864,66915],"valid"],[[66916,66926],"disallowed"],[[66927,66927],"valid",[],"NV8"],[[66928,67071],"disallowed"],[[67072,67382],"valid"],[[67383,67391],"disallowed"],[[67392,67413],"valid"],[[67414,67423],"disallowed"],[[67424,67431],"valid"],[[67432,67583],"disallowed"],[[67584,67589],"valid"],[[67590,67591],"disallowed"],[[67592,67592],"valid"],[[67593,67593],"disallowed"],[[67594,67637],"valid"],[[67638,67638],"disallowed"],[[67639,67640],"valid"],[[67641,67643],"disallowed"],[[67644,67644],"valid"],[[67645,67646],"disallowed"],[[67647,67647],"valid"],[[67648,67669],"valid"],[[67670,67670],"disallowed"],[[67671,67679],"valid",[],"NV8"],[[67680,67702],"valid"],[[67703,67711],"valid",[],"NV8"],[[67712,67742],"valid"],[[67743,67750],"disallowed"],[[67751,67759],"valid",[],"NV8"],[[67760,67807],"disallowed"],[[67808,67826],"valid"],[[67827,67827],"disallowed"],[[67828,67829],"valid"],[[67830,67834],"disallowed"],[[67835,67839],"valid",[],"NV8"],[[67840,67861],"valid"],[[67862,67865],"valid",[],"NV8"],[[67866,67867],"valid",[],"NV8"],[[67868,67870],"disallowed"],[[67871,67871],"valid",[],"NV8"],[[67872,67897],"valid"],[[67898,67902],"disallowed"],[[67903,67903],"valid",[],"NV8"],[[67904,67967],"disallowed"],[[67968,68023],"valid"],[[68024,68027],"disallowed"],[[68028,68029],"valid",[],"NV8"],[[68030,68031],"valid"],[[68032,68047],"valid",[],"NV8"],[[68048,68049],"disallowed"],[[68050,68095],"valid",[],"NV8"],[[68096,68099],"valid"],[[68100,68100],"disallowed"],[[68101,68102],"valid"],[[68103,68107],"disallowed"],[[68108,68115],"valid"],[[68116,68116],"disallowed"],[[68117,68119],"valid"],[[68120,68120],"disallowed"],[[68121,68147],"valid"],[[68148,68151],"disallowed"],[[68152,68154],"valid"],[[68155,68158],"disallowed"],[[68159,68159],"valid"],[[68160,68167],"valid",[],"NV8"],[[68168,68175],"disallowed"],[[68176,68184],"valid",[],"NV8"],[[68185,68191],"disallowed"],[[68192,68220],"valid"],[[68221,68223],"valid",[],"NV8"],[[68224,68252],"valid"],[[68253,68255],"valid",[],"NV8"],[[68256,68287],"disallowed"],[[68288,68295],"valid"],[[68296,68296],"valid",[],"NV8"],[[68297,68326],"valid"],[[68327,68330],"disallowed"],[[68331,68342],"valid",[],"NV8"],[[68343,68351],"disallowed"],[[68352,68405],"valid"],[[68406,68408],"disallowed"],[[68409,68415],"valid",[],"NV8"],[[68416,68437],"valid"],[[68438,68439],"disallowed"],[[68440,68447],"valid",[],"NV8"],[[68448,68466],"valid"],[[68467,68471],"disallowed"],[[68472,68479],"valid",[],"NV8"],[[68480,68497],"valid"],[[68498,68504],"disallowed"],[[68505,68508],"valid",[],"NV8"],[[68509,68520],"disallowed"],[[68521,68527],"valid",[],"NV8"],[[68528,68607],"disallowed"],[[68608,68680],"valid"],[[68681,68735],"disallowed"],[[68736,68736],"mapped",[68800]],[[68737,68737],"mapped",[68801]],[[68738,68738],"mapped",[68802]],[[68739,68739],"mapped",[68803]],[[68740,68740],"mapped",[68804]],[[68741,68741],"mapped",[68805]],[[68742,68742],"mapped",[68806]],[[68743,68743],"mapped",[68807]],[[68744,68744],"mapped",[68808]],[[68745,68745],"mapped",[68809]],[[68746,68746],"mapped",[68810]],[[68747,68747],"mapped",[68811]],[[68748,68748],"mapped",[68812]],[[68749,68749],"mapped",[68813]],[[68750,68750],"mapped",[68814]],[[68751,68751],"mapped",[68815]],[[68752,68752],"mapped",[68816]],[[68753,68753],"mapped",[68817]],[[68754,68754],"mapped",[68818]],[[68755,68755],"mapped",[68819]],[[68756,68756],"mapped",[68820]],[[68757,68757],"mapped",[68821]],[[68758,68758],"mapped",[68822]],[[68759,68759],"mapped",[68823]],[[68760,68760],"mapped",[68824]],[[68761,68761],"mapped",[68825]],[[68762,68762],"mapped",[68826]],[[68763,68763],"mapped",[68827]],[[68764,68764],"mapped",[68828]],[[68765,68765],"mapped",[68829]],[[68766,68766],"mapped",[68830]],[[68767,68767],"mapped",[68831]],[[68768,68768],"mapped",[68832]],[[68769,68769],"mapped",[68833]],[[68770,68770],"mapped",[68834]],[[68771,68771],"mapped",[68835]],[[68772,68772],"mapped",[68836]],[[68773,68773],"mapped",[68837]],[[68774,68774],"mapped",[68838]],[[68775,68775],"mapped",[68839]],[[68776,68776],"mapped",[68840]],[[68777,68777],"mapped",[68841]],[[68778,68778],"mapped",[68842]],[[68779,68779],"mapped",[68843]],[[68780,68780],"mapped",[68844]],[[68781,68781],"mapped",[68845]],[[68782,68782],"mapped",[68846]],[[68783,68783],"mapped",[68847]],[[68784,68784],"mapped",[68848]],[[68785,68785],"mapped",[68849]],[[68786,68786],"mapped",[68850]],[[68787,68799],"disallowed"],[[68800,68850],"valid"],[[68851,68857],"disallowed"],[[68858,68863],"valid",[],"NV8"],[[68864,69215],"disallowed"],[[69216,69246],"valid",[],"NV8"],[[69247,69631],"disallowed"],[[69632,69702],"valid"],[[69703,69709],"valid",[],"NV8"],[[69710,69713],"disallowed"],[[69714,69733],"valid",[],"NV8"],[[69734,69743],"valid"],[[69744,69758],"disallowed"],[[69759,69759],"valid"],[[69760,69818],"valid"],[[69819,69820],"valid",[],"NV8"],[[69821,69821],"disallowed"],[[69822,69825],"valid",[],"NV8"],[[69826,69839],"disallowed"],[[69840,69864],"valid"],[[69865,69871],"disallowed"],[[69872,69881],"valid"],[[69882,69887],"disallowed"],[[69888,69940],"valid"],[[69941,69941],"disallowed"],[[69942,69951],"valid"],[[69952,69955],"valid",[],"NV8"],[[69956,69967],"disallowed"],[[69968,70003],"valid"],[[70004,70005],"valid",[],"NV8"],[[70006,70006],"valid"],[[70007,70015],"disallowed"],[[70016,70084],"valid"],[[70085,70088],"valid",[],"NV8"],[[70089,70089],"valid",[],"NV8"],[[70090,70092],"valid"],[[70093,70093],"valid",[],"NV8"],[[70094,70095],"disallowed"],[[70096,70105],"valid"],[[70106,70106],"valid"],[[70107,70107],"valid",[],"NV8"],[[70108,70108],"valid"],[[70109,70111],"valid",[],"NV8"],[[70112,70112],"disallowed"],[[70113,70132],"valid",[],"NV8"],[[70133,70143],"disallowed"],[[70144,70161],"valid"],[[70162,70162],"disallowed"],[[70163,70199],"valid"],[[70200,70205],"valid",[],"NV8"],[[70206,70271],"disallowed"],[[70272,70278],"valid"],[[70279,70279],"disallowed"],[[70280,70280],"valid"],[[70281,70281],"disallowed"],[[70282,70285],"valid"],[[70286,70286],"disallowed"],[[70287,70301],"valid"],[[70302,70302],"disallowed"],[[70303,70312],"valid"],[[70313,70313],"valid",[],"NV8"],[[70314,70319],"disallowed"],[[70320,70378],"valid"],[[70379,70383],"disallowed"],[[70384,70393],"valid"],[[70394,70399],"disallowed"],[[70400,70400],"valid"],[[70401,70403],"valid"],[[70404,70404],"disallowed"],[[70405,70412],"valid"],[[70413,70414],"disallowed"],[[70415,70416],"valid"],[[70417,70418],"disallowed"],[[70419,70440],"valid"],[[70441,70441],"disallowed"],[[70442,70448],"valid"],[[70449,70449],"disallowed"],[[70450,70451],"valid"],[[70452,70452],"disallowed"],[[70453,70457],"valid"],[[70458,70459],"disallowed"],[[70460,70468],"valid"],[[70469,70470],"disallowed"],[[70471,70472],"valid"],[[70473,70474],"disallowed"],[[70475,70477],"valid"],[[70478,70479],"disallowed"],[[70480,70480],"valid"],[[70481,70486],"disallowed"],[[70487,70487],"valid"],[[70488,70492],"disallowed"],[[70493,70499],"valid"],[[70500,70501],"disallowed"],[[70502,70508],"valid"],[[70509,70511],"disallowed"],[[70512,70516],"valid"],[[70517,70783],"disallowed"],[[70784,70853],"valid"],[[70854,70854],"valid",[],"NV8"],[[70855,70855],"valid"],[[70856,70863],"disallowed"],[[70864,70873],"valid"],[[70874,71039],"disallowed"],[[71040,71093],"valid"],[[71094,71095],"disallowed"],[[71096,71104],"valid"],[[71105,71113],"valid",[],"NV8"],[[71114,71127],"valid",[],"NV8"],[[71128,71133],"valid"],[[71134,71167],"disallowed"],[[71168,71232],"valid"],[[71233,71235],"valid",[],"NV8"],[[71236,71236],"valid"],[[71237,71247],"disallowed"],[[71248,71257],"valid"],[[71258,71295],"disallowed"],[[71296,71351],"valid"],[[71352,71359],"disallowed"],[[71360,71369],"valid"],[[71370,71423],"disallowed"],[[71424,71449],"valid"],[[71450,71452],"disallowed"],[[71453,71467],"valid"],[[71468,71471],"disallowed"],[[71472,71481],"valid"],[[71482,71487],"valid",[],"NV8"],[[71488,71839],"disallowed"],[[71840,71840],"mapped",[71872]],[[71841,71841],"mapped",[71873]],[[71842,71842],"mapped",[71874]],[[71843,71843],"mapped",[71875]],[[71844,71844],"mapped",[71876]],[[71845,71845],"mapped",[71877]],[[71846,71846],"mapped",[71878]],[[71847,71847],"mapped",[71879]],[[71848,71848],"mapped",[71880]],[[71849,71849],"mapped",[71881]],[[71850,71850],"mapped",[71882]],[[71851,71851],"mapped",[71883]],[[71852,71852],"mapped",[71884]],[[71853,71853],"mapped",[71885]],[[71854,71854],"mapped",[71886]],[[71855,71855],"mapped",[71887]],[[71856,71856],"mapped",[71888]],[[71857,71857],"mapped",[71889]],[[71858,71858],"mapped",[71890]],[[71859,71859],"mapped",[71891]],[[71860,71860],"mapped",[71892]],[[71861,71861],"mapped",[71893]],[[71862,71862],"mapped",[71894]],[[71863,71863],"mapped",[71895]],[[71864,71864],"mapped",[71896]],[[71865,71865],"mapped",[71897]],[[71866,71866],"mapped",[71898]],[[71867,71867],"mapped",[71899]],[[71868,71868],"mapped",[71900]],[[71869,71869],"mapped",[71901]],[[71870,71870],"mapped",[71902]],[[71871,71871],"mapped",[71903]],[[71872,71913],"valid"],[[71914,71922],"valid",[],"NV8"],[[71923,71934],"disallowed"],[[71935,71935],"valid"],[[71936,72383],"disallowed"],[[72384,72440],"valid"],[[72441,73727],"disallowed"],[[73728,74606],"valid"],[[74607,74648],"valid"],[[74649,74649],"valid"],[[74650,74751],"disallowed"],[[74752,74850],"valid",[],"NV8"],[[74851,74862],"valid",[],"NV8"],[[74863,74863],"disallowed"],[[74864,74867],"valid",[],"NV8"],[[74868,74868],"valid",[],"NV8"],[[74869,74879],"disallowed"],[[74880,75075],"valid"],[[75076,77823],"disallowed"],[[77824,78894],"valid"],[[78895,82943],"disallowed"],[[82944,83526],"valid"],[[83527,92159],"disallowed"],[[92160,92728],"valid"],[[92729,92735],"disallowed"],[[92736,92766],"valid"],[[92767,92767],"disallowed"],[[92768,92777],"valid"],[[92778,92781],"disallowed"],[[92782,92783],"valid",[],"NV8"],[[92784,92879],"disallowed"],[[92880,92909],"valid"],[[92910,92911],"disallowed"],[[92912,92916],"valid"],[[92917,92917],"valid",[],"NV8"],[[92918,92927],"disallowed"],[[92928,92982],"valid"],[[92983,92991],"valid",[],"NV8"],[[92992,92995],"valid"],[[92996,92997],"valid",[],"NV8"],[[92998,93007],"disallowed"],[[93008,93017],"valid"],[[93018,93018],"disallowed"],[[93019,93025],"valid",[],"NV8"],[[93026,93026],"disallowed"],[[93027,93047],"valid"],[[93048,93052],"disallowed"],[[93053,93071],"valid"],[[93072,93951],"disallowed"],[[93952,94020],"valid"],[[94021,94031],"disallowed"],[[94032,94078],"valid"],[[94079,94094],"disallowed"],[[94095,94111],"valid"],[[94112,110591],"disallowed"],[[110592,110593],"valid"],[[110594,113663],"disallowed"],[[113664,113770],"valid"],[[113771,113775],"disallowed"],[[113776,113788],"valid"],[[113789,113791],"disallowed"],[[113792,113800],"valid"],[[113801,113807],"disallowed"],[[113808,113817],"valid"],[[113818,113819],"disallowed"],[[113820,113820],"valid",[],"NV8"],[[113821,113822],"valid"],[[113823,113823],"valid",[],"NV8"],[[113824,113827],"ignored"],[[113828,118783],"disallowed"],[[118784,119029],"valid",[],"NV8"],[[119030,119039],"disallowed"],[[119040,119078],"valid",[],"NV8"],[[119079,119080],"disallowed"],[[119081,119081],"valid",[],"NV8"],[[119082,119133],"valid",[],"NV8"],[[119134,119134],"mapped",[119127,119141]],[[119135,119135],"mapped",[119128,119141]],[[119136,119136],"mapped",[119128,119141,119150]],[[119137,119137],"mapped",[119128,119141,119151]],[[119138,119138],"mapped",[119128,119141,119152]],[[119139,119139],"mapped",[119128,119141,119153]],[[119140,119140],"mapped",[119128,119141,119154]],[[119141,119154],"valid",[],"NV8"],[[119155,119162],"disallowed"],[[119163,119226],"valid",[],"NV8"],[[119227,119227],"mapped",[119225,119141]],[[119228,119228],"mapped",[119226,119141]],[[119229,119229],"mapped",[119225,119141,119150]],[[119230,119230],"mapped",[119226,119141,119150]],[[119231,119231],"mapped",[119225,119141,119151]],[[119232,119232],"mapped",[119226,119141,119151]],[[119233,119261],"valid",[],"NV8"],[[119262,119272],"valid",[],"NV8"],[[119273,119295],"disallowed"],[[119296,119365],"valid",[],"NV8"],[[119366,119551],"disallowed"],[[119552,119638],"valid",[],"NV8"],[[119639,119647],"disallowed"],[[119648,119665],"valid",[],"NV8"],[[119666,119807],"disallowed"],[[119808,119808],"mapped",[97]],[[119809,119809],"mapped",[98]],[[119810,119810],"mapped",[99]],[[119811,119811],"mapped",[100]],[[119812,119812],"mapped",[101]],[[119813,119813],"mapped",[102]],[[119814,119814],"mapped",[103]],[[119815,119815],"mapped",[104]],[[119816,119816],"mapped",[105]],[[119817,119817],"mapped",[106]],[[119818,119818],"mapped",[107]],[[119819,119819],"mapped",[108]],[[119820,119820],"mapped",[109]],[[119821,119821],"mapped",[110]],[[119822,119822],"mapped",[111]],[[119823,119823],"mapped",[112]],[[119824,119824],"mapped",[113]],[[119825,119825],"mapped",[114]],[[119826,119826],"mapped",[115]],[[119827,119827],"mapped",[116]],[[119828,119828],"mapped",[117]],[[119829,119829],"mapped",[118]],[[119830,119830],"mapped",[119]],[[119831,119831],"mapped",[120]],[[119832,119832],"mapped",[121]],[[119833,119833],"mapped",[122]],[[119834,119834],"mapped",[97]],[[119835,119835],"mapped",[98]],[[119836,119836],"mapped",[99]],[[119837,119837],"mapped",[100]],[[119838,119838],"mapped",[101]],[[119839,119839],"mapped",[102]],[[119840,119840],"mapped",[103]],[[119841,119841],"mapped",[104]],[[119842,119842],"mapped",[105]],[[119843,119843],"mapped",[106]],[[119844,119844],"mapped",[107]],[[119845,119845],"mapped",[108]],[[119846,119846],"mapped",[109]],[[119847,119847],"mapped",[110]],[[119848,119848],"mapped",[111]],[[119849,119849],"mapped",[112]],[[119850,119850],"mapped",[113]],[[119851,119851],"mapped",[114]],[[119852,119852],"mapped",[115]],[[119853,119853],"mapped",[116]],[[119854,119854],"mapped",[117]],[[119855,119855],"mapped",[118]],[[119856,119856],"mapped",[119]],[[119857,119857],"mapped",[120]],[[119858,119858],"mapped",[121]],[[119859,119859],"mapped",[122]],[[119860,119860],"mapped",[97]],[[119861,119861],"mapped",[98]],[[119862,119862],"mapped",[99]],[[119863,119863],"mapped",[100]],[[119864,119864],"mapped",[101]],[[119865,119865],"mapped",[102]],[[119866,119866],"mapped",[103]],[[119867,119867],"mapped",[104]],[[119868,119868],"mapped",[105]],[[119869,119869],"mapped",[106]],[[119870,119870],"mapped",[107]],[[119871,119871],"mapped",[108]],[[119872,119872],"mapped",[109]],[[119873,119873],"mapped",[110]],[[119874,119874],"mapped",[111]],[[119875,119875],"mapped",[112]],[[119876,119876],"mapped",[113]],[[119877,119877],"mapped",[114]],[[119878,119878],"mapped",[115]],[[119879,119879],"mapped",[116]],[[119880,119880],"mapped",[117]],[[119881,119881],"mapped",[118]],[[119882,119882],"mapped",[119]],[[119883,119883],"mapped",[120]],[[119884,119884],"mapped",[121]],[[119885,119885],"mapped",[122]],[[119886,119886],"mapped",[97]],[[119887,119887],"mapped",[98]],[[119888,119888],"mapped",[99]],[[119889,119889],"mapped",[100]],[[119890,119890],"mapped",[101]],[[119891,119891],"mapped",[102]],[[119892,119892],"mapped",[103]],[[119893,119893],"disallowed"],[[119894,119894],"mapped",[105]],[[119895,119895],"mapped",[106]],[[119896,119896],"mapped",[107]],[[119897,119897],"mapped",[108]],[[119898,119898],"mapped",[109]],[[119899,119899],"mapped",[110]],[[119900,119900],"mapped",[111]],[[119901,119901],"mapped",[112]],[[119902,119902],"mapped",[113]],[[119903,119903],"mapped",[114]],[[119904,119904],"mapped",[115]],[[119905,119905],"mapped",[116]],[[119906,119906],"mapped",[117]],[[119907,119907],"mapped",[118]],[[119908,119908],"mapped",[119]],[[119909,119909],"mapped",[120]],[[119910,119910],"mapped",[121]],[[119911,119911],"mapped",[122]],[[119912,119912],"mapped",[97]],[[119913,119913],"mapped",[98]],[[119914,119914],"mapped",[99]],[[119915,119915],"mapped",[100]],[[119916,119916],"mapped",[101]],[[119917,119917],"mapped",[102]],[[119918,119918],"mapped",[103]],[[119919,119919],"mapped",[104]],[[119920,119920],"mapped",[105]],[[119921,119921],"mapped",[106]],[[119922,119922],"mapped",[107]],[[119923,119923],"mapped",[108]],[[119924,119924],"mapped",[109]],[[119925,119925],"mapped",[110]],[[119926,119926],"mapped",[111]],[[119927,119927],"mapped",[112]],[[119928,119928],"mapped",[113]],[[119929,119929],"mapped",[114]],[[119930,119930],"mapped",[115]],[[119931,119931],"mapped",[116]],[[119932,119932],"mapped",[117]],[[119933,119933],"mapped",[118]],[[119934,119934],"mapped",[119]],[[119935,119935],"mapped",[120]],[[119936,119936],"mapped",[121]],[[119937,119937],"mapped",[122]],[[119938,119938],"mapped",[97]],[[119939,119939],"mapped",[98]],[[119940,119940],"mapped",[99]],[[119941,119941],"mapped",[100]],[[119942,119942],"mapped",[101]],[[119943,119943],"mapped",[102]],[[119944,119944],"mapped",[103]],[[119945,119945],"mapped",[104]],[[119946,119946],"mapped",[105]],[[119947,119947],"mapped",[106]],[[119948,119948],"mapped",[107]],[[119949,119949],"mapped",[108]],[[119950,119950],"mapped",[109]],[[119951,119951],"mapped",[110]],[[119952,119952],"mapped",[111]],[[119953,119953],"mapped",[112]],[[119954,119954],"mapped",[113]],[[119955,119955],"mapped",[114]],[[119956,119956],"mapped",[115]],[[119957,119957],"mapped",[116]],[[119958,119958],"mapped",[117]],[[119959,119959],"mapped",[118]],[[119960,119960],"mapped",[119]],[[119961,119961],"mapped",[120]],[[119962,119962],"mapped",[121]],[[119963,119963],"mapped",[122]],[[119964,119964],"mapped",[97]],[[119965,119965],"disallowed"],[[119966,119966],"mapped",[99]],[[119967,119967],"mapped",[100]],[[119968,119969],"disallowed"],[[119970,119970],"mapped",[103]],[[119971,119972],"disallowed"],[[119973,119973],"mapped",[106]],[[119974,119974],"mapped",[107]],[[119975,119976],"disallowed"],[[119977,119977],"mapped",[110]],[[119978,119978],"mapped",[111]],[[119979,119979],"mapped",[112]],[[119980,119980],"mapped",[113]],[[119981,119981],"disallowed"],[[119982,119982],"mapped",[115]],[[119983,119983],"mapped",[116]],[[119984,119984],"mapped",[117]],[[119985,119985],"mapped",[118]],[[119986,119986],"mapped",[119]],[[119987,119987],"mapped",[120]],[[119988,119988],"mapped",[121]],[[119989,119989],"mapped",[122]],[[119990,119990],"mapped",[97]],[[119991,119991],"mapped",[98]],[[119992,119992],"mapped",[99]],[[119993,119993],"mapped",[100]],[[119994,119994],"disallowed"],[[119995,119995],"mapped",[102]],[[119996,119996],"disallowed"],[[119997,119997],"mapped",[104]],[[119998,119998],"mapped",[105]],[[119999,119999],"mapped",[106]],[[120000,120000],"mapped",[107]],[[120001,120001],"mapped",[108]],[[120002,120002],"mapped",[109]],[[120003,120003],"mapped",[110]],[[120004,120004],"disallowed"],[[120005,120005],"mapped",[112]],[[120006,120006],"mapped",[113]],[[120007,120007],"mapped",[114]],[[120008,120008],"mapped",[115]],[[120009,120009],"mapped",[116]],[[120010,120010],"mapped",[117]],[[120011,120011],"mapped",[118]],[[120012,120012],"mapped",[119]],[[120013,120013],"mapped",[120]],[[120014,120014],"mapped",[121]],[[120015,120015],"mapped",[122]],[[120016,120016],"mapped",[97]],[[120017,120017],"mapped",[98]],[[120018,120018],"mapped",[99]],[[120019,120019],"mapped",[100]],[[120020,120020],"mapped",[101]],[[120021,120021],"mapped",[102]],[[120022,120022],"mapped",[103]],[[120023,120023],"mapped",[104]],[[120024,120024],"mapped",[105]],[[120025,120025],"mapped",[106]],[[120026,120026],"mapped",[107]],[[120027,120027],"mapped",[108]],[[120028,120028],"mapped",[109]],[[120029,120029],"mapped",[110]],[[120030,120030],"mapped",[111]],[[120031,120031],"mapped",[112]],[[120032,120032],"mapped",[113]],[[120033,120033],"mapped",[114]],[[120034,120034],"mapped",[115]],[[120035,120035],"mapped",[116]],[[120036,120036],"mapped",[117]],[[120037,120037],"mapped",[118]],[[120038,120038],"mapped",[119]],[[120039,120039],"mapped",[120]],[[120040,120040],"mapped",[121]],[[120041,120041],"mapped",[122]],[[120042,120042],"mapped",[97]],[[120043,120043],"mapped",[98]],[[120044,120044],"mapped",[99]],[[120045,120045],"mapped",[100]],[[120046,120046],"mapped",[101]],[[120047,120047],"mapped",[102]],[[120048,120048],"mapped",[103]],[[120049,120049],"mapped",[104]],[[120050,120050],"mapped",[105]],[[120051,120051],"mapped",[106]],[[120052,120052],"mapped",[107]],[[120053,120053],"mapped",[108]],[[120054,120054],"mapped",[109]],[[120055,120055],"mapped",[110]],[[120056,120056],"mapped",[111]],[[120057,120057],"mapped",[112]],[[120058,120058],"mapped",[113]],[[120059,120059],"mapped",[114]],[[120060,120060],"mapped",[115]],[[120061,120061],"mapped",[116]],[[120062,120062],"mapped",[117]],[[120063,120063],"mapped",[118]],[[120064,120064],"mapped",[119]],[[120065,120065],"mapped",[120]],[[120066,120066],"mapped",[121]],[[120067,120067],"mapped",[122]],[[120068,120068],"mapped",[97]],[[120069,120069],"mapped",[98]],[[120070,120070],"disallowed"],[[120071,120071],"mapped",[100]],[[120072,120072],"mapped",[101]],[[120073,120073],"mapped",[102]],[[120074,120074],"mapped",[103]],[[120075,120076],"disallowed"],[[120077,120077],"mapped",[106]],[[120078,120078],"mapped",[107]],[[120079,120079],"mapped",[108]],[[120080,120080],"mapped",[109]],[[120081,120081],"mapped",[110]],[[120082,120082],"mapped",[111]],[[120083,120083],"mapped",[112]],[[120084,120084],"mapped",[113]],[[120085,120085],"disallowed"],[[120086,120086],"mapped",[115]],[[120087,120087],"mapped",[116]],[[120088,120088],"mapped",[117]],[[120089,120089],"mapped",[118]],[[120090,120090],"mapped",[119]],[[120091,120091],"mapped",[120]],[[120092,120092],"mapped",[121]],[[120093,120093],"disallowed"],[[120094,120094],"mapped",[97]],[[120095,120095],"mapped",[98]],[[120096,120096],"mapped",[99]],[[120097,120097],"mapped",[100]],[[120098,120098],"mapped",[101]],[[120099,120099],"mapped",[102]],[[120100,120100],"mapped",[103]],[[120101,120101],"mapped",[104]],[[120102,120102],"mapped",[105]],[[120103,120103],"mapped",[106]],[[120104,120104],"mapped",[107]],[[120105,120105],"mapped",[108]],[[120106,120106],"mapped",[109]],[[120107,120107],"mapped",[110]],[[120108,120108],"mapped",[111]],[[120109,120109],"mapped",[112]],[[120110,120110],"mapped",[113]],[[120111,120111],"mapped",[114]],[[120112,120112],"mapped",[115]],[[120113,120113],"mapped",[116]],[[120114,120114],"mapped",[117]],[[120115,120115],"mapped",[118]],[[120116,120116],"mapped",[119]],[[120117,120117],"mapped",[120]],[[120118,120118],"mapped",[121]],[[120119,120119],"mapped",[122]],[[120120,120120],"mapped",[97]],[[120121,120121],"mapped",[98]],[[120122,120122],"disallowed"],[[120123,120123],"mapped",[100]],[[120124,120124],"mapped",[101]],[[120125,120125],"mapped",[102]],[[120126,120126],"mapped",[103]],[[120127,120127],"disallowed"],[[120128,120128],"mapped",[105]],[[120129,120129],"mapped",[106]],[[120130,120130],"mapped",[107]],[[120131,120131],"mapped",[108]],[[120132,120132],"mapped",[109]],[[120133,120133],"disallowed"],[[120134,120134],"mapped",[111]],[[120135,120137],"disallowed"],[[120138,120138],"mapped",[115]],[[120139,120139],"mapped",[116]],[[120140,120140],"mapped",[117]],[[120141,120141],"mapped",[118]],[[120142,120142],"mapped",[119]],[[120143,120143],"mapped",[120]],[[120144,120144],"mapped",[121]],[[120145,120145],"disallowed"],[[120146,120146],"mapped",[97]],[[120147,120147],"mapped",[98]],[[120148,120148],"mapped",[99]],[[120149,120149],"mapped",[100]],[[120150,120150],"mapped",[101]],[[120151,120151],"mapped",[102]],[[120152,120152],"mapped",[103]],[[120153,120153],"mapped",[104]],[[120154,120154],"mapped",[105]],[[120155,120155],"mapped",[106]],[[120156,120156],"mapped",[107]],[[120157,120157],"mapped",[108]],[[120158,120158],"mapped",[109]],[[120159,120159],"mapped",[110]],[[120160,120160],"mapped",[111]],[[120161,120161],"mapped",[112]],[[120162,120162],"mapped",[113]],[[120163,120163],"mapped",[114]],[[120164,120164],"mapped",[115]],[[120165,120165],"mapped",[116]],[[120166,120166],"mapped",[117]],[[120167,120167],"mapped",[118]],[[120168,120168],"mapped",[119]],[[120169,120169],"mapped",[120]],[[120170,120170],"mapped",[121]],[[120171,120171],"mapped",[122]],[[120172,120172],"mapped",[97]],[[120173,120173],"mapped",[98]],[[120174,120174],"mapped",[99]],[[120175,120175],"mapped",[100]],[[120176,120176],"mapped",[101]],[[120177,120177],"mapped",[102]],[[120178,120178],"mapped",[103]],[[120179,120179],"mapped",[104]],[[120180,120180],"mapped",[105]],[[120181,120181],"mapped",[106]],[[120182,120182],"mapped",[107]],[[120183,120183],"mapped",[108]],[[120184,120184],"mapped",[109]],[[120185,120185],"mapped",[110]],[[120186,120186],"mapped",[111]],[[120187,120187],"mapped",[112]],[[120188,120188],"mapped",[113]],[[120189,120189],"mapped",[114]],[[120190,120190],"mapped",[115]],[[120191,120191],"mapped",[116]],[[120192,120192],"mapped",[117]],[[120193,120193],"mapped",[118]],[[120194,120194],"mapped",[119]],[[120195,120195],"mapped",[120]],[[120196,120196],"mapped",[121]],[[120197,120197],"mapped",[122]],[[120198,120198],"mapped",[97]],[[120199,120199],"mapped",[98]],[[120200,120200],"mapped",[99]],[[120201,120201],"mapped",[100]],[[120202,120202],"mapped",[101]],[[120203,120203],"mapped",[102]],[[120204,120204],"mapped",[103]],[[120205,120205],"mapped",[104]],[[120206,120206],"mapped",[105]],[[120207,120207],"mapped",[106]],[[120208,120208],"mapped",[107]],[[120209,120209],"mapped",[108]],[[120210,120210],"mapped",[109]],[[120211,120211],"mapped",[110]],[[120212,120212],"mapped",[111]],[[120213,120213],"mapped",[112]],[[120214,120214],"mapped",[113]],[[120215,120215],"mapped",[114]],[[120216,120216],"mapped",[115]],[[120217,120217],"mapped",[116]],[[120218,120218],"mapped",[117]],[[120219,120219],"mapped",[118]],[[120220,120220],"mapped",[119]],[[120221,120221],"mapped",[120]],[[120222,120222],"mapped",[121]],[[120223,120223],"mapped",[122]],[[120224,120224],"mapped",[97]],[[120225,120225],"mapped",[98]],[[120226,120226],"mapped",[99]],[[120227,120227],"mapped",[100]],[[120228,120228],"mapped",[101]],[[120229,120229],"mapped",[102]],[[120230,120230],"mapped",[103]],[[120231,120231],"mapped",[104]],[[120232,120232],"mapped",[105]],[[120233,120233],"mapped",[106]],[[120234,120234],"mapped",[107]],[[120235,120235],"mapped",[108]],[[120236,120236],"mapped",[109]],[[120237,120237],"mapped",[110]],[[120238,120238],"mapped",[111]],[[120239,120239],"mapped",[112]],[[120240,120240],"mapped",[113]],[[120241,120241],"mapped",[114]],[[120242,120242],"mapped",[115]],[[120243,120243],"mapped",[116]],[[120244,120244],"mapped",[117]],[[120245,120245],"mapped",[118]],[[120246,120246],"mapped",[119]],[[120247,120247],"mapped",[120]],[[120248,120248],"mapped",[121]],[[120249,120249],"mapped",[122]],[[120250,120250],"mapped",[97]],[[120251,120251],"mapped",[98]],[[120252,120252],"mapped",[99]],[[120253,120253],"mapped",[100]],[[120254,120254],"mapped",[101]],[[120255,120255],"mapped",[102]],[[120256,120256],"mapped",[103]],[[120257,120257],"mapped",[104]],[[120258,120258],"mapped",[105]],[[120259,120259],"mapped",[106]],[[120260,120260],"mapped",[107]],[[120261,120261],"mapped",[108]],[[120262,120262],"mapped",[109]],[[120263,120263],"mapped",[110]],[[120264,120264],"mapped",[111]],[[120265,120265],"mapped",[112]],[[120266,120266],"mapped",[113]],[[120267,120267],"mapped",[114]],[[120268,120268],"mapped",[115]],[[120269,120269],"mapped",[116]],[[120270,120270],"mapped",[117]],[[120271,120271],"mapped",[118]],[[120272,120272],"mapped",[119]],[[120273,120273],"mapped",[120]],[[120274,120274],"mapped",[121]],[[120275,120275],"mapped",[122]],[[120276,120276],"mapped",[97]],[[120277,120277],"mapped",[98]],[[120278,120278],"mapped",[99]],[[120279,120279],"mapped",[100]],[[120280,120280],"mapped",[101]],[[120281,120281],"mapped",[102]],[[120282,120282],"mapped",[103]],[[120283,120283],"mapped",[104]],[[120284,120284],"mapped",[105]],[[120285,120285],"mapped",[106]],[[120286,120286],"mapped",[107]],[[120287,120287],"mapped",[108]],[[120288,120288],"mapped",[109]],[[120289,120289],"mapped",[110]],[[120290,120290],"mapped",[111]],[[120291,120291],"mapped",[112]],[[120292,120292],"mapped",[113]],[[120293,120293],"mapped",[114]],[[120294,120294],"mapped",[115]],[[120295,120295],"mapped",[116]],[[120296,120296],"mapped",[117]],[[120297,120297],"mapped",[118]],[[120298,120298],"mapped",[119]],[[120299,120299],"mapped",[120]],[[120300,120300],"mapped",[121]],[[120301,120301],"mapped",[122]],[[120302,120302],"mapped",[97]],[[120303,120303],"mapped",[98]],[[120304,120304],"mapped",[99]],[[120305,120305],"mapped",[100]],[[120306,120306],"mapped",[101]],[[120307,120307],"mapped",[102]],[[120308,120308],"mapped",[103]],[[120309,120309],"mapped",[104]],[[120310,120310],"mapped",[105]],[[120311,120311],"mapped",[106]],[[120312,120312],"mapped",[107]],[[120313,120313],"mapped",[108]],[[120314,120314],"mapped",[109]],[[120315,120315],"mapped",[110]],[[120316,120316],"mapped",[111]],[[120317,120317],"mapped",[112]],[[120318,120318],"mapped",[113]],[[120319,120319],"mapped",[114]],[[120320,120320],"mapped",[115]],[[120321,120321],"mapped",[116]],[[120322,120322],"mapped",[117]],[[120323,120323],"mapped",[118]],[[120324,120324],"mapped",[119]],[[120325,120325],"mapped",[120]],[[120326,120326],"mapped",[121]],[[120327,120327],"mapped",[122]],[[120328,120328],"mapped",[97]],[[120329,120329],"mapped",[98]],[[120330,120330],"mapped",[99]],[[120331,120331],"mapped",[100]],[[120332,120332],"mapped",[101]],[[120333,120333],"mapped",[102]],[[120334,120334],"mapped",[103]],[[120335,120335],"mapped",[104]],[[120336,120336],"mapped",[105]],[[120337,120337],"mapped",[106]],[[120338,120338],"mapped",[107]],[[120339,120339],"mapped",[108]],[[120340,120340],"mapped",[109]],[[120341,120341],"mapped",[110]],[[120342,120342],"mapped",[111]],[[120343,120343],"mapped",[112]],[[120344,120344],"mapped",[113]],[[120345,120345],"mapped",[114]],[[120346,120346],"mapped",[115]],[[120347,120347],"mapped",[116]],[[120348,120348],"mapped",[117]],[[120349,120349],"mapped",[118]],[[120350,120350],"mapped",[119]],[[120351,120351],"mapped",[120]],[[120352,120352],"mapped",[121]],[[120353,120353],"mapped",[122]],[[120354,120354],"mapped",[97]],[[120355,120355],"mapped",[98]],[[120356,120356],"mapped",[99]],[[120357,120357],"mapped",[100]],[[120358,120358],"mapped",[101]],[[120359,120359],"mapped",[102]],[[120360,120360],"mapped",[103]],[[120361,120361],"mapped",[104]],[[120362,120362],"mapped",[105]],[[120363,120363],"mapped",[106]],[[120364,120364],"mapped",[107]],[[120365,120365],"mapped",[108]],[[120366,120366],"mapped",[109]],[[120367,120367],"mapped",[110]],[[120368,120368],"mapped",[111]],[[120369,120369],"mapped",[112]],[[120370,120370],"mapped",[113]],[[120371,120371],"mapped",[114]],[[120372,120372],"mapped",[115]],[[120373,120373],"mapped",[116]],[[120374,120374],"mapped",[117]],[[120375,120375],"mapped",[118]],[[120376,120376],"mapped",[119]],[[120377,120377],"mapped",[120]],[[120378,120378],"mapped",[121]],[[120379,120379],"mapped",[122]],[[120380,120380],"mapped",[97]],[[120381,120381],"mapped",[98]],[[120382,120382],"mapped",[99]],[[120383,120383],"mapped",[100]],[[120384,120384],"mapped",[101]],[[120385,120385],"mapped",[102]],[[120386,120386],"mapped",[103]],[[120387,120387],"mapped",[104]],[[120388,120388],"mapped",[105]],[[120389,120389],"mapped",[106]],[[120390,120390],"mapped",[107]],[[120391,120391],"mapped",[108]],[[120392,120392],"mapped",[109]],[[120393,120393],"mapped",[110]],[[120394,120394],"mapped",[111]],[[120395,120395],"mapped",[112]],[[120396,120396],"mapped",[113]],[[120397,120397],"mapped",[114]],[[120398,120398],"mapped",[115]],[[120399,120399],"mapped",[116]],[[120400,120400],"mapped",[117]],[[120401,120401],"mapped",[118]],[[120402,120402],"mapped",[119]],[[120403,120403],"mapped",[120]],[[120404,120404],"mapped",[121]],[[120405,120405],"mapped",[122]],[[120406,120406],"mapped",[97]],[[120407,120407],"mapped",[98]],[[120408,120408],"mapped",[99]],[[120409,120409],"mapped",[100]],[[120410,120410],"mapped",[101]],[[120411,120411],"mapped",[102]],[[120412,120412],"mapped",[103]],[[120413,120413],"mapped",[104]],[[120414,120414],"mapped",[105]],[[120415,120415],"mapped",[106]],[[120416,120416],"mapped",[107]],[[120417,120417],"mapped",[108]],[[120418,120418],"mapped",[109]],[[120419,120419],"mapped",[110]],[[120420,120420],"mapped",[111]],[[120421,120421],"mapped",[112]],[[120422,120422],"mapped",[113]],[[120423,120423],"mapped",[114]],[[120424,120424],"mapped",[115]],[[120425,120425],"mapped",[116]],[[120426,120426],"mapped",[117]],[[120427,120427],"mapped",[118]],[[120428,120428],"mapped",[119]],[[120429,120429],"mapped",[120]],[[120430,120430],"mapped",[121]],[[120431,120431],"mapped",[122]],[[120432,120432],"mapped",[97]],[[120433,120433],"mapped",[98]],[[120434,120434],"mapped",[99]],[[120435,120435],"mapped",[100]],[[120436,120436],"mapped",[101]],[[120437,120437],"mapped",[102]],[[120438,120438],"mapped",[103]],[[120439,120439],"mapped",[104]],[[120440,120440],"mapped",[105]],[[120441,120441],"mapped",[106]],[[120442,120442],"mapped",[107]],[[120443,120443],"mapped",[108]],[[120444,120444],"mapped",[109]],[[120445,120445],"mapped",[110]],[[120446,120446],"mapped",[111]],[[120447,120447],"mapped",[112]],[[120448,120448],"mapped",[113]],[[120449,120449],"mapped",[114]],[[120450,120450],"mapped",[115]],[[120451,120451],"mapped",[116]],[[120452,120452],"mapped",[117]],[[120453,120453],"mapped",[118]],[[120454,120454],"mapped",[119]],[[120455,120455],"mapped",[120]],[[120456,120456],"mapped",[121]],[[120457,120457],"mapped",[122]],[[120458,120458],"mapped",[97]],[[120459,120459],"mapped",[98]],[[120460,120460],"mapped",[99]],[[120461,120461],"mapped",[100]],[[120462,120462],"mapped",[101]],[[120463,120463],"mapped",[102]],[[120464,120464],"mapped",[103]],[[120465,120465],"mapped",[104]],[[120466,120466],"mapped",[105]],[[120467,120467],"mapped",[106]],[[120468,120468],"mapped",[107]],[[120469,120469],"mapped",[108]],[[120470,120470],"mapped",[109]],[[120471,120471],"mapped",[110]],[[120472,120472],"mapped",[111]],[[120473,120473],"mapped",[112]],[[120474,120474],"mapped",[113]],[[120475,120475],"mapped",[114]],[[120476,120476],"mapped",[115]],[[120477,120477],"mapped",[116]],[[120478,120478],"mapped",[117]],[[120479,120479],"mapped",[118]],[[120480,120480],"mapped",[119]],[[120481,120481],"mapped",[120]],[[120482,120482],"mapped",[121]],[[120483,120483],"mapped",[122]],[[120484,120484],"mapped",[305]],[[120485,120485],"mapped",[567]],[[120486,120487],"disallowed"],[[120488,120488],"mapped",[945]],[[120489,120489],"mapped",[946]],[[120490,120490],"mapped",[947]],[[120491,120491],"mapped",[948]],[[120492,120492],"mapped",[949]],[[120493,120493],"mapped",[950]],[[120494,120494],"mapped",[951]],[[120495,120495],"mapped",[952]],[[120496,120496],"mapped",[953]],[[120497,120497],"mapped",[954]],[[120498,120498],"mapped",[955]],[[120499,120499],"mapped",[956]],[[120500,120500],"mapped",[957]],[[120501,120501],"mapped",[958]],[[120502,120502],"mapped",[959]],[[120503,120503],"mapped",[960]],[[120504,120504],"mapped",[961]],[[120505,120505],"mapped",[952]],[[120506,120506],"mapped",[963]],[[120507,120507],"mapped",[964]],[[120508,120508],"mapped",[965]],[[120509,120509],"mapped",[966]],[[120510,120510],"mapped",[967]],[[120511,120511],"mapped",[968]],[[120512,120512],"mapped",[969]],[[120513,120513],"mapped",[8711]],[[120514,120514],"mapped",[945]],[[120515,120515],"mapped",[946]],[[120516,120516],"mapped",[947]],[[120517,120517],"mapped",[948]],[[120518,120518],"mapped",[949]],[[120519,120519],"mapped",[950]],[[120520,120520],"mapped",[951]],[[120521,120521],"mapped",[952]],[[120522,120522],"mapped",[953]],[[120523,120523],"mapped",[954]],[[120524,120524],"mapped",[955]],[[120525,120525],"mapped",[956]],[[120526,120526],"mapped",[957]],[[120527,120527],"mapped",[958]],[[120528,120528],"mapped",[959]],[[120529,120529],"mapped",[960]],[[120530,120530],"mapped",[961]],[[120531,120532],"mapped",[963]],[[120533,120533],"mapped",[964]],[[120534,120534],"mapped",[965]],[[120535,120535],"mapped",[966]],[[120536,120536],"mapped",[967]],[[120537,120537],"mapped",[968]],[[120538,120538],"mapped",[969]],[[120539,120539],"mapped",[8706]],[[120540,120540],"mapped",[949]],[[120541,120541],"mapped",[952]],[[120542,120542],"mapped",[954]],[[120543,120543],"mapped",[966]],[[120544,120544],"mapped",[961]],[[120545,120545],"mapped",[960]],[[120546,120546],"mapped",[945]],[[120547,120547],"mapped",[946]],[[120548,120548],"mapped",[947]],[[120549,120549],"mapped",[948]],[[120550,120550],"mapped",[949]],[[120551,120551],"mapped",[950]],[[120552,120552],"mapped",[951]],[[120553,120553],"mapped",[952]],[[120554,120554],"mapped",[953]],[[120555,120555],"mapped",[954]],[[120556,120556],"mapped",[955]],[[120557,120557],"mapped",[956]],[[120558,120558],"mapped",[957]],[[120559,120559],"mapped",[958]],[[120560,120560],"mapped",[959]],[[120561,120561],"mapped",[960]],[[120562,120562],"mapped",[961]],[[120563,120563],"mapped",[952]],[[120564,120564],"mapped",[963]],[[120565,120565],"mapped",[964]],[[120566,120566],"mapped",[965]],[[120567,120567],"mapped",[966]],[[120568,120568],"mapped",[967]],[[120569,120569],"mapped",[968]],[[120570,120570],"mapped",[969]],[[120571,120571],"mapped",[8711]],[[120572,120572],"mapped",[945]],[[120573,120573],"mapped",[946]],[[120574,120574],"mapped",[947]],[[120575,120575],"mapped",[948]],[[120576,120576],"mapped",[949]],[[120577,120577],"mapped",[950]],[[120578,120578],"mapped",[951]],[[120579,120579],"mapped",[952]],[[120580,120580],"mapped",[953]],[[120581,120581],"mapped",[954]],[[120582,120582],"mapped",[955]],[[120583,120583],"mapped",[956]],[[120584,120584],"mapped",[957]],[[120585,120585],"mapped",[958]],[[120586,120586],"mapped",[959]],[[120587,120587],"mapped",[960]],[[120588,120588],"mapped",[961]],[[120589,120590],"mapped",[963]],[[120591,120591],"mapped",[964]],[[120592,120592],"mapped",[965]],[[120593,120593],"mapped",[966]],[[120594,120594],"mapped",[967]],[[120595,120595],"mapped",[968]],[[120596,120596],"mapped",[969]],[[120597,120597],"mapped",[8706]],[[120598,120598],"mapped",[949]],[[120599,120599],"mapped",[952]],[[120600,120600],"mapped",[954]],[[120601,120601],"mapped",[966]],[[120602,120602],"mapped",[961]],[[120603,120603],"mapped",[960]],[[120604,120604],"mapped",[945]],[[120605,120605],"mapped",[946]],[[120606,120606],"mapped",[947]],[[120607,120607],"mapped",[948]],[[120608,120608],"mapped",[949]],[[120609,120609],"mapped",[950]],[[120610,120610],"mapped",[951]],[[120611,120611],"mapped",[952]],[[120612,120612],"mapped",[953]],[[120613,120613],"mapped",[954]],[[120614,120614],"mapped",[955]],[[120615,120615],"mapped",[956]],[[120616,120616],"mapped",[957]],[[120617,120617],"mapped",[958]],[[120618,120618],"mapped",[959]],[[120619,120619],"mapped",[960]],[[120620,120620],"mapped",[961]],[[120621,120621],"mapped",[952]],[[120622,120622],"mapped",[963]],[[120623,120623],"mapped",[964]],[[120624,120624],"mapped",[965]],[[120625,120625],"mapped",[966]],[[120626,120626],"mapped",[967]],[[120627,120627],"mapped",[968]],[[120628,120628],"mapped",[969]],[[120629,120629],"mapped",[8711]],[[120630,120630],"mapped",[945]],[[120631,120631],"mapped",[946]],[[120632,120632],"mapped",[947]],[[120633,120633],"mapped",[948]],[[120634,120634],"mapped",[949]],[[120635,120635],"mapped",[950]],[[120636,120636],"mapped",[951]],[[120637,120637],"mapped",[952]],[[120638,120638],"mapped",[953]],[[120639,120639],"mapped",[954]],[[120640,120640],"mapped",[955]],[[120641,120641],"mapped",[956]],[[120642,120642],"mapped",[957]],[[120643,120643],"mapped",[958]],[[120644,120644],"mapped",[959]],[[120645,120645],"mapped",[960]],[[120646,120646],"mapped",[961]],[[120647,120648],"mapped",[963]],[[120649,120649],"mapped",[964]],[[120650,120650],"mapped",[965]],[[120651,120651],"mapped",[966]],[[120652,120652],"mapped",[967]],[[120653,120653],"mapped",[968]],[[120654,120654],"mapped",[969]],[[120655,120655],"mapped",[8706]],[[120656,120656],"mapped",[949]],[[120657,120657],"mapped",[952]],[[120658,120658],"mapped",[954]],[[120659,120659],"mapped",[966]],[[120660,120660],"mapped",[961]],[[120661,120661],"mapped",[960]],[[120662,120662],"mapped",[945]],[[120663,120663],"mapped",[946]],[[120664,120664],"mapped",[947]],[[120665,120665],"mapped",[948]],[[120666,120666],"mapped",[949]],[[120667,120667],"mapped",[950]],[[120668,120668],"mapped",[951]],[[120669,120669],"mapped",[952]],[[120670,120670],"mapped",[953]],[[120671,120671],"mapped",[954]],[[120672,120672],"mapped",[955]],[[120673,120673],"mapped",[956]],[[120674,120674],"mapped",[957]],[[120675,120675],"mapped",[958]],[[120676,120676],"mapped",[959]],[[120677,120677],"mapped",[960]],[[120678,120678],"mapped",[961]],[[120679,120679],"mapped",[952]],[[120680,120680],"mapped",[963]],[[120681,120681],"mapped",[964]],[[120682,120682],"mapped",[965]],[[120683,120683],"mapped",[966]],[[120684,120684],"mapped",[967]],[[120685,120685],"mapped",[968]],[[120686,120686],"mapped",[969]],[[120687,120687],"mapped",[8711]],[[120688,120688],"mapped",[945]],[[120689,120689],"mapped",[946]],[[120690,120690],"mapped",[947]],[[120691,120691],"mapped",[948]],[[120692,120692],"mapped",[949]],[[120693,120693],"mapped",[950]],[[120694,120694],"mapped",[951]],[[120695,120695],"mapped",[952]],[[120696,120696],"mapped",[953]],[[120697,120697],"mapped",[954]],[[120698,120698],"mapped",[955]],[[120699,120699],"mapped",[956]],[[120700,120700],"mapped",[957]],[[120701,120701],"mapped",[958]],[[120702,120702],"mapped",[959]],[[120703,120703],"mapped",[960]],[[120704,120704],"mapped",[961]],[[120705,120706],"mapped",[963]],[[120707,120707],"mapped",[964]],[[120708,120708],"mapped",[965]],[[120709,120709],"mapped",[966]],[[120710,120710],"mapped",[967]],[[120711,120711],"mapped",[968]],[[120712,120712],"mapped",[969]],[[120713,120713],"mapped",[8706]],[[120714,120714],"mapped",[949]],[[120715,120715],"mapped",[952]],[[120716,120716],"mapped",[954]],[[120717,120717],"mapped",[966]],[[120718,120718],"mapped",[961]],[[120719,120719],"mapped",[960]],[[120720,120720],"mapped",[945]],[[120721,120721],"mapped",[946]],[[120722,120722],"mapped",[947]],[[120723,120723],"mapped",[948]],[[120724,120724],"mapped",[949]],[[120725,120725],"mapped",[950]],[[120726,120726],"mapped",[951]],[[120727,120727],"mapped",[952]],[[120728,120728],"mapped",[953]],[[120729,120729],"mapped",[954]],[[120730,120730],"mapped",[955]],[[120731,120731],"mapped",[956]],[[120732,120732],"mapped",[957]],[[120733,120733],"mapped",[958]],[[120734,120734],"mapped",[959]],[[120735,120735],"mapped",[960]],[[120736,120736],"mapped",[961]],[[120737,120737],"mapped",[952]],[[120738,120738],"mapped",[963]],[[120739,120739],"mapped",[964]],[[120740,120740],"mapped",[965]],[[120741,120741],"mapped",[966]],[[120742,120742],"mapped",[967]],[[120743,120743],"mapped",[968]],[[120744,120744],"mapped",[969]],[[120745,120745],"mapped",[8711]],[[120746,120746],"mapped",[945]],[[120747,120747],"mapped",[946]],[[120748,120748],"mapped",[947]],[[120749,120749],"mapped",[948]],[[120750,120750],"mapped",[949]],[[120751,120751],"mapped",[950]],[[120752,120752],"mapped",[951]],[[120753,120753],"mapped",[952]],[[120754,120754],"mapped",[953]],[[120755,120755],"mapped",[954]],[[120756,120756],"mapped",[955]],[[120757,120757],"mapped",[956]],[[120758,120758],"mapped",[957]],[[120759,120759],"mapped",[958]],[[120760,120760],"mapped",[959]],[[120761,120761],"mapped",[960]],[[120762,120762],"mapped",[961]],[[120763,120764],"mapped",[963]],[[120765,120765],"mapped",[964]],[[120766,120766],"mapped",[965]],[[120767,120767],"mapped",[966]],[[120768,120768],"mapped",[967]],[[120769,120769],"mapped",[968]],[[120770,120770],"mapped",[969]],[[120771,120771],"mapped",[8706]],[[120772,120772],"mapped",[949]],[[120773,120773],"mapped",[952]],[[120774,120774],"mapped",[954]],[[120775,120775],"mapped",[966]],[[120776,120776],"mapped",[961]],[[120777,120777],"mapped",[960]],[[120778,120779],"mapped",[989]],[[120780,120781],"disallowed"],[[120782,120782],"mapped",[48]],[[120783,120783],"mapped",[49]],[[120784,120784],"mapped",[50]],[[120785,120785],"mapped",[51]],[[120786,120786],"mapped",[52]],[[120787,120787],"mapped",[53]],[[120788,120788],"mapped",[54]],[[120789,120789],"mapped",[55]],[[120790,120790],"mapped",[56]],[[120791,120791],"mapped",[57]],[[120792,120792],"mapped",[48]],[[120793,120793],"mapped",[49]],[[120794,120794],"mapped",[50]],[[120795,120795],"mapped",[51]],[[120796,120796],"mapped",[52]],[[120797,120797],"mapped",[53]],[[120798,120798],"mapped",[54]],[[120799,120799],"mapped",[55]],[[120800,120800],"mapped",[56]],[[120801,120801],"mapped",[57]],[[120802,120802],"mapped",[48]],[[120803,120803],"mapped",[49]],[[120804,120804],"mapped",[50]],[[120805,120805],"mapped",[51]],[[120806,120806],"mapped",[52]],[[120807,120807],"mapped",[53]],[[120808,120808],"mapped",[54]],[[120809,120809],"mapped",[55]],[[120810,120810],"mapped",[56]],[[120811,120811],"mapped",[57]],[[120812,120812],"mapped",[48]],[[120813,120813],"mapped",[49]],[[120814,120814],"mapped",[50]],[[120815,120815],"mapped",[51]],[[120816,120816],"mapped",[52]],[[120817,120817],"mapped",[53]],[[120818,120818],"mapped",[54]],[[120819,120819],"mapped",[55]],[[120820,120820],"mapped",[56]],[[120821,120821],"mapped",[57]],[[120822,120822],"mapped",[48]],[[120823,120823],"mapped",[49]],[[120824,120824],"mapped",[50]],[[120825,120825],"mapped",[51]],[[120826,120826],"mapped",[52]],[[120827,120827],"mapped",[53]],[[120828,120828],"mapped",[54]],[[120829,120829],"mapped",[55]],[[120830,120830],"mapped",[56]],[[120831,120831],"mapped",[57]],[[120832,121343],"valid",[],"NV8"],[[121344,121398],"valid"],[[121399,121402],"valid",[],"NV8"],[[121403,121452],"valid"],[[121453,121460],"valid",[],"NV8"],[[121461,121461],"valid"],[[121462,121475],"valid",[],"NV8"],[[121476,121476],"valid"],[[121477,121483],"valid",[],"NV8"],[[121484,121498],"disallowed"],[[121499,121503],"valid"],[[121504,121504],"disallowed"],[[121505,121519],"valid"],[[121520,124927],"disallowed"],[[124928,125124],"valid"],[[125125,125126],"disallowed"],[[125127,125135],"valid",[],"NV8"],[[125136,125142],"valid"],[[125143,126463],"disallowed"],[[126464,126464],"mapped",[1575]],[[126465,126465],"mapped",[1576]],[[126466,126466],"mapped",[1580]],[[126467,126467],"mapped",[1583]],[[126468,126468],"disallowed"],[[126469,126469],"mapped",[1608]],[[126470,126470],"mapped",[1586]],[[126471,126471],"mapped",[1581]],[[126472,126472],"mapped",[1591]],[[126473,126473],"mapped",[1610]],[[126474,126474],"mapped",[1603]],[[126475,126475],"mapped",[1604]],[[126476,126476],"mapped",[1605]],[[126477,126477],"mapped",[1606]],[[126478,126478],"mapped",[1587]],[[126479,126479],"mapped",[1593]],[[126480,126480],"mapped",[1601]],[[126481,126481],"mapped",[1589]],[[126482,126482],"mapped",[1602]],[[126483,126483],"mapped",[1585]],[[126484,126484],"mapped",[1588]],[[126485,126485],"mapped",[1578]],[[126486,126486],"mapped",[1579]],[[126487,126487],"mapped",[1582]],[[126488,126488],"mapped",[1584]],[[126489,126489],"mapped",[1590]],[[126490,126490],"mapped",[1592]],[[126491,126491],"mapped",[1594]],[[126492,126492],"mapped",[1646]],[[126493,126493],"mapped",[1722]],[[126494,126494],"mapped",[1697]],[[126495,126495],"mapped",[1647]],[[126496,126496],"disallowed"],[[126497,126497],"mapped",[1576]],[[126498,126498],"mapped",[1580]],[[126499,126499],"disallowed"],[[126500,126500],"mapped",[1607]],[[126501,126502],"disallowed"],[[126503,126503],"mapped",[1581]],[[126504,126504],"disallowed"],[[126505,126505],"mapped",[1610]],[[126506,126506],"mapped",[1603]],[[126507,126507],"mapped",[1604]],[[126508,126508],"mapped",[1605]],[[126509,126509],"mapped",[1606]],[[126510,126510],"mapped",[1587]],[[126511,126511],"mapped",[1593]],[[126512,126512],"mapped",[1601]],[[126513,126513],"mapped",[1589]],[[126514,126514],"mapped",[1602]],[[126515,126515],"disallowed"],[[126516,126516],"mapped",[1588]],[[126517,126517],"mapped",[1578]],[[126518,126518],"mapped",[1579]],[[126519,126519],"mapped",[1582]],[[126520,126520],"disallowed"],[[126521,126521],"mapped",[1590]],[[126522,126522],"disallowed"],[[126523,126523],"mapped",[1594]],[[126524,126529],"disallowed"],[[126530,126530],"mapped",[1580]],[[126531,126534],"disallowed"],[[126535,126535],"mapped",[1581]],[[126536,126536],"disallowed"],[[126537,126537],"mapped",[1610]],[[126538,126538],"disallowed"],[[126539,126539],"mapped",[1604]],[[126540,126540],"disallowed"],[[126541,126541],"mapped",[1606]],[[126542,126542],"mapped",[1587]],[[126543,126543],"mapped",[1593]],[[126544,126544],"disallowed"],[[126545,126545],"mapped",[1589]],[[126546,126546],"mapped",[1602]],[[126547,126547],"disallowed"],[[126548,126548],"mapped",[1588]],[[126549,126550],"disallowed"],[[126551,126551],"mapped",[1582]],[[126552,126552],"disallowed"],[[126553,126553],"mapped",[1590]],[[126554,126554],"disallowed"],[[126555,126555],"mapped",[1594]],[[126556,126556],"disallowed"],[[126557,126557],"mapped",[1722]],[[126558,126558],"disallowed"],[[126559,126559],"mapped",[1647]],[[126560,126560],"disallowed"],[[126561,126561],"mapped",[1576]],[[126562,126562],"mapped",[1580]],[[126563,126563],"disallowed"],[[126564,126564],"mapped",[1607]],[[126565,126566],"disallowed"],[[126567,126567],"mapped",[1581]],[[126568,126568],"mapped",[1591]],[[126569,126569],"mapped",[1610]],[[126570,126570],"mapped",[1603]],[[126571,126571],"disallowed"],[[126572,126572],"mapped",[1605]],[[126573,126573],"mapped",[1606]],[[126574,126574],"mapped",[1587]],[[126575,126575],"mapped",[1593]],[[126576,126576],"mapped",[1601]],[[126577,126577],"mapped",[1589]],[[126578,126578],"mapped",[1602]],[[126579,126579],"disallowed"],[[126580,126580],"mapped",[1588]],[[126581,126581],"mapped",[1578]],[[126582,126582],"mapped",[1579]],[[126583,126583],"mapped",[1582]],[[126584,126584],"disallowed"],[[126585,126585],"mapped",[1590]],[[126586,126586],"mapped",[1592]],[[126587,126587],"mapped",[1594]],[[126588,126588],"mapped",[1646]],[[126589,126589],"disallowed"],[[126590,126590],"mapped",[1697]],[[126591,126591],"disallowed"],[[126592,126592],"mapped",[1575]],[[126593,126593],"mapped",[1576]],[[126594,126594],"mapped",[1580]],[[126595,126595],"mapped",[1583]],[[126596,126596],"mapped",[1607]],[[126597,126597],"mapped",[1608]],[[126598,126598],"mapped",[1586]],[[126599,126599],"mapped",[1581]],[[126600,126600],"mapped",[1591]],[[126601,126601],"mapped",[1610]],[[126602,126602],"disallowed"],[[126603,126603],"mapped",[1604]],[[126604,126604],"mapped",[1605]],[[126605,126605],"mapped",[1606]],[[126606,126606],"mapped",[1587]],[[126607,126607],"mapped",[1593]],[[126608,126608],"mapped",[1601]],[[126609,126609],"mapped",[1589]],[[126610,126610],"mapped",[1602]],[[126611,126611],"mapped",[1585]],[[126612,126612],"mapped",[1588]],[[126613,126613],"mapped",[1578]],[[126614,126614],"mapped",[1579]],[[126615,126615],"mapped",[1582]],[[126616,126616],"mapped",[1584]],[[126617,126617],"mapped",[1590]],[[126618,126618],"mapped",[1592]],[[126619,126619],"mapped",[1594]],[[126620,126624],"disallowed"],[[126625,126625],"mapped",[1576]],[[126626,126626],"mapped",[1580]],[[126627,126627],"mapped",[1583]],[[126628,126628],"disallowed"],[[126629,126629],"mapped",[1608]],[[126630,126630],"mapped",[1586]],[[126631,126631],"mapped",[1581]],[[126632,126632],"mapped",[1591]],[[126633,126633],"mapped",[1610]],[[126634,126634],"disallowed"],[[126635,126635],"mapped",[1604]],[[126636,126636],"mapped",[1605]],[[126637,126637],"mapped",[1606]],[[126638,126638],"mapped",[1587]],[[126639,126639],"mapped",[1593]],[[126640,126640],"mapped",[1601]],[[126641,126641],"mapped",[1589]],[[126642,126642],"mapped",[1602]],[[126643,126643],"mapped",[1585]],[[126644,126644],"mapped",[1588]],[[126645,126645],"mapped",[1578]],[[126646,126646],"mapped",[1579]],[[126647,126647],"mapped",[1582]],[[126648,126648],"mapped",[1584]],[[126649,126649],"mapped",[1590]],[[126650,126650],"mapped",[1592]],[[126651,126651],"mapped",[1594]],[[126652,126703],"disallowed"],[[126704,126705],"valid",[],"NV8"],[[126706,126975],"disallowed"],[[126976,127019],"valid",[],"NV8"],[[127020,127023],"disallowed"],[[127024,127123],"valid",[],"NV8"],[[127124,127135],"disallowed"],[[127136,127150],"valid",[],"NV8"],[[127151,127152],"disallowed"],[[127153,127166],"valid",[],"NV8"],[[127167,127167],"valid",[],"NV8"],[[127168,127168],"disallowed"],[[127169,127183],"valid",[],"NV8"],[[127184,127184],"disallowed"],[[127185,127199],"valid",[],"NV8"],[[127200,127221],"valid",[],"NV8"],[[127222,127231],"disallowed"],[[127232,127232],"disallowed"],[[127233,127233],"disallowed_STD3_mapped",[48,44]],[[127234,127234],"disallowed_STD3_mapped",[49,44]],[[127235,127235],"disallowed_STD3_mapped",[50,44]],[[127236,127236],"disallowed_STD3_mapped",[51,44]],[[127237,127237],"disallowed_STD3_mapped",[52,44]],[[127238,127238],"disallowed_STD3_mapped",[53,44]],[[127239,127239],"disallowed_STD3_mapped",[54,44]],[[127240,127240],"disallowed_STD3_mapped",[55,44]],[[127241,127241],"disallowed_STD3_mapped",[56,44]],[[127242,127242],"disallowed_STD3_mapped",[57,44]],[[127243,127244],"valid",[],"NV8"],[[127245,127247],"disallowed"],[[127248,127248],"disallowed_STD3_mapped",[40,97,41]],[[127249,127249],"disallowed_STD3_mapped",[40,98,41]],[[127250,127250],"disallowed_STD3_mapped",[40,99,41]],[[127251,127251],"disallowed_STD3_mapped",[40,100,41]],[[127252,127252],"disallowed_STD3_mapped",[40,101,41]],[[127253,127253],"disallowed_STD3_mapped",[40,102,41]],[[127254,127254],"disallowed_STD3_mapped",[40,103,41]],[[127255,127255],"disallowed_STD3_mapped",[40,104,41]],[[127256,127256],"disallowed_STD3_mapped",[40,105,41]],[[127257,127257],"disallowed_STD3_mapped",[40,106,41]],[[127258,127258],"disallowed_STD3_mapped",[40,107,41]],[[127259,127259],"disallowed_STD3_mapped",[40,108,41]],[[127260,127260],"disallowed_STD3_mapped",[40,109,41]],[[127261,127261],"disallowed_STD3_mapped",[40,110,41]],[[127262,127262],"disallowed_STD3_mapped",[40,111,41]],[[127263,127263],"disallowed_STD3_mapped",[40,112,41]],[[127264,127264],"disallowed_STD3_mapped",[40,113,41]],[[127265,127265],"disallowed_STD3_mapped",[40,114,41]],[[127266,127266],"disallowed_STD3_mapped",[40,115,41]],[[127267,127267],"disallowed_STD3_mapped",[40,116,41]],[[127268,127268],"disallowed_STD3_mapped",[40,117,41]],[[127269,127269],"disallowed_STD3_mapped",[40,118,41]],[[127270,127270],"disallowed_STD3_mapped",[40,119,41]],[[127271,127271],"disallowed_STD3_mapped",[40,120,41]],[[127272,127272],"disallowed_STD3_mapped",[40,121,41]],[[127273,127273],"disallowed_STD3_mapped",[40,122,41]],[[127274,127274],"mapped",[12308,115,12309]],[[127275,127275],"mapped",[99]],[[127276,127276],"mapped",[114]],[[127277,127277],"mapped",[99,100]],[[127278,127278],"mapped",[119,122]],[[127279,127279],"disallowed"],[[127280,127280],"mapped",[97]],[[127281,127281],"mapped",[98]],[[127282,127282],"mapped",[99]],[[127283,127283],"mapped",[100]],[[127284,127284],"mapped",[101]],[[127285,127285],"mapped",[102]],[[127286,127286],"mapped",[103]],[[127287,127287],"mapped",[104]],[[127288,127288],"mapped",[105]],[[127289,127289],"mapped",[106]],[[127290,127290],"mapped",[107]],[[127291,127291],"mapped",[108]],[[127292,127292],"mapped",[109]],[[127293,127293],"mapped",[110]],[[127294,127294],"mapped",[111]],[[127295,127295],"mapped",[112]],[[127296,127296],"mapped",[113]],[[127297,127297],"mapped",[114]],[[127298,127298],"mapped",[115]],[[127299,127299],"mapped",[116]],[[127300,127300],"mapped",[117]],[[127301,127301],"mapped",[118]],[[127302,127302],"mapped",[119]],[[127303,127303],"mapped",[120]],[[127304,127304],"mapped",[121]],[[127305,127305],"mapped",[122]],[[127306,127306],"mapped",[104,118]],[[127307,127307],"mapped",[109,118]],[[127308,127308],"mapped",[115,100]],[[127309,127309],"mapped",[115,115]],[[127310,127310],"mapped",[112,112,118]],[[127311,127311],"mapped",[119,99]],[[127312,127318],"valid",[],"NV8"],[[127319,127319],"valid",[],"NV8"],[[127320,127326],"valid",[],"NV8"],[[127327,127327],"valid",[],"NV8"],[[127328,127337],"valid",[],"NV8"],[[127338,127338],"mapped",[109,99]],[[127339,127339],"mapped",[109,100]],[[127340,127343],"disallowed"],[[127344,127352],"valid",[],"NV8"],[[127353,127353],"valid",[],"NV8"],[[127354,127354],"valid",[],"NV8"],[[127355,127356],"valid",[],"NV8"],[[127357,127358],"valid",[],"NV8"],[[127359,127359],"valid",[],"NV8"],[[127360,127369],"valid",[],"NV8"],[[127370,127373],"valid",[],"NV8"],[[127374,127375],"valid",[],"NV8"],[[127376,127376],"mapped",[100,106]],[[127377,127386],"valid",[],"NV8"],[[127387,127461],"disallowed"],[[127462,127487],"valid",[],"NV8"],[[127488,127488],"mapped",[12411,12363]],[[127489,127489],"mapped",[12467,12467]],[[127490,127490],"mapped",[12469]],[[127491,127503],"disallowed"],[[127504,127504],"mapped",[25163]],[[127505,127505],"mapped",[23383]],[[127506,127506],"mapped",[21452]],[[127507,127507],"mapped",[12487]],[[127508,127508],"mapped",[20108]],[[127509,127509],"mapped",[22810]],[[127510,127510],"mapped",[35299]],[[127511,127511],"mapped",[22825]],[[127512,127512],"mapped",[20132]],[[127513,127513],"mapped",[26144]],[[127514,127514],"mapped",[28961]],[[127515,127515],"mapped",[26009]],[[127516,127516],"mapped",[21069]],[[127517,127517],"mapped",[24460]],[[127518,127518],"mapped",[20877]],[[127519,127519],"mapped",[26032]],[[127520,127520],"mapped",[21021]],[[127521,127521],"mapped",[32066]],[[127522,127522],"mapped",[29983]],[[127523,127523],"mapped",[36009]],[[127524,127524],"mapped",[22768]],[[127525,127525],"mapped",[21561]],[[127526,127526],"mapped",[28436]],[[127527,127527],"mapped",[25237]],[[127528,127528],"mapped",[25429]],[[127529,127529],"mapped",[19968]],[[127530,127530],"mapped",[19977]],[[127531,127531],"mapped",[36938]],[[127532,127532],"mapped",[24038]],[[127533,127533],"mapped",[20013]],[[127534,127534],"mapped",[21491]],[[127535,127535],"mapped",[25351]],[[127536,127536],"mapped",[36208]],[[127537,127537],"mapped",[25171]],[[127538,127538],"mapped",[31105]],[[127539,127539],"mapped",[31354]],[[127540,127540],"mapped",[21512]],[[127541,127541],"mapped",[28288]],[[127542,127542],"mapped",[26377]],[[127543,127543],"mapped",[26376]],[[127544,127544],"mapped",[30003]],[[127545,127545],"mapped",[21106]],[[127546,127546],"mapped",[21942]],[[127547,127551],"disallowed"],[[127552,127552],"mapped",[12308,26412,12309]],[[127553,127553],"mapped",[12308,19977,12309]],[[127554,127554],"mapped",[12308,20108,12309]],[[127555,127555],"mapped",[12308,23433,12309]],[[127556,127556],"mapped",[12308,28857,12309]],[[127557,127557],"mapped",[12308,25171,12309]],[[127558,127558],"mapped",[12308,30423,12309]],[[127559,127559],"mapped",[12308,21213,12309]],[[127560,127560],"mapped",[12308,25943,12309]],[[127561,127567],"disallowed"],[[127568,127568],"mapped",[24471]],[[127569,127569],"mapped",[21487]],[[127570,127743],"disallowed"],[[127744,127776],"valid",[],"NV8"],[[127777,127788],"valid",[],"NV8"],[[127789,127791],"valid",[],"NV8"],[[127792,127797],"valid",[],"NV8"],[[127798,127798],"valid",[],"NV8"],[[127799,127868],"valid",[],"NV8"],[[127869,127869],"valid",[],"NV8"],[[127870,127871],"valid",[],"NV8"],[[127872,127891],"valid",[],"NV8"],[[127892,127903],"valid",[],"NV8"],[[127904,127940],"valid",[],"NV8"],[[127941,127941],"valid",[],"NV8"],[[127942,127946],"valid",[],"NV8"],[[127947,127950],"valid",[],"NV8"],[[127951,127955],"valid",[],"NV8"],[[127956,127967],"valid",[],"NV8"],[[127968,127984],"valid",[],"NV8"],[[127985,127991],"valid",[],"NV8"],[[127992,127999],"valid",[],"NV8"],[[128000,128062],"valid",[],"NV8"],[[128063,128063],"valid",[],"NV8"],[[128064,128064],"valid",[],"NV8"],[[128065,128065],"valid",[],"NV8"],[[128066,128247],"valid",[],"NV8"],[[128248,128248],"valid",[],"NV8"],[[128249,128252],"valid",[],"NV8"],[[128253,128254],"valid",[],"NV8"],[[128255,128255],"valid",[],"NV8"],[[128256,128317],"valid",[],"NV8"],[[128318,128319],"valid",[],"NV8"],[[128320,128323],"valid",[],"NV8"],[[128324,128330],"valid",[],"NV8"],[[128331,128335],"valid",[],"NV8"],[[128336,128359],"valid",[],"NV8"],[[128360,128377],"valid",[],"NV8"],[[128378,128378],"disallowed"],[[128379,128419],"valid",[],"NV8"],[[128420,128420],"disallowed"],[[128421,128506],"valid",[],"NV8"],[[128507,128511],"valid",[],"NV8"],[[128512,128512],"valid",[],"NV8"],[[128513,128528],"valid",[],"NV8"],[[128529,128529],"valid",[],"NV8"],[[128530,128532],"valid",[],"NV8"],[[128533,128533],"valid",[],"NV8"],[[128534,128534],"valid",[],"NV8"],[[128535,128535],"valid",[],"NV8"],[[128536,128536],"valid",[],"NV8"],[[128537,128537],"valid",[],"NV8"],[[128538,128538],"valid",[],"NV8"],[[128539,128539],"valid",[],"NV8"],[[128540,128542],"valid",[],"NV8"],[[128543,128543],"valid",[],"NV8"],[[128544,128549],"valid",[],"NV8"],[[128550,128551],"valid",[],"NV8"],[[128552,128555],"valid",[],"NV8"],[[128556,128556],"valid",[],"NV8"],[[128557,128557],"valid",[],"NV8"],[[128558,128559],"valid",[],"NV8"],[[128560,128563],"valid",[],"NV8"],[[128564,128564],"valid",[],"NV8"],[[128565,128576],"valid",[],"NV8"],[[128577,128578],"valid",[],"NV8"],[[128579,128580],"valid",[],"NV8"],[[128581,128591],"valid",[],"NV8"],[[128592,128639],"valid",[],"NV8"],[[128640,128709],"valid",[],"NV8"],[[128710,128719],"valid",[],"NV8"],[[128720,128720],"valid",[],"NV8"],[[128721,128735],"disallowed"],[[128736,128748],"valid",[],"NV8"],[[128749,128751],"disallowed"],[[128752,128755],"valid",[],"NV8"],[[128756,128767],"disallowed"],[[128768,128883],"valid",[],"NV8"],[[128884,128895],"disallowed"],[[128896,128980],"valid",[],"NV8"],[[128981,129023],"disallowed"],[[129024,129035],"valid",[],"NV8"],[[129036,129039],"disallowed"],[[129040,129095],"valid",[],"NV8"],[[129096,129103],"disallowed"],[[129104,129113],"valid",[],"NV8"],[[129114,129119],"disallowed"],[[129120,129159],"valid",[],"NV8"],[[129160,129167],"disallowed"],[[129168,129197],"valid",[],"NV8"],[[129198,129295],"disallowed"],[[129296,129304],"valid",[],"NV8"],[[129305,129407],"disallowed"],[[129408,129412],"valid",[],"NV8"],[[129413,129471],"disallowed"],[[129472,129472],"valid",[],"NV8"],[[129473,131069],"disallowed"],[[131070,131071],"disallowed"],[[131072,173782],"valid"],[[173783,173823],"disallowed"],[[173824,177972],"valid"],[[177973,177983],"disallowed"],[[177984,178205],"valid"],[[178206,178207],"disallowed"],[[178208,183969],"valid"],[[183970,194559],"disallowed"],[[194560,194560],"mapped",[20029]],[[194561,194561],"mapped",[20024]],[[194562,194562],"mapped",[20033]],[[194563,194563],"mapped",[131362]],[[194564,194564],"mapped",[20320]],[[194565,194565],"mapped",[20398]],[[194566,194566],"mapped",[20411]],[[194567,194567],"mapped",[20482]],[[194568,194568],"mapped",[20602]],[[194569,194569],"mapped",[20633]],[[194570,194570],"mapped",[20711]],[[194571,194571],"mapped",[20687]],[[194572,194572],"mapped",[13470]],[[194573,194573],"mapped",[132666]],[[194574,194574],"mapped",[20813]],[[194575,194575],"mapped",[20820]],[[194576,194576],"mapped",[20836]],[[194577,194577],"mapped",[20855]],[[194578,194578],"mapped",[132380]],[[194579,194579],"mapped",[13497]],[[194580,194580],"mapped",[20839]],[[194581,194581],"mapped",[20877]],[[194582,194582],"mapped",[132427]],[[194583,194583],"mapped",[20887]],[[194584,194584],"mapped",[20900]],[[194585,194585],"mapped",[20172]],[[194586,194586],"mapped",[20908]],[[194587,194587],"mapped",[20917]],[[194588,194588],"mapped",[168415]],[[194589,194589],"mapped",[20981]],[[194590,194590],"mapped",[20995]],[[194591,194591],"mapped",[13535]],[[194592,194592],"mapped",[21051]],[[194593,194593],"mapped",[21062]],[[194594,194594],"mapped",[21106]],[[194595,194595],"mapped",[21111]],[[194596,194596],"mapped",[13589]],[[194597,194597],"mapped",[21191]],[[194598,194598],"mapped",[21193]],[[194599,194599],"mapped",[21220]],[[194600,194600],"mapped",[21242]],[[194601,194601],"mapped",[21253]],[[194602,194602],"mapped",[21254]],[[194603,194603],"mapped",[21271]],[[194604,194604],"mapped",[21321]],[[194605,194605],"mapped",[21329]],[[194606,194606],"mapped",[21338]],[[194607,194607],"mapped",[21363]],[[194608,194608],"mapped",[21373]],[[194609,194611],"mapped",[21375]],[[194612,194612],"mapped",[133676]],[[194613,194613],"mapped",[28784]],[[194614,194614],"mapped",[21450]],[[194615,194615],"mapped",[21471]],[[194616,194616],"mapped",[133987]],[[194617,194617],"mapped",[21483]],[[194618,194618],"mapped",[21489]],[[194619,194619],"mapped",[21510]],[[194620,194620],"mapped",[21662]],[[194621,194621],"mapped",[21560]],[[194622,194622],"mapped",[21576]],[[194623,194623],"mapped",[21608]],[[194624,194624],"mapped",[21666]],[[194625,194625],"mapped",[21750]],[[194626,194626],"mapped",[21776]],[[194627,194627],"mapped",[21843]],[[194628,194628],"mapped",[21859]],[[194629,194630],"mapped",[21892]],[[194631,194631],"mapped",[21913]],[[194632,194632],"mapped",[21931]],[[194633,194633],"mapped",[21939]],[[194634,194634],"mapped",[21954]],[[194635,194635],"mapped",[22294]],[[194636,194636],"mapped",[22022]],[[194637,194637],"mapped",[22295]],[[194638,194638],"mapped",[22097]],[[194639,194639],"mapped",[22132]],[[194640,194640],"mapped",[20999]],[[194641,194641],"mapped",[22766]],[[194642,194642],"mapped",[22478]],[[194643,194643],"mapped",[22516]],[[194644,194644],"mapped",[22541]],[[194645,194645],"mapped",[22411]],[[194646,194646],"mapped",[22578]],[[194647,194647],"mapped",[22577]],[[194648,194648],"mapped",[22700]],[[194649,194649],"mapped",[136420]],[[194650,194650],"mapped",[22770]],[[194651,194651],"mapped",[22775]],[[194652,194652],"mapped",[22790]],[[194653,194653],"mapped",[22810]],[[194654,194654],"mapped",[22818]],[[194655,194655],"mapped",[22882]],[[194656,194656],"mapped",[136872]],[[194657,194657],"mapped",[136938]],[[194658,194658],"mapped",[23020]],[[194659,194659],"mapped",[23067]],[[194660,194660],"mapped",[23079]],[[194661,194661],"mapped",[23000]],[[194662,194662],"mapped",[23142]],[[194663,194663],"mapped",[14062]],[[194664,194664],"disallowed"],[[194665,194665],"mapped",[23304]],[[194666,194667],"mapped",[23358]],[[194668,194668],"mapped",[137672]],[[194669,194669],"mapped",[23491]],[[194670,194670],"mapped",[23512]],[[194671,194671],"mapped",[23527]],[[194672,194672],"mapped",[23539]],[[194673,194673],"mapped",[138008]],[[194674,194674],"mapped",[23551]],[[194675,194675],"mapped",[23558]],[[194676,194676],"disallowed"],[[194677,194677],"mapped",[23586]],[[194678,194678],"mapped",[14209]],[[194679,194679],"mapped",[23648]],[[194680,194680],"mapped",[23662]],[[194681,194681],"mapped",[23744]],[[194682,194682],"mapped",[23693]],[[194683,194683],"mapped",[138724]],[[194684,194684],"mapped",[23875]],[[194685,194685],"mapped",[138726]],[[194686,194686],"mapped",[23918]],[[194687,194687],"mapped",[23915]],[[194688,194688],"mapped",[23932]],[[194689,194689],"mapped",[24033]],[[194690,194690],"mapped",[24034]],[[194691,194691],"mapped",[14383]],[[194692,194692],"mapped",[24061]],[[194693,194693],"mapped",[24104]],[[194694,194694],"mapped",[24125]],[[194695,194695],"mapped",[24169]],[[194696,194696],"mapped",[14434]],[[194697,194697],"mapped",[139651]],[[194698,194698],"mapped",[14460]],[[194699,194699],"mapped",[24240]],[[194700,194700],"mapped",[24243]],[[194701,194701],"mapped",[24246]],[[194702,194702],"mapped",[24266]],[[194703,194703],"mapped",[172946]],[[194704,194704],"mapped",[24318]],[[194705,194706],"mapped",[140081]],[[194707,194707],"mapped",[33281]],[[194708,194709],"mapped",[24354]],[[194710,194710],"mapped",[14535]],[[194711,194711],"mapped",[144056]],[[194712,194712],"mapped",[156122]],[[194713,194713],"mapped",[24418]],[[194714,194714],"mapped",[24427]],[[194715,194715],"mapped",[14563]],[[194716,194716],"mapped",[24474]],[[194717,194717],"mapped",[24525]],[[194718,194718],"mapped",[24535]],[[194719,194719],"mapped",[24569]],[[194720,194720],"mapped",[24705]],[[194721,194721],"mapped",[14650]],[[194722,194722],"mapped",[14620]],[[194723,194723],"mapped",[24724]],[[194724,194724],"mapped",[141012]],[[194725,194725],"mapped",[24775]],[[194726,194726],"mapped",[24904]],[[194727,194727],"mapped",[24908]],[[194728,194728],"mapped",[24910]],[[194729,194729],"mapped",[24908]],[[194730,194730],"mapped",[24954]],[[194731,194731],"mapped",[24974]],[[194732,194732],"mapped",[25010]],[[194733,194733],"mapped",[24996]],[[194734,194734],"mapped",[25007]],[[194735,194735],"mapped",[25054]],[[194736,194736],"mapped",[25074]],[[194737,194737],"mapped",[25078]],[[194738,194738],"mapped",[25104]],[[194739,194739],"mapped",[25115]],[[194740,194740],"mapped",[25181]],[[194741,194741],"mapped",[25265]],[[194742,194742],"mapped",[25300]],[[194743,194743],"mapped",[25424]],[[194744,194744],"mapped",[142092]],[[194745,194745],"mapped",[25405]],[[194746,194746],"mapped",[25340]],[[194747,194747],"mapped",[25448]],[[194748,194748],"mapped",[25475]],[[194749,194749],"mapped",[25572]],[[194750,194750],"mapped",[142321]],[[194751,194751],"mapped",[25634]],[[194752,194752],"mapped",[25541]],[[194753,194753],"mapped",[25513]],[[194754,194754],"mapped",[14894]],[[194755,194755],"mapped",[25705]],[[194756,194756],"mapped",[25726]],[[194757,194757],"mapped",[25757]],[[194758,194758],"mapped",[25719]],[[194759,194759],"mapped",[14956]],[[194760,194760],"mapped",[25935]],[[194761,194761],"mapped",[25964]],[[194762,194762],"mapped",[143370]],[[194763,194763],"mapped",[26083]],[[194764,194764],"mapped",[26360]],[[194765,194765],"mapped",[26185]],[[194766,194766],"mapped",[15129]],[[194767,194767],"mapped",[26257]],[[194768,194768],"mapped",[15112]],[[194769,194769],"mapped",[15076]],[[194770,194770],"mapped",[20882]],[[194771,194771],"mapped",[20885]],[[194772,194772],"mapped",[26368]],[[194773,194773],"mapped",[26268]],[[194774,194774],"mapped",[32941]],[[194775,194775],"mapped",[17369]],[[194776,194776],"mapped",[26391]],[[194777,194777],"mapped",[26395]],[[194778,194778],"mapped",[26401]],[[194779,194779],"mapped",[26462]],[[194780,194780],"mapped",[26451]],[[194781,194781],"mapped",[144323]],[[194782,194782],"mapped",[15177]],[[194783,194783],"mapped",[26618]],[[194784,194784],"mapped",[26501]],[[194785,194785],"mapped",[26706]],[[194786,194786],"mapped",[26757]],[[194787,194787],"mapped",[144493]],[[194788,194788],"mapped",[26766]],[[194789,194789],"mapped",[26655]],[[194790,194790],"mapped",[26900]],[[194791,194791],"mapped",[15261]],[[194792,194792],"mapped",[26946]],[[194793,194793],"mapped",[27043]],[[194794,194794],"mapped",[27114]],[[194795,194795],"mapped",[27304]],[[194796,194796],"mapped",[145059]],[[194797,194797],"mapped",[27355]],[[194798,194798],"mapped",[15384]],[[194799,194799],"mapped",[27425]],[[194800,194800],"mapped",[145575]],[[194801,194801],"mapped",[27476]],[[194802,194802],"mapped",[15438]],[[194803,194803],"mapped",[27506]],[[194804,194804],"mapped",[27551]],[[194805,194805],"mapped",[27578]],[[194806,194806],"mapped",[27579]],[[194807,194807],"mapped",[146061]],[[194808,194808],"mapped",[138507]],[[194809,194809],"mapped",[146170]],[[194810,194810],"mapped",[27726]],[[194811,194811],"mapped",[146620]],[[194812,194812],"mapped",[27839]],[[194813,194813],"mapped",[27853]],[[194814,194814],"mapped",[27751]],[[194815,194815],"mapped",[27926]],[[194816,194816],"mapped",[27966]],[[194817,194817],"mapped",[28023]],[[194818,194818],"mapped",[27969]],[[194819,194819],"mapped",[28009]],[[194820,194820],"mapped",[28024]],[[194821,194821],"mapped",[28037]],[[194822,194822],"mapped",[146718]],[[194823,194823],"mapped",[27956]],[[194824,194824],"mapped",[28207]],[[194825,194825],"mapped",[28270]],[[194826,194826],"mapped",[15667]],[[194827,194827],"mapped",[28363]],[[194828,194828],"mapped",[28359]],[[194829,194829],"mapped",[147153]],[[194830,194830],"mapped",[28153]],[[194831,194831],"mapped",[28526]],[[194832,194832],"mapped",[147294]],[[194833,194833],"mapped",[147342]],[[194834,194834],"mapped",[28614]],[[194835,194835],"mapped",[28729]],[[194836,194836],"mapped",[28702]],[[194837,194837],"mapped",[28699]],[[194838,194838],"mapped",[15766]],[[194839,194839],"mapped",[28746]],[[194840,194840],"mapped",[28797]],[[194841,194841],"mapped",[28791]],[[194842,194842],"mapped",[28845]],[[194843,194843],"mapped",[132389]],[[194844,194844],"mapped",[28997]],[[194845,194845],"mapped",[148067]],[[194846,194846],"mapped",[29084]],[[194847,194847],"disallowed"],[[194848,194848],"mapped",[29224]],[[194849,194849],"mapped",[29237]],[[194850,194850],"mapped",[29264]],[[194851,194851],"mapped",[149000]],[[194852,194852],"mapped",[29312]],[[194853,194853],"mapped",[29333]],[[194854,194854],"mapped",[149301]],[[194855,194855],"mapped",[149524]],[[194856,194856],"mapped",[29562]],[[194857,194857],"mapped",[29579]],[[194858,194858],"mapped",[16044]],[[194859,194859],"mapped",[29605]],[[194860,194861],"mapped",[16056]],[[194862,194862],"mapped",[29767]],[[194863,194863],"mapped",[29788]],[[194864,194864],"mapped",[29809]],[[194865,194865],"mapped",[29829]],[[194866,194866],"mapped",[29898]],[[194867,194867],"mapped",[16155]],[[194868,194868],"mapped",[29988]],[[194869,194869],"mapped",[150582]],[[194870,194870],"mapped",[30014]],[[194871,194871],"mapped",[150674]],[[194872,194872],"mapped",[30064]],[[194873,194873],"mapped",[139679]],[[194874,194874],"mapped",[30224]],[[194875,194875],"mapped",[151457]],[[194876,194876],"mapped",[151480]],[[194877,194877],"mapped",[151620]],[[194878,194878],"mapped",[16380]],[[194879,194879],"mapped",[16392]],[[194880,194880],"mapped",[30452]],[[194881,194881],"mapped",[151795]],[[194882,194882],"mapped",[151794]],[[194883,194883],"mapped",[151833]],[[194884,194884],"mapped",[151859]],[[194885,194885],"mapped",[30494]],[[194886,194887],"mapped",[30495]],[[194888,194888],"mapped",[30538]],[[194889,194889],"mapped",[16441]],[[194890,194890],"mapped",[30603]],[[194891,194891],"mapped",[16454]],[[194892,194892],"mapped",[16534]],[[194893,194893],"mapped",[152605]],[[194894,194894],"mapped",[30798]],[[194895,194895],"mapped",[30860]],[[194896,194896],"mapped",[30924]],[[194897,194897],"mapped",[16611]],[[194898,194898],"mapped",[153126]],[[194899,194899],"mapped",[31062]],[[194900,194900],"mapped",[153242]],[[194901,194901],"mapped",[153285]],[[194902,194902],"mapped",[31119]],[[194903,194903],"mapped",[31211]],[[194904,194904],"mapped",[16687]],[[194905,194905],"mapped",[31296]],[[194906,194906],"mapped",[31306]],[[194907,194907],"mapped",[31311]],[[194908,194908],"mapped",[153980]],[[194909,194910],"mapped",[154279]],[[194911,194911],"disallowed"],[[194912,194912],"mapped",[16898]],[[194913,194913],"mapped",[154539]],[[194914,194914],"mapped",[31686]],[[194915,194915],"mapped",[31689]],[[194916,194916],"mapped",[16935]],[[194917,194917],"mapped",[154752]],[[194918,194918],"mapped",[31954]],[[194919,194919],"mapped",[17056]],[[194920,194920],"mapped",[31976]],[[194921,194921],"mapped",[31971]],[[194922,194922],"mapped",[32000]],[[194923,194923],"mapped",[155526]],[[194924,194924],"mapped",[32099]],[[194925,194925],"mapped",[17153]],[[194926,194926],"mapped",[32199]],[[194927,194927],"mapped",[32258]],[[194928,194928],"mapped",[32325]],[[194929,194929],"mapped",[17204]],[[194930,194930],"mapped",[156200]],[[194931,194931],"mapped",[156231]],[[194932,194932],"mapped",[17241]],[[194933,194933],"mapped",[156377]],[[194934,194934],"mapped",[32634]],[[194935,194935],"mapped",[156478]],[[194936,194936],"mapped",[32661]],[[194937,194937],"mapped",[32762]],[[194938,194938],"mapped",[32773]],[[194939,194939],"mapped",[156890]],[[194940,194940],"mapped",[156963]],[[194941,194941],"mapped",[32864]],[[194942,194942],"mapped",[157096]],[[194943,194943],"mapped",[32880]],[[194944,194944],"mapped",[144223]],[[194945,194945],"mapped",[17365]],[[194946,194946],"mapped",[32946]],[[194947,194947],"mapped",[33027]],[[194948,194948],"mapped",[17419]],[[194949,194949],"mapped",[33086]],[[194950,194950],"mapped",[23221]],[[194951,194951],"mapped",[157607]],[[194952,194952],"mapped",[157621]],[[194953,194953],"mapped",[144275]],[[194954,194954],"mapped",[144284]],[[194955,194955],"mapped",[33281]],[[194956,194956],"mapped",[33284]],[[194957,194957],"mapped",[36766]],[[194958,194958],"mapped",[17515]],[[194959,194959],"mapped",[33425]],[[194960,194960],"mapped",[33419]],[[194961,194961],"mapped",[33437]],[[194962,194962],"mapped",[21171]],[[194963,194963],"mapped",[33457]],[[194964,194964],"mapped",[33459]],[[194965,194965],"mapped",[33469]],[[194966,194966],"mapped",[33510]],[[194967,194967],"mapped",[158524]],[[194968,194968],"mapped",[33509]],[[194969,194969],"mapped",[33565]],[[194970,194970],"mapped",[33635]],[[194971,194971],"mapped",[33709]],[[194972,194972],"mapped",[33571]],[[194973,194973],"mapped",[33725]],[[194974,194974],"mapped",[33767]],[[194975,194975],"mapped",[33879]],[[194976,194976],"mapped",[33619]],[[194977,194977],"mapped",[33738]],[[194978,194978],"mapped",[33740]],[[194979,194979],"mapped",[33756]],[[194980,194980],"mapped",[158774]],[[194981,194981],"mapped",[159083]],[[194982,194982],"mapped",[158933]],[[194983,194983],"mapped",[17707]],[[194984,194984],"mapped",[34033]],[[194985,194985],"mapped",[34035]],[[194986,194986],"mapped",[34070]],[[194987,194987],"mapped",[160714]],[[194988,194988],"mapped",[34148]],[[194989,194989],"mapped",[159532]],[[194990,194990],"mapped",[17757]],[[194991,194991],"mapped",[17761]],[[194992,194992],"mapped",[159665]],[[194993,194993],"mapped",[159954]],[[194994,194994],"mapped",[17771]],[[194995,194995],"mapped",[34384]],[[194996,194996],"mapped",[34396]],[[194997,194997],"mapped",[34407]],[[194998,194998],"mapped",[34409]],[[194999,194999],"mapped",[34473]],[[195000,195000],"mapped",[34440]],[[195001,195001],"mapped",[34574]],[[195002,195002],"mapped",[34530]],[[195003,195003],"mapped",[34681]],[[195004,195004],"mapped",[34600]],[[195005,195005],"mapped",[34667]],[[195006,195006],"mapped",[34694]],[[195007,195007],"disallowed"],[[195008,195008],"mapped",[34785]],[[195009,195009],"mapped",[34817]],[[195010,195010],"mapped",[17913]],[[195011,195011],"mapped",[34912]],[[195012,195012],"mapped",[34915]],[[195013,195013],"mapped",[161383]],[[195014,195014],"mapped",[35031]],[[195015,195015],"mapped",[35038]],[[195016,195016],"mapped",[17973]],[[195017,195017],"mapped",[35066]],[[195018,195018],"mapped",[13499]],[[195019,195019],"mapped",[161966]],[[195020,195020],"mapped",[162150]],[[195021,195021],"mapped",[18110]],[[195022,195022],"mapped",[18119]],[[195023,195023],"mapped",[35488]],[[195024,195024],"mapped",[35565]],[[195025,195025],"mapped",[35722]],[[195026,195026],"mapped",[35925]],[[195027,195027],"mapped",[162984]],[[195028,195028],"mapped",[36011]],[[195029,195029],"mapped",[36033]],[[195030,195030],"mapped",[36123]],[[195031,195031],"mapped",[36215]],[[195032,195032],"mapped",[163631]],[[195033,195033],"mapped",[133124]],[[195034,195034],"mapped",[36299]],[[195035,195035],"mapped",[36284]],[[195036,195036],"mapped",[36336]],[[195037,195037],"mapped",[133342]],[[195038,195038],"mapped",[36564]],[[195039,195039],"mapped",[36664]],[[195040,195040],"mapped",[165330]],[[195041,195041],"mapped",[165357]],[[195042,195042],"mapped",[37012]],[[195043,195043],"mapped",[37105]],[[195044,195044],"mapped",[37137]],[[195045,195045],"mapped",[165678]],[[195046,195046],"mapped",[37147]],[[195047,195047],"mapped",[37432]],[[195048,195048],"mapped",[37591]],[[195049,195049],"mapped",[37592]],[[195050,195050],"mapped",[37500]],[[195051,195051],"mapped",[37881]],[[195052,195052],"mapped",[37909]],[[195053,195053],"mapped",[166906]],[[195054,195054],"mapped",[38283]],[[195055,195055],"mapped",[18837]],[[195056,195056],"mapped",[38327]],[[195057,195057],"mapped",[167287]],[[195058,195058],"mapped",[18918]],[[195059,195059],"mapped",[38595]],[[195060,195060],"mapped",[23986]],[[195061,195061],"mapped",[38691]],[[195062,195062],"mapped",[168261]],[[195063,195063],"mapped",[168474]],[[195064,195064],"mapped",[19054]],[[195065,195065],"mapped",[19062]],[[195066,195066],"mapped",[38880]],[[195067,195067],"mapped",[168970]],[[195068,195068],"mapped",[19122]],[[195069,195069],"mapped",[169110]],[[195070,195071],"mapped",[38923]],[[195072,195072],"mapped",[38953]],[[195073,195073],"mapped",[169398]],[[195074,195074],"mapped",[39138]],[[195075,195075],"mapped",[19251]],[[195076,195076],"mapped",[39209]],[[195077,195077],"mapped",[39335]],[[195078,195078],"mapped",[39362]],[[195079,195079],"mapped",[39422]],[[195080,195080],"mapped",[19406]],[[195081,195081],"mapped",[170800]],[[195082,195082],"mapped",[39698]],[[195083,195083],"mapped",[40000]],[[195084,195084],"mapped",[40189]],[[195085,195085],"mapped",[19662]],[[195086,195086],"mapped",[19693]],[[195087,195087],"mapped",[40295]],[[195088,195088],"mapped",[172238]],[[195089,195089],"mapped",[19704]],[[195090,195090],"mapped",[172293]],[[195091,195091],"mapped",[172558]],[[195092,195092],"mapped",[172689]],[[195093,195093],"mapped",[40635]],[[195094,195094],"mapped",[19798]],[[195095,195095],"mapped",[40697]],[[195096,195096],"mapped",[40702]],[[195097,195097],"mapped",[40709]],[[195098,195098],"mapped",[40719]],[[195099,195099],"mapped",[40726]],[[195100,195100],"mapped",[40763]],[[195101,195101],"mapped",[173568]],[[195102,196605],"disallowed"],[[196606,196607],"disallowed"],[[196608,262141],"disallowed"],[[262142,262143],"disallowed"],[[262144,327677],"disallowed"],[[327678,327679],"disallowed"],[[327680,393213],"disallowed"],[[393214,393215],"disallowed"],[[393216,458749],"disallowed"],[[458750,458751],"disallowed"],[[458752,524285],"disallowed"],[[524286,524287],"disallowed"],[[524288,589821],"disallowed"],[[589822,589823],"disallowed"],[[589824,655357],"disallowed"],[[655358,655359],"disallowed"],[[655360,720893],"disallowed"],[[720894,720895],"disallowed"],[[720896,786429],"disallowed"],[[786430,786431],"disallowed"],[[786432,851965],"disallowed"],[[851966,851967],"disallowed"],[[851968,917501],"disallowed"],[[917502,917503],"disallowed"],[[917504,917504],"disallowed"],[[917505,917505],"disallowed"],[[917506,917535],"disallowed"],[[917536,917631],"disallowed"],[[917632,917759],"disallowed"],[[917760,917999],"ignored"],[[918000,983037],"disallowed"],[[983038,983039],"disallowed"],[[983040,1048573],"disallowed"],[[1048574,1048575],"disallowed"],[[1048576,1114109],"disallowed"],[[1114110,1114111],"disallowed"]]');
|
||
|
||
/***/ })
|
||
|
||
/******/ });
|
||
/************************************************************************/
|
||
/******/ // 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] = {
|
||
/******/ id: moduleId,
|
||
/******/ loaded: false,
|
||
/******/ 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];
|
||
/******/ }
|
||
/******/
|
||
/******/ // Flag the module as loaded
|
||
/******/ module.loaded = true;
|
||
/******/
|
||
/******/ // Return the exports of the module
|
||
/******/ return module.exports;
|
||
/******/ }
|
||
/******/
|
||
/******/ // expose the modules object (__webpack_modules__)
|
||
/******/ __nccwpck_require__.m = __webpack_modules__;
|
||
/******/
|
||
/************************************************************************/
|
||
/******/ /* 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/ensure chunk */
|
||
/******/ (() => {
|
||
/******/ __nccwpck_require__.f = {};
|
||
/******/ // This file contains only the entry chunk.
|
||
/******/ // The chunk loading function for additional chunks
|
||
/******/ __nccwpck_require__.e = (chunkId) => {
|
||
/******/ return Promise.all(Object.keys(__nccwpck_require__.f).reduce((promises, key) => {
|
||
/******/ __nccwpck_require__.f[key](chunkId, promises);
|
||
/******/ return promises;
|
||
/******/ }, []));
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/get javascript chunk filename */
|
||
/******/ (() => {
|
||
/******/ // This function allow to reference async chunks
|
||
/******/ __nccwpck_require__.u = (chunkId) => {
|
||
/******/ // return url for filenames based on template
|
||
/******/ return "" + chunkId + ".index.js";
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* 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/node module decorator */
|
||
/******/ (() => {
|
||
/******/ __nccwpck_require__.nmd = (module) => {
|
||
/******/ module.paths = [];
|
||
/******/ if (!module.children) module.children = [];
|
||
/******/ return module;
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/compat */
|
||
/******/
|
||
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
||
/******/
|
||
/******/ /* webpack/runtime/require chunk loading */
|
||
/******/ (() => {
|
||
/******/ // no baseURI
|
||
/******/
|
||
/******/ // object to store loaded chunks
|
||
/******/ // "1" means "loaded", otherwise not loaded yet
|
||
/******/ var installedChunks = {
|
||
/******/ 179: 1
|
||
/******/ };
|
||
/******/
|
||
/******/ // no on chunks loaded
|
||
/******/
|
||
/******/ var installChunk = (chunk) => {
|
||
/******/ var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;
|
||
/******/ for(var moduleId in moreModules) {
|
||
/******/ if(__nccwpck_require__.o(moreModules, moduleId)) {
|
||
/******/ __nccwpck_require__.m[moduleId] = moreModules[moduleId];
|
||
/******/ }
|
||
/******/ }
|
||
/******/ if(runtime) runtime(__nccwpck_require__);
|
||
/******/ for(var i = 0; i < chunkIds.length; i++)
|
||
/******/ installedChunks[chunkIds[i]] = 1;
|
||
/******/
|
||
/******/ };
|
||
/******/
|
||
/******/ // require() chunk loading for javascript
|
||
/******/ __nccwpck_require__.f.require = (chunkId, promises) => {
|
||
/******/ // "1" is the signal for "already loaded"
|
||
/******/ if(!installedChunks[chunkId]) {
|
||
/******/ if(true) { // all chunks have JS
|
||
/******/ installChunk(require("./" + __nccwpck_require__.u(chunkId)));
|
||
/******/ } else installedChunks[chunkId] = 1;
|
||
/******/ }
|
||
/******/ };
|
||
/******/
|
||
/******/ // no external install chunk
|
||
/******/
|
||
/******/ // no HMR
|
||
/******/
|
||
/******/ // no HMR manifest
|
||
/******/ })();
|
||
/******/
|
||
/************************************************************************/
|
||
/******/
|
||
/******/ // startup
|
||
/******/ // Load entry module and return exports
|
||
/******/ // This entry module doesn't tell about it's top-level declarations so it can't be inlined
|
||
/******/ var __webpack_exports__ = __nccwpck_require__(4633);
|
||
/******/ module.exports = __webpack_exports__;
|
||
/******/
|
||
/******/ })()
|
||
;
|
||
//# sourceMappingURL=index.js.map |